DiscussionsIssue archiveModeling Data and Algorithms

Archived discussion

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

Modeling Data and AlgorithmsTue, 07/09/2024 - 12:082 replies

Browse this forum
QuestionAuthor

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:

Archived image: external image

 

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

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.

02Author

Thank you man! Poly_Connect is exactly what I needed.