Get an ordered list of points that describe an edgeloop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm looking for a way to get a list of the points for a given edgeloop in order.
I've tried a bunch of things, and so far I have two solutions that give the wrong result. The image below shows the result of both attempts so far. the red dashed line shows that the short horizontal line is effectively inverted.
The problem is that the edgeloop contains edges - each with a startvertex and stopvertex. however, the direction of the edges aren't head to tail. In the case below, two edges are backwards (head to head/tail to tail) so iterating through the list of edges and selecting all heads or all tails doesn't work. Similarly, iterating through the list of edges, building a list of points then removing the duplicates doesn't work since the order you iterate over them is incorrect.
I'm about to try building a list of known edge loop points, and comparing that with the list of face vertices in the hope that the face verticies are ordered correctly, but I'd like a more elegant way if possible.
Any suggestions?