From 30e2e20475c9c92288e5aad4bb4778df8b47ed72 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 26 Mar 2024 09:26:22 +0100 Subject: [PATCH] Added chamber_minimal_temperature parameter --- src/libslic3r/Preset.cpp | 6 ++---- src/libslic3r/Print.cpp | 1 + src/libslic3r/PrintConfig.cpp | 12 +++++++++++- src/libslic3r/PrintConfig.hpp | 3 ++- src/slic3r/GUI/Tab.cpp | 6 +++++- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 55f29f2e34..046334058e 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -483,16 +483,14 @@ static std::vector s_Preset_filament_options { "filament_multitool_ramming", "filament_multitool_ramming_volume", "filament_multitool_ramming_flow", "temperature", "idle_temperature", "first_layer_temperature", "bed_temperature", "first_layer_bed_temperature", "fan_always_on", "cooling", "min_fan_speed", "max_fan_speed", "bridge_fan_speed", "disable_fan_first_layers", "full_fan_speed_layer", "fan_below_layer_time", "slowdown_below_layer_time", "min_print_speed", - "start_filament_gcode", "end_filament_gcode", "enable_dynamic_fan_speeds", + "start_filament_gcode", "end_filament_gcode", "enable_dynamic_fan_speeds", "chamber_temperature", "chamber_minimal_temperature", "overhang_fan_speed_0", "overhang_fan_speed_1", "overhang_fan_speed_2", "overhang_fan_speed_3", // Retract overrides "filament_retract_length", "filament_retract_lift", "filament_retract_lift_above", "filament_retract_lift_below", "filament_retract_speed", "filament_deretract_speed", "filament_retract_restart_extra", "filament_retract_before_travel", "filament_retract_layer_change", "filament_wipe", "filament_retract_before_wipe", "filament_retract_length_toolchange", "filament_retract_restart_extra_toolchange", "filament_travel_ramping_lift", "filament_travel_slope", "filament_travel_max_lift", "filament_travel_lift_before_obstacle", // Profile compatibility - "filament_vendor", "compatible_prints", "compatible_prints_condition", "compatible_printers", "compatible_printers_condition", "inherits", - // SuperSlicer - "chamber_temperature", + "filament_vendor", "compatible_prints", "compatible_prints_condition", "compatible_printers", "compatible_printers_condition", "inherits" }; static std::vector s_Preset_machine_limits_options { diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 20043bad54..e7d223cbd0 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -95,6 +95,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "overhang_fan_speed_2", "overhang_fan_speed_3", "chamber_temperature", + "chamber_minimal_temperature", "colorprint_heights", "cooling", "default_acceleration", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index fece15c791..7f3fdc4ce9 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -497,7 +497,7 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionInts { 0 }); def = this->add("chamber_temperature", coInts); - def->label = L("Chamber"); + def->label = L("Nominal"); def->full_label = L("Chamber temperature"); def->tooltip = L("Chamber temperature. Note that this setting doesn't do anything, but you can access it in Start G-code, Tool change G-code and the other ones, like for other temperature settings."); def->sidetext = L("°C"); @@ -506,6 +506,16 @@ void PrintConfigDef::init_fff_params() def->mode = comExpert; def->set_default_value(new ConfigOptionInts{ 0 }); + def = this->add("chamber_minimal_temperature", coInts); + def->label = L("Minimal"); + def->full_label = L("Chamber minimal temperature"); + def->tooltip = L("Chamber temperature. Note that this setting doesn't do anything, but you can access it in Start G-code, Tool change G-code and the other ones, like for other temperature settings."); + def->sidetext = L("°C"); + def->min = 0; + def->max = 300; + def->mode = comExpert; + def->set_default_value(new ConfigOptionInts{ 0 }); + def = this->add("before_layer_gcode", coString); def->label = L("Before layer change G-code"); def->tooltip = L("This custom code is inserted at every layer change, right before the Z move. " diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 29d85b4a3e..72ba652e5f 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -820,6 +820,8 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionInts, overhang_fan_speed_1)) ((ConfigOptionInts, overhang_fan_speed_2)) ((ConfigOptionInts, overhang_fan_speed_3)) + ((ConfigOptionInts, chamber_temperature)) + ((ConfigOptionInts, chamber_minimal_temperature)) ((ConfigOptionBool, complete_objects)) ((ConfigOptionFloats, colorprint_heights)) ((ConfigOptionBools, cooling)) @@ -896,7 +898,6 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionFloats, wiping_volumes_matrix)) ((ConfigOptionBool, wiping_volumes_use_custom_matrix)) ((ConfigOptionFloat, z_offset)) - ((ConfigOptionInts, chamber_temperature)) ) PRINT_CONFIG_CLASS_DERIVED_DEFINE0( diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 7e6ceac849..fdf0d3a339 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2167,7 +2167,6 @@ void TabFilament::build() optgroup = page->new_optgroup(L("Temperature")); create_line_with_near_label_widget(optgroup, "idle_temperature"); - optgroup->append_single_option_line("chamber_temperature"); Line line = { L("Nozzle"), "" }; line.append_option(optgroup->get_option("first_layer_temperature")); @@ -2179,6 +2178,11 @@ void TabFilament::build() line.append_option(optgroup->get_option("bed_temperature")); optgroup->append_line(line); + line = { L("Chamber"), "" }; + line.append_option(optgroup->get_option("chamber_temperature")); + line.append_option(optgroup->get_option("chamber_minimal_temperature")); + optgroup->append_line(line); + page = add_options_page(L("Cooling"), "cooling"); std::string category_path = "cooling_127569#"; optgroup = page->new_optgroup(L("Enable"));