mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 13:16:00 +08:00
parent
366167c88b
commit
488cffa559
@ -93,6 +93,7 @@ void RotoptimizeJob::finalize()
|
|||||||
auto trmatrix = oi->get_transformation().get_matrix();
|
auto trmatrix = oi->get_transformation().get_matrix();
|
||||||
Polygon trchull = o->convex_hull_2d(trmatrix);
|
Polygon trchull = o->convex_hull_2d(trmatrix);
|
||||||
|
|
||||||
|
if (!trchull.empty()) {
|
||||||
MinAreaBoundigBox rotbb(trchull, MinAreaBoundigBox::pcConvex);
|
MinAreaBoundigBox rotbb(trchull, MinAreaBoundigBox::pcConvex);
|
||||||
double phi = rotbb.angle_to_X();
|
double phi = rotbb.angle_to_X();
|
||||||
|
|
||||||
@ -103,6 +104,7 @@ void RotoptimizeJob::finalize()
|
|||||||
|
|
||||||
oi->set_rotation(rt);
|
oi->set_rotation(rt);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Correct the z offset of the object which was corrupted be
|
// Correct the z offset of the object which was corrupted be
|
||||||
// the rotation
|
// the rotation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user