Hi,
Newbie here in Grasshopper. I want to ask for help on how can I sort this points in an order that is described in the image.
Any reply will be helpful. Thank you.
Building Modulation Study.gh (60.2 KB)
Hi,
Newbie here in Grasshopper. I want to ask for help on how can I sort this points in an order that is described in the image.
Any reply will be helpful. Thank you.
Building Modulation Study.gh (60.2 KB)
Use Deconstruct Point
Input: your grid of points
Outputs: X, Y, Z
Use Sort List
A → your points
K → the Y values from Deconstruct Point
→ Output: points ordered by rows (bottom → top)
This groups the points in row order.
You need to tell Grasshopper how many points per row.
If your grid is 6 points per row → Partition List (Size = 6)
If it’s 5 points per row → Size = 5
(Use List Length Ă· number of rows if unsure)
Partition List takes the sorted-by-Y list and divides it into rows.
Add a Sort List inside the row loop:
A = row (from Partition List)
K = X (Deconstruct Point → X)
You’ll need to use Graft on the X list so each row sorts independently.
Now each row is sorted left → right.
Flatten the final sorted rows → you now have the full correct order.
Thank you @GHwiz I will try this method.
FYI.
SortingPointOrder.gh (9.8 KB)
Here I have sorted with the distance but changed the data tree with flatten and flip matrix.
Building Modulation Study.gh (56.7 KB)
Thank you all for your help I tried all your solutions but what works best for the script is from @Volker_Rakow .. I want this panel numbers to stay in order no matter how many modules are in surface. This surface represents one face of elevation of a typical building. Thank you all for your help.
As happy as I am to have helped you, if you are simply dealing with the divisionings of a surface that lie in the UV directions of that surface, Jesse’s solution is probably the best way to go. This is because it creates geometry in correct order instead of forcing you to correct the order in afterward.
It also creates untrimmed surfaces.
Yes but currently I am still using Rhino 7. I believe “Transpose Surface” is only available in Rhino 8.
It is. However, needing to transpose the U and V directions sounds like the problem of a larger context. If it is just about the divisioning, you can switch the U and V divisioning orders and still come to the same result.
I’ll take note of this @Volker_Rakow .. There is still much to learn for me I guess.. ![]()