Fix Detection of rotation change

This commit is contained in:
Filip Sykala - NTB T15p 2023-10-16 13:17:09 +02:00
parent 7148ef6748
commit ec3fe903df

View File

@ -1728,7 +1728,10 @@ std::optional<float> Emboss::calc_up(const Transform3d &tr, double up_limit)
m.row(2) = normal;
double det = m.determinant();
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,