\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.13 - 2D Straight Skeleton and Polygon Offsetting

Functions

template<class K , class InputPolygonPtrIterator , class OutputPolygonWithHolesPtrIterator >
void CGAL::arrange_offset_polygons_2 (InputPolygonPtrIterator begin, InputPolygonPtrIterator end, OutputPolygonWithHolesPtrIterator out, K const &k)
 The function arrange_offset_polygons_2() arranges the sequence of Polygon_2 objects obtained by create_offset_polygons_2() into Polygon_with_holes_2 objects by determining geometric parent-hole relationships using a simple algorithm based on the particular characteristics of offset polygons. More...
 
template<class InputIterator , class Traits >
boost::optional< typename Traits::FT > CGAL::compute_outer_frame_margin (InputIterator first, InputIterator beyond, typename Traits::FT offset, Traits const &traits=Default_traits)
 Computes the separation required between a polygon and the outer frame used to obtain an exterior skeleton suitable for the computation of outer offset polygons at a given distance. More...
 
template<class Polygon , class FT , class StraightSkeleton , class K >
std::vector< boost::shared_ptr< Polygon > > CGAL::create_offset_polygons_2 (FT offset, StraightSkeleton const &s,, K const &k=Exact_predicates_inexact_constructions_kernel)
 returns a container with the offset polygons at distance offset obtained from the straight skeleton s. More...
 
template<class FT , class Polygon , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr< Polygon > > CGAL::create_exterior_skeleton_and_offset_polygons_2 (FT offset, Polygon const &poly, OffsettingK ofk=Exact_predicates_inexact_constructions_kernel, SkeletonK ssk=Exact_predicates_inexact_constructions_kernel)
 returns a container with all the outer offset polygons at distance offset of the 2D polygon poly. More...
 
template<class FT , class Polygon , class HoleIterator , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr< Polygon > > CGAL::create_interior_skeleton_and_offset_polygons_2 (FT offset, Polygon const &outer_boundary, HoleIterator holes_begin, HoleIterator holes_end, OffsettingK ofk=CGAL::Exact_predicates_inexact_constructions_kernel, SkeletonK ssk=CGAL::Exact_predicates_inexact_constructions_kernel)
 returns a container with all the inner offset polygons at distance offset of the 2D polygon with holes whose outer boundary is outer_boundary and its holes are given by [holes_begin,holes_end]. More...
 
template<class FT , class Polygon , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr< Polygon > > CGAL::create_interior_skeleton_and_offset_polygons_2 (FT offset, Polygon const &poly, OffsettingK ofk=CGAL::Exact_predicates_inexact_constructions_kernel, SkeletonK ssk=CGAL::Exact_predicates_inexact_constructions_kernel)
 returns a container with all the inner offset polygons at distance offset of the 2D polygon poly. More...
 
template<class FT , class OffsettingK , class SkeletonK , class C >
std::vector< boost::shared_ptr< Polygon_with_holes_2< OffsettingK, C > > > CGAL::create_exterior_skeleton_and_offset_polygons_with_holes_2 (FT offset, CGAL::Polygon_2< OffsettingK, C > poly_with_holes, OffsettingK ofk=Exact_predicates_inexact_constructions_kernel, SkeletonK ssk=Exact_predicates_inexact_constructions_kernel)
 returns a container with all the outer offset polygons with holes at distance offset of the 2D polygon poly. More...
 
template<class FT , class OffsettingK , class SkeletonK , class C >
std::vector< boost::shared_ptr< Polygon_2< OffsettingK, C > > > CGAL::create_interior_skeleton_and_offset_polygons_2 (FT offset, CGAL::Polygon_with_holes< OffsettingK, C > poly_with_holes, OffsettingK ofk=CGAL::Exact_predicates_inexact_constructions_kernel, SkeletonK ssk=CGAL::Exact_predicates_inexact_constructions_kernel)
 returns a container with all the inner offset polygons at distance offset of the 2D polygon with holes poly_with_holes. More...
 
