Grasshopper

algorithmic modeling for Rhino

hi everybody!

I am making a script component with some data trees as inputs

like:

{0;0;0}
0
1
{0;0;1}
0
{0;0;2}
0
1
2
3

etc

and I was wondering how the script component loops trhrough these items.

does it goes successively through all the items in the first branch, then the second one and so on? or does it loops throgh the first '0' items then the '1' ...?

Views: 146

Replies to This Discussion

there are a few possible ways
1) you do not specify that the input is a list: everything goes in by itself as a single object (0)(1)(0)(0)(1)(2)(3)
2) you specify only list: the script runs three times separately, once for each branch (0,1)(0)(0,1,2,3)
3) you specify list and flatten: the script runs once as one long list but branch divisions are not maintained (0,1,0,0,1,2,3)

see p114 of the Primer for more
thanks for your reply trevor,

I didn´t have all the inputs as lists, that´s what was wrong.

cheers

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