From 3076c16364d26e551c2159d3f1b65bd7f305969e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 3 Oct 2024 11:12:17 +0100 Subject: [PATCH] Start changing the documentation --- .../doc/Polygon_repair/PackageDescription.txt | 3 ++- .../doc/Polygon_repair/Polygon_repair.txt | 24 ++++++++++++------- .../doc/Polygon_repair/examples.txt | 1 + .../include/CGAL/Polygon_repair/Winding.h | 4 ++-- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Polygon_repair/doc/Polygon_repair/PackageDescription.txt b/Polygon_repair/doc/Polygon_repair/PackageDescription.txt index 0bd41658ad43..4aaac43b06e3 100644 --- a/Polygon_repair/doc/Polygon_repair/PackageDescription.txt +++ b/Polygon_repair/doc/Polygon_repair/PackageDescription.txt @@ -15,7 +15,7 @@ \cgalPkgAuthors{Ken Arroyo Ohori} \cgalPkgDesc{This package provides algorithms to repair 2D polygons, polygons with holes, and multipolygons with holes, by selecting faces of the arrangement of the input based on a selection rule. -Currently, only the even-odd rule is provided. } +Currently, only the even-odd rule and the non-zero rule are provided. } \cgalPkgManuals{Chapter_2D_Polygon_repair,PkgPolygonRepairRef} \cgalPkgSummaryEnd @@ -35,4 +35,5 @@ Currently, only the even-odd rule is provided. } \cgalCRPSection{Simplification Rules} - `CGAL::Polygon_repair::Even_odd_rule` +- `CGAL::Polygon_repair::Non_zero_rule` */ diff --git a/Polygon_repair/doc/Polygon_repair/Polygon_repair.txt b/Polygon_repair/doc/Polygon_repair/Polygon_repair.txt index 26b6f6d62c70..6fa329f91463 100644 --- a/Polygon_repair/doc/Polygon_repair/Polygon_repair.txt +++ b/Polygon_repair/doc/Polygon_repair/Polygon_repair.txt @@ -16,13 +16,14 @@ each face according to what it represents (exterior, polygon interior or hole), and reconstructs the polygon(s) represented by the arrangement. The method returns valid output stored in a multipolygon with holes. -Different arrangement and labelling heuristics are possible, but -currently only the even-odd rule is implemented in this package. -This rule results in areas that are alternately assigned as polygon +Different arrangement and labeling heuristics are possible, but +currently only the even-odd rule and non-zero rule are implemented in this package. +The even-odd rule results in areas that are alternately assigned as polygon interiors and exterior/holes each time that an input edge is passed. It does not distinguish between edges that are part of outer boundaries -from those of inner boundaries. In a next version we will add the -winding number rule. +from those of inner boundaries. + +The non-zero rule results in areas with a non-zero winding number. \section SectionPolygonRepair_Definitions Definitions @@ -81,7 +82,7 @@ order - The polygons with holes of a multipolygon with holes are also stored in lexicographic order -\section SectionPolygonRepair_Algorithm Algorithm +\section SectionPolygonRepair_Algorithm Even-Odd Algorithm Broadly, the algorithm consists of three steps: @@ -95,7 +96,7 @@ single multipolygon with holes. \cgalFigureBegin{inout, inout.svg} Examples of polygons with holes (a-d) and multipolygons with holes -(e-h) before (left) and after (right) being repaired. +(e-h) before (left) and after (right) being repaired with the even-odd rule. \cgalFigureEnd \subsection SubsectionPolygonRepair_Arrangement Arrangement @@ -133,7 +134,12 @@ into multipolygons using the face labels to know which polygon with holes inner/ boundaries belong to, and using the orientation to distinguish between the outer and inner boundaries of each polygon with holes. -\subsection SubsectionPolygonRepair_Notes Notes on the Output + +\section SectionPolygonRepair_Algorithm Non-Zero Algorithm + +Tbd. + +\section SubsectionPolygonRepair_Notes Notes on the Output If the input is already valid, the method will return a valid output representing the same area. However, the output might be different in order to conform to the @@ -148,7 +154,7 @@ with holes has zero holes and extract these if needed. \section SectionPolygonRepair_Examples Examples -\subsection SubsectionPolygonRepair_Repair Repairing a (Multi)polygon +\subsection SubsectionPolygonRepair_Repair Repairing a (Multi)polygon with the Even-Odd Rule It is possible to repair a polygon, polygon with holes or multipolygon with holes using the even-odd rule by calling the `Polygon_repair::repair()` function diff --git a/Polygon_repair/doc/Polygon_repair/examples.txt b/Polygon_repair/doc/Polygon_repair/examples.txt index e7d63a06e209..94e5ff33df31 100644 --- a/Polygon_repair/doc/Polygon_repair/examples.txt +++ b/Polygon_repair/doc/Polygon_repair/examples.txt @@ -1,4 +1,5 @@ /*! \example Polygon_repair/repair_polygon_2.cpp +\example Polygon_repair/repair_non_zero_polygon_2.cpp \example Polygon_repair/repair_multipolygon_2.cpp */ diff --git a/Polygon_repair/include/CGAL/Polygon_repair/Winding.h b/Polygon_repair/include/CGAL/Polygon_repair/Winding.h index 2155c94c0df1..1901e7b01121 100644 --- a/Polygon_repair/include/CGAL/Polygon_repair/Winding.h +++ b/Polygon_repair/include/CGAL/Polygon_repair/Winding.h @@ -130,7 +130,7 @@ default constructor. Winding() = default; -*! +/*! sets the polygon as input of the winding number computation. */ void @@ -350,4 +350,4 @@ sets the polygon as input of the winding number computation. } // namespace CGAL -#endif CGAL_POLYGON_REPAIR_WINDING_H +#endif // CGAL_POLYGON_REPAIR_WINDING_H