Grasshopper: Components

Grasshopper components are the building-blocks of Grasshopper definitions.

When a component is initially placed on the Grasshopper canvas, it usually looks something like this:


A component’s color indicates information about its behavior. An orange component indicates that the component needs input before it can perform an action. In the example shown above, the BoxRec component (which constructs a rectangular box) needs input in the form of a rectangular base and a height. A red component has generated an error. A white/gray component is functioning normally.

Many (not all) of the Grasshopper components equate to Rhino modeling commands. A good working familiarity with Rhino is necessary to fully understand Grasshopper components. Several Grasshopper components (such as “number sliders”) do not have Rhino equivalents but are used to control or modify parameters within a definition.

Almost all components have input and output nodes. Input nodes (on the left side of a component) are used to supply the component with input — such as a number, or a list, or a Rhino object. Input can be provided with a wire from another component, or in some cases, by right-clicking on the input node, or on the component itself, to set a value. Output nodes (on the right side of a component) are used to send information to other components.

Panels are a special kind of component, which look like this when initially placed:


A panel is generally used in one of three ways. First, it can simply be used as an annotation or note on the canvas, with no wires connecting it to anything else. Or, if its contents are appropriately edited, it can be used to supply input (such as a single number) to a component. Finally, if its input node is connected to another component’s output node, it simply displays in textual form whatever information the previous component is generating. In this case, the panel simply acts as a flow-through with no effect on the data displayed.


Do either of the following:

1. Double-click in a blank space on the canvas to bring up a search box. Type a few letters of the component you wish to place, and choose from the resulting menu. (For example, typing BOX will bring up a menu including BoxRec.)


2. Navigate to the component using the tabs across the top of the Grasshopper window (“Params”, “Maths”, “Sets”, etc.). After locating the component, drag it into the canvas.


Use the mouse to drag from a node on one component to a node on another component.

Note that some (not all) components allow multiple wires. Hold down [shift] to enable multiple connections from a single node.


Right-click the component near the node you wish to disconnect. Choose Disconnect from the dropdown menu.


Select components singly or in a group by dragging a window around them. Move them by dragging them, once selected. Connecting wires will stay connected during moves.


By default, the effect (if any) of a component is previewed in the Rhino modeling environment using the color red. To disable the Rhino preview of a component or a group of components, select the component(s), click the space bar, and click on the “masked head” icon. To re-enable preview, repeat this action, except click on the “unmasked head” icon.

Grasshopper: Definitions

A Grasshopper definition consists of a series of components connected by wires. This image shows a typical definition with components and wires:



Grasshopper definitions are always read from left to right.

Definitions always have a mechanism for input. Input can be in the form of Rhino objects, or it can be in the form of numbers. In the example shown above, input is provided by adjusting the three number sliders.

Reading from left to right, input feeds into components along wires. Components typically perform some action, which could involve performing calculations or constructing objects in Rhino. In the example shown above, the Rectangle component creates a rectangle in the Rhino modeling environment, using as input the “X Size” and “Y Size” numbers set by the number sliders. Similarly, the BoxRec component creates a rectangular box in Rhino, using as input the rectangle constructed by Rectangle, and the “Height” number set by the number slider.

Thus, Grasshopper definitions have output which is typically in the form of potential Rhino objects. These potential Rhino objects become actual Rhino objects only when Grasshopper’s Bake command is applied within the definition. To Bake a definition, right-click on a component’s output node (on its right side), and select Bake.