Index: cdt.c =================================================================== --- cdt.c (revision 33789) +++ cdt.c (revision 33790) @@ -62,6 +62,11 @@ return e; } +edge_t *cdt_new_edge_(cdt_t *cdt, point_t *p1, point_t *p2, int constrain) +{ + return new_edge(cdt, p1, p2, constrain); +} + edge_t *get_edge_from_points(point_t *p1, point_t *p2) { EDGELIST_FOREACH(e1, p1->adj_edges) @@ -143,6 +148,12 @@ return t; } +triangle_t *cdt_new_triangle_(cdt_t *cdt, point_t *p1, point_t *p2, point_t *p3) +{ + return new_triangle(cdt, p1, p2, p3); +} + + static void remove_triangle(cdt_t *cdt, triangle_t *t) { int i, j; Index: cdt.h =================================================================== --- cdt.h (revision 33789) +++ cdt.h (revision 33790) @@ -86,4 +86,10 @@ (((double)((p)->pos.x - (q)->pos.x) * (double)((p)->pos.x - (q)->pos.x)) \ + ((double)((p)->pos.y - (q)->pos.y) * (double)((p)->pos.y - (q)->pos.y))) + +/* Raw, low level object creation without side effects; use it only to + reconstruct a case */ +edge_t *cdt_new_edge_(cdt_t *cdt, point_t *p1, point_t *p2, int constrain); +triangle_t *cdt_new_triangle_(cdt_t *cdt, point_t *p1, point_t *p2, point_t *p3); + #endif