Data trees are where most architects get stuck in Grasshopper. The definition works on one curve, then you feed it twelve floors and lines connect the wrong points, a loft twists across the building or a component suddenly returns hundreds of results. Almost every time, the geometry is fine and the problem is how the data is organized.
In this guide we build a twisting 12-floor tower facade from scratch and use it to show the tree operations you need every day, from reading a tree to Simplify, Flatten, Graft, Flip Matrix and panels between floors. Every step has the Grasshopper canvas and the result in Rhino, and the last section explains what changes in Grasshopper 2. If you are new to Grasshopper itself, start with our guide to Grasshopper 3D.
Checked in Rhino 9 (build 9.1.26314) with Grasshopper 1 in November 2026. The Grasshopper 2 data modifiers listed below were read from the same build.

Key Takeaways
- A data tree is a set of lists. Each list is a branch with an address called a path, such as {0;0;5}, and every item in it has an index.
- Read the tree before you fix it. Param Viewer shows every branch and how many items it holds, and a dashed double wire tells you the data is a tree.
- Simplify cleans the paths. It removes the levels every path shares, so {0;0;5} becomes {5} and the branches stay as they were.
- Flatten throws the structure away. Use it only when you want one result for the whole building.
- Graft gives every item its own branch. That is how each floor gets every value of a list, not just one.
- Flip Matrix swaps rows and columns. Floors become vertical lines, which is all you need for mullions.
- Relative Items finds the point one floor up. Together with Shift List, it gives the four corners of every facade panel.
- Grasshopper 2 keeps trees and paths. Thirteen data modifiers on every parameter replace several tree components.
What a Data Tree Is
Grasshopper passes data in three shapes. A single item, such as one curve or one number, travels on a single wire. A list of items travels on a double wire. A data tree, which is several lists kept apart, travels on a dashed double wire. You can see all three in the screenshots below, and the wire is the quickest way to know what you are dealing with.
Each list inside a tree is called a branch, and each branch has an address called a path, written in curly brackets. The path {0;2} has two levels, 0 and 2. Inside a branch, every item has an index starting at zero, so item 5 of branch {0;2} is its sixth item, often written as {0;2}[5].
Trees exist because most components run once per branch. When you divide twelve floor curves, you want twelve groups of points, one per floor, not one long list where floor 1 and floor 12 are mixed together. Keeping the floors apart is what lets the next components draw one outline per floor, one row of panels per floor and so on.
The Example Tower
The example is a 12-floor tower on a 24 by 14 m floor plate with rounded corners, a floor height of 3.6 m and a twist of 3 degrees per floor. You can rebuild it in a few minutes from the sliders in the screenshot.
- Rectangle draws the floor plate from the Width, Depth and Corner radius sliders.
- One Series makes 12 heights, 0, 3.6, 7.2 and so on, and Unit Z turns them into vectors. Move copies the rectangle to every floor.
- A second Series makes 12 angles, 0, 3, 6 and so on. Rotate turns each floor around its own centroid, which comes from Area. Right-click the A input of Rotate and choose Degrees, so that 3 means 3 degrees.
- The rotated curves go into a Curve parameter named Floor plates, which the rest of the definition uses.

Reading a Tree With Param Viewer
Divide Curve with 20 divisions turns the 12 floor plates into 240 points. They do not come out as one list. Divide Curve makes a separate branch for each curve, so you get 12 branches of 20 points, one branch per floor.
To see that, connect a Param Viewer from Params > Util. It reports "Data with 12 branches" and lists every path with N = 20, the number of items in that branch. Right-click it and choose Draw Tree to see the same structure as a diagram. A Panel shows the paths too, together with every item, which is handy for short lists and too long for 240 points.

The paths read {0;0;0} to {0;0;11}. The last number is the floor, from 0 at the ground to 11 at the top. The two zeros in front are inherited from upstream, because Series already returned its 12 heights under {0;0} and Divide Curve adds one more level for each curve it divides.

Simplify Cleans the Paths
Paths like {0;0;5} work, but they get longer with every component, they are harder to read and two trees with paths of different depths are harder to combine. Simplify Tree removes the path levels that every branch shares. Here it turns {0;0;0} to {0;0;11} into {0} to {11}, and the data stays exactly the same, 12 branches of 20 points.
You do not even need the component. Right-click any input or output and choose Simplify, and Grasshopper does the same thing right there and marks the parameter with a small icon. The same menu has Flatten, Graft and Reverse.

