From 24d2f510c52987e89e9a6cb48bb0bad118706583 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 23 Aug 2021 09:47:37 +0200 Subject: [PATCH] Fixed painting on surfaces close to the bed (broken since 1360446) --- src/slic3r/GUI/MeshUtils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/MeshUtils.cpp b/src/slic3r/GUI/MeshUtils.cpp index 588e50dab..ba83bdbff 100644 --- a/src/slic3r/GUI/MeshUtils.cpp +++ b/src/slic3r/GUI/MeshUtils.cpp @@ -4,6 +4,7 @@ #include "libslic3r/TriangleMesh.hpp" #include "libslic3r/TriangleMeshSlicer.hpp" #include "libslic3r/ClipperUtils.hpp" +#include "libslic3r/Model.hpp" #include "slic3r/GUI/Camera.hpp" @@ -225,7 +226,7 @@ bool MeshRaycaster::unproject_on_mesh(const Vec2d& mouse_pos, const Transform3d& // Also, remove anything below the bed (sinking objects). for (i=0; i= 0. && + if (transformed_hit.z() >= SINKING_Z_THRESHOLD && (! clipping_plane || ! clipping_plane->is_point_clipped(transformed_hit))) break; }