mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 13:19:02 +08:00
auto-center now ignore unprintable objects
supermerill/SuperSlicer#2008
This commit is contained in:
parent
0fec9837f1
commit
3b2b5a43d5
@ -369,8 +369,10 @@ bool Model::center_instances_around_point(const Vec2d &point)
|
||||
{
|
||||
BoundingBoxf3 bb;
|
||||
for (ModelObject *o : this->objects)
|
||||
for (size_t i = 0; i < o->instances.size(); ++ i)
|
||||
bb.merge(o->instance_bounding_box(i, false));
|
||||
if (o->printable) // only center around printable objects (note: seems always true right now)
|
||||
for (size_t i = 0; i < o->instances.size(); ++ i)
|
||||
if (o->instances[i]->printable) // only center around printable instances
|
||||
bb.merge(o->instance_bounding_box(i, false));
|
||||
|
||||
Vec2d shift2 = point - to_2d(bb.center());
|
||||
if (std::abs(shift2(0)) < EPSILON && std::abs(shift2(1)) < EPSILON)
|
||||
|
Loading…
x
Reference in New Issue
Block a user