diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polylines-wip-tests/polylines-WIP.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polylines-wip-tests/polylines-WIP.cpp index a2b391698b1..3bd00038d7d 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polylines-wip-tests/polylines-WIP.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polylines-wip-tests/polylines-WIP.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -15,7 +16,9 @@ typedef CGAL::Quotient Number_type; typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Segment_traits_2; -typedef CGAL::Arr_polyline_traits_2 Traits_2; +typedef CGAL::Arr_polyline_traits_2 Polyline_traits_2; +typedef CGAL::Arr_tracing_traits_2 Traits_2; +// typedef CGAL::Arr_polyline_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Segment_traits_2::Curve_2 Segment_2; typedef Traits_2::Curve_2 Polyline_2; @@ -24,38 +27,48 @@ typedef CGAL::Arrangement_2 Arrangement_2; int main () { - Traits_2 traits; +Traits_2 traits; +traits.disable_all_traces(); +// traits.enable_trace(Traits_2::SPLIT_OP); +traits.enable_trace(Traits_2::INTERSECT_OP); + Traits_2::Construct_curve_2 polyline_construct = traits.construct_curve_2_object(); - Arrangement_2 arr; +Arrangement_2 arr(&traits); std::list pts; - Point_2 p1(0,2); - Point_2 p2(-1,-1); - Point_2 p3(1,-1); - pts.push_back(p1); - pts.push_back(p2); - pts.push_back(p3); - pts.push_back(p1); + // Point_2 p1(0,2); + // Point_2 p2(-1,-1); + // Point_2 p3(1,-1); + // pts.push_back(p1); + // pts.push_back(p2); + // pts.push_back(p3); + // pts.push_back(p1); + pts.push_back(Point_2(-0, -7)); + pts.push_back(Point_2(-7., 8)); + pts.push_back(Point_2(-1, 6)); + pts.push_back(Point_2(4, -9)); + pts.push_back(Point_2(-7, -7)); + Polyline_2 poly1 = polyline_construct(pts.begin(), pts.end()); - std::vector segs; - Point_2 q1(-1,1); - Point_2 q2(0,-2); - Point_2 q3(1,1); + // std::vector segs; + // Point_2 q1(-1,1); + // Point_2 q2(0,-2); + // Point_2 q3(1,1); - segs.push_back(Segment_2(q1,q3)); - segs.push_back(Segment_2(q1,q2)); - segs.push_back(Segment_2(q2,q3)); - Polyline_2 poly2 = polyline_construct(segs.begin(), segs.end()); + // segs.push_back(Segment_2(q1,q3)); + // segs.push_back(Segment_2(q1,q2)); + // segs.push_back(Segment_2(q2,q3)); + // Polyline_2 poly2 = polyline_construct(segs.begin(), segs.end()); // TODO: Make sure to construct all possible of polylines. That is, from // ranges of points, ranges of segments, ranges with only one segment // or only two points, etc. insert (arr, poly1); - insert (arr, poly2); + // insert (arr, poly2); // print_arrangement (arr);