Grasshopper

generative modeling for Rhino

# sorting / remapping surface veritcies index numbers to world coordinate system

hi there,

can anyone help me sorting / remapping surface veritcies index numbers to world coordinate system ?

many thanks

Tags: /, index, remapping, sorting, surface, veritcies

Views: 440

### Replies to This Discussion

I'm sorry I don't think what you are asking makes a lot of sense. You’ll have to be more descriptive.

Vertices usually refer to the points that define a mesh. Do you have a mesh or a surface?
I don't think you can't remap from index numbers to wcs since they are different things. You can try to sort the point list in several ways using the wcs, like from closest to furthest away to the origin of the wcs, or in rows and columns following the x and y axis of the wcs.

The numbers in your picture don't seem to reference vertices but rather face centers.
You seem to have divided a surface into quadrants, and then subdivided each quadrant again and ordered the resulting faces counterclockwise. Is that what you are looking for?

hi Vincente, sorry for being unclear maybe this image can clarify. i have plenty of surfaces in which the vertex list item order is "messed" up i am looking for a way to "sort" them where the world coordinate system could be one option.

here another very simple example that shows the problem     many thanks for your help

This is one way of ordering the surface corners conterclockwise to an XY plane placed in the middle of the surface with the bottom left quadrant as the starting point.

The way you model the surfaces in rhino will affect the order of the points. If you are using the _plane command make sure to make the first point the lower left corner and the second point the top right.

Draw a circle in the center of the surface using the area centroid as the center of the circle

find the closest point on the curve and sort according to the t value. It Will always be clockwise or counterclockwise from the beginning of the circle. I had to rotate the circle to get the specific order you were hoping for...

Attachments:

You forgot to graft the C input of the Curve CP component (or any previous component).

Do you think this is a better way of solving this?

many thanks guys, i must say i like both your methods,  Andys works perfect, in yours Vicente i still get some errors ...though it should work and it should be faster, as there is less geometry involved. i will try to make it work -   thanks for now !

You forgot to connect AM to P.

IN DEED ..... THANKS

by 雷锋

by 雷锋

by 雷锋

• View All