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;
|
BoundingBox bbox;
|
||||||
if (! expolygons.empty()) {
|
if (! expolygons.empty()) {
|
||||||
bbox = get_extents(expolygons.front());
|
for (size_t i = 0; i < expolygons.size(); ++ i)
|
||||||
for (size_t i = 1; i < expolygons.size(); ++ i)
|
if (! expolygons[i].contour.points.empty())
|
||||||
bbox.merge(get_extents(expolygons[i]));
|
bbox.merge(get_extents(expolygons[i]));
|
||||||
}
|
}
|
||||||
return bbox;
|
return bbox;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user