From 73ad48c135f7ce167a858542fdaacd34d36b99c6 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 27 Feb 2020 14:36:56 +0100 Subject: [PATCH] Small fix of clipping plane positioning If the clipping plane is moved automatically after hollowed mesh was created, move the clipping plane and fix current direction so it is not reset when user wants to move it This is a quick solution for the 2.2.0 release. It should be later refactored as mentioned in the code. --- src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp index b97a6f4bce..5f3430a784 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp @@ -62,6 +62,14 @@ void GLGizmoHollow::set_sla_support_data(ModelObject*, const Selection&) update_clipping_plane(m_c->m_clipping_plane_was_moved); + // This is a temporary and not very nice hack, to make sure that + // if the cp was moved by the data returned by backend, it will + // remember its direction. FIXME: Refactor this mess and make + // the clipping plane itself part of the shared data. + if (! m_c->m_clipping_plane_was_moved && m_c->m_clipping_plane_distance == 0.25f) + m_c->m_clipping_plane_was_moved = true; + + if (m_c->m_model_object) { reload_cache(); if (m_c->has_drilled_mesh())