diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index e2254aeedd..06afed6c18 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1899,6 +1899,8 @@ 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) + return; bool autoemit = print.config().autoemit_temperature_commands; // Is the bed temperature set by the provided custom G-code? int temp_by_gcode = -1; diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 046334058e..1718f8eaea 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", + "remaining_times", "silent_mode", "heated_chamber", "machine_limits_usage", "thumbnails", "thumbnails_format" }; diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 7f3fdc4ce9..8ccf96e698 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1856,6 +1856,15 @@ 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 72ba652e5f..323eaf96af 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -790,6 +790,7 @@ 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 fdf0d3a339..dfd7f6c301 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2385,6 +2385,13 @@ 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); @@ -2696,6 +2703,7 @@ 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]() {