S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

13
S206E057 – Spring 2021 Page 1 (5/24/2021) Copyright ©2021, Chiu-Shui Chan. All Rights Reserved. Create regular features (forms) on façade: Panel features or structural components could be done by components in LunchBox, which is a GH plug-in for exploring mathematical shapes, paneling, structures, and workflow. Particularly, the panel patterns on surfaces could be created (by the panel functions) to serve as divided surface systems. The latest release of LunchBox is built to fit Grasshopper 0.90076, Grasshopper 1 and Rhino 6, which could be found on http://www.food4rhino.com/app/lunchbox and more information is provided online at: http://www.grasshopper3d.com/group/lunchbox. This plug-in includes the following tools, and detailed components are diagrammatically shown on page 9 for information. There are many additions in Rhino 7. 1. Data: Components for dataset management, XML, CSV, and JSON formats 2. Generate: Components for cool generative geometry. 3. Machine Learning: LunchBoxML components for regression, clustering, and neural networks. 4. Math: Create parametric surfaces and forms such as the Mobius, Klein, or 3D Supershape 5. Panels: Create paneling systems such as quad grids, diamonds, or triangles. 6. Structure: Create wire structures such as diagrids or space trusses. 7. Utility: Rationalize spline curves and reverse surfaces. 8. Workflow: Read and write Excel files and automate baking and saving. Methods of installing LunchBox are the same as any plug-in installations. Typical installation sequences are: Old method: Download the ZIP package. In Grasshopper, choose File > Special Folders > Components folder. Save the LunchBox.gha file there (or drag it to the GH canvas). Right-click the file > Properties > make sure there is no "blocked" text Restart Rhino and Grasshopper, LunchBox will appear as one of the tags in the tag area next to the Display tag. New method: Download at https://www.food4rhino.com/app/lunchbox#downloads_list will load & install it in Rhino GH. For Rhino 7, click the Download button next to LunchBox v2020.11.2 version on food4rhino page, a manager window shows for automatic downloading after a few user related questions. Reopen the Rhino and GH. Example 1 of LunchBox application: 1. Use Rhino “Surface from a 3 or 4 corner points” tool to generate a surface on front view. This surface is an untrimmed free surface. The U direction of local coordination is from the first point to point 2 and V direction is from points 2 to 3. (Note, if you want to replicate the xyz axes directions you should start at your base point click the +x direction first then the +y and going around in an anti-clockwise direction will result in the normal in the +z direction.) 2. In GH, apply a Surface component > “Set One Surface” and assign the surface to it. 3. From the LunchBox tag, apply the “Staggered Quad Panel” to generate the brick pattern on the face. Define integer number sliders for U and V, which defines the number of staggered faces along local X and Y axes. 4. Define “Random Split List” component, link the panel from Quad Staggered to the list of the “Random Split List” to see the randomly split surfaces of A and B. R on the Random Split List controls the randomization of the split which is defined by a slider for the number of seed to generate variations. S controls how many panels go to either A or B (or the proportion of the randomness for A and B) that ranges from 0 to 1. 0.5 is half and half. 5. To see the results of random split of the faces visually, use two Surface components and link the output of A & B to these two Surface components. S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper & Architecture Modeling

Transcript of S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

Page 1: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 1 (5/24/2021)

Copyright ©2021, Chiu-Shui Chan. All Rights Reserved. Create regular features (forms) on façade: Panel features or structural components could be done by components in LunchBox, which is a GH plug-in for exploring mathematical shapes, paneling, structures, and workflow. Particularly, the panel patterns on surfaces could be created (by the panel functions) to serve as divided surface systems. The latest release of LunchBox is built to fit Grasshopper 0.90076, Grasshopper 1 and Rhino 6, which could be found on http://www.food4rhino.com/app/lunchbox and more information is provided online at: http://www.grasshopper3d.com/group/lunchbox. This plug-in includes the following tools, and detailed components are diagrammatically shown on page 9 for information. There are many additions in Rhino 7.

1. Data: Components for dataset management, XML, CSV, and JSON formats 2. Generate: Components for cool generative geometry. 3. Machine Learning: LunchBoxML components for regression, clustering, and neural networks. 4. Math: Create parametric surfaces and forms such as the Mobius, Klein, or 3D Supershape 5. Panels: Create paneling systems such as quad grids, diamonds, or triangles. 6. Structure: Create wire structures such as diagrids or space trusses. 7. Utility: Rationalize spline curves and reverse surfaces. 8. Workflow: Read and write Excel files and automate baking and saving.

Methods of installing LunchBox are the same as any plug-in installations. Typical installation sequences are:

• Old method: Download the ZIP package. In Grasshopper, choose File > Special Folders > Components folder. Save the LunchBox.gha file there (or drag it to the GH canvas).

