Skip to content

Commit

Permalink
Merge branch 'Polygon_repair-less_copies-GF' into Triangulation_2-con…
Browse files Browse the repository at this point in the history
…straints-GF
  • Loading branch information
afabri committed Apr 16, 2024
2 parents f06f812 + c8c6747 commit d454a60
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Polygon/include/CGAL/Multipolygon_with_holes_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ class Multipolygon_with_holes_2 {

Size number_of_polygons_with_holes() const { return static_cast<Size>(m_polygons.size()); }

Bbox_2 bbox() const
{
Bbox_2 bb;
for(const auto& pwh : polygons_with_holes()){
bb += pwh.bbox();
}
return bb;
}


protected:
Polygon_with_holes_container m_polygons;
};
Expand Down
2 changes: 2 additions & 0 deletions Polygon/test/Polygon/Multipolygon_with_holes_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@ int main()

std::cout << mp << std::endl;

CGAL::Bbox_2 bb = mp.bbox();

return 0;
}

0 comments on commit d454a60

Please sign in to comment.