template<class FT , class OffsettingK , class SkeletonK , class C >
std::vector< boost::shared_ptr< Polygon_with_holes_2< OffsettingK, C > > > CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 (FT offset, CGAL::Polygon_2< OffsettingK, C > poly, OffsettingK ofk=CGAL::Exact_predicates_inexact_constructions_kernel, SkeletonK ssk=CGAL::Exact_predicates_inexact_constructions_kernel)
 returns a container with all the inner offset polygons with holes at distance offset of the 2D polygon poly. More...
 
template<class FT , class OffsettingK , class SkeletonK , class C >
std::vector< boost::shared_ptr< Polygon_with_holes_2< OffsettingK, C > > > CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 (FT offset, CGAL::Polygon_with_holes_2< OffsettingK, C > poly_with_holes, OffsettingK ofk=CGAL::Exact_predicates_inexact_constructions_kernel, SkeletonK ssk=CGAL::Exact_predicates_inexact_constructions_kernel)
 returns a container with all the inner offset polygons with holes at distance offset of the 2D polygon with holes poly_with_holes. More...
 
template<class FT , class PointIterator , class K >
boost::shared_ptr< Straight_skeleton_2< K > > CGAL::create_exterior_straight_skeleton_2 (FT max_offset, PointIterator vertices_begin, PointIterator vertices_end, K const &k=Exact_predicates_inexact_constructions_kernel)
 The function create_exterior_straight_skeleton_2() creates a straight skeleton in the exterior of a 2D polygon with holes. More...
 
template<class FT , class Polygon , class K >
boost::shared_ptr< Straight_skeleton_2< K > > CGAL::create_exterior_straight_skeleton_2 (FT max_offset, Polygon P, K const &k=Exact_predicates_inexact_constructions_kernel)
 The function create_exterior_straight_skeleton_2() creates a straight skeleton in the exterior of a 2D polygon with holes. More...
 
template<class PointIterator , class HoleIterator , class K >
boost::shared_ptr< Straight_skeleton_2< K > > CGAL::create_interior_straight_skeleton_2 (PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, HoleIterator holes_begin, HoleIterator holes_end, K const &k=Exact_predicates_inexact_constructions_kernel)
 returns a new Straight_skeleton_2<K> in the interior of the 2D polygon with holes whose outer boundary is given by the point sequence [outer_contour_vertices_begin,outer_contour_vertices_end] and its holes given by [holes_begin,holes_end]. More...
 
template<class PointIterator , class K >
boost::shared_ptr< Straight_skeleton_2< K > > CGAL::create_interior_straight_skeleton_2 (PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, K const &k=Exact_predicates_inexact_constructions_kernel)
 returns a new Straight_skeleton_2<K> in the interior of the 2D polygon whose outer boundary is given by the point sequence [outer_contour_vertices_begin,outer_contour_vertices_end]. More...
 
template<class Polygon , class K >
boost::shared_ptr< Straight_skeleton_2< K > > CGAL::create_interior_straight_skeleton_2 (Polygon const &outer_contour, K const &k=Exact_predicates_inexact_constructions_kernel)
 returns a new Straight_skeleton_2<K> in the interior of the 2D polygon outer_contour. More...
 
template<class K , class C >
boost::shared_ptr< Straight_skeleton_2< K > > CGAL::create_interior_straight_skeleton_2 (Polygon_with_holes< K, C > poly_with_holes, K const &k=Exact_predicates_inexact_constructions_kernel)
 returns a new Straight_skeleton_2<K> in the interior of the 2D polygon with holes poly_with_holes. More...
 
template<class Target_skeleton , class Source_skeleton , class Items_converter >
boost::shared_ptr< Target_skeleton, Source_skeleton, Items_converter > CGAL::convert_straight_skeleton_2 (Source_skeleton const &s, Items_converted const &ic=Items_converter())
 Converts a straight skeleton instantiated using certain traits into another straight skeleton instantiated using a different traits. More...
 

Function Documentation

◆ arrange_offset_polygons_2()

template<class K , class InputPolygonPtrIterator , class OutputPolygonWithHolesPtrIterator >
void CGAL::arrange_offset_polygons_2 ( InputPolygonPtrIterator  begin,
InputPolygonPtrIterator  end,
OutputPolygonWithHolesPtrIterator  out,
K const &  k 
)

