S206E057 – Spring 2016 S206E057 -- Lecture 14, 5/22/2016, Architectural Modeling in GH Copyright ©2016, Chiu-Shui Chan. All Rights Reserved. GH Interaction and architectural modeling techniques A. LOFT component: Using GH to assist in modeling a Lofted and Mirrored Surface Step 1: Create 3 curves for generating a lofted surface in Rhino. Step 2: In GH, click on the Surface tab > Freeform and choose the Loft component. Drop the definition into the scripting plane. Step 3: Right click on the input “C” and choose the option “Set Multiple Curves” GH will disappear, and in the Rhino Window, choose the 3 loft curves in appropriate sequences. Hit Enter when done. The sequences of selecting the curves are important for the generated form. You could do some experiments to explore more on it. The Loft Definition will turn Grey indicating the objects are loaded. The lofted surface in Rhino will be Red (shown that it is deselected. If it is Green it means the component is selected and the corresponding objects in Rhino will also be shown in green color.) Page 1 (5/1/2016) Arch534 – Spring 2015 In GH, the lofted surface is in “Preview Mode” meaning the lofted surface is not really created in Rhino yet. It needs to be baked from GH in order to get a real Rhino lofted geometry. However, since this is only a preview geometry, we could manipulate the curves in Rhino to adjust the lofted object as needed. Step 4: Load the Mirror Component from the “Transform” Tab > Euclidean panel > Mirror, Drop it into the scripting plane. Step 5: Connect the “L” output of the loft definition to the “G” Input of the mirror definition. L means the resulting loft object. G means the input geometry. Step 6: Create a new plane next to the lofted surface in Rhino. The way to create a plane is to create a line in Rhino and extrude that line to create a plane. This plane, as a polysurface, will be loaded into the “P” input of the mirror definition to define the mirror plane. Placing your mouse over the various inputs and outputs let you see what Grasshopper needs in order to make a definition work. We could simply load the mirror plane directly into the “P” definition. However, down the road it can be hard to retrace your steps. So instead, it is better to create a parameter and then wire the parameter into the mirror function. Step 7: Place a surface parameter by clicking on the Params Tab > choose the Brep (or Surface) parameter. We used this Brep before which is a parameter storing surface information. Right Click on “Brep” (Srf) parameter and choose “Set One Brep (Surface)” or “Manage Surface Collection” > Add Item Choose the Mirror Surface in Rhino, and wire the output with input p in Mirror definition. Note: It is better to use Brep component than Surface component. Surface definition has the problem of loading extruded surfaces to the surface component due to the representation problem, and sometimes it would have the problem of getting “floating parameter failed to collect data” while wiring it with P. But Brep is fine on accepting the extruded face as a plane. Step 8: Wire the Surface Output to the Mirror “P” input. Page 2 (5/1/2016) S206E057 – Spring 2016 The Lofted Surface is now mirrored on the Surface plane. With this script setup, we can move the original loft curves and the lofted surface. The mirrored loft surfaces automatically update. We can also rotate and adjust the mirror plane. The lofted surface will be updated to the adjusted plane. g Original Plane Rotated Plane Differences between the Number Slider input versus Expression Editor input: If data is entered from the “Set Number” input area, the input mechanism will be suppressed by Panel or Number Slider inputs. But, if value is entered by Number Slider first, it will not be post-processed by Set Number input (this is the new development at software updated in 3/9/2015). Baking the Explicit History Objects into Real Surfaces: Geometry Created in Grasshopper are only preview objects, meaning that they do not exist yet. In order to make these real objects, we need to “Bake” the GH geometry. To do this ShiftSelect the various definitions to Bake. In this case I selected the Loft Surface and the Mirrored Surface. Click on Solution>Bake Selected. The Baked Solution, resulting in two “Actual” surfaces. If the GH program is closed, the unbaked objects will disappear. Otherwise, the baked objects remain; it is because that these baked objects are Rhino objects. This explains the loft component in GH, which had been applied in other exercises demonstrated in earlier lectures. Now it is time to concentrate more on the architectural designs. Page 3 (5/1/2016) Arch534 – Spring 2015 B. Going Deeper into Grasshopper: GH is a great tool to help in the modeling process, but its real power lies in its ability to handle large data sets and geometry that are linked to surfaces etc. This next example will introduce more advanced concepts in GH. Create a simple curved surface in Rhino, by drawing a curve in front view port, make a copy and loft along the two curves. (if there are three curves, the lofted surfaces will have a different tangent direction that makes the projected line shown in different direction.) Open the GH interface. Place the Divide Surface Definition in the GH definition plane or (type sdivide). Surface Tab > Divide Place a Surface component in the GH script plane. Params Tab > Surface (or type surf) Right Click on the Surface component and choose “Manage Surface Collection”. A new window shows and choose “Add Item”, to add the new lofted faces. Then in the Surface persistent data window, check the ID representing the surface, click OK. Connect the Surface component output to the “S” Input of the Divide Surface component. The surface now has a series of points running in the U and V Direction along the surface. U & V represent X & Y axes. Setting up the U and V parameters on the divide surface component: Click on the Number Slider definition in the Params Tab. Apply two Number Sliders on the script. Page 4 (5/1/2016) S206E057 – Spring 2016 Double Click on a Slider Definition, and set the following: Under N Choose Integers Minimum Limit: 0 Maximum Limit: 16 Default Value: 8 Click OK. Do this for both Sliders. (Note: We could do cut and Paste to include two Number sliders as a way to save time or double click to get a input window, then type 0<8<16 to set up the slider component.) Connect one slider to the “U” input of the Divide Surface component and the other slider to the “V” input of the Divide Surface. The number of segment changes so that there are 8 pieces in the U and 8 pieces in the V direction of the surface or a total of 64 segments total. Double click on a slider and change the number of segments to 4, and the other to 16. That means we now have 64 segments on the Surface We are now going to place a line at each point. However, we want the direction vector (normal) of the line to start at each point and point perpendicular to the normal of each point on the plane. In other words, we want the line to rotate as the surface undulates. In order to do this we need a line definition that has the following inputs instead of two points input: Starting point input, Tangent (Normal) Input, Length Input Finding the right definition will take some trial and error. In this case, choose the “Line SDL” definition under the Curve Tab and place it on the definition plane (or type Line SDL in the window input area). Here D means line direction. Note: Rebuilding the Surface will equally distribute the points on the surface. Page 5 (5/1/2016) Arch534 – Spring 2015 Connect the Points to the Start point Connect the Normals to the Direction vector Create a slider and connect it to the Length input. Set the slider to whatever value you want. We are now going to assign a surface to the lines. Choose the Pipe definition. Surface > Pipe. Connect the Line Output “L” of the Line component to the “C” input at the Pipe definition. Create a slider and connect it to the radius input “R” of the pipe component. Right click the E and choose Round for Caps. Other Method of Capping the Tubes: In older version of GH, the Pipe component doesn’t have the function to cap the extruded tube. To resolve this, we could use the Cap Holes (or type cap) component from the surface definitions menu. Surface>Utility>Cap Holes Connect the “P” output of the Pipe Definition to the “B” input of the Cap holes definition. The top and bottom of the Pipe tubes now have surfaces. But, it is not necessary to do so in the new version. Page 6 (5/1/2016) S206E057 – Spring 2016 Flexing the Model: Now that we have built our model, we can flex it! In GH, Click on the View Menu, and Choose Remote Control Panel to put the Panel in Rhino. Then select each slider, right click and choose “Publish to Remote Panel”. This Remote Control will allow you to flex the model and see the various results. Note: To better understand the various sliders names, right click on a slider definition in GH and at the top change the name to a name that you recognize. Adjust the edit points of the original surface: Applications of the GH algorithms Hide the base lofted Surface using Rhino’s Hide Tool. Visibility Panel > Hide Objects. New Surface Created (In this case an ellipsoid) Create a new Ellipsoid. Page 7 (5/1/2016) Arch534 – Spring 2015 Select the Surface Definition and attach it to the new surface you just created. The connection will turn into a new creation of a new form. See the image below. Same solution applied on different surface. This is the notion of applying the same “algorithm” to different objects for creating similar results with different effects. Therefore, as long as one algorithm is generated, it could be applied to different elements at different times. A Solution in GH is a set of instructions and is not saved when you save a Rhino Model. It needs to be saved in addition to the Rhino Models. To save a solution, click on GH > File > Save Document As... The saved GH file needs to be loaded when you load the Rhino model file. If you want to keep the Rhino model file, then save it as well. If you want the GH generated results to be kept in Rhino model, then select the GH component right mouse click and apply bake function to bake the preview results into the Rhino model and save. The creation of pipes on surfaces could be seen as the methods of creating columns, mechanical devices, or structural components on surfaces. This simple example explains the fundamental concepts of interaction between Rhino model objects and GH programs. Footnote on the definition of surfaces: • • • • A mesh is a collection of triangles and quadrilaterals. It is defined internally as a list of vertices (points) and faces (each face connects either three or four vertices). Meshes also support per vertex normals and colors, as well as a host of other properties. A surface is, well, a surface or a single-face brep. It consists of a single smooth area but may have custom edges. If a surface is just a (deformed) rectangle and it has no custom edges, it is called an 'untrimmed' surface. Surfaces with custom edges or holes punched into it is called a 'trimmed' surface. A brep is one or more surfaces joined together, a collection of one or more surfaces where each surface can have trimming curves assigned to it. If a brep only contains a single face, then it is the same thing as a surface. For surfaces to be joined together into a brep, they need to share some of their edges. Geometry is anything that has a shape and it refers to all types of geometry supported by core Grasshopper, this includes meshes, surfaces, and breps, but it also includes boxes, curves, lines, circles, points, etc. Page 8 (5/1/2016) S206E057 – Spring 2016 D. Modeling column series. • Step 1: Create a circle in GH with a radius of 1, which is the radius of a column module. • Step 2: Move the circle to a distance to form the bae of the column. The motion (T) shall be Z vector. • Step 3: Use scale to scale the circle by half. The graphic input and center of the graphic are the attributes of the circle. • Step 4: Move the circle again by Z vector to some for representing the shaft of the column. • Step 5: Then loft the entire column, by the sequence of selecting the circle, move, scale, and move components’ geometry output to the loft curve (C) input part respectively. • Step 6: Apply rectangular array to make the column series. X will determines the number of columns along x axis, and Y determines the number of columns along y axis. The rectangular cell array (C) is determined by “set one rectangle” to define the x and y interval distances in Rhino, see the image below. E. Modeling floors and roof • Step 1: Draw the floor overall outline and the stair opening on the floor plan. • Step 2: Define two Curve (crv) components, Set One Curve and select the major rectangle representing the major floor plane. Select the drawings representing the openings for the second Curve component. • Step 3: Set up a Boundary Surface and link the curves to it. Results will have openings created – see the example of method A below. Page 9 (5/1/2016) Arch534 – Spring 2015 (Or, set up two Boundary Surface (boundary) components, and take a curve or a collection of boundary edge curves to generate a planar surface. E is one or a collection of curves. Output of S is boundary surface. In this example, Curve one component is the major floor slab and the second curve is the group of interior openings. See the example of method B below.) • Step 4: Apply extrude (extr) to extrude the element, which could be curves or planar surfaces, along an extrusion direction of Z vector around 2’ distance. Results of extrusion is BREP (E) representation of solids. • Step 5: Use Solid Difference (sdiff) to take the smaller (opening) rectangle away from the overall floor plane. Result of this component will generate the first floor slab on the ground. • Step 6: Apply Move to move the BREP of the slab along Z vector 20 feet above the ground level to generate the second level of slab and the roof slabe. See the image below. Method A. Method B. Page 10 (5/1/2016) S206E057 – Spring 2016 Results of method A. • Results of method B. Step 7: Also apply Move on the column series to generate the second level of column series. See the images below. Here are the sequences of creating a building with a major elevator core in the middle of the floor plan. Ground level with columns. Second floor plane. Second level with columns. Roof plane. Page 11 (5/1/2016) Arch534 – Spring 2015 Here are the other sequences of creating a building that has a major elevator core in the middle and a few openings for plumbing pipes or for skylights around. Ground level with columns. Second floor plane. Second level with columns. Roof plane. Note: 1. Walls could also be extruded perpendicularly by using the Boundary Surface (boundary) which has a collection of drawn curves and extrude the Boundary Surface components along the correct vector to create sold objects. In this example, the inside loops will be treated as openings. 2. If the surface has various patterns, then you have to apply Solid Difference to carefully take window openings away from the facade. However, if the surfaces are complicated, then it would be impossible to make the pattern correct. Thus, apply simple steps to create best results. 3. If there are beams supporting the floor, then use rectangle to construct the element, move it up representing the height of the beam, loft it, then use rectangle array to locate them under the floor plane. This method is pretty much the same as constructing the column series. Page 12 (5/1/2016)