Re: [gts-general] Re: removed faces
Brought to you by:
popinet
|
From: Ray J. <rj...@po...> - 2002-12-24 17:44:10
|
MALIHEH DASHTI <mal...@ya...> writes: > What do you suggest me to do for removing the zero faces, as they > cause my other functions to give incorrect results? I believe what you want to do is collapse the shortest edge of below-epsilon-area faces (use gts_segment_midvertex() and gts_vertex_replace()), then clean up duplicate edges with gts_edges_merge(). The code in examples/cleanup.c should help guide you. In fact, you may just want to modify cleanup.c to change the criteria under which vertices are merged. Currently, if two vertices are within epsilon, they're merged, and everything else is cleaned up following vertex merges. Instead, you could mark vertices for merging based on triangle area. You might need to be careful in looping over faces and such to make sure you don't try to merge two vertices twice, or remove a face twice. This shouldn't complicate things too much, though. Good luck, Ray Jones |