Grasshopper Interface and Modules

From TOI-Pedia

The Interface

Open Grasshopper

To start the Grasshopper plug-in in Rhino, type 'Grasshopper' in the command line. Grasshopper will start up and open an interface window as shown in the example.

Interface Grasshopper


The interface contains:

  • a row of pull-down menus
  • Tabs with Components
  • Toolbar
  • the main workspace or canvas

The canvas is used to create your definition. The definition creates the geometry - your model - in the Rhino viewports. Note that all geometry generated by Grasshopper can't be selected and modified in Rhino. Geometry created in Rhino however can be used by Grasshopper. We'll get back to this later.



Basic Navigation


Navigation in the Grasshopper Canvas:

  • Pan (move sideways & up/down): RMB click + drag
  • Zoom: CRTL + RMB / scrollwheel

Navigation in Rhino viewports:

  • Pan: Shift + RMB
  • Zoom: Ctrl + RMB
  • Orbiting around the model: RMB click + drag= Orbiting around the model (only possible in a 3D view, ie. Perspective)

This page uses abbreviations for the mouse buttons:

LMB: Left Mouse Button

MMB: Middle Mouse Button

RMB: Right Mouse Button

The pull down menus


Pull down Grasshopper

Grasshopper uses a common layout with a pull-down menu bar at the top. You'll find a menu structure that is used by most software (File, Edit, View, Window). These menus provide functions to open and save files, control how definitions are displayed and more.


File

The file menu contains the traditional options for saving and opening files. Note that Rhino and Grasshopper files are always separated. You save your definition in the Grasshopper window. If you have used Rhino geometry as a basis for your definition, you have to save the Rhino model separately in the Rhino window!


Edit

Groups Grasshopper

In the Edit option we have the standard copy, paste and selection options as well as the options of grouping. Grouping is essential when the complexity of the network increases

  • The group is often a set of parameters / components / specials which generate a well defined function within the network. The group can also be defined by selecting the parameters , components and/or specials and press CRTL+G on your keyboard. Right clicking with your mouse in the box of the group gives you access to the appearance settings of the box.


View

View menu Grasshopper

View contains the display settings of the interface. It enables you to alter the appearance of the interface. Zoom options can be found also in the menu.

Display

display menu Grasshopper

Display contains the display settings of the workspace. It enables you to customize the appearance of the construct and the geometry.

Solution

Solution menu Grasshopper

The Solution menu contains the settings for the calculation of the geometry generated by Grasshopper and made visible in Rhino.

  • There is a direct link between Grasshopper and Rhino which results in a real-time update of the geometry in Rhino, this is called the preview. This however can be problematic if the complexity of the geometry results in to extensive calculations for the update of the geometry. In this case the update can be disabled.
  • To finalize the work in Grasshopper geometry has to be converted into Rhino geometry. This is called baking. The geometry will be completely editable in Rhino after baking. Although the link with Grasshopper still exists the baked geometry is a copy of the Grasshopper geometry at the moment of baking. Any alterations in Grasshopper will result in alterations of the Grasshopper geometry not of the baked geometry. Output geometry can also be baked by right-clicking the component in Grasshopper and selecting 'Bake...'.

The Tabs


Tabs in Grasshopper

The components (building blocks) are arranged in tabs:

  • Params
  • Math
  • Sets
  • Vector, Curve, Surface and Mesh
  • Intersect
  • Transform

We'll cover these in more detail later on.

Grasshopper is actively being developed, the naming and structure may change from version to version.

Each tab is divided into sections to group similar building blocks. Each section shows the most-used blocks. The arrow at the right-hand side of the black section title bar allows you to expand the section to show all available blocks.




The Canvas Toolbar


The icons bar beneath the Tabs contain the functions for representation of the definition and its related geometry in Rhino.

Canvas Navigation

Saving views

Basic navigation is mostly done by the mouse and keyboard, which was covered in the previous section. Navigating the canvas is also supported by various zoom and pan tools in the toolbar.

The right-most icon allows you to save the current view or restore previously saved views.

Preview

Preview options

Most Grasshopper components create new geometry, which is displayed in the Rhino viewports. This is called the Preview. In a larger definitions, most components only create intermediate geometry, which you don't need or which may even clutter the end result. Generating previews uses a lot of processing power, so when possible, disabling preview of components is recommended.



The Canvas


The canvas of Grasshopper
The canvas of Grasshopper

The large window contains the canvas on which the definition is built. Geometry is not visible in this window. The geometry will be represented as a Brep in Rhino. Navigation in Grasshopper is similar to Rhino.

Modules

component

Grasshopper uses a variety of modules which can be interconnected to generate the Explicit History. There a 3 types of modules.

  • The parameter
  • The component
  • The utility or special

When you design in Grasshopper you will use these modules to generate the geometry. There are a wide range of modules available which can be combined in various ways with each other. Within all the possible modules you can use are modules which allow you to define values for a range of inputs for modules. This will give you the possibility to steer the final result of the definition (your network of modules) which is the geometry.

