parent
d0c08ec5c1
commit
e82ef1094b
@ -102,6 +102,7 @@ void RotoptimizeJob::finalize(bool canceled, std::exception_ptr &eptr)
|
||||
auto trmatrix = oi->get_transformation().get_matrix();
|
||||
Polygon trchull = o->convex_hull_2d(trmatrix);
|
||||
|
||||
if (!trchull.empty()) {
|
||||
MinAreaBoundigBox rotbb(trchull, MinAreaBoundigBox::pcConvex);
|
||||
double phi = rotbb.angle_to_X();
|
||||
|
||||
@ -112,6 +113,7 @@ void RotoptimizeJob::finalize(bool canceled, std::exception_ptr &eptr)
|
||||
|
||||
oi->set_rotation(rt);
|
||||
}
|
||||
}
|
||||
|
||||
// Correct the z offset of the object which was corrupted be
|
||||
// the rotation
|
||||
|
Loading…
Reference in New Issue
Block a user