Wed, 03/25/2009 - 20:38
i have multiple coplanar (coincident) TopoDS_Face(s) forming a shell (triangulated). I would like to merge these coplanar faces into single faces on the shell.
Is there any way in opencascade to de/un triangulate a shell to a minimum set?
Thu, 03/26/2009 - 10:09
I do not think there is such a thing in OCC.
If I am fully understanding your question, what you could do is map edges to faces (only of those faces that are both coplanar and connected), create a list of all edges that are not shared, then create a wire from them and, finally, create a face from that wire. You could even take it a little bit further and "merge" connected parallel edges before creating the final wire.
Thu, 03/26/2009 - 14:02
Yes that sounds about what i had envisioned doing.
Wanted to check that nothing already exsisted before i started.
Thu, 03/26/2009 - 18:48
I have a feeling that the Tetgen (not netgen!) does something similar for converting STL files to FE meshes. I think it first analyses the STL triangulation, merging coplanar faces into planar polygons before running the quality surface meshing, which is how the final mesh is not contrained by the original STL trangles. - You might find useful code there.