Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API issues in 2D Straight Skeletons (6.0.x) #8690

Open
wants to merge 22 commits into
base: 6.0.x-branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Straight_skeleton_builder_2& enter_contour( InputPointIterator aBegin, InputPoin
/*!
defines the <I>weights</I> of the contour last entered through `enter_contour()`.
\tparam InputPointIterator must be a model `InputIterator` whose `value_type` is `FT`.
\tparam WeightIterator must be a model `InputIterator` whose `value_type` is `FT`.
\pre `std::distance(aBegin,aEnd)` must be equal to the number of vertices of the contour last entered.
\pre Weights are (strictly) positive.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ If `ss` is the interior skeleton of a polygon with holes, the offset polygons wi
in its interior. If `ss` is the outer skeleton of a polygon with holes, the offset polygons
will be generated in its exterior.

\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam OfKPolygon is a polygon without holes type determined from `OfK`, see Section \ref SLSOffsetPolygonReturnType.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT`.
\tparam StraightSkeleton is an object of type `CGAL::Straight_skeleton_2<SsK>`.
\tparam OfKPolygon is a polygon without holes type determined from `OfK`, see Section \ref SLSOffsetPolygonReturnType.
\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.

\note If `SsK != OfK` the constructed straight skeleton is converted to `CGAL::Straight_skeleton_2<OfK>`.

Expand Down Expand Up @@ -44,16 +44,16 @@ The construction of this skeleton is the most expensive operation, therefore, to
at more than one single distance, it is advised to use `create_interior_straight_skeleton_2()` to create
the skeleton only once, and then call `create_offset_polygons_2()` for each distance.

\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.
\tparam OfKPolygon is a polygon without holes type determined from `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam HoleIterator must be a model of `InputIterator` with value type being a model of `ConstRange`
with value type `SsK::Point_2`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`).
\tparam OfKPolygon is a polygon without holes type determined from `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.

\note If `SsK != OfK` the constructed straight skeleton is converted to `CGAL::Straight_skeleton_2<OfK>`.

Expand Down Expand Up @@ -84,20 +84,20 @@ The construction of this skeleton is the most expensive operation, therefore, to
at more than one single distance, it is advised to use `create_interior_straight_skeleton_2()` to create
the skeleton only once, and then call `create_offset_polygons_2()` for each distance

\tparam OfKPolygon is a polygon without holes type determined by `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam OfKPolygon is a polygon without holes type determined by `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.

\note If `SsK != OfK` the constructed straight skeleton is converted to `CGAL::Straight_skeleton_2<OfK>`.

\pre `offset` is positive
\pre poly` is weakly simple, counterclockwise polygon.
\pre `poly` is weakly simple, counterclockwise polygon.

\sa `CGAL::create_exterior_skeleton_and_offset_polygons_2()`
\sa `CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2()`
Expand Down Expand Up @@ -125,20 +125,20 @@ to obtain the offsets. The construction of this skeleton is the most expensive o
therefore, to construct offsets at more than one single distance, use the separate functions
`create_exterior_straight_skeleton_2()` and `create_offset_polygons_2()` instead.

\tparam OfKPolygon is a polygon without holes type determined from `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam OfKPolygon is a polygon without holes type determined from `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.

\note If `SsK != OfK` the constructed straight skeleton is converted to `CGAL::Straight_skeleton_2<OfK>`.

\pre `offset` is positive
\pre poly` is weakly simple, counterclockwise polygon.
\pre `poly` is weakly simple, counterclockwise polygon.

\sa `CGAL::create_interior_skeleton_and_offset_polygons_2()`
\sa `CGAL::create_exterior_skeleton_and_offset_polygons_with_holes_2()`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ of the 2D polygon with holes `poly_with_holes`.

This is equivalent to `arrange_offset_polygons_2(create_interior_skeleton_and_offset_polygons_2(offset, poly_with_holes, ofk, ssk))`.

\tparam OfKPolygon is a polygon without holes type determined by `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam OfKPolygon is a polygon without holes type determined by `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.


\note If `SsK != OfK` the constructed straight skeleton is converted to `CGAL::Straight_skeleton_2<OfK>`.

Expand All @@ -42,19 +43,19 @@ at distance `offset` of the 2D polygon `poly_with_holes`. Note that the
offset of the outer frame is ignored.

This is equivalent to a call to `CGAL::arrange_offset_polygons_2()` on the
output of \link CGAL::create_exterior_skeleton_and_offset_polygons_2() `create_exterior_skeleton_and_offset_polygons_2(offset, poly_with_holes, ofk, ssk))` \endlink
output of \link CGAL::create_exterior_skeleton_and_offset_polygons_2() `create_exterior_skeleton_and_offset_polygons_2(offset, poly_with_holes, ofk, ssk)` \endlink
after having filtered out the polygon corresponding to the offset of the outer frame and
having reversed the orientation of all other polygons.

\tparam OfKPolygon is a polygon without holes type determined by `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam OfKPolygon is a polygon without holes type determined by `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.

\note If `SsK != OfK` the constructed straight skeleton is converted to `CGAL::Straight_skeleton_2<OfK>`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ The construction of this skeleton is the most expensive operation, therefore, to
at more than one single distance, it is advised to use the separate functions `create_interior_straight_skeleton_2()`
and `create_offset_polygons_2()` instead.

\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.
\tparam OfKPolygon is a polygon without holes type determined from `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`).
\tparam InKWeights must be a model of `Range` with value type `InK::FT`.
\tparam HoleIterator must be a model of `InputIterator` with value type being a model of `ConstRange`
with value type `SsK::Point_2`.
\tparam HoleWeightsIterator must be a model of `InputIterator` with value type being a model of `ConstRange`
\tparam InKWeights must be a model of `SequenceContainer` whose value type is `InK::FT`.
\tparam HoleWeightsIterator must be a model of `InputIterator` with value type being a model of `SequenceContainer`
with value type `InK::FT`.
\tparam OfKPolygon is a polygon without holes type determined from `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.

\note If `SsK != OfK` the constructed straight skeleton is converted to `CGAL::Straight_skeleton_2<OfK>`.

Expand All @@ -45,9 +45,9 @@ template <typename OfKPolygon, typename FT, typename InKPolygon, typename InKWei
std::vector< std::shared_ptr<OfKPolygon> >
create_interior_weighted_skeleton_and_offset_polygons_2(FT offset,
const InKPolygon& outer_boundary,
const InKWeights& outer_boundary_weights,
HoleIterator holes_begin,
HoleIterator holes_end,
const InKWeights& outer_boundary_weights,
HoleWeightsIterator holes_weights_begin,
HoleWeightsIterator holes_weights_end,
OfK ofk = CGAL::Exact_predicates_inexact_constructions_kernel,
Expand All @@ -66,16 +66,16 @@ The construction of this skeleton is the most expensive operation, therefore, to
at more than one single distance, use the separate functions `create_interior_straight_skeleton_2()`
and `create_offset_polygons_2()` instead.

\tparam OfKPolygon is a polygon without holes type determined by `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam InKWeights must be a model of `SequenceContainer` whose value type is itself a model of `SequenceContainer` with value type `InK::FT`.
\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam InKWeights must be a model of `Range` with value type `InK::FT`.
\tparam OfKPolygon is a polygon without holes type determined by `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.

\note If `SsK != OfK` the constructed straight skeleton is converted to `CGAL::Straight_skeleton_2<OfK>`.

Expand Down Expand Up @@ -109,21 +109,21 @@ to obtain the offsets. The construction of this skeleton is the most expensive o
therefore, to construct offsets at more than one single distance, use the separate functions
`create_exterior_straight_skeleton_2()` and `create_offset_polygons_2()` instead.

\tparam OfKPolygon is a polygon without holes type determined from `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam InKWeights must be a model of `SequenceContainer` whose value type is itself a model of `SequenceContainer` with value type `InK::FT`.
\tparam OfK must be a model of `Kernel`. It is used to instantiate
`Polygon_offset_builder_traits_2<OfK>` for constructing the offset polygons.
\tparam SsK must be a model of `Kernel`. It is used to instantiate
`Straight_skeleton_builder_traits_2<SsK>` for constructing the straight skeleton.
\tparam FT must be a model of `FieldNumberType` convertible to `OfK::FT` and `SsK::FT`.
\tparam InKPolygon must be a model of `SequenceContainer` with value type `InK::Point_2` (e.g. `Polygon_2<InK>`)
or a model of `GeneralPolygonWithHoles_2` (e.g. `Polygon_with_holes_2<InK>`).
\tparam InKWeights must be a model of `Range` with value type `InK::FT`.
\tparam OfKPolygon is a polygon without holes type determined from `OfK` and `InKPolygon`,
see Section \ref SLSOffsetPolygonReturnType.

\note If `SsK != OfK` the constructed straight skeleton is converted to `CGAL::Straight_skeleton_2<OfK>`.

\pre `offset` is positive
\pre poly` is weakly simple, counterclockwise polygon.
\pre `poly` is weakly simple, counterclockwise polygon.

\sa `CGAL::create_interior_skeleton_and_offset_polygons_2()`
\sa `CGAL::create_exterior_skeleton_and_offset_polygons_with_holes_2()`
Expand Down
Loading
Loading