Adapted BoundingBox get_extents(const ExPolygons &expolygons)
to work even with empty polygons.
This commit is contained in:
parent
555560f63c
commit
74b95e9152
@ -553,8 +553,8 @@ 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)
|
||||
for (size_t i = 0; i < expolygons.size(); ++ i)
|
||||
if (! expolygons[i].contour.points.empty())
|
||||
bbox.merge(get_extents(expolygons[i]));
|
||||
}
|
||||
return bbox;
|
||||
|
Loading…
Reference in New Issue
Block a user