diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 18cfe2488e..85366ccbca 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3092,11 +3092,9 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu // free functions called by GCode::_do_export() namespace DoExport { - static void init_gcode_processor(const PrintConfig& config, GCodeProcessor& processor, bool& silent_time_estimator_enabled, + static void init_gcode_processor(const PrintConfig& config, GCodeProcessor& processor, const std::shared_ptr& nozzle_group_result = nullptr) { - silent_time_estimator_enabled = (config.gcode_flavor == gcfMarlinLegacy || config.gcode_flavor == gcfMarlinFirmware) - && config.silent_mode; processor.reset(); // Slot-resolution context for the streaming replay (reset() just cleared it). This is NOT // the post-stream result-field handover at the end of do_export, which gates the richer @@ -3105,7 +3103,6 @@ namespace DoExport { processor.initialize_result_moves(); processor.apply_config(config); processor.configure_exclusion_volume_path_check(config); - processor.enable_stealth_time_estimator(silent_time_estimator_enabled); } #if 0 @@ -3397,9 +3394,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato // init as filament map update_layer_related_config(0); - // modifies m_silent_time_estimator_enabled - DoExport::init_gcode_processor(print.config(), m_processor, m_silent_time_estimator_enabled, - print.get_layered_nozzle_group_result()); + DoExport::init_gcode_processor(print.config(), m_processor, print.get_layered_nozzle_group_result()); set_mass_locator(m_processor, print); const bool is_bbl_printers = print.is_BBL_printer(); const bool skip_config_block = print.config().gcode_skip_config_block; diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index e9a346889a..ac646c2a85 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -248,7 +248,6 @@ public: #endif // ENABLE_GCODE_VIEWER_DATA_CHECKING m_brim_done(false), m_second_layer_things_done(false), - m_silent_time_estimator_enabled(false), m_last_obj_copy(nullptr, Point(std::numeric_limits::max(), std::numeric_limits::max())), // BBS m_toolchange_count(0), @@ -911,7 +910,6 @@ protected: int m_timelapse_warning_code = 0; bool m_support_traditional_timelapse = true; - bool m_silent_time_estimator_enabled; Print *m_print{nullptr}; diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index ba22abf4a0..4ffcee9562 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -3652,14 +3652,6 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config) DEFAULT_TRAVEL_ACCELERATION; } - if (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware) { - const ConfigOptionBool* silent_mode = config.option("silent_mode"); - if (silent_mode != nullptr) { - if (silent_mode->value && m_time_processor.machine_limits.machine_max_acceleration_x.values.size() > 1) - enable_stealth_time_estimator(true); - } - } - const ConfigOptionFloat* initial_layer_print_height = config.option("initial_layer_print_height"); if (initial_layer_print_height != nullptr) m_first_layer_height = std::abs(initial_layer_print_height->value); diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 40a3385371..e643e38b95 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1583,7 +1583,6 @@ static std::vector s_Preset_printer_options { "printable_height", "extruder_printable_height", "extruder_clearance_radius", "extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod", "extruder_clearance_dist_to_rod", "nozzle_height", "master_extruder_id", "default_print_profile", "inherits", - "silent_mode", "scan_first_layer", "enable_power_loss_recovery", "wrapping_detection_layers", "wrapping_exclude_area", "machine_load_filament_time", "machine_unload_filament_time", "machine_tool_change_time", "time_cost", "machine_pause_gcode", "template_custom_gcode", "nozzle_type", "nozzle_hrc","auxiliary_fan", "fan_direction", "nozzle_volume","upward_compatible_machine", "z_hop_types", "travel_slope", "retract_lift_enforce","support_chamber_temp_control","support_air_filtration","support_cooling_filter","cooling_filter_enabled","printer_structure","farthest_point_timelapse", "best_object_pos", "head_wrap_detect_zone", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 164bdece3b..1e6079ff8c 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -5290,12 +5290,6 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionString("")); - def = this->add("silent_mode", coBool); - def->label = L("Silent Mode"); - def->tooltip = L("Whether the machine supports silent mode in which machine uses lower acceleration to print more quietly"); - def->mode = comDevelop; - def->set_default_value(new ConfigOptionBool(false)); - def = this->add("emit_machine_limits_to_gcode", coBool); def->label = L("Emit limits to G-code"); def->category = L("Machine limits"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index e712c4565f..51b5640593 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1836,7 +1836,6 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionStrings, filament_change_extrusion_role_gcode)) ((ConfigOptionFloatsNullable, travel_speed)) ((ConfigOptionFloatsNullable, travel_speed_z)) - ((ConfigOptionBool, silent_mode)) ((ConfigOptionString, machine_pause_gcode)) ((ConfigOptionString, template_custom_gcode)) //BBS diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index a6c72dd406..cd114d5441 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -5696,9 +5696,7 @@ void TabPrinter::append_option_line(ConfigOptionsGroupShp optgroup, const std::s auto line = Line{ option.opt.full_label, "" }; line.label_path = label_path; line.append_option(option); - if (m_use_silent_mode - || m_printer_technology == ptSLA // just for first build, if SLA printer preset is selected - ) + if (m_printer_technology == ptSLA) // just for first build, if SLA printer preset is selected line.append_option(optgroup->get_option(opt_key, 1)); optgroup->append_line(line); } @@ -5707,29 +5705,6 @@ PageShp TabPrinter::build_kinematics_page() { auto page = add_options_page(L("Motion ability"), "custom-gcode_motion", true); // ORCA: icon only visible on placeholders - if (m_use_silent_mode) { - // Legend for OptionsGroups - auto optgroup = page->new_optgroup(""); - auto line = Line{ "", "" }; - - ConfigOptionDef def; - def.type = coString; - def.width = Field::def_width(); - def.gui_type = ConfigOptionDef::GUIType::legend; - def.mode = comDevelop; - //def.tooltip = L("Values in this column are for Normal mode"); - def.set_default_value(new ConfigOptionString{ _(L("Normal")).ToUTF8().data() }); - - auto option = Option(def, "full_power_legend"); - line.append_option(option); - - //def.tooltip = L("Values in this column are for Stealth mode"); - def.set_default_value(new ConfigOptionString{ _(L("Silent")).ToUTF8().data() }); - option = Option(def, "silent_legend"); - line.append_option(option); - - optgroup->append_line(line); - } auto optgroup = page->new_optgroup(L("Advanced"), "param_advanced"); optgroup->append_single_option_line("emit_machine_limits_to_gcode", "printer_motion_ability#emit-limits-to-g-code"); @@ -5829,13 +5804,9 @@ void TabPrinter::build_unregular_pages(bool from_initial_build/* = false*/) size_t existed_page = 0; for (size_t i = n_before_extruders; i < m_pages.size(); ++i) // first make sure it's not there already if (m_pages[i]->title().find(L("Motion ability")) != std::string::npos) { - if (m_rebuild_kinematics_page) - m_pages.erase(m_pages.begin() + i); - else - existed_page = i; + existed_page = i; break; } - m_rebuild_kinematics_page = false; if (existed_page < n_before_extruders && (is_marlin_flavor || from_initial_build)) { auto page = build_kinematics_page(); @@ -6824,13 +6795,9 @@ void TabPrinter::toggle_options() const bool gcf_is_klipper = gcf == GCodeFlavor::gcfKlipper; const bool gcf_is_reprap_firmware = gcf == GCodeFlavor::gcfRepRapFirmware; - bool silent_mode = m_config->opt_bool("silent_mode"); - int max_field = silent_mode ? 2 : 1; - for (int i = 0; i < max_field; ++i) - toggle_option("machine_max_acceleration_travel", !gcf_is_marlin_legacy && !gcf_is_klipper, i); + toggle_option("machine_max_acceleration_travel", !gcf_is_marlin_legacy && !gcf_is_klipper, 0); toggle_line("machine_max_acceleration_travel", !gcf_is_marlin_legacy && !gcf_is_klipper); - for (int i = 0; i < max_field; ++i) - toggle_option("machine_max_junction_deviation", gcf_is_marlin_firmware, i); + toggle_option("machine_max_junction_deviation", gcf_is_marlin_firmware, 0); toggle_line("machine_max_junction_deviation", gcf_is_marlin_firmware); // Check if junction deviation value is non-zero and firmware is Marlin @@ -6844,12 +6811,10 @@ void TabPrinter::toggle_options() enable_jerk = true; } } - for (int i = 0; i < max_field; ++i) { - toggle_option("machine_max_jerk_x", enable_jerk, i); - toggle_option("machine_max_jerk_y", enable_jerk, i); - toggle_option("machine_max_jerk_z", enable_jerk, i); - toggle_option("machine_max_jerk_e", enable_jerk, i); - } + toggle_option("machine_max_jerk_x", enable_jerk, 0); + toggle_option("machine_max_jerk_y", enable_jerk, 0); + toggle_option("machine_max_jerk_z", enable_jerk, 0); + toggle_option("machine_max_jerk_e", enable_jerk, 0); bool emittable_limits = gcf_is_marlin_legacy || gcf_is_marlin_firmware || gcf_is_reprap_firmware; toggle_option("emit_machine_limits_to_gcode", emittable_limits); @@ -6954,11 +6919,6 @@ void TabPrinter::update() void TabPrinter::update_fff() { - if (m_use_silent_mode != m_config->opt_bool("silent_mode")) { - m_rebuild_kinematics_page = true; - m_use_silent_mode = m_config->opt_bool("silent_mode"); - } - // Sync IDEX/IQEX tool grid whenever carriage configuration changes. // set_grid_size() is a no-op when dimensions and layout are unchanged. // load_from_config() is gated on matches_config() — without that guard, diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp index 44ef0704a3..e465cbbbbb 100644 --- a/src/slic3r/GUI/Tab.hpp +++ b/src/slic3r/GUI/Tab.hpp @@ -677,9 +677,7 @@ class IMEXModesCtrl; class TabPrinter : public Tab { private: - bool m_use_silent_mode = false; void append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key, const std::string& label_path = ""); - bool m_rebuild_kinematics_page = false; void update_input_shaper_menu(GCodeFlavor flavor); // R8: track the belt->non-belt transition so update_fff() only clears the belt-derived diff --git a/src/slic3r/GUI/UnsavedChangesDialog.cpp b/src/slic3r/GUI/UnsavedChangesDialog.cpp index 8a9693f750..43e271cceb 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.cpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.cpp @@ -1623,10 +1623,6 @@ void UnsavedChangesDialog::update_tree(Preset::Type type, PresetCollection* pres wxString label = option.label_local; if (type == Preset::TYPE_PRINTER && variant_index >= 0 && printer_options_with_variant_2.count(get_pure_opt_key(opt_key)) > 0) { - // Orca: silent_mode is obsolete on import, but its option and two-column UI still exist. - // Keep mode labels for configs that explicitly enable it; omit them in the default single-mode UI. - if (new_config.opt_bool("silent_mode")) - label += " (" + (variant_index % 2 == 0 ? _L("Normal") : _L("Silent")) + ")"; variant_index /= 2; } if (variant_index >= 0 && extruder_variant && variant_index < extruder_variant->size()) { diff --git a/tests/libslic3r/test_config.cpp b/tests/libslic3r/test_config.cpp index 705da9d36a..fdab25bafb 100644 --- a/tests/libslic3r/test_config.cpp +++ b/tests/libslic3r/test_config.cpp @@ -1535,6 +1535,19 @@ TEST_CASE("handle_legacy migrates the adaptive TPMS keys", "[Config]") { CHECK(ctxt.substitutions.empty()); } +TEST_CASE("silent_mode is no longer saved and is dropped on load", "[Config]") { + DynamicPrintConfig full; + full.apply(FullPrintConfig::defaults()); + CHECK_FALSE(full.has("silent_mode")); + + // Projects saved before its removal still carry it. + ConfigSubstitutionContext ctxt(ForwardCompatibilitySubstitutionRule::Enable); + DynamicPrintConfig config; + config.set_deserialize("silent_mode", "0", ctxt); + CHECK_FALSE(config.has("silent_mode")); + CHECK(ctxt.unrecogized_keys == std::vector{"silent_mode"}); +} + TEST_CASE("handle_legacy migrates every IDEX/IQEX key testers already have", "[Config]") { // Three eras of saved profiles: the feature shipped as iXex (is_ixex + ixex_*), the clearance // pair was renamed to say what it measures, then the whole prefix became imex_. Driven from the