Grasshopper

algorithmic modeling for Rhino

Flatten tree with n branches -> 1 branch with n lists

How can I flatten a tree with n branches so that I become 1 branch with n lists? I guess it's a Path Mapper question, but I couldn't find an example for what I want.

Views: 428

Replies to This Discussion

Each list needs have it's own branch. If you want to shorten the branch path, use the simplify Option.

If you want the complete data tree to work on, you need to set the access hint to "Tree Access". This will give you a DataTree instead of a list.

Hi Marcus.

It would be better if you could attach the files.
In case of grasshopper, like Hannes said: data on each branch is data within a list. Even a branch with only one piece of item on it, is in fact a list with one item.
List within a list (nested list) is python's data structure, not grasshopper's. Nested python list is not equal to grasshopper's data tree.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service