From a932821168ca52d9b7b8c2a3c082505b28561cdf Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Thu, 2 Oct 2025 22:04:27 +0800 Subject: [PATCH] Rename wipe tower ribs related options --- src/OrcaSlicer.cpp | 6 ++-- src/libslic3r/GCode/WipeTower.cpp | 8 ++--- src/libslic3r/Preset.cpp | 2 +- src/libslic3r/Print.cpp | 18 +++++------ src/libslic3r/PrintConfig.cpp | 45 +++++++++------------------ src/libslic3r/PrintConfig.hpp | 4 --- src/slic3r/GUI/ConfigManipulation.cpp | 28 ++++++++++------- src/slic3r/GUI/ConfigManipulation.hpp | 1 + src/slic3r/GUI/Field.cpp | 4 +-- src/slic3r/GUI/PartPlate.cpp | 8 ++--- src/slic3r/GUI/Plater.cpp | 8 ++--- src/slic3r/GUI/Tab.cpp | 25 ++++++++++++--- 12 files changed, 78 insertions(+), 79 deletions(-) diff --git a/src/OrcaSlicer.cpp b/src/OrcaSlicer.cpp index 73da0923b7..b240a9f932 100644 --- a/src/OrcaSlicer.cpp +++ b/src/OrcaSlicer.cpp @@ -3523,8 +3523,8 @@ int CLI::run(int argc, char **argv) BOOST_LOG_TRIVIAL(info) << boost::format("%1%, process old params for support and wipe tower")%__LINE__; //wipe tower params process - ConfigOptionBool *prime_tower_rib_wall_option = m_print_config.option("prime_tower_rib_wall", true); - prime_tower_rib_wall_option->value = false; + ConfigOptionEnum *prime_tower_rib_wall_option = m_print_config.option>("wipe_tower_wall_type", true); + prime_tower_rib_wall_option->value = WipeTowerWallType::wtwRectangle; ConfigOptionPercent *prime_tower_infill_gap_option = m_print_config.option("prime_tower_infill_gap", true); prime_tower_infill_gap_option->value = 100; @@ -4406,7 +4406,7 @@ int CLI::run(int argc, char **argv) ConfigOptionFloat* width_option = m_print_config.option("prime_tower_width", true); ConfigOptionFloat* rotation_angle_option = m_print_config.option("wipe_tower_rotation_angle", true); ConfigOptionFloats *volume_option = m_print_config.option("filament_prime_volume", true); - ConfigOptionBool *prime_tower_rib_wall_option = m_print_config.option("prime_tower_rib_wall", true); + ConfigOptionEnum *prime_tower_rib_wall_option = m_print_config.option>("wipe_tower_wall_type", true); std::vector wipe_volume = volume_option->values; BOOST_LOG_TRIVIAL(info) << boost::format("prime_tower_width %1% wipe_tower_rotation_angle %2% prime_volume %3%, rib_wall %4%") % width_option->value % rotation_angle_option->value % get_max_element(wipe_volume) %prime_tower_rib_wall_option->value; diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 4b3350a63d..d3c8a587fe 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -1506,10 +1506,10 @@ WipeTower::WipeTower(const PrintConfig& config, int plate_idx, Vec3d plate_origi m_filaments_change_length(config.filament_change_length.values), m_is_multi_extruder(config.nozzle_diameter.size() > 1), m_use_gap_wall(config.prime_tower_skip_points.value), - m_use_rib_wall(config.prime_tower_rib_wall.value), - m_extra_rib_length((float)config.prime_tower_extra_rib_length.value), - m_rib_width((float)config.prime_tower_rib_width.value), - m_used_fillet(config.prime_tower_fillet_wall.value), + m_use_rib_wall(config.wipe_tower_wall_type.value == WipeTowerWallType::wtwRib), + m_extra_rib_length((float)config.wipe_tower_extra_rib_length.value), + m_rib_width((float)config.wipe_tower_rib_width.value), + m_used_fillet(config.wipe_tower_fillet_wall.value), m_extra_spacing((float)config.prime_tower_infill_gap.value/100.f), m_tower_framework(config.prime_tower_enable_framework.value), m_flat_ironing(config.prime_tower_flat_ironing.value) diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 600ac025fa..9afb679d61 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -914,7 +914,7 @@ static std::vector s_Preset_print_options { "top_surface_line_width", "support_line_width", "infill_wall_overlap","top_bottom_infill_wall_overlap", "bridge_flow", "internal_bridge_flow", "elefant_foot_compensation", "elefant_foot_compensation_layers", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower", "prime_tower_enable_framework", "prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", - "prime_tower_rib_wall","prime_tower_extra_rib_length","prime_tower_rib_width","prime_tower_fillet_wall","prime_tower_infill_gap", + "prime_tower_infill_gap", "prime_tower_flat_ironing", "wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits", "flush_into_infill", "flush_into_objects", "flush_into_support", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index f2ed4676be..7c39d81642 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -307,10 +307,6 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n || opt_key == "prime_tower_brim_width" || opt_key == "prime_tower_skip_points" || opt_key == "prime_tower_flat_ironing" - || opt_key == "prime_tower_rib_wall" - || opt_key == "prime_tower_extra_rib_length" - || opt_key == "prime_tower_rib_width" - || opt_key == "prime_tower_fillet_wall" || opt_key == "first_layer_print_sequence" || opt_key == "other_layers_print_sequence" || opt_key == "other_layers_print_sequence_nums" @@ -972,7 +968,7 @@ static StringObjectException layered_print_cleareance_valid(const Print &print, float depth = print.wipe_tower_data(filaments_count).depth; //float brim_width = print.wipe_tower_data(filaments_count).brim_width; - if (config.prime_tower_rib_wall.value) + if (config.wipe_tower_wall_type.value == WipeTowerWallType::wtwRib) width = depth; Polygons convex_hulls_temp; @@ -2984,9 +2980,9 @@ const WipeTowerData &Print::wipe_tower_data(size_t filaments_cnt) const layer_height = m_objects.front()->config().layer_height.value; auto timelapse_type = config().option>("timelapse_type"); - bool need_wipe_tower = (timelapse_type ? (timelapse_type->value == TimelapseType::tlSmooth) : false) | m_config.prime_tower_rib_wall.value; + bool need_wipe_tower = (timelapse_type ? (timelapse_type->value == TimelapseType::tlSmooth) : false) | (m_config.wipe_tower_wall_type.value == WipeTowerWallType::wtwRib); double extra_spacing = config().option("prime_tower_infill_gap")->getFloat() / 100.; - double rib_width = config().option("prime_tower_rib_width")->getFloat(); + double rib_width = config().option("wipe_tower_rib_width")->getFloat(); double filament_change_volume = 0.; { @@ -3011,12 +3007,12 @@ const WipeTowerData &Print::wipe_tower_data(size_t filaments_cnt) const double volume = wipe_volume * filament_depth_count; if (m_config.nozzle_diameter.values.size() == 2) volume += filament_change_volume * (int) (filaments_cnt / 2); - if (m_config.prime_tower_rib_wall.value) { + if (m_config.wipe_tower_wall_type.value == WipeTowerWallType::wtwRib) { double depth = std::sqrt(volume / layer_height * extra_spacing); if (need_wipe_tower || filaments_cnt > 1) { float min_wipe_tower_depth = WipeTower::get_limit_depth_by_height(max_height); depth = std::max((double) min_wipe_tower_depth, depth); - depth += rib_width / std::sqrt(2) + config().prime_tower_extra_rib_length.value; + depth += rib_width / std::sqrt(2) + config().wipe_tower_extra_rib_length.value; const_cast(this)->m_wipe_tower_data.depth = depth; const_cast(this)->m_wipe_tower_data.brim_width = m_config.prime_tower_brim_width; } @@ -3231,8 +3227,8 @@ void Print::_make_wipe_tower() m_wipe_tower_data.used_filament = wipe_tower.get_used_filament(); m_wipe_tower_data.number_of_toolchanges = wipe_tower.get_number_of_toolchanges(); - m_wipe_tower_data.construct_mesh(wipe_tower.width(), wipe_tower.get_depth(), wipe_tower.get_height(), wipe_tower.get_brim_width(), config().prime_tower_rib_wall.value, - wipe_tower.get_rib_width(), wipe_tower.get_rib_length(), config().prime_tower_fillet_wall.value); + m_wipe_tower_data.construct_mesh(wipe_tower.width(), wipe_tower.get_depth(), wipe_tower.get_height(), wipe_tower.get_brim_width(), config().wipe_tower_wall_type.value == WipeTowerWallType::wtwRib, + wipe_tower.get_rib_width(), wipe_tower.get_rib_length(), config().wipe_tower_fillet_wall.value); const Vec3d origin = this->get_plate_origin(); m_fake_wipe_tower.rib_offset = wipe_tower.get_rib_offset(); m_fake_wipe_tower.set_fake_extrusion_data(wipe_tower.position() + m_fake_wipe_tower.rib_offset, wipe_tower.width(), wipe_tower.get_height(), wipe_tower.get_layer_height(), diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 1648000cc7..4b98010517 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -6173,23 +6173,6 @@ void PrintConfigDef::init_fff_params() "volumes below."); def->set_default_value(new ConfigOptionFloats { 70., 70., 70., 70., 70., 70., 70., 70., 70., 70. }); - def = this->add("prime_tower_extra_rib_length", coFloat); - def->label = L("Extra rib length"); - def->tooltip = L("Positive values can increase the size of the rib wall, while negative values can reduce the size." - "However, the size of the rib wall can not be smaller than that determined by the cleaning volume."); - def->sidetext = L("mm"); - def->max = 300; - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionFloat(0)); - - def = this->add("prime_tower_rib_width", coFloat); - def->label = L("Rib width"); - def->tooltip = L("Rib width"); - def->sidetext = L("mm"); - def->mode = comAdvanced; - def->min = 0; - def->set_default_value(new ConfigOptionFloat(8)); - def = this->add("prime_tower_skip_points", coBool); def->label = L("Skip points"); def->tooltip = L("The wall of prime tower will skip the start points of wipe path"); @@ -6200,19 +6183,6 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); - def = this->add("prime_tower_rib_wall", coBool); - def->label = L("Rib wall"); - def->tooltip = L("The wall of prime tower will add four ribs and make its " - "cross-section as close to a square as possible, so the width will be fixed."); - def->mode = comSimple; - def->set_default_value(new ConfigOptionBool(true)); - - def = this->add("prime_tower_fillet_wall", coBool); - def->label = L("Fillet wall"); - def->tooltip = L("The wall of prime tower will fillet"); - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionBool(true)); - def = this->add("prime_tower_infill_gap", coPercent); def->label = L("Infill gap"); def->tooltip = L("Infill gap"); @@ -7389,6 +7359,21 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va } } } + // Orca: Rename wipe tower ribs related options + else if (opt_key == "prime_tower_rib_wall") { + if (value == "1") { + opt_key = "wipe_tower_wall_type"; + value = "rib"; + } else { + opt_key = ""; + } + } else if (opt_key == "prime_tower_extra_rib_length") { + opt_key = "wipe_tower_extra_rib_length"; + } else if (opt_key == "prime_tower_rib_width") { + opt_key = "wipe_tower_rib_width"; + } else if (opt_key == "prime_tower_fillet_wall") { + opt_key = "wipe_tower_fillet_wall"; + } // Ignore the following obsolete configuration keys: static std::set ignore = { diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 50e1d53e04..d05151438a 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1465,13 +1465,9 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionFloat, wipe_tower_per_color_wipe)) ((ConfigOptionFloat, wipe_tower_rotation_angle)) ((ConfigOptionFloat, prime_tower_brim_width)) - ((ConfigOptionFloat, prime_tower_extra_rib_length)) - ((ConfigOptionFloat, prime_tower_rib_width)) ((ConfigOptionPercent, prime_tower_infill_gap)) ((ConfigOptionBool, prime_tower_skip_points)) ((ConfigOptionBool, prime_tower_flat_ironing)) - ((ConfigOptionBool, prime_tower_rib_wall)) - ((ConfigOptionBool, prime_tower_fillet_wall)) ((ConfigOptionFloat, wipe_tower_bridging)) ((ConfigOptionPercent, wipe_tower_extra_flow)) ((ConfigOptionFloats, flush_volumes_matrix)) diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index eebc285314..20dd24d968 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -421,6 +421,16 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con } #endif + // BBL printers do not support cone wipe tower + if (config->opt_bool("enable_prime_tower") && is_BBL_Printer) { + auto wipe_tower_wall_type = config->opt_enum("wipe_tower_wall_type"); + if (wipe_tower_wall_type == WipeTowerWallType::wtwCone) { + DynamicPrintConfig new_conf = *config; + new_conf.set_key_value("wipe_tower_wall_type", new ConfigOptionEnum(WipeTowerWallType::wtwRectangle)); + apply(config, &new_conf); + } + } + // Check "enable_support" and "overhangs" relations only on global settings level if (is_global_config && config->opt_bool("enable_support")) { // Ask only once. @@ -766,14 +776,9 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co toggle_line("preheat_steps", have_ooze_prevention && (preheat_steps > 0)); bool have_prime_tower = config->opt_bool("enable_prime_tower"); - for (auto el : {"prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", "prime_tower_rib_wall", "prime_tower_infill_gap","prime_tower_enable_framework"}) + for (auto el : {"prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", "wipe_tower_wall_type", "prime_tower_infill_gap","prime_tower_enable_framework"}) toggle_line(el, have_prime_tower); - bool have_rib_wall = config->opt_bool("prime_tower_rib_wall")&&have_prime_tower; - for (auto el : {"prime_tower_extra_rib_length", "prime_tower_rib_width", "prime_tower_fillet_wall"}) - toggle_line(el, have_rib_wall); - toggle_field("prime_tower_width", !have_rib_wall); - for (auto el : {"wall_filament", "sparse_infill_filament", "solid_infill_filament", "wipe_tower_filament"}) toggle_line(el, !bSEMM); @@ -781,18 +786,17 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co for (auto el : {"wipe_tower_rotation_angle", "wipe_tower_cone_angle", "wipe_tower_extra_spacing", "wipe_tower_max_purge_speed", - "wipe_tower_wall_type", - "wipe_tower_extra_rib_length","wipe_tower_rib_width","wipe_tower_fillet_wall", "wipe_tower_bridging", "wipe_tower_extra_flow", "wipe_tower_no_sparse_layers"}) toggle_line(el, have_prime_tower && !is_BBL_Printer); WipeTowerWallType wipe_tower_wall_type = config->opt_enum("wipe_tower_wall_type"); + bool have_rib_wall = (wipe_tower_wall_type == WipeTowerWallType::wtwRib)&&have_prime_tower; toggle_line("wipe_tower_cone_angle", have_prime_tower && !is_BBL_Printer && wipe_tower_wall_type == WipeTowerWallType::wtwCone); - toggle_line("wipe_tower_extra_rib_length", have_prime_tower && !is_BBL_Printer && wipe_tower_wall_type == WipeTowerWallType::wtwRib); - toggle_line("wipe_tower_rib_width", have_prime_tower && !is_BBL_Printer && wipe_tower_wall_type == WipeTowerWallType::wtwRib); - toggle_line("wipe_tower_fillet_wall", have_prime_tower && !is_BBL_Printer && wipe_tower_wall_type == WipeTowerWallType::wtwRib); - + toggle_line("wipe_tower_extra_rib_length", have_rib_wall); + toggle_line("wipe_tower_rib_width", have_rib_wall); + toggle_line("wipe_tower_fillet_wall", have_rib_wall); + toggle_field("prime_tower_width", have_prime_tower && !(is_BBL_Printer && have_rib_wall)); toggle_line("single_extruder_multi_material_priming", !bSEMM && have_prime_tower && !is_BBL_Printer); diff --git a/src/slic3r/GUI/ConfigManipulation.hpp b/src/slic3r/GUI/ConfigManipulation.hpp index f056a79682..59d7779d33 100644 --- a/src/slic3r/GUI/ConfigManipulation.hpp +++ b/src/slic3r/GUI/ConfigManipulation.hpp @@ -80,6 +80,7 @@ public: void check_filament_max_volumetric_speed(DynamicPrintConfig *config); void check_chamber_temperature(DynamicPrintConfig* config); void set_is_BBL_Printer(bool is_bbl_printer) { is_BBL_Printer = is_bbl_printer; }; + bool get_is_BBL_Printer() { return is_BBL_Printer; }; // SLA print void update_print_sla_config(DynamicPrintConfig* config, const bool is_global_config = false); void toggle_print_sla_options(DynamicPrintConfig* config); diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index f2f81d3706..55f754e91a 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -1562,7 +1562,7 @@ void Choice::set_value(const boost::any& value, bool change_event) m_opt_id == "internal_solid_infill_pattern" || m_opt_id == "sparse_infill_pattern" || m_opt_id == "support_base_pattern" || m_opt_id == "support_interface_pattern" || m_opt_id == "ironing_pattern" || m_opt_id == "support_ironing_pattern" || - m_opt_id == "support_style" || m_opt_id == "curr_bed_type") + m_opt_id == "support_style" || m_opt_id == "curr_bed_type" || m_opt_id == "wipe_tower_wall_type") { std::string key; const t_config_enum_values& map_names = *m_opt.enum_keys_map; @@ -1653,7 +1653,7 @@ boost::any& Choice::get_value() m_opt_id == "internal_solid_infill_pattern" || m_opt_id == "sparse_infill_pattern" || m_opt_id == "support_base_pattern" || m_opt_id == "support_interface_pattern" || m_opt_id == "ironing_pattern" || m_opt_id == "support_ironing_pattern" || - m_opt_id == "support_style" || m_opt_id == "curr_bed_type") + m_opt_id == "support_style" || m_opt_id == "curr_bed_type" || m_opt_id == "wipe_tower_wall_type") { const std::string &key = m_opt.enum_values[field->GetSelection()]; m_value = int(m_opt.enum_keys_map->at(key)); diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 6d5ea87273..1e666e2709 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -1972,9 +1972,9 @@ Vec3d PartPlate::estimate_wipe_tower_size(const DynamicPrintConfig & config, con auto timelapse_type = config.option>("timelapse_type"); bool need_wipe_tower = (timelapse_type ? (timelapse_type->value == TimelapseType::tlSmooth) : false) | enable_wrapping_detection; double extra_spacing = config.option("prime_tower_infill_gap")->getFloat() / 100.; - const ConfigOptionBool* use_rib_wall_opt = config.option("prime_tower_rib_wall"); - bool use_rib_wall = use_rib_wall_opt ? use_rib_wall_opt->value: true; - double rib_width = config.option("prime_tower_rib_width")->getFloat(); + const ConfigOptionEnum* use_rib_wall_opt = config.option>("wipe_tower_wall_type"); + bool use_rib_wall = use_rib_wall_opt ? use_rib_wall_opt->value == WipeTowerWallType::wtwRib: false; + double rib_width = config.option("wipe_tower_rib_width")->getFloat(); double depth; double filament_change_volume=0.; { @@ -1996,7 +1996,7 @@ Vec3d PartPlate::estimate_wipe_tower_size(const DynamicPrintConfig & config, con if (need_wipe_tower || plate_extruder_size > 1) { float min_wipe_tower_depth = WipeTower::get_limit_depth_by_height(max_height); depth = std::max((double) min_wipe_tower_depth, depth); - depth += rib_width / std::sqrt(2) + m_print->config().prime_tower_extra_rib_length.value; + depth += rib_width / std::sqrt(2) + m_print->config().wipe_tower_extra_rib_length.value; wipe_tower_size(0) = wipe_tower_size(1) = depth; } } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 6830116162..a711905850 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -4348,7 +4348,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) "nozzle_height", "skirt_type", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance", "skirt_start_angle", "brim_width", "brim_object_gap", "brim_type", "nozzle_diameter", "single_extruder_multi_material", "preferred_orientation", "enable_prime_tower", "wipe_tower_x", "wipe_tower_y", "prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", "prime_tower_enable_framework", - "prime_tower_rib_wall","prime_tower_extra_rib_length", "prime_tower_rib_width","prime_tower_fillet_wall", "prime_tower_infill_gap","filament_prime_volume", + "prime_tower_infill_gap","filament_prime_volume", "extruder_colour", "filament_colour", "filament_type", "material_colour", "printable_height", "extruder_printable_height", "printer_model", "printer_technology", // These values are necessary to construct SlicingParameters by the Canvas3D variable layer height editor. "layer_height", "initial_layer_print_height", "min_layer_height", "max_layer_height", @@ -5655,8 +5655,8 @@ std::vector Plater::priv::load_files(const std::vector& input_ } } } - ConfigOptionBool *prime_tower_rib_wall_option = config.option("prime_tower_rib_wall", true); - prime_tower_rib_wall_option->value = false; + ConfigOptionEnum *prime_tower_rib_wall_option = config.option>("wipe_tower_wall_type", true); + prime_tower_rib_wall_option->value = WipeTowerWallType::wtwRectangle; ConfigOptionPercent *prime_tower_infill_gap_option = config.option("prime_tower_infill_gap", true); prime_tower_infill_gap_option->value = 100; @@ -5684,7 +5684,7 @@ std::vector Plater::priv::load_files(const std::vector& input_ std::vector diff_process_keys; std::string diff_process_settings = diff_settings[0]; Slic3r::unescape_strings_cstyle(diff_process_settings, diff_process_keys); - diff_process_keys.emplace_back("prime_tower_rib_wall"); + diff_process_keys.emplace_back("wipe_tower_wall_type"); diff_process_keys.emplace_back("prime_tower_infill_gap"); diff_process_settings = Slic3r::escape_strings_cstyle(diff_process_keys); diff_settings[0] = diff_process_settings; diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index beee675519..3fb758245f 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2581,10 +2581,6 @@ void TabPrint::build() optgroup->append_single_option_line("prime_tower_width", "multimaterial_settings_prime_tower#width"); optgroup->append_single_option_line("prime_tower_brim_width", "multimaterial_settings_prime_tower#brim-width"); optgroup->append_single_option_line("prime_tower_infill_gap","parameter/prime-tower"); - optgroup->append_single_option_line("prime_tower_rib_wall", "parameter/prime-tower"); - optgroup->append_single_option_line("prime_tower_extra_rib_length","parameter/prime-tower"); - optgroup->append_single_option_line("prime_tower_rib_width","parameter/prime-tower"); - optgroup->append_single_option_line("prime_tower_fillet_wall","parameter/prime-tower"); optgroup->append_single_option_line("wipe_tower_rotation_angle", "multimaterial_settings_prime_tower#wipe-tower-rotation-angle"); optgroup->append_single_option_line("wipe_tower_bridging", "multimaterial_settings_prime_tower#maximal-bridging-distance"); optgroup->append_single_option_line("wipe_tower_extra_spacing", "multimaterial_settings_prime_tower#wipe-tower-purge-lines-spacing"); @@ -2765,6 +2761,27 @@ void TabPrint::toggle_options() } cb->SetValue(n); } + + // BBL printers do not support cone wipe tower + field = m_active_page->get_field("wipe_tower_wall_type"); + if (auto choice = dynamic_cast(field)) { + auto def = print_config_def.get("wipe_tower_wall_type"); + std::vector enum_set_bbl = {wtwRectangle, wtwRib}; + std::vector enum_set_none_bbl = {wtwRectangle, wtwCone, wtwRib}; + auto& set = m_config_manipulation.get_is_BBL_Printer() ? enum_set_bbl : enum_set_none_bbl; + auto& opt = const_cast(field->m_opt); + auto cb = dynamic_cast(choice->window); + auto n = cb->GetValue(); + opt.enum_values.clear(); + opt.enum_labels.clear(); + cb->Clear(); + for (auto i : set) { + opt.enum_values.push_back(def->enum_values[i]); + opt.enum_labels.push_back(def->enum_labels[i]); + cb->Append(_(def->enum_labels[i])); + } + cb->SetValue(n); + } } void TabPrint::update()