#include <CGAL/arrange_offset_polygons_2.h>

The function arrange_offset_polygons_2() arranges the sequence of Polygon_2 objects obtained by create_offset_polygons_2() into Polygon_with_holes_2 objects by determining geometric parent-hole relationships using a simple algorithm based on the particular characteristics of offset polygons.

The function determines parent-hole relationships among the polygons given by [begin,end] creating boost::shared_ptr< Polygon_with_holes_2<K> > objects added to the output sequence given out. A CLOCKWISE oriented polygon H is a hole of a COUNTERCLOCKWISE polygon P, iff at least one vertex of H is ON_BOUNDED_SIDE of P.

This function should not be used to arrange arbitrary polygons into polygons with holes unless they meet the requirements specified below.

Template Parameters
Kmust be a CGAL kernel.
InputPolygonPtrIteratormust be an input iterator whose value_type is a smart pointer (such as boost::shared_ptr) whose element_type is Polygon_2<K>. The input polygons must be simple. The set of input polygons are unique and interior disjoint. That is, given distinct polygons P and Q, there are vertices of P which are not on the boundary of Q and are all on the bounded or unbounded side of Q (but not both).
OutputPolygonWithHolesPtrIteratormust be an output iterator whose value_type is a smart pointer (such as boost::shared_ptr) whose element_type is Polygon_with_holes_2<K>.
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2

◆ compute_outer_frame_margin()

template<class InputIterator , class Traits >
boost::optional< typename Traits::FT > CGAL::compute_outer_frame_margin ( InputIterator  first,
InputIterator  beyond,
typename Traits::FT  offset,
Traits const &  traits = Default_traits 
)

#include <CGAL/compute_outer_frame_margin.h>

Computes the separation required between a polygon and the outer frame used to obtain an exterior skeleton suitable for the computation of outer offset polygons at a given distance.

Given a non-degenerate strictly-simple 2D polygon whose vertices are passed in the range [first,beyond), calculates the largest euclidean distance d between each input vertex and its corresponding offset vertex at a distance offset.

If such a distance can be approximately computed, returns an optional<FT> with the value d + (offset * 1.05). If the distance cannot be computed, not even approximately, due to overflow for instance, returns an empty optional<FT> (an absent result).

This result is the required separation between the input polygon and the rectangular frame used to construct an exterior offset contour at distance offset (which is done by placing the polygon as a hole of that frame).

Such a separation must be computed in this way because if the frame is too close to the polygon, the inward offset contour from the frame could collide with the outward offset contour of the polygon, resulting in a merged contour offset instead of two contour offsets, one of them corresponding to the frame.

Simply using 2*offset as the separation is incorrect since offset is the distance between an offset line and its original, not between an offset vertex and its original. The later, which is calculated by this function and needed to place the frame sufficiently away from the polygon, can be thousands of times larger than offset.

If the result is absent, any attempt to construct an exterior offset polygon at distance offset will fail. This will occur whenever the polygon has a vertex with an internal angle approaching 0 (because the offset vertex of a vertex whose internal angle equals 0 is at infinity ).

Precondition
offset > 0.
The range [first,beyond) contains the vertices of a non-degenerate strictly-simple 2D polygon.

The default traits class Default_traits is an instance of the class Polygon_offset_builder_traits_2<Kernel> parameterized on the kernel in which the type InputIterator::value_type is defined.

Template Parameters
InputIteratormust have a value_type equivalent to Traits::Point_2.
Traitsmust be a model for PolygonOffsetBuilderTraits_2.
See also
PolygonOffsetBuilderTraits_2
Polygon_offset_builder_traits_2
Examples:
Straight_skeleton_2/Low_level_API.cpp.

◆ convert_straight_skeleton_2()

template<class Target_skeleton , class Source_skeleton , class Items_converter >
boost::shared_ptr<Target_skeleton, Source_skeleton, Items_converter> CGAL::convert_straight_skeleton_2 ( Source_skeleton const &  s,
Items_converted const &  ic = Items_converter() 
)

