Issuu on Google+

A personal Notebook on

GRASSHOPPER

using SR: 0.9.0014


SOMETHING of value During my use of Grasshopper in the office, I had collected a few plug-ins required to do some really interesting functions to simply scripting. Please make sure that you try and download: HoopSnake* Kangaroo LunchBox MeshEdit Weaverbird *I do not use HoopSnake at all in this book, but recrusive scripts are something I will be exploring next!


CONTENTS

Brief Basics Tower Tools 250 Davenport Detroit By Design Structural Elements Facade Explorations Resources


BRIEF B B BASICS | DRAWING VECTORS To keep the size of this notebook small, this introduction is written under the assumption that one has experience with the Grasshopper User Interface, as well as the types of buttons that exist. I am no expert on Grasshopper and am still learning quite a lot every time I open the software, so I see no point trying to lecture about how to manage your lists, sets, data trees, etc. For a real introduction to the software, I suggest using grasshoppper3d.com to get to a full series of tutorials. For those who prefer to learn by duplicating working scripts, with slight explanations to reasoning, I hope that this is useful. The trick to writing your Grasshopper (GH) script is writing it in the mind set that you are drawing translations, then applying those geometry. Speaking out your script is the easiest way to make sure you are arranging buttons correctly. Lets start with a simple example such as an array/copy script. Spoken, one could say “I need this placed along this line ‘x’ times”. In GH, since you must consider drawing all the vectors and planes required to create a copy condition, you would attempt “dividing the line ‘x’ times, so I can draw this at each of those points”. Note that a “Vec2Pt” Button is required to move your object in the array. This goes back to the point that you are not simply drawing blobs at points, but drawing the translation vector between the center point of the first blob to each point along the divided curve.

4


SETS AND LISTS | We can expand on this simple script and discover the concept of storing lists. When we divided the initial curve, the slider determined a variable number of points which created then a list of points. (You can always check your lists and data structures by placing Panel buttons at each respective output.) You can manipulate lists by splitting, merging, weaving, removing, recalling, etc. With good list and data tree management you create seemingly complex definitions. A simple introduction to using lists would be to continue adding on to our basic script of an array copy. Because each point is a part of a list, each geometry is now a part of its own list. Using a List Item button, we can recall a certain item in the list to isolate it to apply transformations. Here we can select one of the curves to extrude.

NOTE || When using Lists, 0 is assigned an item! So when using any sliders with sets and lists, 0 is the first item processed. This is why the slider shows 4, yet we have extruded the 5th element.

EVALUATING FUNCTIONS | The last part to give a brief mention of is the evaluation of functions in Grasshopper. There are a full set of math buttons to allow equations to manage the parametric inputs. You can manually write equations and algorithms for inputs, or can generate them simply with Series or Random buttons. When dealing in mathematical inputs, it is very important for units to be converted through buttons, and all variables are linked correctly to prevent errors in the script. Examples of the math buttons will appear in the scripts throughout the notebook.

5


TOOLS TOWERING OWE WEE This script is an easy way to understand the basics of Grasshopper in a more practical application; the creation of a tower. One way to build a tower, is to start with the base curve sketch. This script shows how to multiply the curve in a vertical direction with the ability to change the floor to ceiling height (F2C Height), and the number of storeys cloning along the path. The addition of a Rotate Plane button can then rotate the base curve against a Series button, which can control the number of incremental rotations, and the angle of rotation between steps. Be sure to remember to convert your generated series of numbers into radians to plug into the Angle input via the use of the Radians button. Alternatively to the first sketch, one can create a tower using set interval curves to loft together. By taking the base geometry and placing it at an evaluated point in the height fo the tower, you can scale, rotate or even place different curves at set points to create a very unique lofted tower. Once a massing is achieved, you can begin to extract plate information from it.

SCRIPT LOGIC || Extracting the center point of the original curve >> copying up a Z vector path (sliders to determine distance and number of storeys) >> extract list length of center point to use as rotational count >> rotate geometry.

6


SCRIPT LOGIC || Original Curve >> Moved along Z axis in only 3 positions >> Scale at an evaluated mid-point >> Rotate and loft using key planes

NOTICE || The Intersection you do might turn red. This typically means that the button is not working, but in this case, it is over working. It is showcasing that your guide rail is providing more opportunities for intersections then what will project and hit the massing. To check if it is legitmately broken, simply bake out the results and check for satisfaction.

SCRIPT LOGIC || Reference Z axis Curve >> Divide length by F2C Height >> Create Plane at points >> Intersect with Massing Brep

Using the Intersect tools (in this case Brep,) you can do much more with your form and still extract information and floor plate shapes. The towers can now travel along a path with the storeys still being set F2C Height. You do not need to fully create the geometry within Grasshopper, but simply reference it in using a Geometry or Brep button to apply the intersection. This division of the reference curve can be manipulated to divide the mass, or alternatively can be used to reference the mass back to it.

