#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Constrained_triangulation_plus_2.h>
typedef CDTP::Point Point;
typedef CDTP::Constraint_id Cid;
typedef CDTP::Vertex_handle Vertex_handle;
int main()
{
CDTP cdtp;
cdtp.insert_constraint(Point(1,1), Point(2,2));
cdtp.insert_constraint(Point(2,2), Point(3,3));
cdtp.insert_constraint(Point(1,1), Point(1,2));
cdtp.insert_constraint(Point(1,2), Point(1,3));
cdtp.insert_constraint(Point(10,10), Point(20,20));
cdtp.insert_constraint(Point(20,20), Point(30,30));
cdtp.insert_constraint(Point(100,100), Point(200,200));
std::cout << "Input CDT+ has " << cdtp.number_of_constraints() << " constraints/subconstraints" << std::endl;
std::cout << "Splitting subconstraints graph into constraints" << std::endl;
cdtp.split_subconstraint_graph_into_constraints();
std::cout << "Output CDT+ has " << cdtp.number_of_constraints() << " constraints:" << std::endl;
for (CDTP::Constraint_id cid : cdtp.constraints())
{
std::cout << " *";
for (CDTP::Vertex_handle vh : cdtp.vertices_in_constraint(cid))
std::cout << " (" << vh->point() << ")";
std::cout << std::endl;
}
return EXIT_SUCCESS;
}