diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-11-15 11:28:51 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-11-15 11:28:51 +0300 |
commit | 2dec84a429326b9a95f3c572bae263c6dbe7b72f (patch) | |
tree | f3e66d43850bd62aa19bc386852a6fbf7310c627 /src/slic3r/GUI/3DBed.cpp | |
parent | 840c59cd3d64ddbe616f5d599dca4db1794c32e9 (diff) |
Added model and texture for Mini and Ender3 printer printbeds
Diffstat (limited to 'src/slic3r/GUI/3DBed.cpp')
-rw-r--r-- | src/slic3r/GUI/3DBed.cpp | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp index 82b512270..d0bab50c6 100644 --- a/src/slic3r/GUI/3DBed.cpp +++ b/src/slic3r/GUI/3DBed.cpp @@ -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")) - { - type = SL1; - break; - } - else if (boost::contains(curr->name, "MK3") || boost::contains(curr->name, "MK2.5")) + if ((curr->vendor->name == "Prusa Research") && (shape == dynamic_cast<const ConfigOptionPoints*>(curr->config.option("bed_shape"))->values)) { - type = MK3; - 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, "MK2")) + else if ((curr->vendor->name == "Creality") && (shape == dynamic_cast<const ConfigOptionPoints*>(curr->config.option("bed_shape"))->values)) { - type = MK2; - break; + if (boost::contains(curr->name, "ENDER-3")) + { + type = ENDER3; + break; + } } } } |