Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2019-07-25 09:43:21 +0300
committerEnrico Turri <enricoturri@seznam.cz>2019-07-25 09:43:21 +0300
commit48dc2bb7622ba6db4b251e9d9166a5c1ae246fe7 (patch)
tree2941ba795f33890a300ecf5675115b4cb431f497 /src/slic3r/GUI/3DBed.cpp
parent1483a7fd51dcbafd7ece744efb5c420eb68bf393 (diff)
Fixed positioning of bed model into the scene and changed bundled bed models
Diffstat (limited to 'src/slic3r/GUI/3DBed.cpp')
-rw-r--r--src/slic3r/GUI/3DBed.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp
index 3a8a66904..4f3d499b2 100644
--- a/src/slic3r/GUI/3DBed.cpp
+++ b/src/slic3r/GUI/3DBed.cpp
@@ -398,18 +398,8 @@ void Bed3D::render_prusa(GLCanvas3D& canvas, const std::string& key, bool bottom
std::string filename = m_custom_model.empty() ? resources_dir() + "/models/" + key + "_bed.stl" : m_custom_model;
if ((m_model.get_filename() != filename) && m_model.init_from_file(filename))
{
- Vec3d offset = m_bounding_box.center() - Vec3d(0.0, 0.0, 0.5 * m_model.get_bounding_box().size()(2));
- if (key == "mk2")
- // hardcoded value to match the stl model
- offset += Vec3d(0.0, 7.5, -0.03);
- else if (key == "mk3")
- // hardcoded value to match the stl model
- offset += Vec3d(0.0, 5.5, 2.43);
- else if (key == "sl1")
- // hardcoded value to match the stl model
- offset += Vec3d(0.0, 0.0, -0.03);
-
- m_model.center_around(offset);
+ // move the model a bit down to avoid z-fighting with the texture quad
+ m_model.set_offset(-0.03 * Vec3d::UnitZ());
// update extended bounding box
calc_bounding_boxes();