Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_adaptive_layer_height

This commit is contained in:
Enrico Turri 2019-11-15 15:49:26 +01:00
commit 3baf11f694
29 changed files with 2228 additions and 360 deletions

View file

@ -272,27 +272,13 @@ void Bed3D::render(GLCanvas3D& canvas, float theta, float scale_factor) const
switch (m_type)
{
case MK2:
{
render_prusa(canvas, "mk2", theta > 90.0f);
break;
}
case MK3:
{
render_prusa(canvas, "mk3", theta > 90.0f);
break;
}
case SL1:
{
render_prusa(canvas, "sl1", theta > 90.0f);
break;
}
case MK2: { render_prusa(canvas, "mk2", theta > 90.0f); break; }
case MK3: { render_prusa(canvas, "mk3", theta > 90.0f); break; }
case SL1: { render_prusa(canvas, "sl1", theta > 90.0f); break; }
case MINI: { render_prusa(canvas, "mini", theta > 90.0f); break; }
case ENDER3: { render_prusa(canvas, "ender3", theta > 90.0f); break; }
default:
case Custom:
{
render_custom(canvas, theta > 90.0f);
break;
}
case Custom: { render_custom(canvas, theta > 90.0f); break; }
}
}
@ -364,22 +350,38 @@ Bed3D::EType Bed3D::detect_type(const Pointfs& shape) const
{
if (curr->config.has("bed_shape"))
{
if ((curr->vendor != nullptr) && (curr->vendor->name == "Prusa Research") && (shape == dynamic_cast<const ConfigOptionPoints*>(curr->config.option("bed_shape"))->values))
if (curr->vendor != nullptr)
{
if (boost::contains(curr->name, "SL1"))
if ((curr->vendor->name == "Prusa Research") && (shape == dynamic_cast<const ConfigOptionPoints*>(curr->config.option("bed_shape"))->values))
{
type = SL1;
break;
if (boost::contains(curr->name, "SL1"))
{
type = SL1;
break;
}
else if (boost::contains(curr->name, "MK3") || boost::contains(curr->name, "MK2.5"))
{
type = MK3;
break;
}
else if (boost::contains(curr->name, "MK2"))
{
type = MK2;
break;
}
else if (boost::contains(curr->name, "MINI"))
{
type = MINI;
break;
}
}
else if (boost::contains(curr->name, "MK3") || boost::contains(curr->name, "MK2.5"))
else if ((curr->vendor->name == "Creality") && (shape == dynamic_cast<const ConfigOptionPoints*>(curr->config.option("bed_shape"))->values))
{
type = MK3;
break;
}
else if (boost::contains(curr->name, "MK2"))
{
type = MK2;
break;
if (boost::contains(curr->name, "ENDER-3"))
{
type = ENDER3;
break;
}
}
}
}

View file

@ -67,6 +67,8 @@ public:
MK2,
MK3,
SL1,
MINI,
ENDER3,
Custom,
Num_Types
};

View file

@ -166,6 +166,8 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt
int max_row_width = 0;
int current_row_width = 0;
bool is_variants = false;
for (const auto &model : models) {
if (! filter(model)) { continue; }
@ -220,6 +222,7 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt
auto *alt_label = new wxStaticText(variants_panel, wxID_ANY, _(L("Alternate nozzles:")));
alt_label->SetFont(font_alt_nozzle);
variants_sizer->Add(alt_label, 0, wxBOTTOM, 3);
is_variants = true;
}
auto *cbox = new Checkbox(variants_panel, label, model_id, variant.name);
@ -280,10 +283,10 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt
}
title_sizer->AddStretchSpacer();
if (titles.size() > 1) {
if (/*titles.size() > 1*/is_variants) {
// It only makes sense to add the All / None buttons if there's multiple printers
auto *sel_all_std = new wxButton(this, wxID_ANY, _(L("All standard")));
auto *sel_all_std = new wxButton(this, wxID_ANY, titles.size() > 1 ? _(L("All standard")) : _(L("Standard")));
auto *sel_all = new wxButton(this, wxID_ANY, _(L("All")));
auto *sel_none = new wxButton(this, wxID_ANY, _(L("None")));
sel_all_std->Bind(wxEVT_BUTTON, [this](const wxCommandEvent &event) { this->select_all(true, false); });

View file

@ -403,7 +403,7 @@ const std::vector<std::string>& Preset::print_options()
"top_infill_extrusion_width", "support_material_extrusion_width", "infill_overlap", "bridge_flow_ratio", "clip_multipart_objects",
"elefant_foot_compensation", "xy_size_compensation", "threads", "resolution", "wipe_tower", "wipe_tower_x", "wipe_tower_y",
"wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "single_extruder_multi_material_priming",
"compatible_printers", "compatible_printers_condition", "inherits"
"wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits"
};
return s_opts;
}

View file

@ -1170,6 +1170,7 @@ void TabPrint::build()
optgroup->append_single_option_line("wipe_tower_width");
optgroup->append_single_option_line("wipe_tower_rotation_angle");
optgroup->append_single_option_line("wipe_tower_bridging");
optgroup->append_single_option_line("wipe_tower_no_sparse_layers");
optgroup->append_single_option_line("single_extruder_multi_material_priming");
optgroup = page->new_optgroup(_(L("Advanced")));