From f881526dc2ea043b219685699d44c2ba482dd906 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 30 Apr 2024 14:02:12 +0200 Subject: [PATCH] Remove the checkbox in Printer Settings. The feature will be turned off by setting zero, so it is consistent with bed temperature. --- src/libslic3r/GCode.cpp | 2 +- src/libslic3r/Preset.cpp | 2 +- src/libslic3r/PrintConfig.cpp | 17 +++++------------ src/libslic3r/PrintConfig.hpp | 1 - src/slic3r/GUI/Tab.cpp | 8 -------- 5 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 06afed6c18..365689a777 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1899,7 +1899,7 @@ void GCodeGenerator::_print_first_layer_bed_temperature(GCodeOutputStream &file, // M191 - Set chamber Temperature and Wait void GCodeGenerator::_print_first_layer_chamber_temperature(GCodeOutputStream &file, const Print &print, const std::string &gcode, int temp, bool wait, bool accurate) { - if (! print.config().heated_chamber) + if (temp == 0) return; bool autoemit = print.config().autoemit_temperature_commands; // Is the bed temperature set by the provided custom G-code? diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 1718f8eaea..046334058e 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -512,7 +512,7 @@ static std::vector s_Preset_printer_options { "between_objects_gcode", "printer_vendor", "printer_model", "printer_variant", "printer_notes", "cooling_tube_retraction", "cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "multimaterial_purging", "max_print_height", "default_print_profile", "inherits", - "remaining_times", "silent_mode", "heated_chamber", + "remaining_times", "silent_mode", "machine_limits_usage", "thumbnails", "thumbnails_format" }; diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 6c206955f2..632a48fdcc 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -499,7 +499,8 @@ void PrintConfigDef::init_fff_params() def = this->add("chamber_temperature", coInts); def->label = L("Nominal"); def->full_label = L("Chamber temperature"); - def->tooltip = L("Required chamber temperature for the print. Only used when heated chamber is supported by the printer."); + def->tooltip = L("Required chamber temperature for the print.\nWhen set to zero, " + "the nominal chamber temperature is not set in the G-code."); def->sidetext = L("°C"); def->min = 0; def->max = 1000; @@ -509,8 +510,9 @@ void PrintConfigDef::init_fff_params() def = this->add("chamber_minimal_temperature", coInts); def->label = L("Minimal"); def->full_label = L("Chamber minimal temperature"); - def->tooltip = L("Minimal chamber temperature that the printer should wait for before the print starts. This allows " - "to start the print before the nominal chamber temperature is reached."); + def->tooltip = L("Minimal chamber temperature that the printer waits for before the print starts. This allows " + "to start the print before the nominal chamber temperature is reached.\nWhen set to zero, " + "the minimal chamber temperature is not set in the G-code."); def->sidetext = L("°C"); def->min = 0; def->max = 1000; @@ -1857,15 +1859,6 @@ void PrintConfigDef::init_fff_params() def->mode = comExpert; def->set_default_value(new ConfigOptionString("")); - def = this->add("heated_chamber", coBool); - def->label = L("Supports heated chamber"); - def->tooltip = L("When enabled, G-codes to heat up the chamber will be emitted before and after the Start G-code (unless they are " - "explicitely used in the Start G-code).\n\nThe temperature can be configured in Filament Settings, " - "temperature for the first printing filament will be used. The chamber heating is not turned off " - "at the end, the user is supposed to do it in custom End G-code when they want it."); - def->mode = comExpert; - def->set_default_value(new ConfigOptionBool(false)); - def = this->add("remaining_times", coBool); def->label = L("Supports remaining times"); def->tooltip = L("Emit M73 P[percent printed] R[remaining time in minutes] at 1 minute" diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 323eaf96af..72ba652e5f 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -790,7 +790,6 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloat, parking_pos_retraction)) ((ConfigOptionBool, remaining_times)) ((ConfigOptionBool, silent_mode)) - ((ConfigOptionBool, heated_chamber)) ((ConfigOptionFloat, extra_loading_move)) ((ConfigOptionFloat, multimaterial_purging)) ((ConfigOptionString, color_change_gcode)) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index dfd7f6c301..fdf0d3a339 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2385,13 +2385,6 @@ void TabFilament::toggle_options() } } - if (m_active_page->title() == "Filament") - { - bool supports_chamber = m_preset_bundle->printers.get_edited_preset().config.opt_bool("heated_chamber"); - toggle_option("chamber_temperature", supports_chamber); - toggle_option("chamber_minimal_temperature", supports_chamber); - } - if (m_active_page->title() == "Advanced") { bool multitool_ramming = m_config->opt_bool("filament_multitool_ramming", 0); @@ -2703,7 +2696,6 @@ void TabPrinter::build_fff() optgroup->append_single_option_line("silent_mode"); optgroup->append_single_option_line("remaining_times"); optgroup->append_single_option_line("binary_gcode"); - optgroup->append_single_option_line("heated_chamber"); optgroup->on_change = [this](t_config_option_key opt_key, boost::any value) { wxTheApp->CallAfter([this, opt_key, value]() {