• Right-click the file > Properties > make sure there is no "blocked" text • Restart Rhino and Grasshopper, LunchBox will appear as one of the tags in the tag area next to the Display tag. • New method: Download at https://www.food4rhino.com/app/lunchbox#downloads_list will load & install it in Rhino GH.

For Rhino 7, click the Download button next to LunchBox v2020.11.2 version on food4rhino page, a manager window shows for automatic downloading after a few user related questions. Reopen the Rhino and GH. Example 1 of LunchBox application:

1. Use Rhino “Surface from a 3 or 4 corner points” tool to generate a surface on front view. This surface is an untrimmed free surface. The U direction of local coordination is from the first point to point 2 and V direction is from points 2 to 3. (Note, if you want to replicate the xyz axes directions you should start at your base point click the +x direction first then the +y and going around in an anti-clockwise direction will result in the normal in the +z direction.)

2. In GH, apply a Surface component > “Set One Surface” and assign the surface to it.

3. From the LunchBox tag, apply the “Staggered Quad Panel” to generate the brick pattern on the face. Define integer number sliders for U and V, which defines the number of staggered faces along local X and Y axes.

4. Define “Random Split List” component, link the panel from Quad Staggered to the list of the “Random Split List” to

see the randomly split surfaces of A and B. R on the Random Split List controls the randomization of the split which is defined by a slider for the number of seed to generate variations. S controls how many panels go to either A or B (or the proportion of the randomness for A and B) that ranges from 0 to 1. 0.5 is half and half.

5. To see the results of random split of the faces visually, use two Surface components and link the output of A & B to

these two Surface components.

S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper & Architecture Modeling

Page 2: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 2 (5/24/2021)

6. Then, Offset one or two of the faces to see the panel (or the brick pattern on façade). See the image A below which has the offset faces without thickness. We could use Surface Box (Sbox) to create solid boxes. See GH image A below. S is randomly created surfaces; D should be the domain squre (or the offset surfaces as domain), H is the box height.

7. To make a solid from each group surfaces, Box Rectangle with a value of height could also be used to make boxes. Here, each surface has its rectangle base created by Quad Staggered component. See the image B below.

Images A: results with Offset & Surface Box components.

Image B: results with Box Rectangle. Box Rectangle is to create a box that is defined by a base rectangle and a height. Here, the surface could be used as a surface rectangle. The thickness of the brick could be increased or decreased to make different effects.

Page 3: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 3 (5/24/2021)

Example 2: Creation of truss system by LunchBox functions. Space truss structure 1 – under the structure panel (see the Rhino image on the left side). This function creates a space truss structure on a surface which is a roof surface. U and V default value are both 10 for creating 10 pieces of truss. The output variable of Lines A is the top member of the truss. Lines B is the bottom member of the truss. Web is the supports of the truss and Nodes are connected points.

Space truss structure 2 – under the structure panel (see the right side of image above) This function creates a space truss structure using two surfaces for creation. Surface A is the top face for top member of the truss. Surface B is the bottom face for bottom member of the truss. U and V are local x and y directions. There were two surfaces that determine Srf-A (top surface) and Srf-B (bottom surface). Positions of the two surfaces determine the height dimension of the truss.

Page 4: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 4 (5/24/2021)

Lists of the available LunchBox function for reference.

Example 2: Irregular features on façade and backward thinking: For irregular shape creation, methods are different. Here is the example of modeling an irregular façade through GH.

1. Create the façade first with Surface Creation > Surface from 3 or 4 corner points function in the Front Viewport. This surface plane represents one of the facades.

2. Use Polyline to draw the irregular shape inside this surface.

3. Use split to take the irregular shape away from the surface. 4. Erase the irregular shape away, or simply trim the surface. (These two could be replaced by “Trim” function). 5. ExtrudeCrv > Select the entire curve shapes > In the sub-function area, turn the solid: Yes, Deletinput: Yes,

Extrusion distance: 3. (Extrudesrf could also work.)

Page 5: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 5 (5/24/2021)

Following the methods of modeling in Rhino, the steps of executing the modeling could be converted into algorithms. Here are two versions of algorithms. Executing the backward thinking through GH (Version one): 1. The first algorithm is to apply Extrude Linear (Extrude) component to extrude the shape into 3D solid. The Extrude

Linear component needs the following four inputs.

• P is the profile curve or surface, which is the basic geometry. If it is curve input, then apply curves to construct the shape. If it is surface input, then apply surface tools to create the basic shape. In this example, it is the resulting shape before using “ExtrudeCrv” in the above Rhino modeling.

• Po indicates the orientation plane of the profile shape. • A is the extrusion axis, which could be a drawn line representing the axis. • Ao is the orientation plane for the axis to rest on. • The output of this component is a BREP representation of the geometry.