SCRIPT LOGIC || Drawing a path curve >> Intersect with Vertical Rule (slider for F2C Height) >> Draw squares at intersection points >> Extrude and cap volumes

7


8


250

9


SECTION 1 | Drawing the Form The Question: Can we see what the form looks like with 12 stories at the North East Corner? This script is significantly less complicated then the amount of wires showcases. It references both vertical curves at each corner point and intersects them with a perpendicular plane along a z-axes curve, which are spaced at a variable ceiling height. Those intersection points create a list along the guiding rails at each corner, which allows you to recall them each individually using the List Item button with the slider. Lastly it takes the end point of the original curve (not restricted to plane) and draws a new curve from there to the called out point: the selected storey height for that corner. The exterior curves are then gathered and dispatched into two lists of interior and exterior for lofting to generate the massing form.

NOTE || The order that you select your Reference Curves, (as well as their Normals) makes a difference into your curve parameter holder. They will be a assigned a number in its respective list, which will become evident when you dispatch interior and exterior curves around the courtyard. If crossing of the lofted surface occurs, check to make sure all normals are aligned and that all curves or picked in order!

10


The construction of this form is rather simply spoken and probably overwired, as a constant use of recalling List Items and drawing simple 2Pt Line buttons were placed create the exterior. Grafting the line intersection against the corner guides rail allows for the “apparent intersection� to work correctly. When it comes to redrawing the corner lines from the end points to the new storey points, flattening the list points creates a new line to be drawn from each respective point to the end point instead of drawing a line from each end point to the first point in the list. The last thing to note about the form construction is the triangular end to the building. Since the South East corner has 3 guiding rails, a manipulation was to cull out the middle rail to complete full interior and extrior shapes. The weave was then used to re-introduce that middle rail so that way the edge of the first curve can loft to the final curve while hitting lofting through the peak middle rail.

SECTION 2 | Sectioning Floor Plates The mass is then sectioned using the similar z axes which was designating the the floor to ceiling height. This is using a Brep/Plane intersection button. These buttons may give off an error message, as the guiding rail is often taller than the form of the building to ensure that the entire building is being sectioned. Since the rail is taller, plane interesections are missing the projection on to the mass, causing the software to say it is providing and incomplete function. These sections curves are then joined and closed by drawing a new curve from the end points of the floor plate lines. This condition of requiring to close the curve seems to be unique to this terraced building in particular for some reason, and may not need to be done to other built forms. Once the floor plates are closed, a Area button was used to extract the area of the floor plate shape, and then previewed in a panel. When you extract area of a list, there will be a list of areas as well. The mass addition button takes the numbers, flattens them and adds them to provide a total area value. Notice that a Cull Item was used to removed one floor plate from the addition of floor area to satisfy the nature of Terrace floor space. The panels display live updates to floor areas as you change the shape of your model, ensuring you maintain a set target goal.

11


SECTION 3 | Lofting Terraces The last part to this parametric massing model was to loft together the terraces a as we play with the corners of the mass. This was to ensure that we would always have a terraced building no matter how many storeys we would like to see at each corner, and then give a more finished looking form for importing into either Revit, or for futher development in Rhino/ 3DS Max.

Using the closing curve from the floor plates, we isolate its end points, and draw a new curve in a Z-direction using a slider to match the floor to ceiling height set at the start of the script. Simply taking that new vertical curves endpoints, we can then draw a new curve directly connecting those two. Since we have done all of this to each floor plate all at once (drawing a new list off an intial list), we can weave those two together in sequence to loft the curves together. Simply toggle the loft options to ‘straight sections’ and the terraces form together. The last button (Brep Join) simply is an attempt to join the lofted terraces back to the interior/ exterior walls, giving a single button to bake out the massing. Now we can bake out any number of iterations of a form with differing heights at each corner of the structure.

Note | A massing series using the parametric script, simple lineweights. The massing can achieve infinite shapes without the plates

12


SECTION 4 | Script Limitations This parametric model was a real learning experience on how to achieve something interactive to answer the initial question of playing around with floor heights at each corner. If we were to only stop at massing then the script worked brilliantly to see all the height variations at the perimeter moments of the courtyard. However with the sectioning technique, we can notice some obvious flaws in how we structured our data tree once we attempt to get a non-linear rise in our building, and even more obvious when we attempted to loft our terraces. The data is all ordered with a vertical nature, with no respect to the motion of the plan. If we were to elevate one corner higher than the next in sequence, then returning to another high point, the joining intersection lines will attempt to join to every floor plate at that height with the shortest connecting path. This makes for messy floor plates that do not sit within the plan. To correct this, we need to determine a new way to order our floor plates so that each plate sits in a sequential order with respect to the plan. This will require some further exploration with this model.

13


144


1 15


