Merge branch 'master' of https://github.com/prusa3d/Slic3r into scene_manipulators

This commit is contained in:
Enrico Turri 2018-07-23 13:56:26 +02:00
commit 4294510ed7
6 changed files with 56 additions and 27 deletions

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,4 +1,5 @@
min_slic3r_version = 1.41.0-alpha min_slic3r_version = 1.41.0-alpha
0.2.0-alpha2
0.2.0-alpha1 0.2.0-alpha1
0.2.0-alpha 0.2.0-alpha
min_slic3r_version = 1.40.0 min_slic3r_version = 1.40.0

View File

@ -5,7 +5,7 @@
name = Prusa Research name = Prusa Research
# Configuration version of this file. Config file will only be installed, if the config_version differs. # 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. # 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? # Where to get the updates from?
config_update_url = https://raw.githubusercontent.com/prusa3d/Slic3r-settings/master/live/PrusaResearch/ 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 variants = 0.4; 0.25; 0.6
[printer_model:MK2SMM] [printer_model:MK2SMM]
name = Original Prusa i3 MK2SMM name = Original Prusa i3 MK2S Multi Material Upgrade
variants = 0.4; 0.6 variants = 0.4; 0.6
[printer_model:MK3SMM] [printer_model:MK3MM2]
name = Original Prusa i3 MK3SMM name = Original Prusa i3 MK3 Multi Material Upgrade 2.0
variants = 0.4 variants = 0.4
# All presets starting with asterisk, for example *common*, are intermediate and they will # 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_loading_speed = 28
filament_unloading_speed = 90 filament_unloading_speed = 90
filament_toolchange_delay = 0 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_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_cost = 0
filament_density = 0 filament_density = 0
@ -853,7 +856,7 @@ filament_notes = "List of manufacturers tested with standart PET print settings
inherits = *PLA* 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_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 inherits = Prusa PLA
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material
filament_cooling_final_speed = 50 filament_cooling_final_speed = 50
@ -861,8 +864,12 @@ filament_cooling_initial_speed = 10
filament_cooling_moves = 7 filament_cooling_moves = 7
filament_loading_speed = 14 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" 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] [filament:SemiFlex or Flexfill 98A]
inherits = *FLEX* inherits = *FLEX*
@ -1160,7 +1167,7 @@ cooling_tube_retraction = 30
parking_pos_retraction = 85 parking_pos_retraction = 85
retract_length_toolchange = 3 retract_length_toolchange = 3
extra_loading_move = -13 extra_loading_move = -13
printer_model = MK3SMM printer_model = MK3MM2
default_print_profile = 0.15mm OPTIMAL MK3 MMU2 default_print_profile = 0.15mm OPTIMAL MK3 MMU2
default_filament_profile = Prusa PLA MMU2 default_filament_profile = Prusa PLA MMU2

View File

@ -65,22 +65,27 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons
auto namefont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); auto namefont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
namefont.SetWeight(wxFONTWEIGHT_BOLD); 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<wxStaticText*> titles;
std::vector<wxStaticBitmap*> bitmaps;
std::vector<wxPanel*> variants_panels;
for (const auto &model : models) { 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); 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); 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; const auto model_id = model.id;
bool default_variant = true; // Mark the first variant as default in the GUI 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")), const auto label = wxString::Format("%s %s %s %s", variant.name, _(L("mm")), _(L("nozzle")),
(default_variant ? _(L("(default)")) : wxString())); (default_variant ? _(L("(default)")) : wxString()));
default_variant = false; 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(); const size_t idx = cboxes.size();
cboxes.push_back(cbox); cboxes.push_back(cbox);
bool enabled = appconfig_vendors.get_variant("PrusaResearch", model_id, variant.name); bool enabled = appconfig_vendors.get_variant("PrusaResearch", model_id, variant.name);
variants_checked += enabled; variants_checked += enabled;
cbox->SetValue(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) { cbox->Bind(wxEVT_CHECKBOX, [this, idx](wxCommandEvent &event) {
if (idx >= this->cboxes.size()) { return; } if (idx >= this->cboxes.size()) { return; }
this->on_checkbox(this->cboxes[idx], event.IsChecked()); 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 *all_none_sizer = new wxBoxSizer(wxHORIZONTAL);
auto *sel_all = new wxButton(this, wxID_ANY, _(L("Select all"))); auto *sel_all = new wxButton(this, wxID_ANY, _(L("Select all")));
auto *sel_none = new wxButton(this, wxID_ANY, _(L("Select none"))); auto *sel_none = new wxButton(this, wxID_ANY, _(L("Select none")));

View File

@ -27,6 +27,7 @@ namespace GUI {
enum { enum {
WRAP_WIDTH = 500, WRAP_WIDTH = 500,
MODEL_MIN_WRAP = 150,
DIALOG_MARGIN = 15, DIALOG_MARGIN = 15,
INDEX_MARGIN = 40, INDEX_MARGIN = 40,

View File

@ -541,10 +541,21 @@ bool PresetUpdater::config_update() const
std::unordered_map<std::string, wxString> incompats_map; std::unordered_map<std::string, wxString> incompats_map;
for (const auto &incompat : updates.incompats) { for (const auto &incompat : updates.incompats) {
auto vendor = incompat.name(); auto vendor = incompat.name();
auto restrictions = wxString::Format(_(L("requires min. %s and max. %s")),
incompat.version.min_slic3r_version.to_string(), const auto min_slic3r = incompat.version.min_slic3r_version;
incompat.version.max_slic3r_version.to_string() 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))); incompats_map.emplace(std::make_pair(std::move(vendor), std::move(restrictions)));
} }