#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/snap_rounding_2.h>
#include <CGAL/Double_grid_snap_rounding_traits_2.h>
typedef Kernel::FT FT;
typedef std::vector<Point_2> Polyline_2;
int main()
{
std::vector< Segment_2 > segs;
FT e(std::pow(2, -60));
segs.emplace_back(Point_2(1-e, 1), Point_2(-1-e, -1+2*e));
segs.emplace_back(Point_2(e/2, e/2), Point_2(1, -1));
segs.emplace_back(Point_2(0, 2-e/2), Point_2(2, 0));
segs.emplace_back(Point_2(0, 2-e/2), Point_2(-2+e, -4));
segs.emplace_back(Point_2(-2, 2), Point_2(2, 2));
std::vector< Segment_2 > out;
std::cout << "Size of the output: " << out.size() << std::endl;
return 0;
}
OutputPolylineIterator snap_rounding_2(const SegmentRange &segments, OutputPolylineIterator out, const NamedParameters &np=parameters::default_values())
subdivides and rounds a range of segments so that they are pairwise disjoint in their interiors.
bool do_curves_intersect(InputIterator curves_begin, InputIterator curves_end)
The class Double_grid_snap_rounding_traits_2<InputKernel, ExactKernel, BaseTraits> is a model of the ...
Definition: Double_grid_snap_rounding_traits_2.h:53