top of page

017 – Organise your Grasshopper graph with data trees

Updated: May 16

Data Trees

Data trees are a great way to organise your data! Grasshopper operations will give different results depending on the tree structure of the inputs. In this video we will take a look at a simple list with numbers, all numbers are in one branch {0}.

Organising your Grasshopper graph using data trees provides several benefits. Data trees allow you to structure and manage large amounts of data in a hierarchical manner, making it easier to understand and maintain. They also provide a way to reuse information throughout your graph, reducing the amount of duplicated data and improving efficiency.

Prerequisite: Set up a list with numbers.


Step 1: We need to graft this list so each item is placed in its own branch. Connect the 'list' to the 'number' with a wire.

Step 1: Grasshopper data trees

Step 2: Then connect this to a 'panel' on the other side of the 'number'.

Step 2: Grasshopper data trees

Step 3: Right click on the 'number' and choose "graft".

Step 3: Grasshopper data trees

Tip: You can see the difference in a more visual way using the 'param viewer' component.

Tip: Grasshopper data trees

Step 4: When we take the grafted list and use the 'flatten' option we remove all existing branches and place all items in one branch.

Step 4: Grasshopper data trees

Learn more

You can also watch the full video on data trees over on our YouTube channel. Read our previous blog post or sign up to our platform here to put your Grasshopper models online and share them.


Recent Posts

See All
bottom of page