CGAL::create_exterior_skeleton_and_offset_polygons_2

Definition

The function create_exterior_skeleton_and_offset_polygons_2 creates outer offset polygons directly from an input polygon via a temporarily created straight skeleton.

#include <CGAL/create_offset_polygons_2.h>

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

#include <CGAL/create_offset_polygons_from_polygon_with_holes_2.h>

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

Requirements

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