# Stepped Topography

## Introduction

LEVEL: BEGINNER AND INTERMEDIATE
Expected Time: 45 min

This tutorial consists of two parts. First, we will discuss the difference between Extrusion, Lofting, Contouring and finally Projecting. After that, using these four principles, we will create a stepped topology that you can use for your own designs.

## Extrude

Create a curve parameter and set an existing curve in Rhino to the parameter.

• Create a curve parameter Params » Geometry » Curve
• Set the Rhino curve to the parameter Select Rhino Curve » RMB on curve parameter » Set one Curve

Extrude the curve to make a straight extrusion. Other extrusion options are also available. The direction and distance are controlled by a single vector. The right image uses an XYZ-vector, which is fed in the Amplitude node to define a length (magnitude) of the vector. Finally this is inserted in the Direction input of the Extrude component.

• Create a surface using the Extrude component Surface » Freeform » Extrude
• Define the direction with an XYZ-vector Vector » Vector » Vector XYZ
• Define the distance of the vector with an amplitude Vector » Vector » Amplitude
• Connect the amplitude to the direction input of the extrude component.

## Loft

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

• Use the same curve parameter as the chapter about extrusions
• Move the curve using the Transform » Euclidian » Move
• Define the movement direction with a Unit-Z vector and a Number Slider Vector » Vector » Unit Z

Next, we can rotate the moved curve using the Y-Axis as rotation axis.

• Rotate the moved curve Transform » Euclidian » Rotate
• Use a Y-Unit vector as axis Vector » Vector » Unit Y
• Right-click on the Angle input to enable "Degrees" RMB on Angle input » Degrees
• Define the rotation with a Number Slider Params » Input » Number Slider

A loft always uses at least two curves. Connect the first Rhino curve to a Curves Loft input. 'Holding shift connect the second rotated curve to the Curves Loft input.

• Create a loft component Surface » Freeform » Loft
• Connect the initial curve and rotated curve to the Curves input

Combining multiple inputs may be tricky in more complicated definitions. The Tree structure of the connections determines which curves will be lofted together. Refer to Data Trees in Grasshopper Components for more information on Data Trees.

## Contour

Contours can be derived from any surface using the contour component. A contour is an intersection of a surface at certain intervals, spread over a specified vector.

• Create a horizontal surface using one of the methods in the previous chapters
• Create a contour on the surface Intersect » Mathematical » Contour
• Define the direction with, for example a Unit_Z vector Vector » Vector » Unit Z
• Define the distance between the contours with a Number Slider Params » Input » Number Slider

If you change the input curves, it automatically updates the surface and the location of the contours. By moving the Number Slider you can make changes in the distance between contours. You could for example set this to the minimum or maximum step-height (150mm-180mm) of a stair to generate a walkable surface.

## Project

3D Curves can be projected onto a plane, projected onto a plane along a vector or projected onto a brep. Depending on what you will do after the projection you select which command is most useful. Generally speaking, you can project curves on a flat surface using two components: Project and Project Along. In the second respectively, you can use a vector and plane as input to project geometry.

• Create a lofted surface using two different curves Surface » Freeform » Loft
• Create a bounding box around the loft Surface » Primitive » BoundingBox

Since we haven't used a bounding box before, it is wise to explain what this component does. A bounding box takes one or multiple geometries as input, and creates the smallest possible box around the object. Without giving a plane input, the bounding box uses the world axes as directions for the box. When you are using multiple geometries, you can right-click on the bounding box component and select if you want to create one box (Union Box) or multiple boxes.

We now extract the lowest XY surface of the bounding box using a deconstruct brep component.

• Deconstruct the bounding box Surface » Analysis » Deconstruct Brep
• Get the lowest XY surface using a List Item componetn Sets » List » List Item
• Define the right index for the List Item using a Number Slider Params » Input » Number Slider

Now we create a contour from the originally created loft using the Z-axis as direction.

• Create a contour for the loft Intersect » Mathematical » Contour
• Define a Unit-Y vector for the direction Vector » Vector » Unit Z
• Find a distance that suites your model Params » Input » Number Slider

As last step, we project the contour on the extracted surface. We now have a map of all intersections on a flat surface.

