1

I've got an array of unique edges (n,2) from my mesh, each edge contains the index of the vertexes it belongs to. I already checked whether the edges form one or more closed loops or not (with networkx) but now I need them sorted for further investigation on the boundary loop.

For example this array has a closed loop from four unsorted edges:

edges = ([[3, 2], [7, 3],[2, 6],[6, 7]])

Now I want to create a new array with the edges sorted like this:

[3, 2] <-> [2, 6] <-> [6, 7] <-> [7,3])

Additionally, the edges which form the first closed loop shell be deleted from the initial array so I can do another sorting for the next closed loop (if there is one).

1 Answers1

0

There was already another question like this. Long story short, there might be no built-in function doing what you want. But maybe you can adapt the suggested solution to your needs - although it wasn't marked as correct).

Community
  • 1
  • 1