@p1r4t3b0y wrote:
Hi,
Is there a way to get the unique mesh edges in rhinocommon, without duplicate edges.
I currently construct the mesh edges for each face, from the face vertices.result = list(my_mesh.Faces.GetFaceVertices(my_index)) edges = [] if result[0]: # success vertices = list(result[1:]) for i in range(len(vertices)): if i < len(vertices) - 1: edge = rg.LineCurve(vertices[i], vertices[i+1]) else: edge = rg.LineCurve(vertices[i], vertices[0]) edges.append(edge)
However, this is problematic, since it produces a duplicate edge/line for each face edge that has a neighbour. I would prefer to construct each shared edge only once.
Any suggestions?
Posts: 3
Participants: 2