Visual programming 3

Introduction to Grasshopper

Output Parameters

Output parameters are either used as interim values between components, or in the sense of terminal nodes of a graph. We may visualize outputs either within the visual programming environment or within the computer aided design viewports.

Panel outputs the string representation of data

The most commonly used component is the “panel”, because it can convert any input value into a text string representation. This allows us to inspect the both values and structure of data produced by various other components. In figure above illustrates the conversion of numbers, colours, Booleans, points and solid object into text.

Geometric data produced by components is automatically displayed in the viewports. We may toggle the visualization of a geometric components using the context menu situated above a component’s label and selecting the “preview” option. Do note that geometries produced by the visual programming environment are not inserted into the CAD document. They are rendered directly in the hardware accelerated viewports for performance reasons. This means that we cannot select them in the viewport or save them in a CAD file.

Baking geometry to Rhinoceros

To permanently store geometries generated via the visual programming environment within the CAD document we need to “bake” them, using the context menu situated above a component’s label. The pop-up dialog box allow us to define whether we wish to store the geometry into a particular layer or group; in other words apply any required object attributes.

Specialized visualization components are listed in the “display” tool palette. You will notice that those often have no output parameters denoted by a serrated edge on the right hand side of the component.

Practice

  • Explore various components such as input primitives and basic arithmetic in the math palette. Each component has a minimal help contents accessible by the context menu right on top of the component’s label.

  • Notice how most of the geometric components replicate the functionality found in the CAD environment. Create some basic geometries using the command you are already familiar with.

Last updated