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 Tue, 07/09/2024 - 14:02
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.
Tue, 07/09/2024 - 14:02
You may try
Poly_Connect
tool to explore adjacency between triangles and find free edges - take a look onto implementation ofPrs3d::AddFreeEdges()
as example insrc/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 overTopoDS_Edge
and usePoly_PolygonOnTriangulation
representation of these Edges to filter out boundary segments in triangulation.Tue, 07/09/2024 - 22:16
Thank you man! Poly_Connect is exactly what I needed.