From a62bf3b838f41c0a49723d2ba809dbf4f2603225 Mon Sep 17 00:00:00 2001 From: "xun.zhang" Date: Wed, 18 Oct 2023 12:03:03 +0800 Subject: [PATCH] ENH: refine logic for chamber temp and exhaust fan 1. Add chamber temp option for 3rd printers 2. Move support_air_filtration option from develop mode to advanced mode jira:[NEW] Signed-off-by: xun.zhang Change-Id: I9cb4263fc12d9d5edcf2595d97143446b3e63316 --- src/libslic3r/GCode.cpp | 9 ++++++++- src/libslic3r/PrintConfig.cpp | 2 +- src/slic3r/GUI/Tab.cpp | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index dae068e31f..49d0cea3d0 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1904,6 +1904,12 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato // Set extruder(s) temperature before and after start G-code. this->_print_first_layer_extruder_temperatures(file, print, machine_start_gcode, initial_extruder_id, false); } + + // BBS: chamber temp control for 3rd printers + if (!is_BBL_Printer() && print.config().support_chamber_temp_control.value && max_chamber_temp > 0 ){ + file.write(m_writer.set_chamber_temperature(max_chamber_temp,true)); + } + // adds tag for processor file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(erCustom).c_str()); @@ -2193,7 +2199,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato file.write(m_writer.update_progress(m_layer_count, m_layer_count, true)); // 100% file.write(m_writer.postamble()); - file.write(m_writer.set_chamber_temperature(0, false)); //close chamber_temperature + if (print.config().support_chamber_temp_control.value && max_chamber_temp>0) + file.write(m_writer.set_chamber_temperature(0, false)); //close chamber_temperature // adds tags for time estimators diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index c01e025158..8d663aa117 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1831,7 +1831,7 @@ void PrintConfigDef::init_fff_params() def =this->add("support_air_filtration",coBool); def->label=L("Support air filtration"); def->tooltip=L("Enable this if printer support air filtration"); - def->mode=comDevelop; + def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); def = this->add("gcode_flavor", coEnum); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 4721c3955f..82405e7667 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3097,8 +3097,8 @@ void TabFilament::toggle_options() toggle_option("pressure_advance", m_config->opt_bool("enable_pressure_advance", 0)); } - bool support_chamber_temp_control = this->m_preset_bundle->printers.get_selected_preset().config.opt_bool("support_chamber_temp_control"); - toggle_line("chamber_temperatures", is_BBL_printer&&support_chamber_temp_control); + bool support_chamber_temp_control = this->m_preset_bundle->printers.get_edited_preset().config.opt_bool("support_chamber_temp_control"); + toggle_line("chamber_temperatures", support_chamber_temp_control); for (auto el : {"cool_plate_temp", "cool_plate_temp_initial_layer", "eng_plate_temp", "eng_plate_temp_initial_layer", "textured_plate_temp", "textured_plate_temp_initial_layer"}) @@ -3906,7 +3906,7 @@ void TabPrinter::toggle_options() toggle_option("thumbnail_size",!is_BBL_printer); toggle_option("printer_structure", !is_BBL_printer); toggle_option("use_relative_e_distances", !is_BBL_printer); - toggle_option("support_chamber_temp_control", 0); + toggle_option("support_chamber_temp_control",!is_BBL_printer); toggle_option("support_air_filtration",is_BBL_printer); auto flavor = m_config->option>("gcode_flavor")->value; bool is_marlin_flavor = flavor == gcfMarlinLegacy || flavor == gcfMarlinFirmware;