How to make geometry in Grasshopper

From TOI-Pedia

Introduction

Spaceframe points.jpg


Grasshopper is a plugin in Rhino where you can make your complex designs based on combining blocks of code in a network of relations. Although it sounds abstract the principle behind it is quite simple. Commands used in the Rhino interface , like moving an object, is replaced in Grasshopper by a block of code making the movement possible. This block of code needs input, it has to know what object to move and in what directing and how far. then the calculation of the movement is done in the code and the output is the moved object.

If we look at this principle for making geometry we find that Rhino and Grasshopper are heavily intertwinded. Geometry made in Rhino can be used in Grasshopper or the geometry can be fully made in grasshopper.

There are three main techniques for introducing geometry in Grasshopper;

  • Use geometry made in Rhino
  • Use geometry made in Rhino as a basis for geometry in Grasshopper
  • Make geometry for scratch in Grasshopper.



Importing Rhino geometry into Grasshopper


Parameters
Curve Parameters

Points, curves, surfaces and volumes made in Rhino can be used in Grasshopper. Grasshopper uses a special kind of block of code for this called a parameter. This parameter can contain only information. It doesn't change it or does anything with it. It is like a container holding an object.


There are a range of parameters available in Grasshopper. Most geometry made in Rhino can be imported in Grasshopper. The main ones are:

  • Point
  • Curve
  • Surface
  • BRep (boundry representation - multiple attached surfaces)


To import the geometry, drag for example a curve parameter into the workarea. Right click on the parameter and select the option of set one /multiple curves and select the curve in Rhino. The parameter becomes grey which means it contains data ( the selected curve or curves) If the parameter is selected it becomes green as well as the attached curves in Rhino. These curves can now be used in Grasshopper.


A result of this setup is that the curves still can be transformed and deformed in Rhino. As a result the Grasshopper model based on these curves will also change.

Rhino geometry as basis for Grasshopper geometry



Curve to geometry

In the previous example a curve was imported in Grasshopper. This curve can be used for generating geometry in Grasshopper. Generating geometry from curves works similar in Grasshopper as in Rhino. The main difference is that because we have no mouse input in Grasshopper things like direction and distance have to be defined in additional blocks or as they are called in Grasshopper, components.

As an example:


  • Extrude curve: In the example of an extrusion of a curve , the extrusion component needs a curve input and a direction and distance input. The direction is defined by a vector, in this case a Z vector, abd a number slider defining the amount of movement.
  • Sweep 1 rail: The sweep 1 rail needs two curves as input. One rail and one section. This is exactly the same as in Rhino.
  • Loft: A loft needs always multiple curves to generate a surface. Therefore we can use a single curve component with multiple curves or multiple curve components with each a single curve. Similar to Rhino the order in which they are listed or connected will have an effect on the loft. To connect multiple parameters to the curve input of the Loft component use shift on your keyboard and connect the next curve parameter to the curve component.

Making geometry from scratch in Grasshopper


Curve to geometry222.jpg

It is also possible to make geometry without using the drawing tools in Rhino. There are several options available.

  • Parameters of Grasshopper geometry: There are parameters to import geometry into Grasshopper, however there are also parameters for drawing geometry in Grasshopper. The geometry drawn with these parameters can not be edited in Rhino, only in Grasshopper.

These parameter options are:

       * Points
       * Circle
       * Arc
       * Line
       * Rectangle
       * Box
  • Curve primitives: These are components for making curves. They need additional information like points where the curves have to go through. Because they are components you need always additional data to produce them. This option is often used in combination with other geometry. You can for example extract point from an existing curve and use these to build another curve. The advantage is that if one of the extracted points of the existing curve is moved the new curve will deform accordingly. So if a curve needs to be adjusted it is not necessary to build a complex set of individual points which can be adjusted. Just use an existing curve extract the points from that curve, build a curve from these points and then move one of these point to adjust the curve.

Similar to the curve primitives the curve spline option makes it possible to generate curves from scratch.


Points can be extracted from curves to generate new curves but they also can be generated from one or more surfaces. This option is often used to build new geometry on or between surfaces.


  • Surface primitives: Similar to the curve primitives, surface primitives need additional input to make the geometry. This can be extracted from other geometry, like points, edges or surfaces.


Extracting data from geometry


GH ANAYLIS curve in Plane1111.jpg

The strength of grasshopper is the possibility to analyse your geometry and extract data from it which can be used for making new geometry. This is why we find in the curves and surfaces tabs an analysis section. With these tools you can extract for example points, curves, edges and surfaces from existing geometry and use to build new geometry. In the case of the curves we have an additional option called divisions. These options are often used to extract points from curves to build new curves. For this course it is enough to know that using the point generated by the division component can be a good basis for generating a new curve which easily can be altered.

Personal tools
Actions
Navigation
Tools