mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 07:48:58 +08:00
Fix Detection of rotation change
This commit is contained in:
parent
7148ef6748
commit
ec3fe903df
@ -1728,7 +1728,10 @@ std::optional<float> Emboss::calc_up(const Transform3d &tr, double up_limit)
|
|||||||
m.row(2) = normal;
|
m.row(2) = normal;
|
||||||
double det = m.determinant();
|
double det = m.determinant();
|
||||||
double dot = suggested.dot(up);
|
double dot = suggested.dot(up);
|
||||||
return -atan2(det, dot);
|
double res = -atan2(det, dot);
|
||||||
|
if (is_approx(res, 0.))
|
||||||
|
return {};
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
Transform3d Emboss::create_transformation_onto_surface(const Vec3d &position,
|
Transform3d Emboss::create_transformation_onto_surface(const Vec3d &position,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user