From aef9a07d2a63eca3d2d3fd0587bed8f2696bb006 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 10 Jun 2025 14:37:06 +0100 Subject: [PATCH] Add that for join() and intersect() the input must have correct orientation --- Polygon_repair/include/CGAL/Polygon_repair/repair.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Polygon_repair/include/CGAL/Polygon_repair/repair.h b/Polygon_repair/include/CGAL/Polygon_repair/repair.h index 871bf75ff71..d60519226b8 100644 --- a/Polygon_repair/include/CGAL/Polygon_repair/repair.h +++ b/Polygon_repair/include/CGAL/Polygon_repair/repair.h @@ -104,7 +104,8 @@ Multipolygon_with_holes_2 repair(const Polygon_with_holes_2 Multipolygon_with_holes_2 repair(const Multipolygon_with_holes_2& p, Rule = Rule()) { @@ -813,7 +814,8 @@ protected: /// computes the union of all polygons with holes in `p` /// \tparam Kernel parameter of the input and output polygons. Must be model of `ConstrainedDelaunayTriangulationTraits_2 ` /// \tparam Container parameter of the input and output polygons -/// \pre Each polygon with hole must be free of self-intersections +/// \pre Each polygon with holes must be free of self-intersections, +/// the outer boundaries must be counterclockwise and the holes clockwise oriented. template Multipolygon_with_holes_2 join(const Multipolygon_with_holes_2& pa) @@ -838,7 +840,8 @@ join(const Multipolygon_with_holes_2& pa) /// \tparam Container parameter of the input and output polygons /// \tparam PA must be `Polygon_2`, or `Polygon_with_holes_2`, or `Multipolygon_with_holes_2` /// \tparam PB must be `Polygon_2`, or `Polygon_with_holes_2`, or `Multipolygon_with_holes_2` -/// \pre The polygons `pa` and `pb` must be free of self-intersections +/// \pre The polygons `pa` and `pb` must be free of self-intersections, +/// the outer boundaries must be counterclockwise and the holes clockwise oriented. template #ifdef DOXYGEN_RUNNING Multipolygon_with_holes_2 @@ -870,7 +873,8 @@ join(const PA& pa, const PB& pb, const Kernel& = Default(), const Container& = D /// computes the intersection of all polygons with holes in `p` /// \tparam Kernel parameter of the input and output polygons. Must be model of `ConstrainedDelaunayTriangulationTraits_2 ` /// \tparam Container parameter of the input and output polygons -/// \pre Each polygon with hole must be free of self-intersections +/// \pre Each polygon with holes must be free of self-intersections +/// the outer boundaries must be counterclockwise and the holes clockwise oriented. template Multipolygon_with_holes_2 intersect(const Multipolygon_with_holes_2& p) @@ -902,6 +906,7 @@ intersect(const Multipolygon_with_holes_2& p) /// \tparam PA must be `Polygon_2`, or `Polygon_with_holes_2`, or `Multipolygon_with_holes_2` /// \tparam PB must be `Polygon_2`, or `Polygon_with_holes_2`, or `Multipolygon_with_holes_2` /// \pre The polygons `pa` and `pb` must be free of self-intersections +/// the outer boundaries must be counterclockwise and the holes clockwise oriented. template #ifdef DOXYGEN_RUNNING Multipolygon_with_holes_2