Skip to content

Commit

Permalink
don't apply the inverse scale twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Oekn5w authored and lordofhyphens committed Dec 2, 2019
1 parent fe171e9 commit bf4223a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions xs/src/libslic3r/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,9 +1231,6 @@ void ModelInstance::set_complete_trafo(TransformationMatrix const & trafo)
// Get the rotation values.
// Normalize scale from the matrix.
TransformationMatrix rotmat = trafo.multiplyLeft(TransformationMatrix::mat_scale(1/sx, 1/sy, 1/sz));
rotmat.m00 /= sx; rotmat.m10 /= sy; rotmat.m20 /= sz;
rotmat.m01 /= sx; rotmat.m11 /= sy; rotmat.m21 /= sz;
rotmat.m02 /= sx; rotmat.m12 /= sy; rotmat.m22 /= sz;

// Get quaternion values
double q_w = sqrt(std::max(0.0, 1.0 + rotmat.m00 + rotmat.m11 + rotmat.m22)) / 2,
Expand Down

0 comments on commit bf4223a

Please sign in to comment.