2. In this Extrude (Linear) component, the profile could take either a curve or a surface input. In this example, the original

shape was created as a surface, so it is assigned to the Surface component for input. If it is a curve, then it might use Geometry as input format. (You could test if the BREP component could serve the input purpose.)

3. For the Po and Ao planes, they are defined and assigned as XZ Plane, because both objects of the Srf (surface) and

Geo (geometry) sit on the XZ planes and shall be extruded out from it. 4. For the extrusion Axis, it could be a drawn line representing the axis and is assigned to the geometry parameter for

serving the input for A component. The second version of backward thinking applied in GH (Version two) to represent the extrusion axis: The geometry of the axis could be represented by a line component, which are defined by two points and controlled by six number sliders of x, y, z coordinates to make the change flexible. The 3D solid of the shape shall be created in either direction determined by positive or negative values. In this second version of the algorithm, the GH components applied for form generations are more completed and robust than version one. This example explains that thinking logic is abstract and Rhino GH components are stepwise implementation. Thinking in form creation could be done by different methods. Bottom line is to use the method that is short and efficient.

Page 6: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 6 (5/24/2021)

Question A: Could the final form created by the “Extrude Linear Component” be baked as Rhino model, saved as BREP geometry component and manipulated further? That relates to the notion of recursion which had been covered in lecture 11. An example is given on the next page. Question B: Could the entire creation of a building be implemented by GH? The answer is yes, but, it is not that efficient. Hybrid of Rhino and GH would be better. See the example below, which is the mixture of Rhino model and the GH components together with utilizing extra components provided by LunchBox plug-in. Example #3 given in the following is the way of creating a building design through the interaction between Rhino & GH. Example 3: The LunchBox plug-in is able to do regular shape generation. For instance, the repetitive window openings in this example were done through “Quad Panels” component to create quadrangular panels on a surface in GH. There is a function of “Path Mapper”, which creates a data tree for the lexical data items. The way to change the lexical data format is executed by Lexer Combo Editor. Click on the icon to open the Lexer Editor. Inside the Editor, type {A;B;C;D} for the source and {A;B;C;D%2=0;D} for the target. The output of Path Mapper will be a part of the data tree input for Simplify Component.

Arc Extrude

Edgesurf + Array Coin, Boolean difference

Page 7: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 7 (5/24/2021)

Offset surface for floor slabs Results

Same method for getting more details Boolean for openings

Page 8: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 8 (5/24/2021)

Coding example:

Question: Could the final baked model be applied again through BREP and manipulated even further? This question relates to the concept of GH recursion versus form recursion, which could be found in the following example. Example 4: Free form manipulation (or modification): The following example is to create a cracked effect for a sculpture, which is shown on the following pictures. The sculpture has been modeled in Rhino as shown in the image on the right. This example is applying a GH algorithm to create the special effects for the Rhino geometry, which could be converted into a Rhino model again. The algorithm is called “BREP Cracking” that could be found on “food4Rhino” Web site. However, it was written in Chinese and discussed by the group. The English translation was not available. Here are the brief explanations of the algorithm applied and explained here for GH exercise reference.

Page 9: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 9 (5/24/2021)

1. The form is the geometry encoded in BREP parameter component in Grasshopper. 2. Through the HoopSnake iteration, edges of each cell are divided (or broken) 13 times to generate cracking effects

along edges. HoopSnake is the recursive function. Its changing data (or Data input) was provided by the BREP Creaking component which was loaded from the Grasshopper User Group. The time for completing the computation is about 5 minutes.

3. The broken edges were joined through Join Curves component to make better results. 4. Finally, the entire form is defined as blue color through Color Swatch and displayed through Custom Preview to

make a cyan color for the object. 5. The final form in Custom Preview could be baked into Rhino as a solid model.

Here is the coding example of the cracking algorithm. Differences between the original image and the created final effects.

Page 10: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 10 (5/24/2021)

Example 6: There are other methods on creating structural components. Create a grid system along surfaces: The geometry outlines are shown in the following pictures. One is the regular flat surface on the left, loft surface in the middle and a sweep surface on the right. Using three GH algorithms, results are the grids on the surfaces waiting for further manipulations.

Figure: The base shapes.

Figure: The algorithm for the flat surface on the left.

Figure: The GH for loft surface in the middle of the picture.

Figure: The algorithm creates the Sweep 2 rail form on the right of the picture.

In GH, other than the system defined grid pattern components, there are other plug-in platforms created for further development of grid paneling or patterning. Paneling Tool is one example which is explained in the following pages.

Page 11: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 11 (5/24/2021)

