Problem with List ordering

Hi all,

I am facing a Problem i dont know how to solve. I am automatically exporting the vertices of polygonals from Rhino to Ecxel. I need them for plotting in Matlab, however the vertices must be in order for the plot to work correctly. Does anybody have an idea how i can sort the List of vertices so that they are in the correct order for plotting? I am grateful for any idea.

In the Attachment you find my current state of things. I save the objects as a brep then selebt the surface i need, extract the vertices and export them to matlab. However the ordering is not correct, therefore the plot in Matlab wrong. I have many of these objects and i cannot sort the points by trial and error manually.

Tanks you very much in advance!!

Matlab Plot:


at first sight it looks like these need to be swapped


difficult to say more with just screenshots :slight_smile:

Yes true, however I am interested in automatic ordering for all Objects not just this one :slight_smile: