From 32892514ff57cd87a9aa77b26ae9247f79c6cfc1 Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Tue, 4 Jul 2023 09:12:20 +0800 Subject: [PATCH] FIX: correct the bed model to the print area origin point Change-Id: Ieb856dff421d39694966e3c13c519f4ffa3da5c2 --- src/slic3r/GUI/3DBed.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp index 1ef1e0f1f..baebacfe8 100644 --- a/src/slic3r/GUI/3DBed.cpp +++ b/src/slic3r/GUI/3DBed.cpp @@ -604,15 +604,15 @@ void Bed3D::render_system(GLCanvas3D& canvas, bool bottom) const void Bed3D::update_model_offset() const { // move the model so that its origin (0.0, 0.0, 0.0) goes into the bed shape center and a bit down to avoid z-fighting with the texture quad - Vec3d shift = m_extended_bounding_box.center(); + Vec3d shift = m_build_volume.bounding_volume().center(); shift(2) = -0.03; Vec3d* model_offset_ptr = const_cast(&m_model_offset); *model_offset_ptr = shift; //BBS: TODO: hack for current stl for BBL printer if (std::string::npos != m_model_filename.find("bbl-3dp-")) { - (*model_offset_ptr)(0) -= 128.f; - (*model_offset_ptr)(1) -= 128.f; + (*model_offset_ptr)(0) -= m_bed_shape[2].x() / 2.0f; + (*model_offset_ptr)(1) -= m_bed_shape[2].y() / 2.0f; (*model_offset_ptr)(2) = -0.41 + GROUND_Z; }