Get Faces in order

I have a cylindrical pipe, I want to get the radial edges(circular edges) in sequential manner as in the figure. How can I do this?

I used topoexplorer to explore all edges and got all the radial edges, but they are not in sequence..So how can I do this. Please help..

- anand

Fabian Hachenberg's picture

I see no figure :)

You could sort them for the atan2-Value of their start vertex.

1. Project each starting vertex onto the plane in which the circular edges lie (-> (x,y)-Coordinates)
2. atan2(y,x) gives the angular coordinate of the vertex within the plane
3. Sort edges for this atan2-Value

Then you should have them in sequential order

jelle's picture

cool algorithm! did you come up with this yourself Fabian, or have you got a textbook reference?
nice one...


Anand R P's picture

Sorry for not providing the picture, actually i forgot to upload it.

Here I am attaching the screen shot of file. Also I want to refine my question, actually I have a cylindrical pipe which have so many bends. For this pipe I need to find the radial edges in a sequential manner.Please help.