Grasshopper

algorithmic modeling for Rhino

Sorting points in 3d space in terms of their Z dimention

Hello every body , I am an intermediate user of GS and I have a question pretty urgent ! How can I sort a list of 3d points (meaning they are not on a surface) in terms of their Z dimension so as more the Z dimension is as higher or lower in my list?

Thank you in advance

Views: 2357

Replies to This Discussion

Hello,

I'm also a beginner but i'll try to help (I don't have the software right now so I can't join a picture/file, and not 100% of my advice).

You can create a "point" component to get all your points.

Then create a "deconstruct" component to get the XYZ coordinates of these points.

Then you can sort the Z coordinates with a "Sort List" component.

And with a right click you can choose to Reverse the list once it has been sorted, if you want to sort it in the other way.

I hope it will help.

I did that some time ago.
Points> bounding box (Union box)> split box sections in the Z axis > Explode tree> Points in breps> Dispatch (list = points)> merge all List A
With this order the points you get, I hope it helps you if you have any problems upload the definition and help you.

awesome guys thank you

Clement has forgotten to mention you need to sort the actual points with the number data, so you must put the points into the a input of sort and use the a output of sort to get the points. K will only give you values. "A" sorts things based on "k's" number arrangement. 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service