Grasshopper

algorithmic modeling for Rhino

Beginner question about iterating over a list

Hi All,

I would like to iterate through a list of points, comparing the first point on the list to all others on the list to see if it meets a minimum distance requirement. Once the current point is processed, it will be removed from the list and its index stored appropriately depending on its pass or fail status. The process will be repeated with the next point on the list until the list is depleted.

Is this something I can do using the Hoopsnake component? Sorry for the beginner question. I am new to Grasshopper, and could not easily figure this out from the examples given.

Views: 702

Replies to This Discussion

You could use the Proximity3D component to find all nearest neighbours to all points in a collection of points. It's a one-step operation and you can test the length of the connecting line segments afterwards to see if the nearest neighbour is too close or too far for your purposes.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks for the suggestion David. This is obviously a better solution.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service