diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index b34be89f9..4f9a8e65e 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -4900,14 +4900,14 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description, Overhang_threshold_none : EXTRUDER_CONFIG(overhang_fan_threshold) - 1; if ((EXTRUDER_CONFIG(overhang_fan_threshold) == Overhang_threshold_none && path.role() == erExternalPerimeter)) { gcode += ";_OVERHANG_FAN_START\n"; - comment = ";_EXTRUDE_SET_SPEED"; } else if (path.get_overhang_degree() > overhang_threshold || is_bridge(path.role())) gcode += ";_OVERHANG_FAN_START\n"; - else - comment = ";_EXTRUDE_SET_SPEED"; } - else { + + int overhang_boundary_for_cooling = EXTRUDER_CONFIG(overhang_threshold_participating_cooling); + + if (!is_bridge(path.role()) && path.get_overhang_degree() <= overhang_boundary_for_cooling) { comment = ";_EXTRUDE_SET_SPEED"; } diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index f48b2d719..6f59c8b4f 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -859,7 +859,7 @@ static std::vector s_Preset_filament_options { // "bed_type", //BBS:temperature_vitrification "temperature_vitrification", "reduce_fan_stop_start_freq", "slow_down_for_layer_cooling", "fan_min_speed", - "fan_max_speed", "enable_overhang_bridge_fan", "overhang_fan_speed", "overhang_fan_threshold", "close_fan_the_first_x_layers", "full_fan_speed_layer", "fan_cooling_layer_time", "slow_down_layer_time", "slow_down_min_speed", + "fan_max_speed", "enable_overhang_bridge_fan", "overhang_fan_speed", "overhang_fan_threshold", "overhang_threshold_participating_cooling","close_fan_the_first_x_layers", "full_fan_speed_layer", "fan_cooling_layer_time", "slow_down_layer_time", "slow_down_min_speed", "filament_start_gcode", "filament_end_gcode", //exhaust fan control "activate_air_filtration","during_print_exhaust_fan_speed","complete_print_exhaust_fan_speed", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 02f4abc2a..027a5cae4 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -90,6 +90,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "enable_overhang_bridge_fan" "overhang_fan_speed", "overhang_fan_threshold", + "overhang_threshold_participating_cooling", "slow_down_for_layer_cooling", "default_acceleration", "deretraction_speed", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index a7d08165d..b2e2ef285 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -302,6 +302,17 @@ static const t_config_enum_values s_keys_map_OverhangFanThreshold = { }; CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(OverhangFanThreshold) +//BBS +static const t_config_enum_values s_keys_map_OverhangThresholdParticipatingCooling = { + { "0%", Overhang_threshold_participating_cooling_none }, + { "10%", Overhang_threshold_participating_cooling_1_4 }, + { "25%", Overhang_threshold_participating_cooling_2_4 }, + { "50%", Overhang_threshold_participating_cooling_3_4 }, + { "75%", Overhang_threshold_participating_cooling_4_4 }, + { "95%", Overhang_threshold_participating_cooling_bridge } +}; +CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(OverhangThresholdParticipatingCooling) + // BBS static const t_config_enum_values s_keys_map_BedType = { { "Default Plate", btDefault }, @@ -770,6 +781,28 @@ void PrintConfigDef::init_fff_params() def->enum_labels.emplace_back("95%"); def->set_default_value(new ConfigOptionEnumsGeneric{ (int)Overhang_threshold_bridge }); + def = this->add("overhang_threshold_participating_cooling", coEnums); + def->label = L("Overhang threshold for participating cooling"); + def->tooltip = L("Decide which overhang part join the cooling function to slow down the speed." + "Expressed as percentage which indicides how much width of the line without support from lower layer. " + "100% means forcing cooling for all outer wall no matter how much overhang degree"); + def->sidetext = ""; + def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); + def->mode = comAdvanced; + def->enum_values.emplace_back("0%"); + def->enum_values.emplace_back("10%"); + def->enum_values.emplace_back("25%"); + def->enum_values.emplace_back("50%"); + def->enum_values.emplace_back("75%"); + def->enum_values.emplace_back("100%"); + def->enum_labels.emplace_back("0%"); + def->enum_labels.emplace_back("10%"); + def->enum_labels.emplace_back("25%"); + def->enum_labels.emplace_back("50%"); + def->enum_labels.emplace_back("75%"); + def->enum_labels.emplace_back("100%"); + def->set_default_value(new ConfigOptionEnumsGeneric{(int) Overhang_threshold_participating_cooling_bridge}); + def = this->add("bridge_angle", coFloat); def->label = L("Bridge direction"); def->category = L("Strength"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 1248fc89f..f6b3382d2 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -213,6 +213,15 @@ enum OverhangFanThreshold { Overhang_threshold_bridge }; +enum OverhangThresholdParticipatingCooling { + Overhang_threshold_participating_cooling_none = 0, + Overhang_threshold_participating_cooling_1_4, + Overhang_threshold_participating_cooling_2_4, + Overhang_threshold_participating_cooling_3_4, + Overhang_threshold_participating_cooling_4_4, + Overhang_threshold_participating_cooling_bridge +}; + // BBS enum BedType { btDefault = 0, @@ -991,6 +1000,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionBools, enable_overhang_bridge_fan)) ((ConfigOptionInts, overhang_fan_speed)) ((ConfigOptionEnumsGeneric, overhang_fan_threshold)) + ((ConfigOptionEnumsGeneric, overhang_threshold_participating_cooling)) ((ConfigOptionEnum,print_sequence)) ((ConfigOptionInts, first_layer_print_sequence)) ((ConfigOptionInts, other_layers_print_sequence)) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index fad1f9547..0f437e5e2 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3133,6 +3133,7 @@ void TabFilament::build() optgroup->append_single_option_line("enable_overhang_bridge_fan", "auto-cooling"); optgroup->append_single_option_line("overhang_fan_threshold", "auto-cooling"); + optgroup->append_single_option_line("overhang_threshold_participating_cooling", "auto-cooling"); optgroup->append_single_option_line("overhang_fan_speed", "auto-cooling"); optgroup = page->new_optgroup(L("Auxiliary part cooling fan"), L"param_cooling_fan");