#include <CGAL/Straight_skeleton_converter_2.h>

Converts a straight skeleton instantiated using certain traits into another straight skeleton instantiated using a different traits.

returns a new straight skeleton data structure with the same combinatorial and geometric data as s using the items converter ic to convert the geometric embedding to the types of the target skeleton.

Template Parameters
Target_skeletontype of the target straight skeleton
Source_skeletontype of the source straight skeleton
Items_convertera model of StraightSkeletonItemsConverter_2
See also
StraightSkeletonItemsConverter_2
Straight_skeleton_items_converter_2
Straight_skeleton_converter_2

◆ create_exterior_skeleton_and_offset_polygons_2()

template<class FT , class Polygon , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr<Polygon> > CGAL::create_exterior_skeleton_and_offset_polygons_2 ( FT  offset,
Polygon const &  poly,
OffsettingK  ofk = Exact_predicates_inexact_constructions_kernel,
SkeletonK  ssk = Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_offset_polygons_2.h>

returns a container with all the outer offset polygons at distance offset of the 2D polygon poly.

A temporary straight skeleton is constructed in the limited exterior of the input polygon to obtain the offsets. The construction of this skeleton is the most expensive operation, 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. The exterior skeleton is limited by an outer rectangular frame placed at a margin sufficiently large to allow the offset polygons to be constructed.

Template Parameters
OffsettingKmust be a CGAL kernel. It is used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
SkeletonKmust be a CGAL kernel. It is used to instantiate Straight_skeleton_builder_traits_2<K> for constructing the straight skeleton. If SkeletonK != OffsettingK the constructed straight skeleton is converted to Straight_skeleton_2<OffsettingK>.
FTmust be a number type implicitly convertible to OffsettingK::FT.
  1. Straight_skeleton is Straight_skeleton_2<K2>. If K != K2 the straight skeleton is converted to Straight_skeleton_2<K>.
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2
Examples:
Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp.

◆ create_exterior_skeleton_and_offset_polygons_with_holes_2()

template<class FT , class OffsettingK , class SkeletonK , class C >
std::vector< boost::shared_ptr< Polygon_with_holes_2<OffsettingK,C> > > CGAL::create_exterior_skeleton_and_offset_polygons_with_holes_2 ( FT  offset,
CGAL::Polygon_2< OffsettingK, C >  poly_with_holes,
OffsettingK  ofk = Exact_predicates_inexact_constructions_kernel,
SkeletonK  ssk = Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_offset_polygons_from_polygon_with_holes_2.h>

returns a container with all the outer offset polygons with holes at distance offset of the 2D polygon poly.

This is equivalent to arrange_offset_polygons_2(create_exterior_skeleton_and_offset_polygons_2(offset,poly,okk,ssk)).

◆ create_exterior_straight_skeleton_2() [1/2]

template<class FT , class PointIterator , class K >
boost::shared_ptr< Straight_skeleton_2<K> > CGAL::create_exterior_straight_skeleton_2 ( FT  max_offset,
PointIterator  vertices_begin,
PointIterator  vertices_end,
K const &  k = Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_straight_skeleton_2.h>

The function create_exterior_straight_skeleton_2() creates a straight skeleton in the exterior of a 2D polygon with holes.

The function returns a new Straight_skeleton_2<K> in the limited exterior of the 2D polygon P given by the point sequence [vertices_begin,vertices_end]. The skeleton in the limited exterior of P is the skeleton in the interior of a polygon Q with P as its hole and a rectangular frame F as outer boundary. The outer boundary F is constructed by enlarging the bounding box of P a distance d. d is a margin sufficiently large to allow an outer offset at distance max_offset to be obtained from this exterior skeleton, as computed by the function compute_outer_frame_margin()

Requirements

Template Parameters
FTa number type
Kis any CGAL Kernel
PointIteratoran InputIterator with value_type being equivalent to K2::Point_2 Cartesian_converter is used to convert from K2::Point_2 to K::Point_2
See also
create_interior_straight_skeleton_2()
Straight_skeleton_builder_2
Examples:
Straight_skeleton_2/Create_straight_skeleton_2.cpp.

◆ create_exterior_straight_skeleton_2() [2/2]

template<class FT , class Polygon , class K >
boost::shared_ptr< Straight_skeleton_2<K> > CGAL::create_exterior_straight_skeleton_2 ( FT  max_offset,
Polygon  P,
K const &  k = Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_straight_skeleton_2.h>

The function create_exterior_straight_skeleton_2() creates a straight skeleton in the exterior of a 2D polygon with holes.

The function returns a new Straight_skeleton_2<K> in the limited exterior of the 2D polygon P. The skeleton in the limited exterior of P is the skeleton in the interior of a polygon Q with P as its hole and a rectangular frame F as outer boundary. The outer boundary F is constructed by enlarging the bounding box of P a distance d. d is a margin sufficiently large to allow an outer offset at distance max_offset to be obtained from this exterior skeleton, as computed by the function compute_outer_frame_margin()

Requirements

Template Parameters
FTa number type
Kis any CGAL kernel.
Polygonis Polygon_2<K> or a standard container of K::Point_2 elements.
See also
create_interior_straight_skeleton_2()
Straight_skeleton_builder_2

◆ create_interior_skeleton_and_offset_polygons_2() [1/3]

template<class FT , class OffsettingK , class SkeletonK , class C >
std::vector< boost::shared_ptr< Polygon_2<OffsettingK,C> > > CGAL::create_interior_skeleton_and_offset_polygons_2 ( FT  offset,
CGAL::Polygon_with_holes< OffsettingK, C >  poly_with_holes,
OffsettingK  ofk = CGAL::Exact_predicates_inexact_constructions_kernel,
SkeletonK  ssk = CGAL::Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_offset_polygons_from_polygon_with_holes_2.h>

returns a container with all the inner offset polygons at distance offset of the 2D polygon with holes poly_with_holes.

A temporary straight skeleton is constructed in the interior of the input polygon to obtain the offsets. The construction of this skeleton is the most expensive operation, therefore, to construct offsets at more than one single distance, use the separate functions create_interior_straight_skeleton_2() and create_offset_polygons_2() instead.

Template Parameters
OffsettingKis the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
SkeletonKis the CGAL kernel used to instantiate Straight_skeleton_builder_traits_2<K> for constructing the straight skeleton. If SkeletonK != OffsettingK the constructed straight skeleton is converted to Straight_skeleton_2<OffsettingK>.
FTis any number type implicitly convertible to OffsettingK::FT.
Cis the container of points in the polygons.
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2

◆ create_interior_skeleton_and_offset_polygons_2() [2/3]

template<class FT , class Polygon , class HoleIterator , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr<Polygon> > CGAL::create_interior_skeleton_and_offset_polygons_2 ( FT  offset,
Polygon const &  outer_boundary,
HoleIterator  holes_begin,
HoleIterator  holes_end,
OffsettingK  ofk = CGAL::Exact_predicates_inexact_constructions_kernel,
SkeletonK  ssk = CGAL::Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_offset_polygons_2.h>

returns a container with all the inner offset polygons at distance offset of the 2D polygon with holes whose outer boundary is outer_boundary and its holes are given by [holes_begin,holes_end].

A temporary straight skeleton is constructed in the interior of the input polygon to obtain the offsets. The construction of this skeleton is the most expensive operation, therefore, to construct offsets at more than one single distance, use the separate functions create_interior_straight_skeleton_2() and create_offset_polygons_2() instead.

Template Parameters
OffsettingKis the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
SkeletonKis the CGAL kernel used to instantiate Straight_skeleton_builder_traits_2<K> for constructing the straight skeleton. If SkeletonK != OffsettingK the constructed straight skeleton is converted to Straight_skeleton_2<OffsettingK>.
FTis any number type implicitly convertible to OffsettingK::FT.
Straight_skeletonis Straight_skeleton_2<K2>. If K != K2 the straight skeleton is converted to Straight_skeleton_2<K>.
HoleIteratoris an InputIterator with value_type being CGAL::Polygon_2<OffsettingK> or a standard container of OffsettingK::Point_2 elements
Polygonis an InputIterator with value_type being CGAL::Polygon_2<OffsettingK> or a standard container of OffsettingK::Point_2 elements
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2
Examples:
Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp, and Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp.

◆ create_interior_skeleton_and_offset_polygons_2() [3/3]

template<class FT , class Polygon , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr<Polygon> > CGAL::create_interior_skeleton_and_offset_polygons_2 ( FT  offset,
Polygon const &  poly,
OffsettingK  ofk = CGAL::Exact_predicates_inexact_constructions_kernel,
SkeletonK  ssk = CGAL::Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_offset_polygons_2.h>

returns a container with all the inner offset polygons at distance offset of the 2D polygon poly.

A temporary straight skeleton is constructed in the interior of the input polygon to obtain the offsets. The construction of this skeleton is the most expensive operation, therefore, to construct offsets at more than one single distance, use the separate functions create_interior_straight_skeleton_2() and create_offset_polygons_2() instead.

Template Parameters
OffsettingKis the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
SkeletonKis the CGAL kernel used to instantiate Straight_skeleton_builder_traits_2<K> for constructing the straight skeleton. If SkeletonK != OffsettingK the constructed straight skeleton is converted to Straight_skeleton_2<OffsettingK>.
FTis any number type implicitly convertible to OffsettingK::FT.
Polygonis an InputIterator with value_type being CGAL::Polygon_2<OffsettingK> or a standard container of OffsettingK::Point_2 elements
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2

◆ create_interior_skeleton_and_offset_polygons_with_holes_2() [1/2]

template<class FT , class OffsettingK , class SkeletonK , class C >
std::vector< boost::shared_ptr< Polygon_with_holes_2<OffsettingK,C> > > CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 ( FT  offset,
CGAL::Polygon_2< OffsettingK, C >  poly,
OffsettingK  ofk = CGAL::Exact_predicates_inexact_constructions_kernel,
SkeletonK  ssk = CGAL::Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_offset_polygons_from_polygon_with_holes_2.h>

returns a container with all the inner offset polygons with holes at distance offset of the 2D polygon poly.

This is equivalent to arrange_offset_polygons_2(create_interior_skeleton_and_offset_polygons_2(offset,poly,okk,ssk)).

Template Parameters
OffsettingKis the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
SkeletonKis the CGAL kernel used to instantiate Straight_skeleton_builder_traits_2<K> for constructing the straight skeleton. If SkeletonK != OffsettingK the constructed straight skeleton is converted to Straight_skeleton_2<OffsettingK>.
FTis any number type implicitly convertible to OffsettingK::FT.
Cis the container of points in the polygons.
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2
Examples:
Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp, and Straight_skeleton_2/Show_offset_polygon.cpp.

◆ create_interior_skeleton_and_offset_polygons_with_holes_2() [2/2]

template<class FT , class OffsettingK , class SkeletonK , class C >
std::vector< boost::shared_ptr< Polygon_with_holes_2<OffsettingK,C> > > CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 ( FT  offset,
CGAL::Polygon_with_holes_2< OffsettingK, C >  poly_with_holes,
OffsettingK  ofk = CGAL::Exact_predicates_inexact_constructions_kernel,
SkeletonK  ssk = CGAL::Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_offset_polygons_from_polygon_with_holes_2.h>

returns a container with all the inner offset polygons with holes at distance offset 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,okk,ssk)).

Template Parameters
OffsettingKis the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
SkeletonKis the CGAL kernel used to instantiate Straight_skeleton_builder_traits_2<K> for constructing the straight skeleton. If SkeletonK != OffsettingK the constructed straight skeleton is converted to Straight_skeleton_2<OffsettingK>.
FTis any number type implicitly convertible to OffsettingK::FT.
Cis the container of points in the polygons.
Straight_skeletonis Straight_skeleton_2<K2>. If K != K2 the straight skeleton is converted to Straight_skeleton_2<K>.
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2

◆ create_interior_straight_skeleton_2() [1/4]

template<class K , class C >
boost::shared_ptr< Straight_skeleton_2<K> > CGAL::create_interior_straight_skeleton_2 ( Polygon_with_holes< K, C >  poly_with_holes,
K const &  k = Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_straight_skeleton_from_polygon_with_holes_2.h>

returns a new Straight_skeleton_2<K> in the interior of the 2D polygon with holes poly_with_holes.

See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2

◆ create_interior_straight_skeleton_2() [2/4]

template<class PointIterator , class HoleIterator , class K >
boost::shared_ptr< Straight_skeleton_2<K> > CGAL::create_interior_straight_skeleton_2 ( PointIterator  outer_contour_vertices_begin,
PointIterator  outer_contour_vertices_end,
HoleIterator  holes_begin,
HoleIterator  holes_end,
K const &  k = Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_straight_skeleton_2.h>

returns a new Straight_skeleton_2<K> in the interior of the 2D polygon with holes whose outer boundary is given by the point sequence [outer_contour_vertices_begin,outer_contour_vertices_end] and its holes given by [holes_begin,holes_end].

Template Parameters
Kis any CGAL Kernel
PointIteratoran InputIterator with value_type begin equivalent to K2::Point_2. Cartesian_converter is used to convert from K2::Point_2 to K::Point_2
HoleIteratoran InputIterator with value_type being Polygon_2<K> or a standard container of K2::Point_2 elements.
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2
Examples:
Straight_skeleton_2/Create_offset_polygons_2.cpp, Straight_skeleton_2/Create_straight_skeleton_2.cpp, Straight_skeleton_2/Create_straight_skeleton_from_polygon_with_holes_2.cpp, and Straight_skeleton_2/Show_straight_skeleton.cpp.

◆ create_interior_straight_skeleton_2() [3/4]

template<class PointIterator , class K >
boost::shared_ptr< Straight_skeleton_2<K> > CGAL::create_interior_straight_skeleton_2 ( PointIterator  outer_contour_vertices_begin,
PointIterator  outer_contour_vertices_end,
K const &  k = Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_straight_skeleton_2.h>

returns a new Straight_skeleton_2<K> in the interior of the 2D polygon whose outer boundary is given by the point sequence [outer_contour_vertices_begin,outer_contour_vertices_end].

Template Parameters
Kis any CGAL Kernel
PointIteratoran InputIterator with value_type begin equivalent to K2::Point_2. Cartesian_converter is used to convert from K2::Point_2 to K::Point_2
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2

◆ create_interior_straight_skeleton_2() [4/4]

template<class Polygon , class K >
boost::shared_ptr< Straight_skeleton_2<K> > CGAL::create_interior_straight_skeleton_2 ( Polygon const &  outer_contour,
K const &  k = Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_straight_skeleton_2.h>

returns a new Straight_skeleton_2<K> in the interior of the 2D polygon outer_contour.

Template Parameters
Kis any CGAL Kernel
Polygonan InputIterator with value_type being Polygon_2<K> or a standard container of K2::Point_2 elements.
See also
create_exterior_straight_skeleton_2()
Straight_skeleton_builder_2

◆ create_offset_polygons_2()

template<class Polygon , class FT , class StraightSkeleton , class K >
std::vector< boost::shared_ptr<Polygon> > CGAL::create_offset_polygons_2 ( FT  offset,
StraightSkeleton const &  s,
K const &  k = Exact_predicates_inexact_constructions_kernel 
)

#include <CGAL/create_offset_polygons_2.h>

returns a container with the offset polygons at distance offset obtained from the straight skeleton s.

If s is the inner skeleton of a polygon with holes, the offset polygons will be generated in its interior. If s is the outer skeleton of a polygon with holes, the offset polygons will be generated in its exterior.

Template Parameters
Kis any CGAL kernel.
FTis any number type implicitly convertible to K::FT.
StraightSkeletonis Straight_skeleton_2<K2>. If K != K2 the straight skeleton is converted to Straight_skeleton_2<K>.
Polygonis a model of VertexContainer_2. If this first template parameter is omitted, Polygon_2 is used.
See also
create_interior_straight_skeleton_2()
create_exterior_straight_skeleton_2()
create_interior_skeleton_and_offset_polygons_2()
create_exterior_skeleton_and_offset_polygons_2()