From here on, every group in the definition starts from these simplified points, in a parameter named Facade points.
One caution. If you simplify one tree and not another, their paths stop matching, and components that combine data by path, such as Merge, then put the same floor into two different branches. Simplify both trees or neither.
Flatten Turns the Tree Into One List
PolyLine connected to the facade points draws 12 closed outlines, one per branch, because it runs once per floor. That is the tree doing its job.
Flatten Tree removes every level and puts all 240 points into one branch, {0}. PolyLine then runs only once and draws a single line through all the points, jumping from the end of one floor to the start of the next.


Flatten is often used to make an error message go away, and that is when it causes the most trouble later, because the information about which point belongs to which floor is gone. Use it when you really want one result for everything, for example to count all the panels, to find the bounding box of the whole tower or to bake all the points to one layer.
Graft Gives Every Item Its Own Branch
Say each floor needs two offset lines, a slab edge at 1.5 m and a balcony edge at 2.4 m. A Panel holds the two distances, 1.5 and 2.4, and goes into the D input of Offset Curve together with the 12 floor plates.
Without Graft, the floor plates are one list of 12 curves and the distances are one list of 2 values. Grasshopper matches lists item by item, and when one list runs out, it keeps repeating its last item. That rule is called longest list. Floor 0 gets 1.5 m and floors 1 to 11 all get 2.4 m, so you end up with 12 offsets and only the ground floor has a slab edge.
Graft Tree puts every floor plate into its own branch, {0;0;0} to {0;0;11}. Each branch now holds one curve, and the single list of distances is used again for every branch. Every floor gets both offsets, 24 in total.


Graft is the right tool whenever every item should get the whole of another list, for example every floor with all its offsets or every curve with every parameter you evaluate it at.
Flip Matrix Turns Floors Into Mullions
The facade points are 12 branches of 20, so every branch is a row of points around one floor. Mullions need the opposite, 20 branches of 12, where every branch is the same position on the floor plate going up the building.
Flip Matrix does exactly that. Item 0 of every floor goes to branch {0}, item 1 to branch {1} and so on. PolyLine on the result draws 20 vertical lines that follow the twist of the tower.


