Poly_Triangulation -> determine is edge of triangle inner or outer?

Hi guys, i use Poly_Triangulation to generate shape mesh and i want to know, is any edge of triangle inner or outer, is there any way to find out?  

For example, look at rectangle face:


gkv311 n's picture

You may try Poly_Connect tool to explore adjacency between triangles and find free edges - take a look onto implementation of Prs3d::AddFreeEdges() as example in src/Prs3d/Prs3d.cxx.

Or you may define a Map with Segment (as pair of sorted nodes indexes) as a key and Integer as a value, iterate over triangles and fill in the map by incrementing value for each key. Than you with this map you will be able to check if particular Segment is shared between triangles or not.

If we are talking about TopoDS_Face, than you may also iterate over TopoDS_Edge and use Poly_PolygonOnTriangulation representation of these Edges to filter out boundary segments in triangulation.

Caleb Smith's picture

Thank you man! Poly_Connect is exactly what I needed.