#include <CGAL/Cartesian.h>
#include <CGAL/Arr_circle_segment_traits_2.h>
#include <CGAL/Arrangement_with_history_2.h>
typedef Traits_2::Point_2 Point_2;
typedef Traits_2::Curve_2 Curve_2;
typedef Arr_with_hist_2::Curve_handle Curve_handle;
Point_location;
int main()
{
Arr_with_hist_2 arr;
Curve_2 C[9];
Curve_handle handles[9];
size_t k;
for (k = 0; k < 9; k++)
handles[k] =
insert(arr, C[k]);
std::cout << "The initial arrangement size:" << std::endl
<< " V = " << arr.number_of_vertices()
<< ", E = " << arr.number_of_edges()
<< ", F = " << arr.number_of_faces() << std::endl;
std::cout << "Removing C[0] : ";
<< " edges have been removed." << std::endl;
std::cout << "The arrangement size:" << std::endl
<< " V = " << arr.number_of_vertices()
<< ", E = " << arr.number_of_edges()
<< ", F = " << arr.number_of_faces() << std::endl;
Point_location pl(arr);
const Point_2 q = Point_2(_7_halves, 7);
Point_location::result_type obj = pl.locate(q);
Arr_with_hist_2::Halfedge_const_handle e;
CGAL_assertion_code(bool success = ) CGAL::assign(e, obj);
CGAL_assertion(success);
Arr_with_hist_2::Halfedge_handle e1, e2;
e1 = arr.split_edge(arr.non_const_handle(e), q);
e2 = e1->next();
std::cout << "After edge split: "
<< "V = " << arr.number_of_vertices()
<< ", E = " << arr.number_of_edges()
<< ", F = " << arr.number_of_faces() << std::endl;
arr.merge_edge(e1, e2);
std::cout << "After edge merge: "
<< "V = " << arr.number_of_vertices()
<< ", E = " << arr.number_of_edges()
<< ", F = " << arr.number_of_faces() << std::endl;
return 0;
}