Ordering mesh naked Edges


#1

Hi,

When I extract mesh naked edges using:
if(brepMesh[i].TopologyEdges.GetConnectedFaces(j).Length == 1)
Edges Are not ordered:

What would be the method to order edges?
Do I need to use DepthFirstSearch? Or there is a simpler method?


(Menno Deij - van Rijswijk) #2

how about brepMesh[i].GetNakedEdges()? it returns polyline(s) which are ordered by definition.


#3

But I need indices in continuos order, not geometry.


(Menno Deij - van Rijswijk) #4

Ah, ok. I have no idea sorry…


(Menno Deij - van Rijswijk) #5

I guess what you could do is Mesh.GetNakedEdgePointStatus() to get all the vertices’ (not topology vertices!) naked edge statuses. Then start at one vertex and enumerate all edges that radiate from that vertex. Take the edge that has a naked opposite vertex and keep going from that vertex until you reach the beginning.


#6

Thanks this seems to be a good approach working with adjacency.