Fix of Place on face:
1) Decreased "gimbal lock" epsilon 10x 2) Got rid of unnecessary back and forth conversions which led to numerical inacurracies This should fix issues #5172, #5011 and #5398
This commit is contained in:
parent
fe4f1b15c6
commit
2d6b694261
2 changed files with 9 additions and 36 deletions
src/libslic3r
|
@ -1223,7 +1223,7 @@ Vec3d extract_euler_angles(const Eigen::Matrix<double, 3, 3, Eigen::DontAlign>&
|
|||
// reference: http://www.gregslabaugh.net/publications/euler.pdf
|
||||
Vec3d angles1 = Vec3d::Zero();
|
||||
Vec3d angles2 = Vec3d::Zero();
|
||||
if (is_approx(std::abs(rotation_matrix(2, 0)), 1.0))
|
||||
if (std::abs(std::abs(rotation_matrix(2, 0)) - 1.0) < 1e-5)
|
||||
{
|
||||
angles1(2) = 0.0;
|
||||
if (rotation_matrix(2, 0) < 0.0) // == -1.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue