Grasshopper

algorithmic modeling for Rhino

I happen to have a list of 10 points. As its only one list, I would suppose that flattening the list would not make a difference, but it actually does, I noticed the list name in the panel changing from {0;0} to {0} when flatten. What does this means?

Thanks

Shynn

Views: 2692

Replies to This Discussion

That is the path of the branch, not the name. To understand what is a path, think the simplest way to represent branching hierarchy.

{0} (list of data A)

{00} (list of data B)

{000} (list of data C)

{001} (list of data D)

{002} (list of data E)

{01} (list of data F)

{010} (list of data G )

{011} (list of data H)

              /==C

     /==B |==D

==A        \==E

     \==F |==G

             \==H

If you merge a list with path {0}, another with {0;0} and another with {0;0;0}, what you get is a tree with three branches, you actually will not join those lists, only they will placed in the same tree. In this case to join the three lists, you have to do is flatten all to {0}, then when they come together, as they all have the same path ({0}), the data will hang in the same branch/list, as if {0} were the trunk.


Some components automatically append elements to the paths with the idea of "hey! I've been here," so we get things like {0;0;0;0;0;0...}, GH prefer to give that information, but often it is irrelevant, and can be simplified to {0} with the simplify option in the parameter menu.

All lists in GH are actually a branch of a tree, although we can call it lists if the data structure has only one branch. So! {0} and {0;0} are different paths and if you flatten, all branches become {0} and data from all branches will gather if you put them together. 

{0}(Lists A,B,C,D,E,F,G,H)

==A,B,C,D,E,F,G,H

I had a similar situation. It was very helpful. Thank you, Daniel.

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