Fabrication
Contents
Introduction
The parametric feature of Grasshopper gives us the ability to make different studies. Eventually you can finalize your created geometry with the Bake Selected command.
In this example you can use a closed polysurface or a landscape-like sloping surface. You will slice the geometry in even slices to create section lines for example for lasercutting.
Building the model in the latest versions (after 0.8.0001)
You will make a model of the geometry used or created. Meaning, that you probably need to scale down the model. Further you need to determine the thickness of the slices.
Variables
- Scale
- Slice thickness
Step 1: Scaling and positioning
First you need to define a geometry.
To scale you need two input fields. A division operator and a scale component for the transformation.
Create to input fields with:
Connect the outputs of the Panels with the inputs of the division operator.
Connect the result of the division operator and your geometry with the Scale component.
It is very likely that the geometry is somewhere in your viewport. When scaled down you would like to have your geometry in the origin and not somewhere else in your viewport.
To find the lowest point create a bounding box around your scaled geometry.
To get the different components of the box we need to explode the geometry.
This outputs 6 faces, 12 edges and 8 vertices. You need one vertice to move from. Choose one of the items and connect it with output V (vertices) of BRep Components.
You need a vector to the origin. Create a vector and connect the first position with input A.
Connect the origin with input B of the vector (X,Y,Z) is standard 0.
Create a move component to perform the translation. Connect it with the scaled geometry and the vector. The lower left corner should be in the origin now.
Step 2: Creating the base
The shape is still hovering in the air. So if you slice the shape horizontal you will get the contour lines of the shape itself but you will be missing the contour lines of the outer edges.
This means that you need te create a bounding box and trim away the unneeded parts with the edges of the shape.
Create a bounding box.
To get the faces explode the box.
You need only the vertical faces. You can create four seperate List Item components with seperate index numbers, but you can also combine a series of index numbers with one List Item.
To get the trim lines, you need the edges of the landscape shape. Again use Explode (BRep Components) and select the edges with Series and List Item.
To trim a face you first need to split a face. The actual trim is to keep one of the splitted faces.
Add a Surface Split component to divide the sides of the bounding box
Connect the output with a List Item component and keep the face you want. This is the same what Trim in Rhino actually does. It hides one of the trimmed surfaces.
You might think let's connect the output of the edges with input C and connect the output of the faces with input S of the Surface Split component. Unfortunately, that will not work.
The output of the faces and edges is one data stream. To make it work with the Surface Split component you need to split the data stream in single branches. This way the data is handled one by one.
Check the difference of the data structure by adding a Param Viewer component before and after the Graft Tree component.
Step 3: Slicing
To slice the shape in equal segments you will need cutting planes and extract the intersection curves between the shape and the slices.
Determine the size of the cutting planes with the edges of the earlier created bounding box of the shape. Select only one edge for the length and one edge for the width.
You wil also need a vertical edge to divide in equal lenghts. Later you will place on each division point a cutting plane.
According to the thickness of your sheet material you can set it here. The lenght of the division can be set with a Number Slider. Connect this with input L of the Divide Length component.
You now have all the required information to create a plane. Connect the output from the edges and the height with the inputs of the Plane component.
On each division point a cutting plane will be created. To get the cutting lines between the intersecting surfaces you will need the BRep | Plane component.
These intersection lines you can bake. RMB on the BRep | Plane component and select Bake... If asked select a layer in Rhino to put the lines in.