From a0096cf563e5830b49a647c79c01ad3cc4195422 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 23 Jul 2018 09:42:02 +0200 Subject: [PATCH 1/3] Renamed the key MK3SMMU to MK3MMU2, added a generic PLA MMU2 material. --- ...ch_MK3SMM.png => PrusaResearch_MK3MM2.png} | Bin resources/profiles/PrusaResearch.idx | 1 + resources/profiles/PrusaResearch.ini | 23 ++++++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) rename resources/icons/printers/{PrusaResearch_MK3SMM.png => PrusaResearch_MK3MM2.png} (100%) diff --git a/resources/icons/printers/PrusaResearch_MK3SMM.png b/resources/icons/printers/PrusaResearch_MK3MM2.png similarity index 100% rename from resources/icons/printers/PrusaResearch_MK3SMM.png rename to resources/icons/printers/PrusaResearch_MK3MM2.png diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx index 8b8e8951e..bdb372d81 100644 --- a/resources/profiles/PrusaResearch.idx +++ b/resources/profiles/PrusaResearch.idx @@ -1,4 +1,5 @@ min_slic3r_version = 1.41.0-alpha +0.2.0-alpha2 0.2.0-alpha1 0.2.0-alpha min_slic3r_version = 1.40.0 diff --git a/resources/profiles/PrusaResearch.ini b/resources/profiles/PrusaResearch.ini index 2f0761d15..fe403263d 100644 --- a/resources/profiles/PrusaResearch.ini +++ b/resources/profiles/PrusaResearch.ini @@ -5,7 +5,7 @@ name = Prusa Research # Configuration version of this file. Config file will only be installed, if the config_version differs. # This means, the server may force the Slic3r configuration to be downgraded. -config_version = 0.2.0-alpha1 +config_version = 0.2.0-alpha2 # Where to get the updates from? config_update_url = https://raw.githubusercontent.com/prusa3d/Slic3r-settings/master/live/PrusaResearch/ @@ -27,11 +27,11 @@ name = Original Prusa i3 MK2.5 variants = 0.4; 0.25; 0.6 [printer_model:MK2SMM] -name = Original Prusa i3 MK2SMM +name = Original Prusa i3 MK2S Multi Material Upgrade variants = 0.4; 0.6 -[printer_model:MK3SMM] -name = Original Prusa i3 MK3SMM +[printer_model:MK3MM2] +name = Original Prusa i3 MK3 Multi Material Upgrade 2.0 variants = 0.4 # All presets starting with asterisk, for example *common*, are intermediate and they will @@ -589,6 +589,9 @@ extrusion_multiplier = 1 filament_loading_speed = 28 filament_unloading_speed = 90 filament_toolchange_delay = 0 +filament_cooling_moves = 4 +filament_cooling_initial_speed = 2.2 +filament_cooling_final_speed = 3.4 filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6" filament_cost = 0 filament_density = 0 @@ -853,7 +856,7 @@ filament_notes = "List of manufacturers tested with standart PET print settings inherits = *PLA* filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH" -[filament:Prusa PLA MMU2] +[filament:*PLA MMU2*] inherits = Prusa PLA compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material filament_cooling_final_speed = 50 @@ -861,8 +864,12 @@ filament_cooling_initial_speed = 10 filament_cooling_moves = 7 filament_loading_speed = 14 filament_ramming_parameters = "120 110 4.03226 4.12903 4.25806 4.41935 4.58065 4.80645 5.35484 6.29032 7.58065 9.09677 10.5806 11.8387 12.6452 12.9677| 0.05 4.01935 0.45 4.15483 0.95 4.50968 1.45 4.94516 1.95 6.79677 2.45 9.87102 2.95 12.4388 3.45 13.0839 3.95 7.6 4.45 7.6 4.95 7.6" -min_fan_speed = 85 -slowdown_below_layer_time = 10 + +[filament:Generic PLA MMU2] +inherits = *PLA MMU2* + +[filament:Prusa PLA MMU2] +inherits = *PLA MMU2* [filament:SemiFlex or Flexfill 98A] inherits = *FLEX* @@ -1160,7 +1167,7 @@ cooling_tube_retraction = 30 parking_pos_retraction = 85 retract_length_toolchange = 3 extra_loading_move = -13 -printer_model = MK3SMM +printer_model = MK3MM2 default_print_profile = 0.15mm OPTIMAL MK3 MMU2 default_filament_profile = Prusa PLA MMU2 From abe7a71f85d28ed4561ad357a3d59cae39f0eb1c Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 23 Jul 2018 11:43:06 +0200 Subject: [PATCH 2/3] ConfigWizard: Wrap printer model titles --- xs/src/slic3r/GUI/ConfigWizard.cpp | 37 ++++++++++++++-------- xs/src/slic3r/GUI/ConfigWizard_private.hpp | 1 + 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index 2e315a70b..0c42168bb 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -65,22 +65,27 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons auto namefont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); namefont.SetWeight(wxFONTWEIGHT_BOLD); + // wxGrid appends widgets by rows, but we need to construct them in columns. + // These vectors are used to hold the elements so that they can be appended in the right order. + std::vector titles; + std::vector bitmaps; + std::vector variants_panels; + for (const auto &model : models) { - auto *panel = new wxPanel(this); - auto *col_sizer = new wxBoxSizer(wxVERTICAL); - panel->SetSizer(col_sizer); - - auto *title = new wxStaticText(panel, wxID_ANY, model.name, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); - title->SetFont(namefont); - col_sizer->Add(title, 0, wxBOTTOM, 3); - auto bitmap_file = wxString::Format("printers/%s_%s.png", vendor.id, model.id); wxBitmap bitmap(GUI::from_u8(Slic3r::var(bitmap_file.ToStdString())), wxBITMAP_TYPE_PNG); - auto *bitmap_widget = new wxStaticBitmap(panel, wxID_ANY, bitmap); - col_sizer->Add(bitmap_widget, 0, wxBOTTOM, 3); - col_sizer->AddSpacer(20); + auto *title = new wxStaticText(this, wxID_ANY, model.name, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); + title->SetFont(namefont); + title->Wrap(std::max((int)MODEL_MIN_WRAP, bitmap.GetWidth())); + titles.push_back(title); + auto *bitmap_widget = new wxStaticBitmap(this, wxID_ANY, bitmap); + bitmaps.push_back(bitmap_widget); + + auto *variants_panel = new wxPanel(this); + auto *variants_sizer = new wxBoxSizer(wxVERTICAL); + variants_panel->SetSizer(variants_sizer); const auto model_id = model.id; bool default_variant = true; // Mark the first variant as default in the GUI @@ -88,22 +93,26 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons const auto label = wxString::Format("%s %s %s %s", variant.name, _(L("mm")), _(L("nozzle")), (default_variant ? _(L("(default)")) : wxString())); default_variant = false; - auto *cbox = new Checkbox(panel, label, model_id, variant.name); + auto *cbox = new Checkbox(variants_panel, label, model_id, variant.name); const size_t idx = cboxes.size(); cboxes.push_back(cbox); bool enabled = appconfig_vendors.get_variant("PrusaResearch", model_id, variant.name); variants_checked += enabled; cbox->SetValue(enabled); - col_sizer->Add(cbox, 0, wxBOTTOM, 3); + variants_sizer->Add(cbox, 0, wxBOTTOM, 3); cbox->Bind(wxEVT_CHECKBOX, [this, idx](wxCommandEvent &event) { if (idx >= this->cboxes.size()) { return; } this->on_checkbox(this->cboxes[idx], event.IsChecked()); }); } - printer_grid->Add(panel); + variants_panels.push_back(variants_panel); } + for (auto title : titles) { printer_grid->Add(title, 0, wxBOTTOM, 3); } + for (auto bitmap : bitmaps) { printer_grid->Add(bitmap, 0, wxBOTTOM, 20); } + for (auto vp : variants_panels) { printer_grid->Add(vp); } + auto *all_none_sizer = new wxBoxSizer(wxHORIZONTAL); auto *sel_all = new wxButton(this, wxID_ANY, _(L("Select all"))); auto *sel_none = new wxButton(this, wxID_ANY, _(L("Select none"))); diff --git a/xs/src/slic3r/GUI/ConfigWizard_private.hpp b/xs/src/slic3r/GUI/ConfigWizard_private.hpp index 04319a1b4..c027f300d 100644 --- a/xs/src/slic3r/GUI/ConfigWizard_private.hpp +++ b/xs/src/slic3r/GUI/ConfigWizard_private.hpp @@ -27,6 +27,7 @@ namespace GUI { enum { WRAP_WIDTH = 500, + MODEL_MIN_WRAP = 150, DIALOG_MARGIN = 15, INDEX_MARGIN = 40, From 1c58c3e15340833555422c0aad2e9bef8c7c8507 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 23 Jul 2018 12:34:07 +0200 Subject: [PATCH 3/3] PresetUpdater: Fix incompatible bundle requirements display --- xs/src/slic3r/Utils/PresetUpdater.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/xs/src/slic3r/Utils/PresetUpdater.cpp b/xs/src/slic3r/Utils/PresetUpdater.cpp index 7ed963a16..b5eab115b 100644 --- a/xs/src/slic3r/Utils/PresetUpdater.cpp +++ b/xs/src/slic3r/Utils/PresetUpdater.cpp @@ -541,10 +541,21 @@ bool PresetUpdater::config_update() const std::unordered_map incompats_map; for (const auto &incompat : updates.incompats) { auto vendor = incompat.name(); - auto restrictions = wxString::Format(_(L("requires min. %s and max. %s")), - incompat.version.min_slic3r_version.to_string(), - incompat.version.max_slic3r_version.to_string() - ); + + const auto min_slic3r = incompat.version.min_slic3r_version; + const auto max_slic3r = incompat.version.max_slic3r_version; + wxString restrictions; + if (min_slic3r != Semver::zero() && max_slic3r != Semver::inf()) { + restrictions = wxString::Format(_(L("requires min. %s and max. %s")), + min_slic3r.to_string(), + max_slic3r.to_string() + ); + } else if (min_slic3r != Semver::zero()) { + restrictions = wxString::Format(_(L("requires min. %s")), min_slic3r.to_string()); + } else { + restrictions = wxString::Format(_(L("requires max. %s")), max_slic3r.to_string()); + } + incompats_map.emplace(std::make_pair(std::move(vendor), std::move(restrictions))); } @@ -556,7 +567,7 @@ bool PresetUpdater::config_update() const BOOST_LOG_TRIVIAL(info) << "User wants to re-configure..."; p->perform_updates(std::move(updates)); GUI::ConfigWizard wizard(nullptr, GUI::ConfigWizard::RR_DATA_INCOMPAT); - if (! wizard.run(GUI::get_preset_bundle(), this)) { + if (! wizard.run(GUI::get_preset_bundle(), this)) { return false; } } else {