Skip to content

Commit

Permalink
Internal Bridge Flow rate parameter introduction
Browse files Browse the repository at this point in the history
Updated internal bridging flow change and reverted bridge PR (SoftFever#2943)

Updated internal bridging flow change & reverted bridge PR

(cherry picked from commit ae9a2d5)
Internal Bridge Flow rate parameter introduction (SoftFever#2859)

* Internal Bridge Flow rate parameter introduction

* updated incorrect capitalisation

* Updated parameter ordering

(cherry picked from commit ce9a8d7)
  • Loading branch information
igiannakas authored and SoftFever committed Dec 1, 2023
1 parent 5676e0e commit 3a8b799
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4588,6 +4588,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
_mm3_per_mm *= m_config.top_solid_infill_flow_ratio;
else if (path.role() == erBottomSurface)
_mm3_per_mm *= m_config.bottom_solid_infill_flow_ratio;
else if (path.role() == erInternalBridgeInfill)
_mm3_per_mm *= m_config.internal_bridge_flow;


double e_per_mm = m_writer.extruder()->e_per_mm3() * _mm3_per_mm;
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 14 additions & 0 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -5702,6 +5711,11 @@ std::map<std::string, std::string> validate(const FullPrintConfig &cfg, bool und
if (cfg.bridge_flow <= 0) {
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) {
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/PrintObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,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.
Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3a8b799

Please sign in to comment.