mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-08 13:39:10 +08:00
Adapted BoundingBox get_extents(const ExPolygons &expolygons)
to work even with empty polygons.
This commit is contained in:
parent
555560f63c
commit
74b95e9152
@ -553,9 +553,9 @@ BoundingBox get_extents(const ExPolygons &expolygons)
|
||||
{
|
||||
BoundingBox bbox;
|
||||
if (! expolygons.empty()) {
|
||||
bbox = get_extents(expolygons.front());
|
||||
for (size_t i = 1; i < expolygons.size(); ++ i)
|
||||
bbox.merge(get_extents(expolygons[i]));
|
||||
for (size_t i = 0; i < expolygons.size(); ++ i)
|
||||
if (! expolygons[i].contour.points.empty())
|
||||
bbox.merge(get_extents(expolygons[i]));
|
||||
}
|
||||
return bbox;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user