\( \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.5 - 2D Straight Skeleton and Polygon Offsetting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

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 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 > > 
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 > > 
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 >
std::vector< boost::shared_ptr
< Polygon_with_holes_2
< OffsettingK > > > 
CGAL::create_exterior_skeleton_and_offset_polygons_with_holes_2 (FT offset, CGAL::Polygon_2< OffsettingK > 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 >
std::vector< boost::shared_ptr
< Polygon_2< OffsettingK > > > 
CGAL::create_interior_skeleton_and_offset_polygons_2 (FT offset, CGAL::Polygon_with_holes< OffsettingK > 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 >
std::vector< boost::shared_ptr
< Polygon_with_holes_2
< OffsettingK > > > 
CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 (FT offset, CGAL::Polygon_2< OffsettingK > 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 >
std::vector< boost::shared_ptr
< Polygon_with_holes_2
< OffsettingK > > > 
CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 (FT offset, CGAL::Polygon_with_holes_2< OffsettingK > 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 Polygon , class FT , class Straight_skeleton , class K >
std::vector< boost::shared_ptr
< Polygon > > 
CGAL::create_offset_polygons_2 (FT offset, Straight_skeleton const &s,, K const &k=Exact_predicates_inexact_constructions_kernel)
 The function create_offset_polygons_2() creates a straight skeleton in the interior 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 >
boost::shared_ptr
< Straight_skeleton_2< K > > 
CGAL::create_interior_straight_skeleton_2 (Polygon_with_holes< K > 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...
 
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

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.

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).
OtputPolygonWithHolesPtrIteratormust 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<Gt,Ss>

#include <CGAL/arrange_offset_polygons_2.h>

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.

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
CGAL::Polygon_offset_builder_traits_2<Kernel>

#include <CGAL/compute_outer_frame_margin.h>

Examples:
Straight_skeleton_2/Low_level_API.cpp.
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.

See Also
StraightSkeletonItemsConverter_2
Straight_skeleton_items_converter_2<SrcSs,TgtSs,NTConverter>
Straight_skeleton_converter_2<SrcSs,TgtSs,ItemsConverter>

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.

The first template parameter is the type of the target straight skeleton. This template parameter is not bound to a function argument so it must be explicitly specified.

#include <CGAL/Straight_skeleton_converter_2.h>

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.

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<Gt,Ss>

#include <CGAL/create_offset_polygons_2.h>

Examples:
Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp.
template<class FT , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr< Polygon_with_holes_2<OffsettingK> > > CGAL::create_exterior_skeleton_and_offset_polygons_with_holes_2 ( FT  offset,
CGAL::Polygon_2< OffsettingK >  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.

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

#include <CGAL/create_offset_polygons_from_polygon_with_holes_2.h>

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.

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

  1. K is any CGAL kernel.
  2. PointIterator::value_type is equivalent to K2::Point_2. A Cartesian converter is used to convert from K2::Point_2 to K::Point_2
  3. Polygon is Polygon_2<K> or a standard container of K2::Point_2 elements.
See Also
create_interior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss,Visitor>

#include <CGAL/create_straight_skeleton_2.h>

Examples:
Straight_skeleton_2/Create_straight_skeleton_2.cpp.
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.

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

  1. K is any CGAL kernel.
  2. PointIterator::value_type is equivalent to K2::Point_2. A Cartesian converter is used to convert from K2::Point_2 to K::Point_2
  3. Polygon is Polygon_2<K> or a standard container of K2::Point_2 elements.
See Also
create_interior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss,Visitor>

#include <CGAL/create_straight_skeleton_2.h>

template<class FT , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr< Polygon_2<OffsettingK> > > CGAL::create_interior_skeleton_and_offset_polygons_2 ( FT  offset,
CGAL::Polygon_with_holes< OffsettingK >  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.

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.

  1. OffsettingK is the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
  2. SkeletonK is 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>.
  3. FT is any 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>.
  2. HoleIterator::value_type and Polygon are Polygon_2<OffsettingK> or a standard container of OffsettingK::Point_2 elements.
See Also
create_exterior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss>

#include <CGAL/create_offset_polygons_from_polygon_with_holes_2.h>

Examples:
Straight_skeleton_2/Create_saop_from_polygon_with_holes_2.cpp, and Straight_skeleton_2/Create_skeleton_and_offset_polygons_2.cpp.
template<class FT , class Polygon , class HoleIterator , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr<Polygon> > 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].

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.

  1. OffsettingK is the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
  2. SkeletonK is 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>.
  3. FT is any 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>.
  2. HoleIterator::value_type and Polygon are CGAL::Polygon_2<OffsettingK> or a standard container of OffsettingK::Point_2 elements
See Also
create_exterior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss>

#include <CGAL/create_offset_polygons_2.h>

template<class FT , class Polygon , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr<Polygon> > 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.

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.

  1. OffsettingK is the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
  2. SkeletonK is 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>.
  3. FT is any 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>.
  2. HoleIterator::value_type and Polygon are CGAL::Polygon_2<OffsettingK> or a standard container of OffsettingK::Point_2 elements
See Also
create_exterior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss>

#include <CGAL/create_offset_polygons_2.h>

template<class FT , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr< Polygon_with_holes_2<OffsettingK> > > CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 ( FT  offset,
CGAL::Polygon_2< OffsettingK >  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.

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

  1. OffsettingK is the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
  2. SkeletonK is 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>.
  3. FT is any 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>.
  2. HoleIterator::value_type and Polygon are CGAL::Polygon_2<OffsettingK> or a standard container of OffsettingK::Point_2 elements.
See Also
create_exterior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss>

#include <CGAL/create_offset_polygons_from_polygon_with_holes_2.h>

Examples:
Straight_skeleton_2/Create_skeleton_and_offset_polygons_with_holes_2.cpp, and Straight_skeleton_2/Show_offset_polygon.cpp.
template<class FT , class OffsettingK , class SkeletonK >
std::vector< boost::shared_ptr< Polygon_with_holes_2<OffsettingK> > > CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 ( FT  offset,
CGAL::Polygon_with_holes_2< OffsettingK >  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.

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

  1. OffsettingK is the CGAL kernel used to instantiate Polygon_offset_builder_traits_2<K> for constructing the offset polygons.
  2. SkeletonK is 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>.
  3. FT is any 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>.
  2. HoleIterator::value_type and Polygon are CGAL::Polygon_2<OffsettingK> or a standard container of OffsettingK::Point_2 elements.
See Also
create_exterior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss>

#include <CGAL/create_offset_polygons_from_polygon_with_holes_2.h>

template<class K >
boost::shared_ptr< Straight_skeleton_2<K> > CGAL::create_interior_straight_skeleton_2 ( Polygon_with_holes< K >  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.

See Also
create_exterior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss>

#include <CGAL/create_straight_skeleton_from_polygon_with_holes_2.h>

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].

  1. K is any CGAL kernel.
  2. PointIterator::value_type is equivalent to K2::Point_2. A Cartesian converter is used to convert from K2::Point_2 to K::Point_2
  3. HoleIterator::value_type and Polygon are Polygon_2<K> or a standard container of K2::Point_2 elements.
See Also
create_exterior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss>

#include <CGAL/create_straight_skeleton_2.h>

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.
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].

  1. K is any CGAL kernel.
  2. PointIterator::value_type is equivalent to K2::Point_2. A Cartesian converter is used to convert from K2::Point_2 to K::Point_2
  3. HoleIterator::value_type and Polygon are Polygon_2<K> or a standard container of K2::Point_2 elements.
See Also
create_exterior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss>

#include <CGAL/create_straight_skeleton_2.h>

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.

  1. K is any CGAL kernel.
  2. PointIterator::value_type is equivalent to K2::Point_2. A Cartesian converter is used to convert from K2::Point_2 to K::Point_2
  3. HoleIterator::value_type and Polygon are Polygon_2<K> or a standard container of K2::Point_2 elements.
See Also
create_exterior_straight_skeleton_2
Straight_skeleton_builder_2<Gt,Ss>

#include <CGAL/create_straight_skeleton_2.h>

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

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

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

  1. K is any CGAL kernel.
  2. FT is any number type implicitly convertible to K::FT.
  3. Straight_skeleton is Straight_skeleton_2<K2>. If K != K2 the straight skeleton is converted to Straight_skeleton_2<K>.
  4. Polygon is a model of VertexContainer_2. If this first template parameter is omitted, Polygon_2 is used.
See Also
create_interior_skeleton_2
create_exterior_skeleton_2
create_interior_skeleton_and_offset_polygons_2
create_exterior_skeleton_and_offset_polygons_2

#include <CGAL/create_straight_skeleton_2.h>