mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Internal Bridge Flow rate parameter introduction (#2859)
* Internal Bridge Flow rate parameter introduction * updated incorrect capitalisation * Updated parameter ordering
This commit is contained in:
parent
cd35995402
commit
ce9a8d7b20
8 changed files with 24 additions and 6 deletions
|
@ -487,7 +487,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
|||
params.bridge = is_bridge || Fill::use_bridge_flow(params.pattern);
|
||||
params.flow = params.bridge ?
|
||||
//BBS: always enable thick bridge for internal bridge
|
||||
layerm.bridging_flow(extrusion_role, (surface.is_bridge() && !surface.is_external()) || object_config.thick_bridges) :
|
||||
layerm.bridging_flow(extrusion_role, (surface.is_bridge() && !surface.is_external()) || object_config.thick_bridges, params.extrusion_role == erInternalBridgeInfill) :
|
||||
layerm.flow(extrusion_role, (surface.thickness == -1) ? layer.height : surface.thickness);
|
||||
|
||||
// Calculate flow spacing for infill pattern generation.
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
|
||||
Flow flow(FlowRole role) const;
|
||||
Flow flow(FlowRole role, double layer_height) const;
|
||||
Flow bridging_flow(FlowRole role, bool thick_bridge = false) const;
|
||||
Flow bridging_flow(FlowRole role, bool thick_bridge = false, bool internal_bridge = false) const;
|
||||
|
||||
void slices_to_fill_surfaces_clipped();
|
||||
void prepare_fill_surfaces();
|
||||
|
|
|
@ -32,14 +32,16 @@ Flow LayerRegion::flow(FlowRole role, double layer_height) const
|
|||
return m_region->flow(*m_layer->object(), role, layer_height, m_layer->id() == 0);
|
||||
}
|
||||
|
||||
Flow LayerRegion::bridging_flow(FlowRole role, bool thick_bridge) const
|
||||
Flow LayerRegion::bridging_flow(FlowRole role, bool thick_bridge, bool internal_bridge) const
|
||||
{
|
||||
const PrintRegion ®ion = this->region();
|
||||
const PrintRegionConfig ®ion_config = region.config();
|
||||
const PrintObject &print_object = *this->layer()->object();
|
||||
Flow bridge_flow;
|
||||
auto nozzle_diameter = float(print_object.print()->config().nozzle_diameter.get_at(region.extruder(role) - 1));
|
||||
if (thick_bridge) {
|
||||
if(internal_bridge) { // internal bridge is using the thick bridge logic with the internal bridge flow ratio
|
||||
bridge_flow = Flow::bridging_flow(float(sqrt(region_config.internal_bridge_flow)) * nozzle_diameter, nozzle_diameter);
|
||||
} else if (thick_bridge) {
|
||||
// The old Slic3r way (different from all other slicers): Use rounded extrusions.
|
||||
// Get the configured nozzle_diameter for the extruder associated to the flow role requested.
|
||||
// Here this->extruder(role) - 1 may underflow to MAX_INT, but then the get_at() will follback to zero'th element, so everything is all right.
|
||||
|
|
|
@ -749,7 +749,7 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
"sparse_infill_filament", "solid_infill_filament", "support_filament", "support_interface_filament",
|
||||
"ooze_prevention", "standby_temperature_delta", "interface_shells", "line_width", "initial_layer_line_width",
|
||||
"inner_wall_line_width", "outer_wall_line_width", "sparse_infill_line_width", "internal_solid_infill_line_width",
|
||||
"top_surface_line_width", "support_line_width", "infill_wall_overlap", "bridge_flow",
|
||||
"top_surface_line_width", "support_line_width", "infill_wall_overlap", "bridge_flow", "internal_bridge_flow",
|
||||
"elefant_foot_compensation", "elefant_foot_compensation_layers", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower",
|
||||
"prime_tower_width", "prime_tower_brim_width", "prime_volume",
|
||||
"wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits",
|
||||
|
|
|
@ -776,6 +776,15 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(1));
|
||||
|
||||
def = this->add("internal_bridge_flow", coFloat);
|
||||
def->label = L("Internal bridge flow");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("This value governs the thickness of the internal bridge layer. This is the first layer over sparse infill. Decrease this value slightly (for example 0.9) to improve surface quality over sparse infill.");
|
||||
def->min = 0;
|
||||
def->max = 2.0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(1));
|
||||
|
||||
def = this->add("top_solid_infill_flow_ratio", coFloat);
|
||||
def->label = L("Top surface flow ratio");
|
||||
def->category = L("Advanced");
|
||||
|
@ -5711,6 +5720,11 @@ std::map<std::string, std::string> validate(const FullPrintConfig &cfg, bool und
|
|||
error_message.emplace("bridge_flow", L("invalid value ") + std::to_string(cfg.bridge_flow));
|
||||
}
|
||||
|
||||
// --bridge-flow-ratio
|
||||
if (cfg.bridge_flow <= 0) {
|
||||
error_message.emplace("internal_bridge_flow", L("invalid value ") + std::to_string(cfg.internal_bridge_flow));
|
||||
}
|
||||
|
||||
// extruder clearance
|
||||
if (cfg.extruder_clearance_radius <= 0) {
|
||||
error_message.emplace("extruder_clearance_radius", L("invalid value ") + std::to_string(cfg.extruder_clearance_radius));
|
||||
|
|
|
@ -796,6 +796,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionFloat, bottom_shell_thickness))
|
||||
((ConfigOptionFloat, bridge_angle))
|
||||
((ConfigOptionFloat, bridge_flow))
|
||||
((ConfigOptionFloat, internal_bridge_flow))
|
||||
((ConfigOptionFloat, bridge_speed))
|
||||
((ConfigOptionFloatOrPercent, internal_bridge_speed))
|
||||
((ConfigOptionBool, ensure_vertical_shell_thickness))
|
||||
|
|
|
@ -1106,7 +1106,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "overhang_speed_classic") {
|
||||
steps.emplace_back(posPerimeters);
|
||||
steps.emplace_back(posSupportMaterial);
|
||||
} else if (opt_key == "bridge_flow") {
|
||||
} else if (opt_key == "bridge_flow" || opt_key == "internal_bridge_flow") {
|
||||
if (m_config.support_top_z_distance > 0.) {
|
||||
// Only invalidate due to bridging if bridging is enabled.
|
||||
// If later "support_top_z_distance" is modified, the complete PrintObject is invalidated anyway.
|
||||
|
|
|
@ -1896,6 +1896,7 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("wall_infill_order");
|
||||
optgroup->append_single_option_line("print_flow_ratio");
|
||||
optgroup->append_single_option_line("bridge_flow");
|
||||
optgroup->append_single_option_line("internal_bridge_flow");
|
||||
optgroup->append_single_option_line("bridge_density");
|
||||
optgroup->append_single_option_line("thick_bridges");
|
||||
optgroup->append_single_option_line("top_solid_infill_flow_ratio");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue