From 2565a66b6d57306f5454e4c4c2b5696bb18f0049 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Wed, 5 Jul 2023 20:26:11 +0800 Subject: [PATCH] FIX: set uniform_scale false modify the scale ratio STUDIO-3364 Change-Id: Idd5f5640cb7bb6eb5b5dbb2c829f6dce2e61fe3c --- src/libslic3r/Model.cpp | 8 ++++---- src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index 6c51c0d10..a4d2dbcfc 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -2455,10 +2455,10 @@ void ModelObject::bake_xy_rotation_into_meshes(size_t instance_idx) assert(instance_idx < this->instances.size()); const Geometry::Transformation reference_trafo = this->instances[instance_idx]->get_transformation(); - // BBS: As long as the rotation value changed, the rotation angle will be applied to the mesh. - //if (Geometry::is_rotation_ninety_degrees(reference_trafo.get_rotation())) - // // nothing to do, scaling in the world coordinate space is possible in the representation of Geometry::Transformation. - // return; + + if (Geometry::is_rotation_ninety_degrees(reference_trafo.get_rotation())) + // nothing to do, scaling in the world coordinate space is possible in the representation of Geometry::Transformation. + return; bool left_handed = reference_trafo.is_left_handed(); bool has_mirrorring = ! reference_trafo.get_mirror().isApprox(Vec3d(1., 1., 1.)); diff --git a/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp b/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp index df3daa365..2cdd8aac3 100644 --- a/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp +++ b/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp @@ -452,8 +452,8 @@ void GizmoObjectManipulation::set_uniform_scaling(const bool new_value) // all volumes in the selection belongs to the same instance, any of them contains the needed instance data, so we take the first one const GLVolume* volume = selection.get_volume(*selection.get_volume_idxs().begin()); // Is the angle close to a multiple of 90 degrees? - // BBS: As long as the rotation value changed, the rotation angle will be applied to the mesh. - // if (! Geometry::is_rotation_ninety_degrees(volume->get_instance_rotation())) { + + if (! Geometry::is_rotation_ninety_degrees(volume->get_instance_rotation())) { // Cannot apply scaling in the world coordinate system. // BBS: remove tilt prompt dialog @@ -463,7 +463,7 @@ void GizmoObjectManipulation::set_uniform_scaling(const bool new_value) wxGetApp().plater()->update(); // Recalculate cached values at this panel, refresh the screen. this->UpdateAndShow(true); - // } + } } m_uniform_scale = new_value; }