POLY LINE ATTRACTOR/DETRACTOR | The polyline attractor places a polygon at a point along a grid, and then scales its size dependant on the distance from a control vector or point. This script in particular was adjusted so that the original grid plane can be orientated to any tilted plane, which was required for its use in the Detroit By Design competition proposal. The last addition was to include the same concept of the scaling function to an extrusion button, so that the geometry will extrude higher the further it is away from the controlling vector. The scripts works so that you input the desired plane angle, and extract the corners using the BrepComponents and List Item buttons. These then draw a new plane to orientate a grid which size is determined by sliders in both the U and V directions (X and Y), as well as cell size. Then draw a controlling vector to determine the path where geometry will be pushed away. The script then measures the distance between all the points on the grid to a closest point on the line, where that distance is then divided by a variable to create the size of the object. That same result can then be put into the limiting extrusion height, but in this case it was also divided one more time to create a slightly small extrusion by a new slider. The Minimum button sets a minimum radius for the geometry, therefore eliminating the geometry that might exist near the controlling path due to the division result being smaller then the minimum size. All the math plugs into a Polygon button which allows you to decide what shape is generate at each point.

16


Note | Detroit By Design submission render. The perforations used to create light wells into both the proposed Windsor Tunnel Customs facility, and shopping district. The perforations were also used as a facade treatement on the update Joe Louis arena in the proposal. Pretty ambitious proposal, but what are idea competitions for anyways?

17


18


19


Standard Truss Construction | Trusses can be drawn by extracting some form of curve which acts as the origin of your truss system, offsetting it a set distance away, and then in filling the curve with an assortment of web styles. Trusses can also be drawn by adding logic that will size members, for example using the length of the span to define the depth of the member. To keep things simple, this script provides a representational structure which can manipulate how many trusses exist, their depth, and their web pattern manipulated via the Weave button. In this example, we started with a curved surface to represent any roof structure and was able to draw some sort of structural representation against it. By inverting the order of how point lists enter a Weave button, you changed the flow of the interpolated curve. Note that the degree (D input) has an integer button. It is set to a value of 1 so that the are angled and not a curved webs.

20


| Space Frame Construction I am hesitant to add this script, as it was created from 2 different structural scripts, which left me with an “old� SubSet button that I have yet to find a clean way to circumvent. The script still operates correctly even with the old button. This script will take your created surface and divide it into sub-surfaces. We use a MD-Slider (Multi-Dimensional) to evaluate the point in the sub-surface which will be connection between trusses. That point is then moved away from the surface using the Amplitude button and the Normal we can extract from evaluating the surface. We then draw a line from each vertex of the exploded sub-surface (the BrepExplode button function) to the new center point. We then join all the lines together and pipe them to a thickness. The sliders function so that we can set how many spans we achieve in both the X and Y direction, as well as the amplitude (the distance we move the space frame away from the guiding surface). The last two sliders operate the thickness of the piping on the finished frame.

21


22


23


| Pattern Facade Studies By using Cull buttons, you can remove items from lists. Using a Cull Pattern Button, you can set multiple “booleans�, or True / False statements to influence what items can be removed from a list. In this study, a planar surface is subdivided, then a rectangle placed at the center point of each subdivided rectangle. The new rectangles make a list, and the cull function removes patterns out of that list. One can see how this could translate to panel systems or glazing systems in terms of aesthetic panelling. Try exchanging Cull Pattern with Cull Nth and attach a slider to roll over iterations. You can also experiment with different shapes, rotations, and ranges to achieve gradients or randomly rotated rectangles.

SCRIPT LOGIC | Surface >> Divide into panels >> Extract Centroid >> Place Rectangle >> Adjust Booleans >> Bake Results

24


Panelling Systems | We can do quick geometric panel systems by either placing preset geometry against a surface, or modeling a editable feature in GH to place against a surface. In this script we can take a surface (generated any way you would like) and subdivide it into panel pieces. These panel pieces are now the base of a Twisted Box morph, and the modular geometry placed and morphed inside if it. Try changing the source geometry to achieve different panel systems. The surface parameter could also be generated parametricly by using loft curves, which will give the ability to edit the surface and have an ever-updating panel system.

SCRIPT LOGIC | Surface >> Divide into panels >> Place Twisted Box >> Reference Geometry >> Morph Geometry >> Bake Results

25


Twisted Ribbon Surface | The Twisted Ribbon Script was found on http://formularch.blogspot.ca/. Full credit for the original script to author Michael Pryor, but has been adapted and analysized for use in Ontario Place massing explorations This script subdivides and ribbons a surface, then allows for a deformation determined by points or external forces along the surface. These points are referenced in independant of the ribbon surface. One can imagine using view planes or feature openings to guide these deformations.

26


27


REFERENCES

Here are some websites, blogs, tuturial series where I grabbed inspiration and knowledge on how to achieve results. Also some provide full scripts so you can duplicate more complicated scripts and continuing learning through application http://www.grasshopper3d.com/ http://formularch.blogspot.ca/ http://www.exlab.org/ http://www.alexhogrefe.com/rhinogh/ There are also countless images under the Grasshopper3D galleries where they often post downloads of their scripts for analyzing. And of course you may always Google/Youtube anything you would ever want to learn.

28


Grasshopper Notebook