Tutorial 5 - Creating-components

From TOI-Pedia


Introduction

In this tutorial we will go through a three step process: - Step one: Creating a surface component (a 3d truss) - Step two: Create a surface - Step three: Combining step one and step two

Step 1 – Creating a surface component, the 3d rectangular truss

Sketching

Although grasshopper is very intuitive, it’s highly recommended to first sketch a problem on paper. For readability, these sketches have been made more clear in illustrator.

Sketch of component

Our component is a simple rectangular space-frame. Consisting of a plane, and an offsetted surface. To create the component, we need to offset a surface, and then connect a set of lines. There is a linked list of vertices that we wish to link to each other.

Connecting of multiple components

Image 2 shows that when connecting multiple components it’s better not to cross connect vertices 2-3 and 3-0, because it would cause overlaps.

Creating the surface

To start, we will just create one component, which we will later multiply on the surface. To do this, we first create an often used set of components: Surface » Primitive » Panar Srf Right now we’re only concerned with the order of construction of the element, and not the precise size, so the default size of 10x10 will be fine. The next step will be to offset the surface: Surface » Freeform » Offset And then to create a subdivision of the surface: Surface » Freeform » Offset It’s probably easiest to create a set of sliders for the offset of the surface, and also one for the input of the distance slot of the offset surface: Params » Special » Number Slider Make sure to set the slider to integers for the U/V parameters (right click → edit… ) and choose reasonable parameters. (I picked 1 to a 100), we can always increase this, the offset is probably best off as a float. Right now we’re not yet working on scale, be sure to adjust this when you are. The output of the subdivide surface will be a set of u/v ranges that describe a certain subsurface. Using the Subsrf block, we can obtain the subset of this surface. Surface » Util » Isotrim By now your network should look like this image 3.

GH Network

Extracting the edges and vertices

If you look at the first sketch, the numbers in the black circles stand for the vertices (points) at the edge of a rectangular subsurface. One thing you should know: in grasshopper a list always starts at 0. So the first entry of a list will have the number zero. In image 1 there also is a table of which surface should be connected to which surface. Also, we will need to use some of the vertices of the edge surface (number 0 and 1). To get the vertices and edges, we use the explode brep tool. Surface » Analysis » Brep Components Create two of them, one for each subdivision. It will have the output of F / E / V (Faces / Edges / Vertices). Now it’s time to connect the different elements. Since we need to hand pick some points to connect them, we first use the item element. Sets » List » List Item Create two of them, one for each explode block, and for each connect the V(ertice) output to the L(ist). Now we can use some handy tool: the panel tool. This can be connected to the i(nput) of the item block. Params » Special » Panel A panel can be used for multiple parameters, to do this: uncheck the ‘multiline data’ checkbox of the panel. Now we can create two panels, one for each Item block. For the first one enter:

0
1
0
1
1
2

For the second one:

0
1
1
0
2
1

(if you do not understand this step: look again closely at the first image).

Now, the result of the two item blocks can be combined in a line Curve » Primitve » Line Now we also need to get two edges from other components: the edges 0 and 1. To do this, create two new list Items and connect them to the brep components element.

Sets » List » List Item Then, again create a panel like the ones we created before, except now with two parameters: 0 and 1. Our component is now complete. Playing with the parameters should give multiple components.

Component GH Network
Result

Step 2: Creating a surface

For step two we will create a free form surface to place our later component on. In this case we will use a normal suface, created by hand.

To do this go to: Params » Geometry » Surface And create a surface input. This will replace the planar surface we had before. Right click the surface and press select one surface, click the loft you created.

Step 3: Adding material

As of yet we only have a set of curves, but it would be nice to have some form of material. In this case, we will use a pipe to create a suggestion of material. First: create a merge 3 stream component to join the 3 sets of edges. Then connect this one to a pipe component. Now your model will have geometry.


Sets » Tree » Merge 03

Surface » Freeform » Pipe


Component GH Network
Final result
Personal tools
Actions
Navigation
Tools