Intro to Grasshopper
Lets get started
For this lesson you will need a basic understanding of Rhino. In Rhino, we will only create a surface and a point. The rest we will do inside of Grasshopper. I will try to keep it as simple as possible and slowly build up the complexity. When I started teaching myself Grasshopper I did simple graphic designs because I wanted to focus on the user interface, not making 3D sculptures.
User Interface
Grasshopper has a node based user interface. This means that you drag and drop components into the work space and you can connect them to each other.
In the top you see the component tabs labeled Parameters, Math, Set and so on. They all have different uses and functions that we will slowly start to learn. If you click on the the little black tabs, more components will be revealed, these are called Panels
Component basics
Components usually have input and output slots that are represented by little white circles in the sides. Left being input and right being output, you click and drag them to connect to each other.
If you right click on a component a menu pops up. Here you can hide, disable or bake a component. You can also find the help menu here. When you click on it, it will show you what that component is for and what type of input it needs.
Start with the Basics
- Add a surface that is 80 mm in length and 45 mm wide. Place it in a layer named Surface.
- Add a point in the middle of that surface (40, 23.5, 0). Place in a layer named Point.
- In the command bar type Grasshopper to launch the plug in
Your first algorithm
- Inside the Parameter tab, click on the panel labeled Geometry
- Add a Surface component to your workspace.
- Right click on the component to reveal its options.
- Click on Set one surface
- Click on the surface we created in Rhino
- Inside of the Parameter tab, click on the panel labeled Input
- Add the Color Swatch component to your workspace.
- Inside of the Display tab, click on the panel labeled Preview
- Add the custom Preview components
- Click and hold the output slot of the surface component and connect it to the input slot labeled G in the Preview component.
- Click on the output slot of the Color Swatch and connect it to the input slot labeled S in the Preview component.
- Congratulation, you just made your first algorithm.
Tips on user interface
Now that we made a very simple algorithm you can get a feel for how this approach works. What you see in your screen is just a preview of your algorithm, once we finish and want to actually do something with that data we will have to bake it out. We will go over this in more detail in the next couple of pages. Here are some other tips.
double clicking shortcut
Double clicking on an empty part of your work space prompts a keyword tool. You can start typing the name of the component and it will start to give you components that start with those letters. I usually use this method, instead of finding it inside of the tabs and panels.
Save your work
Grasshopper files are not stored inside of your rhino file. Make sure to save your algorithms before closing Rhino. I always place them next to each other in the same folder.
Spacebar is your friend
Whenever you select components, pressing spacebar will give you a radial menu with different options. I always use this to enable/disable the preview, enable/disable the component and group components together.
Pretty Icons
I like to see the icons but other people prefer to read them. You can change this under the Display menu>Draw Icons