Flip Matrix expects a real matrix, with the same number of items in every branch, so check the N values in Param Viewer before you use it.
Panels Between Floors With Relative Items
A facade panel needs four corners, two neighboring points on one floor and the same two points on the floor above. In tree terms, if corner A is item 1 of branch {4}, the other corners are item 2 of {4}, item 2 of {5} and item 1 of {5}.
![Close-up of the tower facade in Rhino with one panel highlighted in pink and its four corners labeled A {4}[1], B {4}[2], C {5}[2] and D {5}[1]](/images/blog/grasshopper-data-trees/grasshopper-data-trees-12.webp?cb=seo-meta-20260227-164423)
- Connect the facade points to both the A and B inputs of Relative Items and give it the offset {+1}[0] from a Panel, which means one branch up and the same item. Output A returns floors 0 to 10, and output B returns the point directly above each of them, from floors 1 to 11.
- Run each output through Shift List with Shift set to 1 and Wrap set to True. That moves every list by one item, so you get the next point around the floor.
- Connect A, shifted A, shifted B and B to 4Point Surface, in that order. The corners then go around the panel instead of across it.
![Grasshopper Relative Items with the offset {+1}[0] from a Panel, two Shift List components and 4Point Surface building the facade panels between floors](/images/blog/grasshopper-data-trees/grasshopper-data-trees-13.webp?cb=seo-meta-20260227-164423)
The result is 220 panels, 20 per floor in 11 rows, one row fewer than the floors because the top floor has nothing above it. Wrap matters here. With Wrap set to False, the last point of each floor has no neighbor, and in our test the last panel of every row collapsed to zero area, which left 11 broken panels and a vertical gap in the facade.
This is the logic that paneling plugins such as LunchBox handle for you, done with plain tree components, so you control every corner. Our mini-course on data trees, described at the end of this guide, takes it further with custom triangular panels.
Other Tree Components Worth Knowing
- Path Mapper rewrites paths with a rule you type, for example from {A;B;C} to {C}. It can replace Simplify, Graft or Flatten in one place, but a rule written for one structure gives wrong results when the incoming paths change, so add it last.
- Tree Branch and Explode Tree pick out single branches, for example one floor.
- Entwine and Merge combine several inputs into one tree.
- Split Tree divides a tree with path masks, for example the even floors from the odd ones.
- Tree Statistics returns the paths, the length of each branch and the number of branches as data you can use further down the definition.
Five Mistakes That Break Data Trees
- Flattening to silence an error. The warning disappears and the floor information goes with it.
- Combining a tree and a list without thinking about matching. A list with one branch is reused for every branch of the tree. Two trees with different numbers of branches are matched branch by branch, and the last branch of the shorter one repeats.
- Simplifying only one side. Paths that no longer match end up in separate branches when you merge.
- Using Flip Matrix on uneven branches. It needs the same number of items in every branch.
- Forgetting Wrap. Shift List without Wrap drops the last item, so closed rings like floor outlines lose their last panel.
Data Trees in Grasshopper 2
Grasshopper 2 ships with Rhino 9 next to Grasshopper 1 and opens with the GH2 command. The good news is that trees, branches and paths are still there, so everything above carries over.
What changes is where you manipulate them. In Grasshopper 1, only a few options such as Flatten, Graft, Simplify and Reverse sit on the parameters, and most tree operations need their own component. In Grasshopper 2, every parameter has thirteen data modifiers. In the Rhino 9.1 build we used, they are Flatten, Graft, Sort, Reverse, Randomise, Trim, Remove Meta Data, Remove Nulls, Remove Invalids, Remove Empty, Increment, Renumber and Simplify. Jobs that need Sort List, Clean Tree or Trim Tree components in GH1 become a click on the parameter.
Grasshopper 2 also adds meta data to every item, so a panel can carry its floor and type with it instead of in a separate tree that you have to keep in sync. Some components were renamed as well, so List Item is now Item From Index. Our article on Grasshopper 2 vs Grasshopper 1 covers all of it. McNeel still recommends Grasshopper 1 for production work, so learn trees there, and the knowledge moves with you.
Learn Data Trees Step by Step
If you want to go deeper, our mini-course Mastering Data Trees for Paneling in How to Rhino Premium starts where this guide ends. Lazar Djuric builds a custom triangular panelization on a smooth periodic form without a paneling plugin, by reading branch and index coordinates in Param Viewer, writing Split Tree masks and connecting point sets with Relative Items.
- Instructor: Lazar Djuric
- Length: About 2 hours in one session
- Software: Grasshopper and Weaverbird
- Level: Intermediate
All the details are on the Mastering Data Trees for Paneling page. For the full path from the first slider to complex definitions, our Grasshopper Complete Course covers data trees and data structure in depth.
Frequently Asked Questions
What is a data tree in Grasshopper?
A data tree is a set of lists, called branches, each stored under an address called a path, such as {0;2}. Grasshopper uses trees to keep related data apart, for example the points of each floor of a building.
What is the difference between Flatten and Graft?
Flatten puts every item into one list and removes the structure. Graft does the opposite and puts every item into its own branch. Use Flatten when you want one result for everything, and Graft when every item should get the whole of another list.
What does Simplify do in Grasshopper?
Simplify removes the path levels that all branches share, so {0;0;5} becomes {5}. The branches and their items stay the same.
How do I see the structure of a data tree?
Connect a Param Viewer, which lists every path with its number of items. Right-click it and choose Draw Tree for a diagram, or use a Panel to see the items themselves.
What does {0;1} mean in Grasshopper?
It is a path with two levels, 0 and 1. The index of an item inside that branch is often written after it, so {0;1}[3] is the fourth item of branch {0;1}.
Does Grasshopper 2 still use data trees?
Yes. Trees, branches and paths work the same way, and every parameter gets thirteen data modifiers, such as Flatten, Graft, Simplify, Sort and Remove Empty.
Related Resources
- Grasshopper 3D: Parametric Design Software for Rhino (2026 Guide)
- Grasshopper 2 vs Grasshopper 1: What Changed and When to Switch
- Best Grasshopper Plugins Every Architect Should Know
- Hexagonal Modular Facade
- Parametric Brick Wall
- RhinoAI for Architects: Setup, First Grasshopper Definition and Limits
Grasshopper Complete Course
Give your architectural skills a boost with the Grasshopper Complete Course. Get over 50 hours of comprehensive Grasshopper training tailored for architects. Learn to generate and iterate designs faster. Click below for more information and streamline your workflows!