Grasshopper

algorithmic modeling for Rhino

I have two lists, List "A" with 3 points, and list "B" with 100. I need to separate the 100 points in list "B" into 3 lists containing the closest points to those on list "A" in a way that no point is repeated on any of the 3 lists.

What I have managed so far is attached, it is finding the closest points, but it is not creating the lists and it eventually repeats points.

I you can help me with this file, or suggest a better way to do it, I´ll appreciate it a lot.

Thanks

Views: 361

Attachments:

Replies to This Discussion

I have done this once, but with only two points instead of 3.

I did it by calculating the Dist. between ptA <> allPts and then comparing to ptB <> all Pts

and then Dispatching the allPts into two categories based on the result of the comparison.

It worked for me, and you can probably make it work with 3 points, but I don't think it is the best way to do it - and it is not scalable....

Thank you,

I´ll give it a try, it is also probably easier than using CP and hoopsnake, and if it does not work, i will post

try this:

Works great, and it is really simple too

Thank you

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service