15 #define DEFAULT_CONVEX_HULL_LEN 20 74 #ifdef DEBUG_INITIALIZE_DCEL 79 if ((dcel->
vertex == NULL) ||
80 (dcel->
edges == NULL) ||
81 (dcel->
faces == NULL))
84 sprintf( log_Text,
"Error allocating memory in initialize_DCEL");
88 printf(
"Function initialize_DCEL.\tError allocating memory in initialize_DCEL\n");
105 int nVertex=0, nEdges=0, nFaces=0;
110 if ((fd = fopen( fileName,
"r")) == NULL)
113 sprintf( log_Text,
"Error opening DCEL file: %s\n", fileName);
114 write_Log( log_Text);
116 printf(
"Error opening DCEL file: %s\n", fileName);
122 ret = fscanf( fd,
"%d", &nVertex);
124 #ifdef DEBUG_READ_DCEL 125 printf(
"# vertex %d\n", nVertex);
128 for (i=0; i<nVertex; i++)
132 ret = fscanf( fd,
"%f", &vertex.
vertex.
x);
133 ret = fscanf( fd,
"%f", &vertex.
vertex.
y);
135 ret = fscanf( fd,
"%lf", &vertex.
vertex.
x);
136 ret = fscanf( fd,
"%lf", &vertex.
vertex.
y);
142 ret = fscanf( fd,
"%d", &nEdges);
144 #ifdef DEBUG_READ_DCEL 145 printf(
"# edges %d\n", nEdges);
148 for (i=0; i<nEdges; i++)
151 ret = fscanf( fd,
"%d", &origin);
152 ret = fscanf( fd,
"%d", &twin);
153 ret = fscanf( fd,
"%d", &prev);
154 ret = fscanf( fd,
"%d", &next);
155 ret = fscanf( fd,
"%d", &edgeFace);
159 ret = fscanf( fd,
"%d", &nFaces);
161 #ifdef DEBUG_READ_DCEL 162 printf(
"# faces %d\n", nFaces);
167 fd = fopen( fileName,
"r");
172 ret = fscanf( fd,
"%d", &nVertex);
175 for (i=0; i<nVertex; i++)
179 ret = fscanf( fd,
"%f", &vertex.
vertex.
x);
180 ret = fscanf( fd,
"%f", &vertex.
vertex.
y);
182 ret = fscanf( fd,
"%lf", &vertex.
vertex.
x);
183 ret = fscanf( fd,
"%lf", &vertex.
vertex.
y);
187 #ifdef DEBUG_READ_DCEL 196 ret = fscanf( fd,
"%d", &nEdges);
199 for (i=0; i<nEdges; i++)
202 ret = fscanf( fd,
"%d", &origin);
203 ret = fscanf( fd,
"%d", &twin);
204 ret = fscanf( fd,
"%d", &prev);
205 ret = fscanf( fd,
"%d", &next);
206 ret = fscanf( fd,
"%d", &edgeFace);
209 insertEdge( dcel, origin, twin, prev, next, edgeFace);
213 ret = fscanf( fd,
"%d", &nFaces);
216 for (i=0; i<nFaces; i++)
219 ret = fscanf( fd,
"%d", &face.
edge);
225 #ifdef DEBUG_READ_DCEL 226 printf(
"Read dcel with:\n%d vertex\n%d edges\n%d faces\n",
246 if ((fd = fopen( fileName,
"r")) == NULL)
250 sprintf( log_Text,
"Error %d opening input file: %s\n", errno, fileName);
251 write_Log( log_Text);
253 printf(
"Error %d opening input file: %s\n", errno, fileName);
259 if (fscanf( fd,
"%d", &number_Points) != 1)
262 sprintf( log_Text,
"Error %d reading number of points from file: %s.", errno, fileName);
263 write_Log( log_Text);
265 printf(
"Error %d reading number of points from file: %s.", errno, fileName);
270 #ifdef DEBUG_READ_FLAT_FILE 271 printf(
"# points %d\n", number_Points);
277 sprintf( log_Text,
"Error allocating memory when calling initialize_DCEL\n");
278 write_Log( log_Text);
280 printf(
"Error allocating memory when calling initialize_DCEL");
308 if ((fd = fopen( fileName,
"w")) == NULL)
312 sprintf( log_Text,
"Error %d opening input file: %s\n", errno, fileName);
313 write_Log( log_Text);
315 printf(
"Error %d opening output file: %s\n", errno, fileName);
322 #ifdef DEBUG_WRITE_DCEL 323 printf(
"Writing DCEL data to %s file\n", fileName);
330 for (i=0; i<dcel->
nVertex; i++)
342 for (i=0; i<dcel->
nEdges; i++)
356 for (i=0; i<dcel->
nFaces; i++)
364 #ifdef DEBUG_WRITE_DCEL 365 printf(
"Writing only points to %s file\n", fileName);
371 for (i=0; i<dcel->
nVertex; i++)
391 printf(
"# vertices: %d\n", dcel->
nVertex);
394 for (i=0; i<dcel->
nVertex; i++)
403 printf(
"# edges: %d\n", dcel->
nEdges);
406 for (i=0; i<dcel->
nEdges; i++)
417 printf(
"# faces: %d\n", dcel->
nFaces);
420 for (i=0; i<dcel->
nFaces; i++)
504 sprintf( log_Text,
"Error allocating vertex in resize_DCEL.\n");
505 write_Log( log_Text);
507 printf(
"Error allocating vertex in resize_DCEL.\n");
517 refEdges = dcel->
edges;
524 (dcel->
edges != NULL))
531 free(refEdgeChecked);
537 sprintf( log_Text,
"Error allocating edges in resize_DCEL.\n");
538 write_Log( log_Text);
540 printf(
"Error allocating edges in resize_DCEL.\n");
549 refFaces = dcel->
faces;
554 if (dcel->
faces != NULL)
565 sprintf( log_Text,
"Error allocating faces in resize_DCEL.\n");
566 write_Log( log_Text);
568 printf(
"Error allocating faces in resize_DCEL.\n");
607 if (dcel->
edges != NULL)
621 if (dcel->
faces != NULL)
663 printf(
"DCEL vertex is full. Size %d and # elements is %d.\n",
670 sprintf(
"Error resizing DCEL in insertPoint.\n");
671 write_Log( log_Text);
673 printf(
"Error resizing DCEL in insertPoint.\n");
680 #ifdef DEBUG_INSERTPOINT 681 printf(
"Insert point (%lf,%lf) at position %d. Size %d\n", point->
x, point->
y,
714 printf(
"DCEL vertex is full. Size %d and # elements is %d.\n", dcel->
sizeVertex,
720 sprintf(
"Error resizing DCEL in insertPoint.\n");
721 write_Log( log_Text);
723 printf(
"Error resizing DCEL in insertPoint.\n");
730 #ifdef DEBUG_INSERTVERTEX 731 printf(
"Insert point (%lf,%lf) at position %d. Size %d\n", vertex.
vertex.
x,
764 printf(
"Error inserting vertex in DCEL. Index %d out of bounds (0,%d).\n",
768 sprintf(
"Error inserting vertex in DCEL. Index %d out of bounds (0,%d).\n",
771 write_Log( log_Text);
806 printf(
"Error updating vertex in DCEL. Index %d out of bounds (0,%d).\n",
810 sprintf(
"Error updating vertex in DCEL. Index %d out of bounds (0,%d).\n",
813 write_Log( log_Text);
819 #ifdef DEBUG_UPDATE_VERTEX_EDGE_AT 820 printf(
"Updating vertex %d with edge %d\n", index, edge_ID);
844 if ((index1 >= dcel->
nVertex) ||
847 printf(
"Error swapping vertices in DCEL. Index1 %d or Index2 %d out of bounds (0,%d).\n",
852 sprintf(
"Error swapping vertices in DCEL. Index1 %d or Index2 out of bounds (0,%d).\n",
856 write_Log( log_Text);
863 vertex = dcel->
vertex[index1];
887 printf(
"Error in get_Vertex DCEL. Index %d out of bounds (0,%d).\n",
891 sprintf(
"Error in get_Vertex DCEL. Index %d out of bounds (0,%d).\n",
894 write_Log( log_Text);
902 return(&dcel->
vertex[index]);
922 printf(
"Error in get_Vertex_Point DCEL. Index %d out of bounds (0,%d).\n",
926 sprintf(
"Error in get_Vertex_Point DCEL. Index %d out of bounds (0,%d).\n",
929 write_Log( log_Text);
1005 printf(
"DCEL edges is full. Size %d and # elements is %d.\n",
1012 sprintf(
"Error resizing DCEL in insertEdge.\n");
1013 write_Log( log_Text);
1015 printf(
"Error resizing DCEL in insertEdge.\n");
1022 #ifdef DEBUG_INSERTEDGE 1023 printf(
"Added edge %d. Origin %d Twin %d Prev %d Next %d Face %d.\n",
1067 if (index >= dcel->
nEdges)
1069 printf(
"Trying to update index edge %d out of bounds %d\n",
1073 sprintf(
"Trying to update index edge %d out of bounds %d\n",
1076 write_Log( log_Text);
1112 #ifdef DEBUG_UPDATE_EDGE 1113 printf(
"Updated edge %d. Origin %d Twin %d Prev %d Next %d Face %d.\n",
1177 int is_External=
FALSE;
1180 if (index >= dcel->
nEdges)
1182 printf(
"Trying to check an edge %d out of bounds %d in is_External_Edge\n",
1186 sprintf(
"Trying to check an edge %d out of bounds %d in is_External_Edge\n",
1189 write_Log( log_Text);
1191 is_External =
FALSE;
1204 return(is_External);
1221 if (edge_Index >= dcel->
nEdges)
1223 printf(
"Trying to get edge %d out of bounds %d in get_Edge_Origin_Vertex\n",
1227 sprintf(
"Trying to check an edge %d out of bounds %d in is_External_Edge\n",
1230 write_Log( log_Text);
1248 edge_Index = firstEdge_Index;
1253 #ifdef DEBUG_GET_EDGE_IN_CONVEX_HULL 1254 printf(
"Checking convex hull edge index %d. Points are %d and %d\n", edge_Index,
1271 #ifdef DEBUG_GET_EDGE_IN_CONVEX_HULL 1272 printf(
"Found edge %d.\n", edge_Index+1);
1275 return(edge_Index+1);
1290 if (index >= dcel->
nEdges)
1292 printf(
"Trying to get edge %d out of bounds %d in get_Edge\n",
1296 sprintf(
"Trying to check an edge %d out of bounds %d in get_Edge\n",
1299 write_Log( log_Text);
1301 return(&dcel->
edges[0]);
1306 return(&dcel->
edges[index]);
1325 if (index >= dcel->
nEdges)
1327 printf(
"Trying to get edge %d out of bounds %d in copy_Edge\n",
1331 sprintf(
"Trying to check an edge %d out of bounds %d in copy_Edge\n",
1334 write_Log( log_Text);
1383 printf(
"DCEL faces array is full. Size %d # elements %d.\n",
1391 sprintf(
"Error resizing DCEL in insertFace.\n");
1392 write_Log( log_Text);
1394 printf(
"Error resizing DCEL in insertFace.\n");
1401 #ifdef DEBUG_INSERTFACE 1402 printf(
"Insert face %d with edge %d\n", dcel->
nFaces, edge_ID);
1435 printf(
"DCEL faces array is full. Size %d # elements %d.\n",
1443 sprintf(
"Error resizing DCEL in update_Face.\n");
1444 write_Log( log_Text);
1446 printf(
"Error resizing DCEL in update_Face.\n");
1453 #ifdef DEBUG_UPDATE_FACE 1454 printf(
"Updating face %d with edge %d\n", index, edge_ID);
1482 if (index >= dcel->
nFaces)
1484 printf(
"Trying to get face %d out of bounds %d in get_Face\n",
1488 sprintf(
"Trying to get an face %d out of bounds %d in get_Face\n",
1491 write_Log( log_Text);
1493 return(&dcel->
faces[0]);
1498 return(&dcel->
faces[index]);
1520 if (face_ID >= dcel->
nFaces)
1522 printf(
"Trying to get face %d out of bounds %d in get_Face\n",
1526 sprintf(
"Trying to get an face %d out of bounds %d in get_Face\n",
1529 write_Log( log_Text);
1535 #ifdef DEBUG_GET_FACE_VERTEX 1575 for (i=1; i<dcel->
nFaces ;i++)
1631 bool is_Interior=
false;
1635 if (face_ID >= dcel->
nFaces)
1637 printf(
"Checking face %d out of bounds %d in is_Interior_To_Face\n",
1641 sprintf(
"Checking face %d out of bounds %d in is_Interior_To_Face\n",
1644 write_Log( log_Text);
1646 is_Interior =
false;
1651 edge_Index = dcel->
faces[face_ID].
edge-1;
1662 return(is_Interior);
1678 int is_Negative=
FALSE;
1681 if (edgeID > dcel->
nEdges)
1683 printf(
"Checking edge %d out of bounds %d in is_Negative_Any_Vertex\n",
1687 sprintf(
"Checking edge %d out of bounds %d in is_Negative_Any_Vertex\n",
1690 write_Log( log_Text);
1692 is_Negative =
FALSE;
1696 #ifdef DEBUG_IS_NEGATIVE_ANY_VERTEX 1708 return(is_Negative);
1722 printf(
"Face %d.\n", faceID);
1725 printf(
"\tEdges:\t%d\t\t%d\t\t%d.\n", dcel->
faces[faceID].
edge,
1822 #ifdef DEBUG_RETURN_TURN 1823 printf(
"Turn between segment %d %d and point \n", source_ID, dest_ID);
1827 printf(
" is LEFT_TURN\n");
1829 else if (turn == RIGHT)
1831 printf(
" is RIGHT\n");
1835 printf(
" is COLLINEAR\n");
1847 for (point_Index=0; point_Index<dcel->
nVertex ;point_Index++)
1859 int point_Index=0,
first=0;
1865 first = point_Index;
1880 if (point_Index ==
first)
1913 bool finished=
false;
1919 if (((*length) > 0) && (dcel->
nFaces > 0))
1921 #ifdef DEBUG_GET_CONVEX_HULL 1939 #ifdef DEBUG_GET_CONVEX_HULL 1940 printf(
"Found first edge %d. O %d D %d\n", edgeIndex,
1954 firstIndex = edgeIndex;
1958 while ((!built) && (!finished))
1961 if (nPoints < (*length))
1966 #ifdef DEBUG_GET_CONVEX_HULL 1983 if (edgeIndex == firstIndex)
1986 if (nPoints < (*length))
1991 (*length) = nPoints - 1;
1992 #ifdef DEBUG_GET_CONVEX_HULL 1993 printf(
"Finished\n");
2020 bool isInterior=
false;
2025 bool finished=
false;
2032 while ((!built) && (!(*error)))
2035 if ((convex = (
int *)malloc(
sizeof(
int)*length)) == NULL)
2039 sprintf( log_Text,
"Error allocating memory for convex hull vector");
2040 write_Log( log_Text,
"interior_To_Convex_Hull",
true);
2042 printf(
"Function interior_To_Convex_Hull:\n");
2043 printf(
"Error allocating memory for convex hull vector\n");
2068 while ((isInterior) && (!finished))
2071 if (index == (length-1))
2113 while ((i<nPoints) && (ret==
SUCCESS))
2115 #ifdef DEBUG_READ_POINTS_DCEL 2116 printf(
"Reading point %d\n", i+1);
2119 if (fscanf( fd,
"%f", &point.
vertex.
x) != 1)
2123 sprintf( log_Text,
"Fail reading X coordinate of %dth point", i+1);
2124 write_Log( log_Text);
2126 printf(
"Fail reading X coordinate of %dth point", i+1);
2128 else if (fscanf( fd,
"%f", &point.
vertex.
y) != 1)
2132 sprintf( log_Text,
"Fail reading Y coordinate of %dth point", i+1);
2133 write_Log( log_Text);
2135 printf(
"Fail reading Y coordinate of %dth point", i+1);
2139 #ifdef DEBUG_READ_POINTS_DCEL 2140 printf(
"Point read (%lf,%lf)\n", point.
vertex.
x, point.
vertex.
y);
2150 bottom_Most = point;
2160 bottom_Most = point;
2199 srand48((
int) time(NULL));
2202 for (i=0; i<nPoints ;i++)
2205 point.
vertex.
x = (drand48() * maxX);
2206 point.
vertex.
y = (drand48() * maxY);
2216 bottom_Most = point;
2226 bottom_Most = point;
2251 int nClusters,
int radius,
TYPE maxX,
TYPE maxY)
2254 int nElementsCluster=0;
2258 #ifdef DEBUG_GENERATE_CLUSTER 2259 printf(
"Generating %d points in %d clusters with radius %d\n", nPoints, nClusters, radius);
2263 srand48((
int) time(NULL));
2266 nElementsCluster = nPoints / nClusters;
2269 for (i=0; i<nClusters ;i++)
2272 seed.
vertex.
x = (drand48() * maxX);
2273 seed.
vertex.
y = (drand48() * maxY);
2279 #ifdef DEBUG_GENERATE_CLUSTER 2280 printf(
"Generating %d cluster with seed (%f, %f)\n", i+1, seed.
vertex.
x, seed.
vertex.
y);
2284 for (
j=0;
j<nElementsCluster-1 ;
j++)
2287 if (drand48() > 0.5)
2295 if (drand48() > 0.5)
2306 if (drand48() > 0.5)
2314 if (drand48() > 0.5)
2329 else if (point.
vertex.
x > maxX)
2337 else if (point.
vertex.
y > maxY)
2346 #ifdef DEBUG_GENERATE_CLUSTER 2347 printf(
"Generated %d point (%f, %f)\n",
j+1, point.
vertex.
x, point.
vertex.
y);
2353 for (i=dcel->
nVertex; i<nPoints ;i++)
2356 point.
vertex.
x = (drand48() * maxX);
2357 point.
vertex.
y = (drand48() * maxY);
2382 int *convex_Hull_Set=NULL;
2384 long long int memory=0;
2388 #ifdef DEBUG_PRINT_DCEL_STATISTICS 2389 printf(
"DCEL has %d faces\n", dcel->
nFaces);
2392 if ((fd = fopen( fileName,
"w")) == NULL)
2394 printf(
"Error opening output file: %s\n", fileName);
2408 if ((convex_Hull_Set = (
int *) calloc( length,
sizeof(
int))) != NULL)
2412 while ((!
get_Convex_Hull( dcel, &length, convex_Hull_Set)) && (!error))
2415 free(convex_Hull_Set);
2417 if ((convex_Hull_Set = (
int *) calloc( length,
sizeof(
int))) == NULL)
2424 fprintf( fd,
"Convex length %d\n", length);
2425 free(convex_Hull_Set);
2439 printf(
"DCEL has no triangles\n");
2451 srand((
int) time(NULL));
2454 for (i=0; i<dcel->
nVertex ;i++)
2458 position = position % dcel->
nVertex;
2472 printf(
"Vertex info:\n");
2480 printf(
"Edge info:\n\tOrigin: %d\n\tTwin %d\n\tPrevious %d\n\tNext %d\n\tFace %d\n\n",
2491 printf(
"Face info:\n\tEdge: %d\n\n", face->
edge);
2503 while ((i<dcel->nVertex) && !found)
2530 prev_Edge =
get_Edge( dcel, index);
2532 prev_Edge =
get_Edge( dcel, index);
2534 prev_Edge =
get_Edge( dcel, index);
2559 if (index >= dcel->
nEdges)
2562 sprintf(
"Trying to access index %d out of bounds (0,%d)\n.", index,
2564 write_Log( log_Text);
2566 printf(
"Trying to access index %d out of bounds (0,%d)\n.", index,
void get_Extreme_Point(struct DCEL_T *dcel, int(*f)(struct Point_T *, struct Point_T *), struct Point_T *p)
int update_Face(struct DCEL_T *dcel, int edge_ID, int index)
struct Dcel_Vertex_T * get_Vertex(struct DCEL_T *dcel, int index)
void generate_Cluster_Points_DCEL(int nPoints, struct DCEL_T *dcel, int nClusters, int radius, TYPE maxX, TYPE maxY)
int initialize_DCEL(struct DCEL_T *dcel, int nPoints, int nEdges, int nFaces)
int get_Vertex_Index(struct DCEL_T *dcel, struct Point_T *point)
int get_Face_Vertex(struct DCEL_T *dcel, int face_ID, struct Dcel_Vertex_T *v1, struct Dcel_Vertex_T *v2, struct Dcel_Vertex_T *v3)
struct Point_T * get_Vertex_Point(struct DCEL_T *dcel, int index)
void copy_Dcel(struct DCEL_T *in_Dcel, struct DCEL_T *out_Dcel)
void shake_Points_DCEL(struct DCEL_T *dcel)
void shake_Dcel(struct DCEL_T *dcel)
int insertVertex(struct DCEL_T *dcel, struct Dcel_Vertex_T vertex)
void reset_DCEL(struct DCEL_T *dcel)
struct Dcel_Face_T * get_Face(struct DCEL_T *dcel, int index)
int lexicographic_Higher(struct Point_T *p1, struct Point_T *p2)
int get_Number_Edges(struct DCEL_T *dcel)
int get_Number_Vertex(struct DCEL_T *dcel)
void finalize_DCEL(struct DCEL_T *dcel)
void print_Edge(struct Dcel_Edge_T *edge)
int is_External_Edge(struct DCEL_T *dcel, int index)
int read_Points_DCEL(FILE *fd, int nPoints, struct DCEL_T *dcel)
int read_Points_Flat_File(struct DCEL_T *dcel, const char *fileName)
enum Turn_T return_Turn(struct DCEL_T *dcel, struct Point_T *p, int source_ID, int dest_ID)
int copy_Edge(struct DCEL_T *dcel, int index, struct Dcel_Edge_T *edge)
void print_Point(struct Point_T *point)
int equal_Point(struct Point_T *p1, struct Point_T *p2)
void printFace(struct DCEL_T *dcel, int faceID)
int higher_Point(struct Point_T *p1, struct Point_T *p2, int(*f)(struct Point_T *, struct Point_T *))
void print_Vertex(struct Dcel_Vertex_T *vertex)
struct Dcel_Edge_T * edges
void print_Face(struct Dcel_Face_T *face)
int read_DCEL(struct DCEL_T *dcel, char *fileName)
int write_DCEL(struct DCEL_T *dcel, int type, const char *fileName)
__host__ __device__ float length(float2 v)
int get_Edge_In_Convex_Hull(struct DCEL_T *dcel, int firstEdge_Index)
int get_Number_Faces(struct DCEL_T *dcel)
void sort(struct DCEL_T *dcel)
bool interior_Triangle(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3, struct Point_T *q)
struct Dcel_Vertex_T * vertex
int is_Negative_Any_Vertex(struct DCEL_T *dcel, int edgeID)
int insert_Vertex_At(struct DCEL_T *dcel, struct Dcel_Vertex_T vertex, int index)
void generate_Random_Points_DCEL(int nPoints, struct DCEL_T *dcel, TYPE maxX, TYPE maxY)
int get_Number_Real_Faces(struct DCEL_T *dcel)
int in_Convex_Hull(struct DCEL_T *dcel, struct Dcel_Edge_T *edge)
TYPE distance(struct Point_T *p, struct Point_T *q)
#define DEFAULT_CONVEX_HULL_LEN
bool is_Interior_To_Face(struct DCEL_T *dcel, struct Point_T *p, int face_ID)
struct Dcel_Edge_T * get_Edge(struct DCEL_T *dcel, int index)
int get_Edge_Origin_Vertex(struct DCEL_T *dcel, int edge_Index)
int get_Number_Real_Edges(struct DCEL_T *dcel)
int are_Twins(struct DCEL_T *dcel, struct Dcel_Edge_T *edge1, struct Dcel_Edge_T *edge2)
int swap_Vertex(struct DCEL_T *dcel, int index1, int index2)
void check_DCEL_Data(struct DCEL_T *dcel)
enum Turn_T check_Turn(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3)
fprintf(glob_prnt.io, "\)
void print_DCEL(struct DCEL_T *dcel)
int resize_DCEL(struct DCEL_T *dcel, enum Resize_DCEL_T resize_Type)
int update_Vertex_Edge_At(struct DCEL_T *dcel, int edge_ID, int index)
bool is_Interior_To_Convex_Hull(struct DCEL_T *dcel, struct Point_T *p, bool *error)
#define CONVEX_HULL_LEN_FACTOR
void clutter(struct DCEL_T *dcel)
struct Dcel_Face_T * faces
bool get_Convex_Hull(struct DCEL_T *dcel, int *length, int *points)
int set_Edge_Not_Checked(struct DCEL_T *dcel, int index, int *n)
void get_Vertex_Of_Face(struct DCEL_T *dcel, int face, int *index1, int *index2, int *index3)
void print_Dcel_Statistics(char *fileName, struct DCEL_T *dcel)
int insertFace(struct DCEL_T *dcel, int edge_ID)
int insertPoint(struct DCEL_T *dcel, struct Point_T *point)
int insertEdge(struct DCEL_T *dcel, int origin, int twin, int prev, int next, int face)
int update_Edge(struct DCEL_T *dcel, int origin, int twin, int prev, int next, int face, int index)