Modules

From TOI-Pedia

Introduction

4 different modules

Grasshopper uses a variety of modules which can be interconnected to generate the Explicit History. There are 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 is a wide range of modules available to combine in various ways with each other. Within all the possible modules, there 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.

Two lines: one created in Rhino and one created in Grasshopper

As mentioned earlier 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.

The Params Tab

The organization of the tabs follows the logic of constructing geometry within Grasshopper. The first two tabs are the Geometry and Primitive tabs. The input tab contains nodes like the number slider and the panel. These specials are defined to support the workflow. Finally, the Params tab holds the Util functions. These functions can make your scripting life a lot easier, but they are only used to support your workflow.

The Params Tab


Defining a Parameter

Settings of a parameter

When a parameter is placed on the canvas, the color is orange. This means that 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.

Set one object

To define the parameter click on the Set 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

A surface from Rhino to Grasshopper

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.

Components

Component 1.jpg

Components can be found in almost every other tab than Params. 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.

Find the information of a specific component

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.

Connect a component to your script

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.

Input

The number slider and the panel

The input tab contains 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