Branch Out Your Rhino Skills with this Free Tutorial

Marc Teer

February 16, 2016

Branch Out Your Rhino Skills with this Free Tutorial

A free tutorial from the Black Spectacles Architectural Prototyping with Rhino 5 and Grasshopper course.

In this Black Spectacles FREE tutorial, you will learn about the branch components in Rhino using the Grasshopper plugin. This tutorial is part of the Black Spectacles course on Architectural Prototyping with Rhino 5 and Grasshopper in which you will learn to unfold a doubly curved surface in Grasshopper for laser cutting, among other skills. 

View the entire course here: 
Architectural Prototyping with Rhino 5 and Grasshopper

The Branch Components Tutorial

Step 1: Introduce the Tree Branch Component

To start, you should have 2 main branches to work with. First you want to retrieve each branch separately and to do that, you need to introduce the Tree Branch ComponentSelect the Tree Branch Component option, and plug your data tree into it. You will see it is orange which means it’s missing some data. If you hover over the output, you will see there is a Branch 0 and a Branch 1. So in this case, it is asking you to specify which branch you are working with. 

Step 2: Specify one branch

There are a couple ways you can do this.

The first is to right click on the input and select “Set the Path.” The first path is the path of 0. You select this path by putting it in curly brackets “{0}”, and click “Commit changes”. So now if you highlight this branch you’ll see that is only selecting the fins in the X direction.

The other way to do this is to create a panel – which is like an empty container for strings or text. Select the “Panel” component and enter the text “{0}” into the panel. Then plug the panel into your branch component. 

Step 3: Create the second branch

In order to create the second branch, you can simply select the first branch and the attached panel, then copy and paste it below the first one. The first branch is Branch 0, so you will need to update the second branch to be Branch 1. To do that, you simply change the text in the panel to be “{1}” and click “OK.” You now have both branches. 

Step 4: Introduce the Curve|Curve Intersection Component

Next you want to find where the fins intersect each other, and to do this you need to use the Curve|Curve Intersection component. Go to the “Intersect” tab and select the “Curve|Curve” intersection.

At this point you should rename your branches. Rename Branch 0 to “Branch X” and rename Branch 1 to “Branch Y”. This will be helpful to remind you which direction each branch is going. And now, pull both branch outputs into the Curve|Curve intersection input.

Once you do this and look at the preview window, you will see that all it’s doing is going through each branch and comparing the first values. What you want this to do is to have the X fins look at all of the intersection points with the Y fins independently. In order to do that, you need to create a new branch for every single fin.

Step 5: Create a new branch for every single fin

Right-click on the Curve|Curve input and select “Graft,” which will graft all the data in that parameter. Grafting creates a new branch for every data Item.

To better understand this part, use the param viewer which allows you to visualize data in text form and as a tree. Select the param viewer, copy, and paste it. Then, plug your data points into the new param viewer. You will now have a great view of your branching data structure and see that each division point now has its own individual branch. Here you can see your 7 X Fins solving intersection points with each of the 9 Y Fins. Here is a close-up view of the fins. 

Step 6: Eliminate the first branch

In this case, you actually don’t need the first branch. So you can eliminate it. In order to do that, you want to use the “Shift Paths” tool. Plug your data points into the Shift Path. Then copy and paste the param viewer again. Plug the Shift Path into the new viewer, and you will see that the first branch was eliminated. Now you can see you are working with just 7 individual sets, each of those having a bunch of intersection points.

Step 7: Clean up your data with the Clean Tree Component

During this process you will sometimes get invalid pieces of geometry or null elements in your data structure. In those cases, it’s helpful to use the Clean Tree component. In order to do this, select that component and plug your data tree into the Clean Tree. Next, right click on the “E” input in your Clean Tree component. This is a toggle to remove empty branches. When you right-click, select the “Boolean” and set it to “True.”

Now plug the Shift Path and the Clean Tree into the param viewer. You will notice it doesn’t look any different. This is because we are working with pretty clean geometry in this particular example. However, there will be some cases when you are working with more complex geometry when you will need this function to remove the null or invalid elements. 

Step 8: Introduce the Dispatch Component

You will notice in the preview that each fin has a top and a bottom intersection point. For this example, you are only interested in one or the other, going in the X direction. So at this point you need to introduce the “Dispatch” component. The Dispatch component allows you to take an individual list and split it up based on a pattern. It will use Booleans, which are true and false values, to create that pattern. To do this, simply connect your Clean Tree component to the Dispatch component.

Step 9: Create a Slider Object

To better illustrate what you’re doing here, use the List Item component. Select the “List Item” component and plug the Clean Tree into the List Item. Next, create the Slider Object and plug it into the List Item.

So now if you move the slider object, you can see the set of points alternate between the top and bottom. If you go to the 0 element on the slider, you can see it’s a set of points on the bottom edge of the fin. If you slide it to the second element, it’s a set of points on the top. The third element is on the bottom, fourth on the top, and so on. In other words, by using the dispatch tool, you are sorting these into odd and even numbers which will translate into the top and bottom elements of the fins. 

View the video for this tutorial here:

The Top 10 Bachelor of Architecture Programs in the US

Read previous post