#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polygon_with_holes_2.h>
#include <CGAL/create_straight_skeleton_from_polygon_with_holes_2.h>
#include <CGAL/Straight_skeleton_2/IO/print.h>
#include <memory>
#include <cassert>
typedef K::Point_2 Point ;
typedef std::shared_ptr<Ss> SsPtr ;
int main()
{
Polygon_2 outer ;
outer.push_back( Point(-1,-1) ) ;
outer.push_back( Point(0,-12) ) ;
outer.push_back( Point(1,-1) ) ;
outer.push_back( Point(12,0) ) ;
outer.push_back( Point(1,1) ) ;
outer.push_back( Point(0,12) ) ;
outer.push_back( Point(-1,1) ) ;
outer.push_back( Point(-12,0) ) ;
Polygon_2 hole ;
hole.push_back( Point(-1,0) ) ;
hole.push_back( Point(0,1 ) ) ;
hole.push_back( Point(1,0 ) ) ;
hole.push_back( Point(0,-1) ) ;
assert(outer.is_counterclockwise_oriented());
assert(hole.is_clockwise_oriented());
Polygon_with_holes poly( outer ) ;
poly.add_hole( hole ) ;
CGAL::Straight_skeletons_2::IO::print_straight_skeleton(*iss);
return EXIT_SUCCESS;
}
The class Straight_skeleton_2 provides a model for the StraightSkeleton_2 concept which is the class ...
Definition: Straight_skeleton_2.h:178
std::shared_ptr< Straight_skeleton_2< SsK > > create_interior_straight_skeleton_2(PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, HoleIterator holes_begin, HoleIterator holes_end, SsK k=CGAL::Exact_predicates_inexact_constructions_kernel())
creates a straight skeleton in the interior of the 2D polygon with holes.