From 30faa26919d415cf4f30ce22b0b3ee932cb3ea7e Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Thu, 2 Nov 2023 09:44:10 +0800 Subject: [PATCH] FIX:The plane should rotate around the world coordinate system Jira: STUDIO-5054 Change-Id: I16e484b38d79cabd9473acf1abf3c5c6b0adc4c6 --- src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp index 770f70569..3e038d677 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp @@ -614,7 +614,7 @@ void GLGizmoAdvancedCut::update_plate_center(Axis axis_type, double projection, void GLGizmoAdvancedCut::update_plate_normal_boundingbox_clipper(Vec3d rotation) { - const Transform3d rotation_tmp = m_start_dragging_m * Geometry::rotation_transform(rotation); + const Transform3d rotation_tmp = Geometry::rotation_transform(rotation) * m_start_dragging_m; const bool update_tbb = !m_rotate_matrix.rotation().isApprox(rotation_tmp.rotation()); m_rotate_matrix = rotation_tmp; if (update_tbb) m_transformed_bounding_box = transformed_bounding_box(m_plane_center, m_rotate_matrix); @@ -623,7 +623,7 @@ void GLGizmoAdvancedCut::update_plate_normal_boundingbox_clipper(Vec3d rotation) void GLGizmoAdvancedCut::on_update(const UpdateData& data) { - if (m_hover_id < 0) + if (m_hover_id < 0) return; m_is_dragging = true; if (m_hover_id <= 2) { // drag rotate