Grasshopper

algorithmic modeling for Rhino

Hi,
I have a question on how to get several tree branches into a single script component.

As I read in the Grasshopper primer, the script inside the script component gets executed once per branch. What I would like to do though, is to call the function only once and somehow get access to all branches, within the script (for example to compare them).
Is that generally possible and if so how could I do that.

Thanks in advance for your help.
Martin

P.S. I’m working with c#

Views: 239

Replies to This Discussion

I don't think this is yet possible. If you flatten the paths you'll be able to read all of it in one go but you loose the tree strucutre. You can then recreate it inside the component by also inputing into the script a list of numbers that represent the size of each path (using the 'list length' component) and a list of the names of the paths (using the param viewer). This last one can be read as a string (you can use the string.substring() and string.split(";") methods to get the path names into something more useful).

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