#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/create_offset_polygons_2.h>
#include <CGAL/Straight_skeleton_2/IO/print.h>
#include <memory>
#include <cassert>
#include <vector>
typedef K::FT FT ;
typedef K::Point_2 Point ;
typedef std::shared_ptr<Polygon_2> PolygonPtr ;
typedef std::shared_ptr<Ss> SsPtr ;
typedef std::vector<PolygonPtr> PolygonPtrVector ;
int main()
{
Polygon_2 poly ;
poly.push_back( Point(-1,-1) ) ;
poly.push_back( Point(0,-12) ) ;
poly.push_back( Point(1,-1) ) ;
poly.push_back( Point(12,0) ) ;
poly.push_back( Point(1,1) ) ;
poly.push_back( Point(0,12) ) ;
poly.push_back( Point(-1,1) ) ;
poly.push_back( Point(-12,0) ) ;
assert(poly.is_counterclockwise_oriented());
FT lOffset = 1 ;
CGAL::Straight_skeletons_2::IO::print_polygons(inner_offset_polygons);
CGAL::Straight_skeletons_2::IO::print_polygons(outer_offset_polygons);
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::vector< std::shared_ptr< OfKPolygon > > create_interior_skeleton_and_offset_polygons_2(FT offset, const InKPolygon &outer_boundary, HoleIterator holes_begin, HoleIterator holes_end, OfK ofk=CGAL::Exact_predicates_inexact_constructions_kernel, SsK ssk=CGAL::Exact_predicates_inexact_constructions_kernel())
returns a container with all the inner offset polygons at distance offset of a 2D polygon with holes.
std::vector< std::shared_ptr< OfKPolygon > > create_exterior_skeleton_and_offset_polygons_2(FT offset, const InKPolygon &poly, OfK ofk=Exact_predicates_inexact_constructions_kernel(), SsK ssk=Exact_predicates_inexact_constructions_kernel())
returns a container with all the outer offset polygons at distance offset of the 2D polygon poly.