mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
Fix issue with auto orient a scaled object. (#3904)
Partly revert 73ab032e82
This commit is contained in:
parent
6937f031db
commit
6d9b1d46d6
1 changed files with 4 additions and 2 deletions
|
@ -1298,8 +1298,10 @@ public:
|
|||
|
||||
// BBS
|
||||
void rotate(Matrix3d rotation_matrix) {
|
||||
const Geometry::Transformation& old_inst_trafo = get_transformation();
|
||||
set_transformation(Geometry::Transformation{old_inst_trafo.get_offset_matrix() * rotation_matrix * old_inst_trafo.get_matrix_no_offset()});
|
||||
auto R = m_transformation.get_rotation_matrix().matrix().block<3, 3>(0, 0);
|
||||
auto R_new = rotation_matrix * R;
|
||||
auto euler_angles = Geometry::extract_euler_angles(R_new);
|
||||
set_rotation(euler_angles);
|
||||
}
|
||||
|
||||
Vec3d get_scaling_factor() const { return m_transformation.get_scaling_factor(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue