diff options
author | supermerill <merill@free.fr> | 2021-12-06 12:36:41 +0300 |
---|---|---|
committer | supermerill <merill@free.fr> | 2021-12-07 17:05:30 +0300 |
commit | 3b2b5a43d523170db2b16ca7027b87b34a5b8832 (patch) | |
tree | 4cee1b85815cce2c7d9e897b1f2c47d1229ba5ae /src | |
parent | 0fec9837f11eda9d3ec66c6d6c2f3cf252f08c8f (diff) |
auto-center now ignore unprintable objects
supermerill/SuperSlicer#2008
Diffstat (limited to 'src')
-rw-r--r-- | src/libslic3r/Model.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index 6d460d524..d86e88e48 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -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) |