• Project the curves on the extracted surface Curve » Util » Project

## Stepped Topography

LEVEL: INTERMEDIATE

This tutorial combines the 4 operations above; extrude, loft, contour and project. To reduce the complexity and to avoid using data trees we generate the contours by intersection the surface with series of boxes rather than using the contour command.

Create a loft between two Rhino curves. Make sure the curves are both created in the X-direction or Y-direction. Furthermore, the curves should have the same length in the respective direction.

• Create a loft between two Rhino curves Surface » Freeform » Loft

Connect a bounding box component to the loft and deconstruct this bounding box.

• Connect the loft to a Bounding Box Surface » Primitive » BoundingBox
• Deconstruct the Bounding Box Surface » Analysis » Deconstruct Box

Once we have deconstructed the BoundingBox, we need to divide the height of the Bounding Box based on the distance between contours. We can use a number slider for this. For example, if the distance between contours is 0.5, we need to place a box every 0.5 with a height of 0.5 (0-0.5, 0.5-1, 1-1.5, 1.5-2, 2-2.5, 2.5-3, etc.) until the total height of the original Bounding Box is reached. If we want to keep the definition parametric, this series of numbers always needs to adjust according to the height of the bounding box.

• Find the height of the Bounding Box by deconstructing the Z-domain Maths » Domain » Deconstruct Domain
• Substract the start value of the end value Math » Operators » Substraction

By dividing the found height by a number, we can specify the step size. However, first we round the previously found value to its integer ceiling.

• Divide the found height Math » Operators » Division
• Use a Number Slider for the division B input to define the step size Params » Input » Number Slider
• Round the amount of steps Math » Util » Round
• Create a series of values using the domain start as start, Number Slider of the step size for the size input and rounded ceiling value for the Count input Set » Sequence » Series

Now we need to create a domain for the bounding boxes that we will use as intersection through the loft surface. First shift the Series output twice, once with as shift of 1 and once with a step of -1. Furthermore, we must set the Wrap input of the shift list components to False. Finally, we can construct a domain using the two shifted lists.

• Shift the Series output two times: once with value 1 as shift and once with -1 as shift Sets » List » Shift List
• Set both Wrap inputs of the Shift List components to False RMB on W input of Shift List component » Invert
• Construct a domain from the two shifted lists Maths » Domain » Construct Domain

The result will be a list of domains (0-0.5, 0.5-1, 1-1.5, 1.5-2, 2-2.5, 2.5-3, etc.) which we can be inserted in the z-coordinates for the boxes.

Construct domain boxes from the original plane, x-domain and y-domain of the loft surface. As z-domain, use the generated list of the previous step.

• Create a domain box using the inputs visible in the right image Surface » Primitive » Domain Box

Now we find the intersection between the boxes and the input loft surface using a brep-brep intersection. The loft surface should be inputted to the A input of the intersection; the boxes to the B input.

• Find the intersection between the loft and the boxes Intersect » Physcial » Brep-Brep

The found curve intersections should now be projected on a plane at the beginning of each step.

• Connect the intersection curves output to the Geometry input of a Project node Curve » Util » Project
• Create an XY-plane Vector » Plane » Unit XY-Plane
• Connect the output of the plane to a move component Transform » Euclidean » Move
• Use a Z-Unit vector for the direction input Vector » Vector » Unit Z
• Specify the Z-Unit vector factor with the shift list component (+1) we used to find the step size values
• Graft the result of the Move Geometry Node RMB on Geometry output » Graft
• Connect the moved planes to the Project Plane input

Now we create the surface of the steps by using a Boundary Surface node for each projected curve.

• Create a boundary surface from the projected curves Surface » Freeform » Boundary Surface

To conclude the stepped topography we can extrude the surfaces using the Number Slider that determines the distance between contours. Connect a negative z-vector into the Distance input on the extrude component. Plug the contour distances Number Slider into the z-vector.

• Extrude the surfaces Surface » Freeform » Extrude
• Use a Z-Unit Vector for the direction input Vector » Vector » Unit Z
• Add a Negative component before the Unit Z node Maths » Operators » Negative
• Specify the distance using the contour distance Number Slider