# Surfaces

## Introduction

LEVEL: BEGINNER
Expected Time: 15 min
Possible result of this tutorial

Creating surfaces doesn't differ much from generating them in Rhino. The main four modeling options of extrude, sweep 1 rail, loft and planar are also available in Grasshopper. However, the major difference is the input geometry. This can be a set of points or curves. Especially the use of points is something which is less used in Rhino. Points in Grasshopper can be useful for coupling it to other parameters, influencing the location of the points. Thereby creating triggers which might deform the surface.

The techniques are relatively the same in Rhino as in Grasshopper. We have the main four options of:

• Extrude
• Sweep 1 rail
• Loft
• Planar

In this tutorial, we will discuss the extrusion and loft method, since they are mostly used in Grasshopper.

## Extrude

Example of an extrusion based on a curve in Rhino, click on image for full screen.

The example on the right uses the extrude component to extrude an existing curve in Rhino.

Add a Rhino curve to a Grasshopper Curve parameter
• Set a curve created in Rhino to a curve parameter in Grasshopper Params » Geometry » Curve

Add a vector with numbersliders to the canvas

The extrude component is used to make a straight extrusion. Other extrusion options are also available. The direction and distance are controlled by a vector.

• Add a vector to the canvas Vector » Vector » Vector XYZ
• Give a x, y, and z value to the vector with a number slider Params » Input » Number Slider

Connect an amplitude to the vector output

The distance of the vector is controlled by the amplitude. This is, in fact, the length of the extrusion.

• Connect an amplitude to the output of the vector. Vector » Vector » Amplitude
• Add a number slider to the Amplitude input Params » Input » Number Slider

Add an extrude node to the canvas, connect amplitude to direction and curve to Base
• Use an extrude component to extrude the geometry Surface » Freeform » Extrude
• Draw a connection line between the amplitude output and direction input
• Add a surface parameter for good practice Params » Geometry » Surface

Your script is now finished. You can "bake" the object by right-clicking on the surface parameter and click on bake. This will get your surface into Rhino for further modelling.

• Bake your final surface RMB on surface parameter » Bake

## Loft

Move a curve in the x and z direction

When you have existing curves that you use to make a loft, you may want to change the position of these curves. You can do this using the move or rotate component. The move component uses vectors to specify the direction and distance.

• Create a curve in Rhino and set it to a curve parameter Params » Geometry » Curve

The first curve is moved in the Z-direction and X-direction by using a Unit vector component. The length of this Unit factor is changed by using the Factor input with a Number Slider. The vectors can be combined using an addition component.

• Add a move component to the script Transform » Euclidian » Move
• Connect an addition node to the motion input Maths » Operators » Addition
• Add two unit vectors (X and Z) to the addition input Unit Z » Vector » Vector
• Add a number slider to the unit vector input Params » Input » Number Slider

Loft the two curves

Finally, you have to connect the original and moved curve to a loft component. Make sure you connect the curves in the right order to the loft component! Otherwise this may not give the result you expect!

• Connect the original curve to the loft component Surface » Freeform » Loft
• While holding the shift key, connect the moved curve to the curve input of the loft node

Rotate a curve before lofting

Of course, you can also rotate the moved script. This will result in the following script.

Always rename and add a parameter at the end

For good practice, always add a parameter at the end and rename your sliders.

• Add a final surface parameter Params » Geometry » Surface