As mentioned earlier in the introduction you construct the generation of the geometry step by step. That means that when you start using Grasshopper you will often first analyze on how to build the required geometry. What steps do you have to make. Keep in mind many functions in Rhino like drawing a curve are supported by manual input of the mouse. Or settings of that curve can be changed in the command line. In Grasshopper you don't have that option. You will have to define every step of the process of generating geometry with the help of the modules. Drawing a line is not selecting the curve function and then click with the mouse to define the curve, instead it is a process of defining the points of the curve and then generate a curve from those point. This will take some additional effort, however it allows you to define the points in such a way that you can easy alter them afterwards, in this case with the help of a set of number sliders.

Rhino curve - Grasshopper curve






Parameters


the Parameter tab

To see what functions the parameter icons represent please go to the link above.

The organization of the tabs follows the logic of constructing geometry within Grasshopper. The first Tab is the Parameter Tab. The Parameter tab enables you to define geometry and primitives. The specials contain parameters like the number slider and the panel. These specials are defined to support the workflow. The Parameter divers from the components of the other tabs because a parameter primarily contains data. A parameter doesn’t modify the stored data it will only define the stored data in the network. It works like a filling cabinet.


Parameters primarily contain data, they don't perform actions. This data can either be used to serve as input for other components or it can be displayed (Panel, Graph). Data can be existing geometry (from Rhino), numbers, text or colors. Geometry parameters are used when you want to use existing Rhino geometry in your definition.


Defining the parameter

Colour of Tab.jpg
Parameter content.jpg

When a parameter is placed on the canvas the colour is orange, the parameter is empty. The parameter can be dragged onto the canvas or selected in the tab and clicked in the canvas. When the parameter is placed on the canvas it doesn’t contain any information. To define the parameter geometry or a primitive has to be defined. It is possible to define one or multiple similar types of geometry or primitives within the parameter. To define a single or multiple geometrical objects, right click on the parameter and use the selection option.


To define the parameter click on the Select one or multiple objects depending on the amount of objects you want to define in the parameter. There are two options of creating content for the parameter. It can be defined in Rhino or in Grasshopper. This will depend on the mathematical description of the geometry in Grasshopper. If this is similar to Rhino the geometry can be defined in Rhino. If it not similar , for example with the definition of a circle, the geometry is made within Grasshopper.




Parameter defined in Rhino or Grasshopper

Related geometry Tab.jpg

The geometry of the Parameters can be defined in Grasshopper or Rhino. A circle for example has to be defined within Grasshopper because the definition of a circle in Rhino differs from the parametric definition of the Grasshopper circle. This difference in definition will depend on what Parameter is defined. A point for example can be defined in Rhino as well in Grasshopper. This difference in definition will dictate the possibility of changing the geometry later in Rhino and not only in Grasshopper. Although this seems trivial, it will greatly influence the design process and the capacity to effectively alter your design geometry. If the content of the parameters is defined in Grasshopper, the options of modifying the geometry in Rhino itself will be lost. If however the content of the parameter is based on Rhino geometry the geometry can be altered in Rhino resulting in a modification of the whole Grasshopper geometry.


The curve is made in Rhino, the loft in Grasshopper. Altering the curve in Rhino will alter the loft which was generated in Grasshopper.





Components


Components
Components
connecting and disconnecting

Each component performs a specific action. Most components require an input and provide an output.

For example: the Loft component creates a surface between two or more curves. So it has an input to specify which curves should be used for the loft. The output specifies the surface (or surfaces) that is created by the component's action.

The output of a component can be connected to another component to serve as an input. In our Loft example, the output (a surface) can be the input for the Divide Surface component, that subdivides any given surface. Or it could be fed into a Move component creates a moved instance of the input geometry.

This is in essence how designing your Grasshopper definition works. You use components (inputs and actions) and connect them to other components to generate or manipulate geometry. A Grasshopper definition is in essence a cookbook that represents your design idea.

Hovering with the cursor over the input or output of the component displays the properties of the input or output. If you want to change the settings of the input or output RMB-click on the input or output. RMB-click on the components name to switch a component on/off or to switch the Preview on/off.


To connect a component to another component, LMB-click the output and drag to the input of another component. To disconnect use the CRTL + LMB and drag the connection in the opposite direction. Alternatively you can RMB-click an input and use the context-menu to disconnect.

The result is a network of relations and parameters defining the design geometry. The network can be edited and extended during the design process. The design geometry will change accordingly.

Specials


Specials: number sliders and panel

The specials contain a variety of functions which support the easy access and manipulation of the network. We can in some cases also use a Special for the input or output of a component. The most used are the

  • Number slider
  • The Panel

The number slider will enable you to define a number within a certain range and type. If you want to be able to move a curve of a loft , you can add a transform component to the curve and manually define the transformation with the help of the slider.

The panel will give you feedback on the output of the components. This can be of use when you want to explore the list you want to edit. Using Panels to display data is very useful to debug your Grasshopper definition. If something doesn't work properly or behaves differently than you expected, you can connect Panels to the output of components at various locations in your definition to try to understand what is going on.

Personal tools
Actions
Navigation
Tools