#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Float_snap_rounding_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;
std::vector< Polyline_2 > polylines;
return 0;
}
OutputIterator float_snap_rounding_2(InputIterator begin, InputIterator end, OutputIterator out, const NamedParameters &np=parameters::default_values())
subdivides and rounds a set of segments so that they are pairwise disjoint in their interiors.
Definition: Float_snap_rounding_2.h:439
OutputIterator compute_snapped_subcurves_2(InputIterator begin, InputIterator end, OutputIterator out, const NamedParameters &np=parameters::default_values())
Given a range of segments, computes rounded subsegments that are pairwise disjoint in their interior,...
Definition: Float_snap_rounding_2.h:504
bool do_curves_intersect(InputIterator curves_begin, InputIterator curves_end)
The class Float_snap_rounding_traits_2<Kernel> is a model of the FloatSnapRoundingTraits_2 concept.
Definition: Float_snap_rounding_traits_2.h:143