diff --git a/resources/models/mk2_bed.stl b/resources/models/mk2_bed.stl index 07b7655ea6..21fb29d0c3 100644 Binary files a/resources/models/mk2_bed.stl and b/resources/models/mk2_bed.stl differ diff --git a/resources/models/mk3_bed.stl b/resources/models/mk3_bed.stl index 1bd1a8faac..e494641168 100644 Binary files a/resources/models/mk3_bed.stl and b/resources/models/mk3_bed.stl differ diff --git a/resources/models/sl1_bed.stl b/resources/models/sl1_bed.stl index b2cadde4bd..dfbf12845b 100644 Binary files a/resources/models/sl1_bed.stl and b/resources/models/sl1_bed.stl differ diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp index 3a8a669043..4f3d499b2b 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(); diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index 9e3eaf41d3..dba5958466 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -1736,13 +1736,7 @@ bool GLBed::on_init_from_file(const std::string& filename) m_filename = filename; - ModelObject* model_object = model.objects.front(); - model_object->center_around_origin(); - - TriangleMesh mesh = model.mesh(); - mesh.repair(); - - m_volume.indexed_vertex_array.load_mesh(mesh); + m_volume.indexed_vertex_array.load_mesh(model.mesh()); float color[4] = { 0.235f, 0.235f, 0.235f, 1.0f }; set_color(color, 4);