From cc9656432118e1a2865c83d7046ed01dffc957c4 Mon Sep 17 00:00:00 2001 From: supermerill Date: Thu, 26 Mar 2020 15:00:02 +0100 Subject: [PATCH] Update to wizzard: add a thumbnail parameter ; don't auto-select prusa mini if no printer installed also some merge for creality printers, and fix some problem in it. relax the min/max version for the profile, i don't have the resource to check & modify these for each release. --- resources/profiles/BIBO.idx | 4 +- resources/profiles/Basic.ini | 49 +++++++++++- resources/profiles/Creality.idx | 5 +- resources/profiles/Creality.ini | 110 ++++++++++++++++++--------- resources/profiles/LulzBot.idx | 2 +- resources/profiles/PrusaResearch.idx | 4 +- resources/ui_layout/filament.ui | 2 +- resources/ui_layout/print.ui | 6 ++ resources/ui_layout/print.ui.legacy | 6 ++ resources/ui_layout/printer_sla.ui | 2 + src/slic3r/GUI/ConfigWizard.cpp | 28 +++++-- src/slic3r/GUI/Field.hpp | 1 - src/slic3r/GUI/Preset.cpp | 5 +- src/slic3r/GUI/Preset.hpp | 1 + src/slic3r/GUI/Tab.cpp | 51 ++----------- 15 files changed, 174 insertions(+), 102 deletions(-) diff --git a/resources/profiles/BIBO.idx b/resources/profiles/BIBO.idx index f8ad05323..5152fb1a9 100644 --- a/resources/profiles/BIBO.idx +++ b/resources/profiles/BIBO.idx @@ -8,6 +8,6 @@ min_slic3r_version = 2.2.0-alpha3 0.0.1-alpha8 Available to community Early adopters for testing. Corrected filament settings to prevent duplicates, and reworked start and end gcode. # The following line (max_slic3r_version) forces the users of PrusaSlicer 2.2.0-alpha3 and newer to update the profiles to 0.0.1-alpha12 and newer, # so they will see the print bed. -max_slic3r_version = 2.2.0-alpha2 -min_slic3r_version = 2.2.0-alpha0 +max_slic3r_version = 12.2.0 +min_slic3r_version = 2.1.0 0.0.1-alpha Initial version diff --git a/resources/profiles/Basic.ini b/resources/profiles/Basic.ini index 0cf0f0024..706fb9de1 100644 --- a/resources/profiles/Basic.ini +++ b/resources/profiles/Basic.ini @@ -17,6 +17,12 @@ config_update_url = [printer_model:Custom_1.75mm] name = Custom 1.75mm variants = 0.4; 0.15; 0.2; 0.25; 0.3; 0.35; 0.5; 0.6; 0.8; 1.0; 1.2; +thumbnail = Basic_thumbnail.png + +[printer_model:Bowden_1.75mm] +name = Bowden 1.75mm +variants = 0.4; 0.15; 0.2; 0.25; 0.3; 0.35; 0.5; 0.6; 0.8; 1.0; 1.2; +thumbnail = Basic_thumbnail.png #[printer_model:Custom_2.5mm] #name = Custom 2.5mm @@ -173,6 +179,43 @@ printer_model = Custom_1.75mm inherits = *common*; *1.2nozzle* printer_model = Custom_1.75mm +[printer:*bowden*] +inherits = *common* +retract_length = 8 +retract_speed = 60 +deretract_speed = 40 +printer_model = Bowden_1.75mm + + +[printer:Bowden 0.15 nozzle] +inherits = *bowden*; *0.15nozzle* + +[printer:Bowden 0.2 nozzle] +inherits = *bowden*; *0.2nozzle* + +[printer:Bowden 0.25 nozzle] +inherits = *bowden*; *0.25nozzle* + +[printer:Bowden 0.3 nozzle] +inherits = *bowden*; *0.3nozzle* + +[printer:Bowden 0.4 nozzle] +inherits = *bowden*; *0.4nozzle* + +[printer:Bowden 0.5 nozzle] +inherits = *bowden*; *0.5nozzle* + +[printer:Bowden 0.6 nozzle] +inherits = *bowden*; *0.6nozzle* + +[printer:Bowden 0.8 nozzle] +inherits = *bowden*; *0.8nozzle* + +[printer:Bowden 1.0 nozzle] +inherits = *bowden*; *1.0nozzle* + +[printer:Bowden 1.2 nozzle] +inherits = *bowden*; *1.2nozzle* # Common print preset, mostly derived from MK2 single material with a 0.4mm nozzle. # All other print presets will derive from the *common* print preset. @@ -595,14 +638,14 @@ start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{el [filament:Basic PLA] inherits = *common* -bed_temperature = 60 +bed_temperature = 55 fan_below_layer_time = 100 filament_colour = #FF3232 filament_max_volumetric_speed = 15 filament_type = PLA filament_density = 1.24 filament_cost = 20 -first_layer_bed_temperature = 60 +first_layer_bed_temperature = 55 first_layer_temperature = 215 disable_fan_first_layers = 1 fan_always_on = 1 @@ -646,7 +689,7 @@ filament_type = ABS filament_density = 1.04 filament_cost = 20 first_layer_bed_temperature = 100 -first_layer_temperature = 238 +first_layer_temperature = 250 fan_always_on = 0 max_fan_speed = 0 min_fan_speed = 0 diff --git a/resources/profiles/Creality.idx b/resources/profiles/Creality.idx index 6db20df5b..f9c02a84f 100644 --- a/resources/profiles/Creality.idx +++ b/resources/profiles/Creality.idx @@ -5,6 +5,7 @@ min_slic3r_version = 2.2.0-alpha3 0.0.2-alpha0 Print bed textures are now configurable from the Preset Bundle. Requires PrusaSlicer 2.2.0-alpha3 and newer. # The following line (max_slic3r_version) forces the users of PrusaSlicer 2.2.0-alpha3 and newer to update the profiles to 1.1.1-alpha3 and newer, # so they will see the print bed. -max_slic3r_version = 2.2.0-alpha2 -min_slic3r_version = 2.2.0-alpha0 +max_slic3r_version = 12.2.0 +min_slic3r_version = 2.1.0 0.0.1 Initial version +0.0.2 Supermerill version diff --git a/resources/profiles/Creality.ini b/resources/profiles/Creality.ini index 009560f59..ffa3bdb81 100644 --- a/resources/profiles/Creality.ini +++ b/resources/profiles/Creality.ini @@ -25,11 +25,27 @@ default_materials = Creality PLA; Creality PETG; Creality ABS [printer_model:CR-10] name = Creality CR-10 -variants = 0.4; 0.2; 0.5; 0.6 +variants = 0.4; 0.2; 0.5; 0.6; 0.8 technology = FFF family = CR-10 default_materials = Creality PLA; Creality PETG; Creality ABS +[printer_model:CR-10 Max] +name = Creality CR-10 Max +variants = 0.4; 0.2; 0.5; 0.6; 0.8 +technology = FFF +family = CR-10 +default_materials = Creality PLA; Creality PETG; Creality ABS +thumbnail = CR-10_thumbnail.png + +[printer_model:CR-10 S5] +name = Creality CR-10 S5 +variants = 0.4; 0.2; 0.5; 0.6; 0.8 +technology = FFF +family = CR-10 +default_materials = Creality PLA; Creality PETG; Creality ABS +thumbnail = CR-10_thumbnail.png + # All presets starting with asterisk, for example *common*, are intermediate and they will # not make it into the user interface. @@ -155,6 +171,7 @@ machine_max_jerk_y = 8 machine_max_jerk_z = 0.4 machine_min_extruding_rate = 0 machine_min_travel_rate = 0 +retract_length = 6 retract_before_travel = 2 retract_speed = 60 deretract_speed = 40 @@ -166,12 +183,6 @@ printer_notes = Fan-made creality ender-3 printer profile. Please send me a gith [printer:ENDER-3 0.4 nozzle] inherits = *ENDER-3*; *0.4nozzle* -nozzle_diameter = 0.4 -retract_before_travel = 0.5 -retract_length = 6 -retract_speed = 40 -default_print_profile = 0.16mm NORMAL 0.4 nozzle -default_filament_profile = Creality PLA [printer:ENDER-3 0.4N MMU (manual)] inherits = *ENDER-3*; *0.4nozzle* @@ -185,7 +196,6 @@ max_layer_height = 0.32 min_layer_height = 0.07 printer_variant = 0.4 manual MMU single_extruder_multi_material = 1 -single_extruder_multi_material_priming = 0 toolchange_gcode = M600 retract_layer_change = 0 retract_restart_extra = 0 @@ -196,51 +206,79 @@ cooling_tube_retraction = 100 [printer:ENDER-3 0.2 nozzle] inherits = *ENDER-3*; *0.2nozzle* -nozzle_diameter = 0.4 -retract_before_travel = 0.5 -retract_length = 6 -retract_speed = 40 -default_print_profile = 0.16mm NORMAL 0.4 nozzle -default_filament_profile = Creality PLA + +[printer:ENDER-3 0.5 nozzle] +inherits = *ENDER-3*; *0.5nozzle* [printer:ENDER-3 0.6 nozzle] inherits = *ENDER-3*; *0.6nozzle* -nozzle_diameter = 0.4 -retract_before_travel = 0.5 -retract_length = 6 -retract_speed = 40 -default_print_profile = 0.16mm NORMAL 0.4 nozzle -default_filament_profile = Creality PLA [printer:*CR-10*] inherits = *common* bed_shape = 0x0,300x0,300x300,0x300 -max_print_height = 250 +max_print_height = 400 printer_model = CR-10 printer_notes = Fan-made creality cr-10 printer profile. Please send me a github issue if this profile need tweaking.\nPRINTER_HAS_BOWDEN +[printer:*CR-10Max*] +inherits = *common* +bed_shape = 0x0,450x0,450x450,0x450 +max_print_height = 470 +printer_model = CR-10 Max +printer_notes = Fan-made creality cr-10 printer profile. Please send me a github issue if this profile need tweaking.\nPRINTER_HAS_BOWDEN + +[printer:*CR-10S5*] +inherits = *common* +bed_shape = 0x0,500x0,500x500,0x500 +max_print_height = 500 +printer_model = CR-10 S5 +printer_notes = Fan-made creality cr-10 printer profile. Please send me a github issue if this profile need tweaking.\nPRINTER_HAS_BOWDEN + [printer:CR-10 0.2 nozzle] inherits = *CR-10*; *0.2nozzle* [printer:CR-10 0.4 nozzle] inherits = *CR-10*; *0.4nozzle* -nozzle_diameter = 0.4 -retract_before_travel = 0.5 -retract_length = 3 -retract_speed = 40 -variable_layer_height = 0 -printer_variant = 0.4 -default_print_profile = 0.16mm NORMAL 0.4 nozzle + +[printer:CR-10 0.5 nozzle] +inherits = *CR-10*; *0.5nozzle* [printer:CR-10 0.6 nozzle] inherits = *CR-10*; *0.6nozzle* -retract_before_travel = 0.6 -retract_length = 2.5 -retract_speed = 25 -nozzle_diameter = 0.6 -printer_variant = 0.6 -default_print_profile = 0.16mm FINE 0.6 nozzle + +[printer:CR-10 0.8 nozzle] +inherits = *CR-10*; *0.8nozzle* + +[printer:CR-10 Max 0.2 nozzle] +inherits = *CR-10Max*; *0.2nozzle* + +[printer:CR-10 Max 0.4 nozzle] +inherits = *CR-10Max*; *0.4nozzle* + +[printer:CR-10 Max 0.5 nozzle] +inherits = *CR-10Max*; *0.5nozzle* + +[printer:CR-10 Max 0.6 nozzle] +inherits = *CR-10Max*; *0.6nozzle* + +[printer:CR-10 Max 0.8 nozzle] +inherits = *CR-10Max*; *0.8nozzle* + +[printer:CR-10 S5 0.2 nozzle] +inherits = *CR-10S5*; *0.2nozzle* + +[printer:CR-10 S5 0.4 nozzle] +inherits = *CR-10S5*; *0.4nozzle* + +[printer:CR-10 S5 0.5 nozzle] +inherits = *CR-10S5*; *0.5nozzle* + +[printer:CR-10 S5 0.6 nozzle] +inherits = *CR-10S5*; *0.6nozzle* + +[printer:CR-10 S5 0.8 nozzle] +inherits = *CR-10S5*; *0.8nozzle* # Common print preset, mostly derived from MK2 single material with a 0.4mm nozzle. # All other print presets will derive from the *common* print preset. @@ -313,8 +351,9 @@ raft_layers = 0 resolution = 0 seam_position = hidden skirts = 0 -skirt_distance = 2 +skirt_distance = 6 skirt_height = 3 +single_extruder_multi_material_priming = 0 small_perimeter_speed = 25 solid_infill_below_area = 0 solid_infill_every_layers = 0 @@ -629,7 +668,6 @@ max_fan_speed = 40 min_fan_speed = 20 bridge_fan_speed = 100 top_fan_speed = 20 -printer_notes=~/.*PRINTER_HAS_BOWDEN.*/ temperature = 238 [filament:Creality ABS] diff --git a/resources/profiles/LulzBot.idx b/resources/profiles/LulzBot.idx index 4d6436f82..b12f06b5c 100644 --- a/resources/profiles/LulzBot.idx +++ b/resources/profiles/LulzBot.idx @@ -1,2 +1,2 @@ -min_slic3r_version = 2.2.0-alpha3 +min_slic3r_version = 2.1.0 0.0.1 Initial version diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx index 3990bdd78..74e10a31a 100644 --- a/resources/profiles/PrusaResearch.idx +++ b/resources/profiles/PrusaResearch.idx @@ -6,8 +6,8 @@ min_slic3r_version = 2.2.0-alpha3 1.1.1-alpha3 Print bed textures are now configurable from the Preset Bundle. Requires PrusaSlicer 2.2.0-alpha3 and newer. # The following line (max_slic3r_version) forces the users of PrusaSlicer 2.2.0-alpha3 and newer to update the profiles to 1.1.1-alpha3 and newer, # so they will see the print bed. -max_slic3r_version = 2.2.0-alpha2 -min_slic3r_version = 2.2.0-alpha0 +max_slic3r_version = 12.2.0 +min_slic3r_version = 2.1.0 1.1.1-alpha2 Bumped up config version, so our in house customer will get updated profiles. 1.1.0 Filament aliases, Creality profiles and other goodies for PrusaSlicer 2.2.0-alpha0 min_slic3r_version = 2.1.1-beta0 diff --git a/resources/ui_layout/filament.ui b/resources/ui_layout/filament.ui index 1ecc35a90..f3fcc068c 100644 --- a/resources/ui_layout/filament.ui +++ b/resources/ui_layout/filament.ui @@ -37,7 +37,7 @@ group:Cooling thresholds page:Advanced:wrench group:Filament properties - setting:filament_type + setting:width$7:filament_type setting:filament_soluble group:Multimaterial toolchange temperature setting:filament_enable_toolchange_temp diff --git a/resources/ui_layout/print.ui b/resources/ui_layout/print.ui index b9526f966..b506eb3de 100644 --- a/resources/ui_layout/print.ui +++ b/resources/ui_layout/print.ui @@ -9,6 +9,11 @@ group:Horizontal shells setting:top_solid_layers setting:label$Bottom:bottom_solid_layers end_line + line:Minimum shell thickness + setting:top_solid_min_thickness + setting:bottom_solid_min_thickness + end_line + top_bottom_shell_thickness_explanation setting:enforce_full_fill_volume group:Quality (slower slicing) line:Extra perimeters @@ -120,6 +125,7 @@ group:Skirt setting:skirts setting:skirt_distance setting:skirt_height + setting:draft_shield setting:min_skirt_length group:Brim setting:brim_width diff --git a/resources/ui_layout/print.ui.legacy b/resources/ui_layout/print.ui.legacy index c6c7f0f3e..3a6a0d411 100644 --- a/resources/ui_layout/print.ui.legacy +++ b/resources/ui_layout/print.ui.legacy @@ -12,6 +12,11 @@ group:Horizontal shells setting:top_solid_layers setting:label$Bottom:bottom_solid_layers end_line + line:Minimum shell thickness + setting:top_solid_min_thickness + setting:bottom_solid_min_thickness + end_line + top_bottom_shell_thickness_explanation setting:enforce_full_fill_volume group:Quality (slower slicing) setting:full_lablel:extra_perimeters @@ -85,6 +90,7 @@ group:Skirt setting:skirts setting:skirt_distance setting:skirt_height + setting:draft_shield setting:min_skirt_length group:Brim setting:brim_width diff --git a/resources/ui_layout/printer_sla.ui b/resources/ui_layout/printer_sla.ui index 4370bf1f7..7e0a4fa10 100644 --- a/resources/ui_layout/printer_sla.ui +++ b/resources/ui_layout/printer_sla.ui @@ -28,6 +28,8 @@ group:Corrections setting:label$Z:id$1:relative_correction end_line setting:absolute_correction + setting:elefant_foot_compensation + setting:elefant_foot_min_width setting:gamma_correction group:Exposure setting:min_exposure_time diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index 86af462c9..a13c61f7a 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -165,7 +165,7 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt , vendor_id(vendor.id) , width(0) { - const auto &models = vendor.models; + const std::vector &models = vendor.models; auto *sizer = new wxBoxSizer(wxVERTICAL); @@ -184,12 +184,15 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt bool is_variants = false; - for (const auto &model : models) { + for (const VendorProfile::PrinterModel &model : models) { if (! filter(model)) { continue; } wxBitmap bitmap; int bitmap_width = 0; - const wxString bitmap_file = GUI::from_u8(Slic3r::resources_dir() + "/profiles/" + vendor.id + "/" + model.id + "_thumbnail.png"); + const wxString bitmap_file = + (model.thumbnail.empty()) ? + GUI::from_u8(Slic3r::resources_dir() + "/profiles/" + vendor.id + "/" + model.id + "_thumbnail.png") : + GUI::from_u8(Slic3r::resources_dir() + "/profiles/" + vendor.id + "/" + model.thumbnail); if (wxFileExists(bitmap_file)) { bitmap.LoadFile(bitmap_file, wxBITMAP_TYPE_PNG); bitmap_width = bitmap.GetWidth(); @@ -545,12 +548,16 @@ std::set PagePrinters::get_selected_models() void PagePrinters::set_run_reason(ConfigWizard::RunReason run_reason) { +#ifdef ALLOW_PRUSA_FIRST if (technology == T_FFF && (run_reason == ConfigWizard::RR_DATA_EMPTY || run_reason == ConfigWizard::RR_DATA_LEGACY) && printer_pickers.size() > 0 && printer_pickers[0]->vendor_id == PresetBundle::PRUSA_BUNDLE) { printer_pickers[0]->select_one(0, true); } +#else + //didn't select the first prusa even if it's the first start: let the user choose +#endif } @@ -2119,14 +2126,19 @@ ConfigWizard::ConfigWizard(wxWindow *parent) p->add_page(p->page_custom = new PageCustom(this)); p->custom_printer_selected = p->page_custom->custom_wanted(); #else - for (const auto &vendor : p->bundles) { + std::vector sorted_vendors; + for (const auto &vendor : p->bundles) sorted_vendors.push_back(vendor.first); + std::sort(sorted_vendors.begin(), sorted_vendors.end()); + + for (const std::string &vendor_name : sorted_vendors) { + const Bundle &vendor = p->bundles[vendor_name]; bool first = true; - for (const PrinterTechnology &tech : vendor.second.vendor_profile->technologies) { - wxString name = _(L(vendor.second.vendor_profile->name)); + for (const PrinterTechnology &tech : vendor.vendor_profile->technologies) { + wxString name = _(L(vendor.vendor_profile->name)); name.Replace("{technology}", tech_to_string.at(tech)); - wxString description = _(L(vendor.second.vendor_profile->full_name)); + wxString description = _(L(vendor.vendor_profile->full_name)); description.Replace("{technology}", tech_to_string.at(tech)); - p->pages_vendors.push_back(new PagePrinters(this, description, name, *vendor.second.vendor_profile, (uint32_t)(vendor.second.vendor_profile->technologies.size()>1 && !first ? 1 : 0), (Technology)(uint8_t)tech)); + p->pages_vendors.push_back(new PagePrinters(this, description, name, *vendor.vendor_profile, (uint32_t)(vendor.vendor_profile->technologies.size()>1 && !first ? 1 : 0), (Technology)(uint8_t)tech)); p->add_page(p->pages_vendors.back()); first = false; } diff --git a/src/slic3r/GUI/Field.hpp b/src/slic3r/GUI/Field.hpp index ad2cfc8eb..7a3b4bf8f 100644 --- a/src/slic3r/GUI/Field.hpp +++ b/src/slic3r/GUI/Field.hpp @@ -361,7 +361,6 @@ public: } void set_value(const boost::any& value, bool change_event = false) { m_disable_change_event = !change_event; - std::cout << value.type().name() << "==int !0\n"; tmp_value = boost::any_cast(value); m_value = value; dynamic_cast(window)->SetValue(tmp_value); diff --git a/src/slic3r/GUI/Preset.cpp b/src/slic3r/GUI/Preset.cpp index 9fdd89fa8..fbf43fc5e 100644 --- a/src/slic3r/GUI/Preset.cpp +++ b/src/slic3r/GUI/Preset.cpp @@ -212,8 +212,11 @@ VendorProfile VendorProfile::from_ini(const ptree &tree, const boost::filesystem } model.bed_model = section.second.get("bed_model", ""); model.bed_texture = section.second.get("bed_texture", ""); + model.thumbnail = section.second.get("thumbnail", ""); + + //save it if (! model.id.empty() && ! model.variants.empty()) - res.models.push_back(std::move(model)); + res.models.emplace_back(std::move(model)); } } diff --git a/src/slic3r/GUI/Preset.hpp b/src/slic3r/GUI/Preset.hpp index c7275929a..2582266bd 100644 --- a/src/slic3r/GUI/Preset.hpp +++ b/src/slic3r/GUI/Preset.hpp @@ -67,6 +67,7 @@ public: // Vendor & Printer Model specific print bed model & texture. std::string bed_model; std::string bed_texture; + std::string thumbnail; PrinterVariant* variant(const std::string &name) { for (auto &v : this->variants) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 971576485..a1df6d1cb 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1458,16 +1458,8 @@ bool Tab::create_pages(std::string setting_type_name) }; current_group->append_line(current_line); } - else if (boost::starts_with(full_line, "preset_description_line")) { - build_preset_description_line(current_group.get()); - } else if (boost::starts_with(full_line, "parent_preset_description")) { - current_line = Line{ "", "" }; - current_line.full_width = 1; - current_line.widget = [this](wxWindow* parent) { - return description_line_widget(parent, &this->m_parent_preset_description_line); - }; - current_group->append_line(current_line); + build_preset_description_line(current_group.get()); } else if (boost::starts_with(full_line, "cooling_description")) { TabFilament* tab = nullptr; @@ -1523,42 +1515,11 @@ bool Tab::create_pages(std::string setting_type_name) tab->build_printhost(current_group.get()); } else if (full_line == "bed_shape"){ - Line myline = current_group->create_single_option_line("bed_shape");//{ _(L("Bed shape")), "" }; - myline.widget = [this](wxWindow* parent) { - ScalableButton* btn; - add_scaled_button(parent, &btn, "printer_white", " " + _(L("Set")) + " " + dots, wxBU_LEFT | wxBU_EXACTFIT); - btn->SetFont(wxGetApp().normal_font()); - - auto sizer = new wxBoxSizer(wxHORIZONTAL); - sizer->Add(btn); - - btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e) - { - BedShapeDialog dlg(this); - dlg.build_dialog(*m_config->option("bed_shape"), - *m_config->option("bed_custom_texture"), - *m_config->option("bed_custom_model")); - if (dlg.ShowModal() == wxID_OK) { - const std::vector& shape = dlg.get_shape(); - const std::string& custom_texture = dlg.get_custom_texture(); - const std::string& custom_model = dlg.get_custom_model(); - if (!shape.empty()) - { - load_key_value("bed_shape", shape); - load_key_value("bed_custom_texture", custom_texture); - load_key_value("bed_custom_model", custom_model); - update_changed_ui(); - } - } - })); - - return sizer; - }; - wxStaticText* label = (m_colored_Labels.find("bed_shape") == m_colored_Labels.end()) ? nullptr : m_colored_Labels.at("bed_shape"); - if (label != nullptr) - current_group->append_line(myline, &label); - else - current_group->append_line(myline); + TabPrinter* tab = nullptr; + if ((tab = dynamic_cast(this)) == nullptr) continue; + create_line_with_widget(current_group.get(), "bed_shape", [tab](wxWindow* parent) { + return tab->create_bed_shape_widget(parent); + }); } else if (full_line == "extruders_count") { ConfigOptionDef def;