Copyright ©2021, Chiu-Shui Chan. All Rights Reserved. Rhino and Grasshopper Plug-in Paneling Tools Paneling tools are similar to the LunchBox tools, both are plug-ins. However, “PanelingTools” was created by the Robert McNeel & Associates, that supports creating 2D and 3D paneling solutions from concept to fabrication would have systematic update from time to time (version to version); whereas the LunchBox Tools were created by a third party accepted by Rhino. Paneling tools could be downloaded from the food4Rhino @ https://www.food4rhino.com/app/panelingtools-rhino-and-grasshopper. Tutorial, menu, plus other related information of it could also be found on the same page. Each set of tools has its own characters and usages, but, Paneling Tools have sub-menu, and tool listed that are easy to be found and are applied in more advanced level of form generation. Up to this point of development, LunchBox applies to most of surfaces, Paneling tools always require to have a grid system associated. Installation: Download PanelingTools Installer for Rhino 6. • Make sure you have the latest Rhino 6 SR9 (Windows) • Download and double click on the installer “PanelingTools2018041300.rhi” to install and load both PanelingTools

plugin for 64 and 32 bit Windows and also PTComponentLibrary for Grasshopper. No further action is needed. You should see PanelingTools menu and PanelingTools tab when open Grasshopper.

• Toolbars are also installed in Rhino, but they do not load. When open new session of Rhino, go to "Tools" menu and select "Toolbar Layout..". Select "PanelingTools" from the list and check "PanelingTools" in the toolbar list to add. The tool could be found and loaded through the Options >Toolbar Layout on the Rhino desktop.

For download PanelingTools for Rhino 7 window version. • The download button will open a “Package Manger” window to install the plug-in. • On the manager window, select both “PanelingToos” and “PanelingToolsScripts” and click “Install” button to

download the package and install. • After finishing download, reopen Rhino & GH, the PanelingTools folder are created inside both Rhino and GH.

Paneling Surfaces in Grasshopper: This unit is to create a surface, on which a modular unit adjusts within a modular division to create forms. Such a creation is done by functions in “Paneling Tools”. Applications: These sequences of modeling are quoted from the menu. 1. Create a grid. Create a rectangular paneling grid of points by the “Paneling Tools > Grid Tag > Planar Grid (or type PtPlanar)”. Creating a paneling grid (or called planar grid) results in points that can be manipulated with any GH standard components or any components in the “Grid Utility” tag.

A. Here B is the base point, which is usually defined by the original point of (0.0, 0.0, 0.0). B. The input components of Planar Grid have i and j two parts, where i represents row and j represents column, here

are the details: • Di is the row direction vector (1.0, 0.0, 0.0) as default.

S206E057 -- Lecture 17-2, 5/23/2021, Grasshopper – plug-ins

Page 12: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 12 (5/24/2021)

• Dj is the column direction vector (0.0, 1.0, 0.0) as default. • Si is the floating number of the distance between rows (local value is 1). • Sj is the floating number of the distance between columns (local value is 1). • Ei is the integer number of rows, default is 4. • Ej is the integer number of columns, default is 6.

2. Populate the grid with paneling elements. The Planar Grid component could populate a pattern or modules of curves, surfaces, and polysurfaces. Generating the paneling would create patterns, which could be applied to valid paneling grid of points. The resulting paneling is standard Rhino geometry in the form of curves, surfaces, or meshes. To further process panels (with the Unroll, Offset, Pipe, or Fin commands, for example), other paneling utility components and GH components could be used.

Example 1: In this example, Planar Grid defines a grid system with starting point of (0,0,0) which is the default original point. Circle defines a module of a circle with the original point of (0,0,0) and radius of 1. Morph 2D will morph the circle (pattern curve) to the grid cell. Coding is shown on the left and image of the Rhino model is shown on the right.

Example 2: Apply the previously created circles in the grid, apply offset, move and loft to create cylindrical forms on grid.

Page 13: S206E057 -- Lecture 17-1, 5/25/2021, Rhino 3D, Grasshopper ...

S206E057 – Spring 2021

Page 13 (5/24/2021)

Example 3: Here, “Planar Grid” is to create planar grid one unit distance on both x and y for 50 rows and columns. The grid will put on top of the pixel data stored in an image file kept on the “image sampler”. For the image sampler, we could drag an image file from windows explorer onto a GH canvas in the image sampler. Through PtWeight, points on grids together with dark color (0) and white (1) will show in Rhino.

Data Management and Filtering: Since Grasshopper can manage large amounts of data, being able to sort and filter that data is important. The following is a brief example of how that can be done. (Note: Refer to the Grasshopper Primer on Lists and Data Management for more detailed methods.) Series Definition: Creates a List of numbers. This could also be a divided surface point grid.

• Post-It shows the sequence of numbers. • Note: Numbers always start with 0. 1.0 is the second number.

Shift is used to shift the sequence of numbers by a specified amount. Cull allows you to strip out specified numbers within a list.