Grasshopper

algorithmic modeling for Rhino

Hi all,

I have a two lists, one of points and one of curves. Each one have 45 branches and different number of items in it. I want to use the 'Curve Closest Point' component to find the curves that pass through the points (i.e. where the distance between curve and points its zero).

Basically, I want to search for each item in each the branch of points the curves that are in the first branch of the curve list. So for the first branch of points and curves, I'll have 9 results, for the second, 36 and so on (it varies depending on the # of items). 

In the image attached, I did want I want for the branch 19, but I need to apply this through many branches so I don't want to do it one by one. And I tried will all the points and curves but it didn't work, it doesn't goes branch by branch. 

I though I need a for loop in ghpython, but I didn't find a command that returns the distance between the curve and a point as the grasshopper component. At the end I need to select all the curves that results in 0.0 distance, and this will give me a new list of curves all arrange in 45 branches and with the items organise in a counter-clockwise manner.

Any ideas on how to do this?

Thank you,

Martha

Views: 407

Attachments:

Replies to This Discussion

Hello Martha,

Check out this reply by Danny Boyes to the same problem (data-structure-wise).

Cheers,

Nikos

Treesloth is also helpufull (propagate ancestors)

best

alex

If you're not adverse to using plug-ins, Treesloth's "Propagate Ancecstors" is intended to address exactly this:

Thank you all very much for your help,

I tried the way Danny Boyes did, and it worked perfectly for what I wanted.

And I installed the treesloth component for the future as well.... :)

Best,

Martha

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