Grasshopper for Structures

0/0 steps0/0 exercisesSaved in this browser

Start the course

Grasshopper for structural engineers

39 two-hour sessions, about 9 months at one session a week. You start by placing one slider and finish with design studies that an office like Arup or KKE might hand a new engineer.

  • 39 sessions
  • 2 hours each
  • 27 live examples

The definition beside this note is live. Drag a slider and the truss is rebuilt and solved in your browser. The two boxes marked cluster stand in for about twenty components, which you wire yourself in Sessions 9 and 21.

How to use this course

Every session follows the same order. Work through it from the top, then tick the checklist at the end. Your ticks and answers are saved.

PartWhat you doWhere
IdeaRead one concept, in plain wordsThis page
ExampleFollow a structural example step by stepThis page
Try it hereDrag sliders on a live definition and predict what happensThis page
In RhinoBuild the same thing yourself in GrasshopperYour Mac
PredictAnswer short questions before you check in RhinoThis page
Fix the bugClick the component that causes a broken resultThis page
Build challengeBuild something new, with hints and a hidden solutionYour Mac
ChecklistTick each thing you can now do without lookingThis page

Until Rhino is installed you can still do the reading, the live examples and the Predict and Fix the bug exercises in every session. Open a build challenge's solution only after you have tried it. Japanese terms you will hear at a design office are given in brackets after the English, and collected in the glossary.

The last stage, Projects, works like a small office job. Each project has a brief, a list of what to hand in, and a comparison table (比較検討表) that ranks your options from the numbers you get in Rhino.

Set up

One session to get Rhino running on your Mac and to see the Grasshopper canvas for the first time.

1Install Rhino and meet the canvas

By the end you have Rhino 8 running, the Grasshopper window open, and one red point on screen that you made with a component.

Idea

Rhino is a 3D modeller: you draw points, curves and surfaces at real size. Grasshopper is a second window that comes with Rhino. In it you do not draw. You place components and connect them with wires, and the result appears in Rhino as a red preview. Change a number and everything downstream updates. That chain of components is called a definition.

Two files hold your work: the Rhino model (.3dm) and the Grasshopper definition (.gh). For structural work the definition is the valuable one. It is the rule that makes the geometry, so one definition can produce a hundred variants of a roof.

Example: install on your Mac

  1. Download Rhino 8 for Mac. The evaluation is the full version and runs for 90 days. After that, saving and plug-ins stop until you buy a licence.
  2. A student licence costs ¥39,600 in Japan and is the same program as the commercial one. One licence covers both Mac and Windows, so it moves with you to a Windows PC later. You need proof of student status.
  3. Open Rhino and start a new model from the template Large Objects - Meters. This course works in metres because the analysis plug-in reads coordinates as metres.
  4. Click in the command line, type Grasshopper and press Enter. The canvas opens in its own window.

In Rhino: your first component

  1. Double-click an empty spot on the canvas. A search box appears. Type Construct Point and press Enter.
  2. Look at the Rhino Perspective viewport. A small red point sits at the origin. Red means it is a Grasshopper preview, not a real Rhino object yet.
  3. Double-click the canvas again, type Number Slider, press Enter. Drag from the slider's right edge to the X input of the point.
  4. Drag the slider. The point moves along the red X axis.
What your canvas should look like. Inputs are on the left of a component, outputs on the right, and data flows left to right.

Watch out: units in Japan

Japanese structural drawings are in millimetres, and this course models in metres. Neither is wrong. What matters is that you know which one a file uses before you type a number. Type Units in Rhino to check.

Practice

Predict. You drag the slider wired into the X input of Construct Point. Which way does the red point move in Perspective?

Predict. What does a red object in the Rhino viewport tell you?

Build challenge: Put a point anywhere

Wire three sliders into X, Y and Z of one Construct Point and move the point to (2, 3, 4).

Done when

  • The point sits at x 2, y 3, z 4. Check it by typing EvaluatePt or by reading the three slider values.
  • Each slider moves the point along one axis only.
Hint 1

Every input of Construct Point accepts its own slider. Make three sliders first, then wire one into each input.

Show the solution

Three sliders, one per input. Set them to 2, 3 and 4.

Checklist

Rhino, just enough

Grasshopper produces Rhino geometry, so you need to move around a 3D model and know what a point, a curve and a surface are. Two sessions cover that. You do not need to become a Rhino modeller.

2Move around and draw in 3D

By the end you can orbit, pan and zoom without thinking, and draw a line by typing coordinates.

Idea

Rhino shows four viewports: Top, Front, Right and Perspective. Top looks down the Z axis, so it is your plan (伏図). Front looks along Y, so it is your elevation or frame view (軸組図). Z is up. Double-click a viewport's name to make it fill the window, and again to go back.

You work by typing command names. Type Line, press Enter, then answer the prompts. A point is typed as x,y,z. A point relative to the last one starts with r, so r0,0,3.5 means 3.5 m straight up from where you were.

To do thisMouseTrackpad
Orbit in PerspectiveRight-button dragTwo-finger drag
Pan in PerspectiveShift + right-button dragShift + two-finger drag
Pan in Top, Front, RightRight-button dragTwo-finger drag
ZoomScroll wheelPinch
Fit everything in viewType ZE (Zoom Extents)

If two-finger drag does nothing on your trackpad, open Rhino's settings, go to Trackpad, and turn on Use two fingers to pan and rotate views.

Coming from Jw_cad

In Jw_cadIn Rhino
You draw in 2D on a sheet at a scale (縮尺)You model in 3D at real size. Scale only matters when you print
Commands come from the toolbar and the クロックメニューCommands are typed: Line, Move, Copy
Right-click reads an existing point (読取点)Osnap does it: End, Mid, Int, Perp, switched on at the bottom of the window
Layer groups and layers, 16 by 16One Layers panel with as many named layers as you like
The drawing is the productThe model is the product, and drawings are made from it

In Rhino: a column grid by hand

  1. Maximise the Top viewport. Type Point and enter 0,0,0. Repeat for 6,0,0, 12,0,0, then the same three at Y = 8: 0,8,0, 6,8,0, 12,8,0. That is a grid of 2 bays by 1 bay, 6 m by 8 m.
  2. Type Line, start at 0,0,0, end at r0,0,3.5. You have one column (柱), 3.5 m tall.
  3. Select the line, type Copy, and copy it to the other five points.
  4. Switch to Perspective, orbit around it, then type ZE.

Notice how slow that was for six columns. In Session 8 Grasshopper makes the same grid for any number of bays with five components.

Practice

Predict. The last point you placed is the top of a column at (6, 0, 3.5). You type r0,0,-3.5. Where is the next point?

Predict. You drew a frame in the XZ plane. Which viewport shows it as a framing elevation (軸組図)?

Build challenge: Two storeys by hand

Using only relative coordinates after the first point, draw a two-storey column line: columns at x = 0, 6 and 12 m, storey height 3.5 m, so each column is two lines stacked. Then draw the girders at both floor levels with Osnap.

Done when

  • 6 column lines and 4 girder lines.
  • Every girder end snaps exactly to a column end.
Hint 1

Start Line at 0,0,0, then type r0,0,3.5. Start the next line from that end point with Osnap End.

Hint 2

Draw one bay, select it and use Copy with a relative distance of r6,0,0.

Show the solution
  1. Line from 0,0,0 to r0,0,3.5, then Line from that end to r0,0,3.5.
  2. Select both lines, Copy, base point 0,0,0, targets 6,0,0 and 12,0,0.
  3. Turn on Osnap End and draw the four girders between column ends at z = 3.5 and z = 7.

Checklist

3Objects, units, snaps and layers

By the end you can name the five kinds of geometry Grasshopper passes around, and you know why two nodes half a millimetre apart are a problem.

Idea

Everything Grasshopper makes is one of a few Rhino object types. Each has a structural meaning.

Rhino objectWhat it isWhat it stands for in a structure
PointA position x, y, zA node (節点), a support, a load position
CurveA line, polyline, arc or free curveA member centre line (部材芯): beam, column, brace
SurfaceA smooth sheet with two directions, U and VA slab, wall or shell before meshing
BrepSurfaces joined into a solid or shellA member drawn with its real section
MeshFlat faces joined at verticesShell elements for analysis

A structural model is mostly points and lines. Two members are connected only when their end points are at the same place. Rhino decides "the same place" with the document tolerance, which you see with the Units command. With metres, a tolerance of 0.001 means 1 mm.

In Rhino

  1. Type Units. Confirm the model units are metres and read the absolute tolerance.
  2. Turn on Osnap at the bottom of the window and tick End, Mid and Int. Draw a line (Line) from the top of one column to the top of the next. The cursor should jump to the end point. That is a girder (大梁).
  3. Open the Layers panel (Layer). Make three layers named C, G and Grid, each with its own colour. Select the columns and move them to C, the girders to G, the points to Grid.
  4. Select a girder and turn on the Gumball. Drag the blue arrow to move it in Z. Undo it.

Watch out: nodes that almost touch

If you draw a beam without Osnap and its end lands 0.5 mm from the column top, it looks connected and is not. The analysis sees two separate nodes and the beam hangs in the air. Geometry made by Grasshopper avoids this because both members are built from the same point.

Practice

Predict. Your model is in metres with an absolute tolerance of 0.001. Two beam ends are 0.4 mm apart. How does Rhino treat them?

Predict. Which Rhino object type becomes a shell element in a structural analysis?

Build challenge: A braced bay with tidy layers

Add an X brace (ブレース) to the middle bay of your two-storey frame from the last session, on a new layer named V. Lock the Grid layer so you cannot move the points by accident.

Done when

  • Four brace lines, two per storey, on layer V.
  • Every brace end snaps to a column-girder node.
  • The Grid layer shows a lock icon.
Hint 1

With Osnap End on, draw each diagonal from one corner of the bay to the opposite corner.

Show the solution
  1. In the Layers panel make V and set it current.
  2. Draw the four diagonals with Osnap End.
  3. Click the lock icon next to Grid.

Checklist

First definitions

Three sessions on the mechanics of the canvas: components, wires, sliders and panels. You finish with a portal frame whose span and height are two sliders.

4Components, wires and sliders

By the end you can read any small definition from left to right and say what each box does.

Idea

A component takes data in on the left, does one job, and gives data out on the right. A Number Slider makes a number. A Panel, the yellow note, shows whatever you wire into it. Use panels constantly: when you are not sure what a wire carries, plug it into a panel and read it.

The colour of a component is its status, and this page uses the same code.

ColourMeaning in GrasshopperWhat to do
Light greySolved, no problemsNothing
OrangeWarning. Most often an input has no data yetHover over the small balloon in the corner and read it
RedError. The component could not runRead the balloon. Usually the wrong type of data went in
GreenSelected. Its preview in Rhino turns green tooUse it to find which box makes which geometry

Example: a point and a line

Two sliders set the X and Z of point B. Point A has nothing wired in, so it stays at the origin. Line joins them, Length measures the result, and a panel shows the number.

Try it here

Before you drag: with X = 3 and Z = 4, what will the panel show? Set the sliders and check.

In Rhino

  1. Build the definition above. Find each component by double-clicking the canvas and typing its name.
  2. Double-click the name of a slider to open its settings. Set the range to 0 to 10 and the rounding to one decimal.
  3. Shortcut: double-click the canvas and type 0<6<12. You get a slider from 0 to 12 already set to 6.
  4. To unplug a wire, right-click the input and choose Disconnect. To plug a second wire into the same input, hold Shift while you drag.
ComponentFind it underPorts
Number SliderParams, Inputone output
PanelParams, Inputone input, one output
Construct PointVector, PointX, Y, Z in; Pt out
LineCurve, PrimitiveA, B in; L out
LengthCurve, AnalysisC in; L out

Practice

Predict. Point A is at the origin and point B is at (3, 0, 4). What does the Length panel show?

Predict. A component is orange. Its balloon says an input "failed to collect data". What is the likely cause?

Fix the bug. You drag the Z slider and point B should move up in the Front view, but it moves into the screen instead. Click the component that is wired wrongly.

Build challenge: Measure a brace

A bay is 6 m wide and the storey is 3.5 m high. Build a definition that gives the length of the diagonal brace, with sliders for bay width and storey height.

Done when

  • The panel shows 6.95 for a 6 m by 3.5 m bay.
  • The value updates when you move either slider.
Hint 1

The brace runs from the origin to the point (bay width, 0, storey height).

Show the solution

√(6² + 3.5²) = 6.95 m.

Checklist

5A parametric portal frame

By the end you have a portal frame (門形ラーメン) driven by a span slider and a height slider.

Idea

One slider can feed many inputs. That is the whole point of a parametric model: the span is stored once, and every point that depends on it follows. Here the span L goes to the X of two points and the height H goes to the Z of two points.

Build frames in the XZ plane, which is the Front view. Z is up, and the analysis plug-in applies gravity along Z.

Example

Four points: A at the left base, B at the left top, C at the right top, D at the right base. Polyline joins them in the order you wire them. Explode breaks the polyline back into three separate members, because an analysis needs one line per member. Length then returns three numbers, one per segment.

Try it here

The thick double wire after Explode is how Grasshopper draws a wire that carries a list, here three segments. A thin wire carries a single item.

In Rhino

  1. Place four Construct Point components and two sliders. Wire L and H as in the figure. Leave Y empty on all four.
  2. Place Polyline. Wire A into V, then hold Shift and wire B, C and D into the same input, in that order.
  3. Add Explode and Length, and read the lengths in a panel.
  4. Select everything, press Cmd + G to group it, and type a name on the group: Portal frame geometry.

Watch out: wiring order is list order

When several wires enter one input, the data arrives in the order you connected them. Wire D before C and the polyline crosses itself. If a shape looks wrong, plug the input into a panel and check the order.

Practice

Predict. Span L = 8 m and height H = 4 m. What is the total length of the three portal members?

Predict. You wire the points into Polyline in the order A, B, D, C. What do you see?

Fix the bug. The panel should read 4.00, 8.00 and 4.00. It reads 4.00, 8.94 and 0.00. Click the component that is missing a wire.

Build challenge: A gabled portal (山形ラーメン)

Add a ridge point E at mid-span, raised above the eaves by a rise slider, so the frame has two rafters instead of a flat beam.

Done when

  • Polyline runs A, B, E, C, D and Explode returns 4 members.
  • The ridge stays at mid-span when you change L, and moves up when you change the rise.
Hint 1

The ridge X is L / 2. Its Z is H + rise. Use Division and Addition from Maths, Operators.

Show the solution

Wire L into Division with B = 2 for the ridge X, and H plus rise into the ridge Z. Insert E between B and C in the Polyline input.

Checklist

6Rhino geometry in, baked geometry out

By the end you can bring a curve you drew in Rhino into a definition, and send Grasshopper's result back to Rhino on a layer.

Idea

Data crosses between the two windows in both directions. Going in, a Curve or Point parameter can reference an object in the Rhino model: move the object and the definition updates. Going out, Bake turns the red preview into real Rhino objects. Baked objects are a copy. They do not update when you move a slider afterwards.

At an office the usual pattern is: the architect's roof line or surface comes in by reference, your definition generates the structure on it, and you bake the result when a version is agreed.

Example

A referenced Rhino curve divided into 10 equal parts. The panel lists 11 points, numbered from 0. The coordinates shown are an example and depend on your curve.

In Rhino

  1. In the Front viewport, draw a gentle roof line about 24 m long with Curve.
  2. In Grasshopper place a Curve parameter (Params, Geometry). Right-click it, choose Set one Curve, and click your roof line.
  3. Wire it into Divide Curve (Curve, Division) with a slider on N. Red points appear along the line.
  4. In Rhino, drag a control point of the roof line (turn them on with PointsOn). The points follow.
  5. Right-click Divide Curve, choose Bake, pick a layer, and confirm. The points are now real Rhino points.
  6. Right-click the Curve parameter and choose Internalise data. The curve now lives inside the .gh file and no longer needs the Rhino object.

Keep definitions readable from the first day: inputs on the left, logic in the middle, results on the right, every stage in a named group. Double-click a wire to add a Relay when a long wire needs a bend. A colleague should be able to follow it without you.

Practice

Predict. You bake the divided points, then move the count slider. What happens to the baked points?

Predict. You internalise the referenced roof curve, then delete the curve in Rhino. What happens to the definition?

Build challenge: Columns along a curved wall

Draw a curved wall line in the Top view. Place a 3.5 m column every 6 m along it, measured along the curve, and bake the columns to layer C.

Done when

  • Moving a control point of the wall line moves the columns.
  • The columns are 6 m apart along the curve and 3.5 m tall.
  • Baked lines sit on layer C.
Hint 1

Divide Length (Curve, Division) places points at a fixed distance along a curve.

Hint 2

Line SDL (Curve, Primitive) draws a line from a start point, a direction and a length. Use Unit Z for the direction.

Show the solution
  1. Curve parameter, Set one Curve, pick the wall line.
  2. Divide Length with L = 6.
  3. Line SDL: S = the points, D = Unit Z, L = 3.5.
  4. Right-click Line SDL, Bake, choose layer C.

Checklist

Lists

A structure is repetition: columns on a grid, panels in a truss, floors in a frame. In Grasshopper repetition means lists. These three sessions are where the tool starts saving you time.

7Making and reading lists

By the end you can generate a row of evenly spaced points and pick any one of them by its index.

Idea

A list is an ordered set of items, numbered from 0. Most components do not care whether they receive one item or fifty. Give Construct Point a list of four X values and it makes four points. You never write a loop.

Series is the list maker you will use most: a start value S, a step N and a count C. For column lines at 6 m centres, that is start 0, step 6, count 4, which gives 0, 6, 12, 18.

Try it here

The number above each point is its index. A panel shows the index in the left column. With 4 points the last index is 3, not 4.

Example: components for working on a list

ComponentFind it underWhat it does
SeriesSets, SequenceStart, step, count
RangeSets, SequenceSplits a domain into N steps, so N + 1 values
List ItemSets, ListReturns the item at index i
List LengthSets, ListHow many items
Reverse ListSets, ListLast becomes first
Shift ListSets, ListSlides the items along by S places
Cull PatternSets, SequenceKeeps or drops items by a repeating true, false pattern
DispatchSets, ListSorts items into two lists by a pattern

In Rhino

  1. Build Series into Construct Point as in the figure, and read the points in a panel.
  2. Add List Item. Wire the points into L and a slider into i. One point turns up as its output. Select List Item to see it highlighted green in Rhino.
  3. Set i to 5 with only 4 points. List Item quietly returns index 1, the second point, because its Wrap input W is True by default and the index wraps round. Wire a Boolean Toggle set to False into W and set i to 5 again: now List Item returns nothing, which is easier to notice.
  4. Add Cull Pattern with a panel containing True and False on two lines wired into P. Every second point disappears.
Check yourself: Range from 0 to 24 with N = 4 gives how many values?

Five: 0, 6, 12, 18, 24. N is the number of steps, and a span cut into 4 steps has 5 ends. Series counts items, Range counts gaps. Mixing them up gives you one node too many or too few.

Practice

Predict. Series with start 0, step 6 and count 4. What is the last value?

Predict. List Item gets a list of 4 points and i = 5, with its Wrap input left at the default. What comes out?

Predict. Cull Pattern gets 7 items and the pattern True, False. How many items are left?

Fix the bug. You need 5 column lines between 0 and 24 m. The panel lists 6 points. Click the component that needs to change.

Build challenge: Columns and wind posts

Make 9 points along X at 3 m spacing. Every other point gets a 4 m main column; the points between get 3 m wind posts (間柱).

Done when

  • Two separate lists: 5 columns and 4 posts.
  • Columns are 4 m tall and posts 3 m tall.
Hint 1

Dispatch (Sets, List) splits a list in two with a true, false pattern.

Show the solution

Dispatch sends items 0, 2, 4, 6 and 8 to A and the rest to B. Draw each list with Line SDL using Unit Z and its own length.

Checklist

8Data matching

By the end you can predict what a component does when its inputs are lists of different lengths. This one rule explains most surprises in Grasshopper.

Idea

Suppose X receives 4 values and Y receives 3. Which X goes with which Y? Grasshopper has three answers.

RuleWhat happens4 and 3 items give
Longest List (the default)Pair item by item. When the short list runs out, reuse its last item4 results
Shortest ListPair item by item. Stop when the short list runs out3 results
Cross ReferencePair every item with every item12 results

Longest List is built into every component. For the other two you place a Shortest List or Cross Reference component (both under Sets, List) in front of the inputs.

Example: the column grid

You want a column at every crossing of 4 grid lines in X and 3 in Y (通り芯). Wire the two Series straight into Construct Point and you get 4 points on a diagonal, because of Longest List. Put Cross Reference in between and you get the 12 you wanted.

Try it here

Dashed rings mark every grid crossing. Solid points are what the definition actually makes. Change the rule in the dark box.

In Rhino

  1. Make two Series: step 6 with count 4, and step 8 with count 3.
  2. Wire them straight into X and Y of Construct Point. Count the points.
  3. Insert Cross Reference between them. Count again.
  4. Add a third Series for Z with step 3.5 and count 2, then zoom in on Cross Reference until a small plus sign appears, and click it to add a third input. You now have the node grid of a one-storey frame.

Watch out: the silent repeat

Longest List never warns you. The component stays grey and the result looks plausible. Whenever a result has the wrong number of items, compare the lengths of the lists going in.

Practice

Predict. X receives 5 values and Y receives 2. With the default matching, how many points does Construct Point make?

Predict. The same 5 and 2 values pass through Cross Reference first. How many points now?

Fix the bug. The grid should have 12 column points, 4 by 3, but List Length says 4. Click the component whose inputs need a different matching rule.

Build challenge: A three-storey column grid

Build every node of a frame with 4 bays in X at 6 m, 3 bays in Y at 8 m and 3 storeys at 3.5 m. Then draw a column from every ground node up to the roof.

Done when

  • 5 × 4 × 4 = 80 nodes.
  • 20 columns, each 10.5 m tall.
  • Changing a bay count slider updates everything.
Hint 1

Zoom in on Cross Reference until a plus sign appears, then add a third input.

Hint 2

For the columns you only need the ground nodes. Cross Reference X and Y on their own gives those.

Show the solution
  1. Three Series: step 6 count 5, step 8 count 4, step 3.5 count 4.
  2. Cross Reference with three inputs into Construct Point for the nodes.
  3. A second Cross Reference with X and Y only for the ground nodes, then Line SDL with Unit Z and length 10.5.

Checklist

9A truss from two lists

By the end you have a parallel-chord truss (平行弦トラス) built from lists, and you know the trick that connects node i to node i + 1.

Idea

A truss is two rows of nodes and four sets of lines between them: bottom chord (下弦材), top chord (上弦材), verticals (束材) and diagonals (斜材). Each set is one Line component fed with two lists.

  • Verticals: bottom node i to top node i. Same index, so wire the two lists straight in.
  • Chords: node i to node i + 1 in the same row.
  • Diagonals: bottom node i to top node i + 1.

"i + 1" is what Shift List does. It slides a list along by S places, so item 1 moves to position 0, item 2 to position 1, and so on. Pair the original list with the shifted one and each node meets its neighbour.

Try it here

Six bottom nodes and six top nodes, numbered 0 to 5. Find the two settings that give clean diagonals and clean chord segments.

Example: the full truss

  1. Bottom nodes: Series (start 0, step L / n, count n + 1) into the X of Construct Point.
  2. Top nodes: Move the bottom nodes by a Unit Z vector with the depth H as its factor.
  3. Verticals: Line with A = bottom, B = top.
  4. Bottom chord: Line with A = bottom, B = bottom through Shift List (S = 1, Wrap = False), with Shortest List in front.
  5. Top chord: the same with the top nodes.
  6. Diagonals: Line with A = bottom, B = top through Shift List, again with Shortest List.

That gives diagonals that all lean the same way. For a Pratt truss they must run down towards midspan in both halves, mirrored at the centre. Split the node lists at midspan with Split List, build each half, and shift the bottom list in one half and the top list in the other.

Watch out: Wrap is on by default

Shift List has a Wrap input that is True unless you change it. With Wrap on, the item pushed off the front returns at the back, and your last node gets connected to the first. Set it to False with a Boolean Toggle.

In Rhino

  1. Build the six steps above with three sliders: span L, depth H and panels n. Use Division for L / n and Addition for n + 1.
  2. Check the member count in a panel. A truss with n panels has 4n + 1 members.
  3. Group each member set and name it. You will need them separately when you assign sections.

Practice

Predict. Shift List gets the list 0, 1, 2, 3, 4, 5 with S = 1 and Wrap = False. What comes out?

Predict. How many members does a parallel-chord truss with 8 panels have?

Fix the bug. The bottom chord of 6 nodes should have 5 segments. You get 6, and one runs from the last node back to the first. Click the component to change.

Build challenge: Pratt or Howe from one switch

Add a Boolean Toggle to your truss that flips every diagonal, so the same definition draws a Pratt truss or a Howe truss.

Done when

  • True draws the Pratt diagonals, False the Howe diagonals.
  • The member count stays 4n + 1.
Hint 1

Build both sets of diagonals, then choose one with Stream Filter (Sets, Tree). Its G input picks which stream passes.

Show the solution
  1. Pratt diagonals: Line from the bottom nodes to the shifted top nodes in the left half, mirrored in the right half, as in the session.
  2. Howe diagonals: the same with top and bottom swapped.
  3. Stream Filter with the Howe set in input 0 and the Pratt set in input 1. Wire the Boolean Toggle into G: True is read as 1 and picks the Pratt set, False is read as 0 and picks the Howe set.

Checklist

Data trees

A list handles one row of things. A building has rows of rows: nodes per floor, beams per bay per floor. Grasshopper stores those as a tree. Trees are the hardest idea in the course and the one that separates people who can use Grasshopper at work from people who cannot.

10What a tree is

By the end you can read a tree's structure in a Param Viewer and say how many branches it has and how long each one is.

Idea

A data tree (データツリー) is a set of lists. Each list is a branch, and each branch has an address called a path, written in curly brackets: {0}, {1}, {0;2}. A plain list is a tree with one branch, {0}.

Trees appear on their own. Give Divide Curve three curves and ask for 4 segments each. It returns 15 points, and it keeps them in three branches of 5 so you still know which point belongs to which curve.

Example

Three curves in, three branches out. The dashed wire is how Grasshopper draws a wire that carries a tree. Double-click a Param Viewer to switch between this text view and a diagram.
{0;0}   N = 5     points on curve 0
  0  point
  1  point
  2  point
  3  point
  4  point
{0;1}   N = 5     points on curve 1
{0;2}   N = 5     points on curve 2

Read a path from the right. The last number is the newest level: here it is the index of the curve. The 0 in front is left over from the input list. Simplify Tree removes the part all paths share, which turns these into {0}, {1}, {2}. The live examples on this page show simplified paths.

The rule that makes trees useful: a component runs once per branch. Polyline given this tree draws three polylines, one through each branch.

In Rhino

  1. Draw three separate lines in Rhino. Reference all three in one Curve parameter with Set Multiple Curves.
  2. Wire it into Divide Curve with N = 4, then wire the P output into a Param Viewer (Params, Util) and into a panel.
  3. Read the paths. Then right-click the P output, choose Simplify, and read them again.
  4. Wire P into Polyline. Count the polylines.

Practice

Predict. Divide Curve gets 4 curves and N = 5. What is the shape of its point output?

Predict. Polyline gets a tree of 3 branches with 4 points each. How many polylines are drawn?

Build challenge: The first point of every floor

Draw three horizontal lines at z = 0, 3.5 and 7 m. Divide each into 4 segments, then pick the first point of every line and join those points into a column line.

Done when

  • List Item with i = 0 returns 3 points, one per branch.
  • A single vertical polyline joins them.
Hint 1

List Item works inside every branch at once. You will get one item per branch.

Hint 2

The three single items are still in three branches. Flatten before Polyline, or Polyline will have nothing to join.

Show the solution
  1. Divide Curve on the three lines, N = 4.
  2. List Item with i = 0.
  3. Flatten the List Item output (right-click, Flatten), then Polyline.

Checklist

11Flatten, Graft and Flip Matrix

By the end you can reshape a tree on purpose, and recognise the two classic mistakes when you see them.

Idea

OperationWhat it doesTypical use
FlattenPours every branch into one listCounting, or sending all members to the analysis at once
GraftGives every item its own branchMaking a component treat each item separately
SimplifyRemoves the shared part of the pathsTidying paths so two trees can match
Flip MatrixSwaps rows and columnsTurning "by floor" into "by column line"

All four exist as components under Sets, Tree. Flatten, Graft and Simplify are also one right-click away on any input or output, and a small icon appears on the port when one is active.

Try it here

The points are stored one branch per floor. Change the operation in the dark box and watch three things: the Param Viewer, the wire style, and what Polyline draws.

In Rhino

  1. Build a grid of points with one branch per floor. The quickest way is in the next session. For now, use your three divided curves from Session 10 as the three floors.
  2. Wire the points into Polyline four times, each through a different operation, and compare.
  3. With Flip Matrix, check the Param Viewer before and after: the number of branches and the length of each branch swap places.

Watch out: Flip Matrix needs a full rectangle

Flip Matrix expects every branch to have the same number of items. If one floor has a column missing, the rows no longer line up, and the result is not what you expect. Check branch lengths in a Param Viewer first.

Practice

Predict. A tree has branches {0}, {1} and {2} with 4 items each. What does Flatten give?

Predict. The same tree goes through Flip Matrix. What comes out?

Fix the bug. You expected three beam lines, one per floor, and got one zigzag line through every point. Click the component to remove.

Build challenge: Beams and columns in two colours

From a tree of nodes with one branch per floor, draw the beams in one colour and the columns in another.

Done when

  • Beams: one polyline per floor.
  • Columns: one polyline per grid line.
  • Two Custom Preview colours.
Hint 1

Columns need the same node from every floor in one branch. Which tree operation gives that?

Show the solution
  1. Polyline straight from the node tree for the beams.
  2. Flip Matrix, then Polyline, for the columns.
  3. Custom Preview (Display, Preview) on each, with a Colour Swatch.

Checklist

12A multi-storey frame, organised by floor

By the end you have a frame for any number of storeys and bays, with beams stored by floor and columns stored by grid line.

Idea

Grafting one input is how you build a tree deliberately. Give Construct Point a plain list of X values and a grafted list of Z values. Each Z sits alone in its own branch, so the component runs once per level, and each run pairs that one Z with the whole X list. Out comes one branch of nodes per level.

Example

Four X values and four grafted Z values give four branches of four nodes: ground plus three floors. The Series count is bays + 1 and storeys + 1.
  1. Nodes by level: as in the figure.
  2. Beams (梁): within each branch, Line from the nodes to the same nodes through Shift List, with Shortest List. Because a component runs once per branch, one Line component draws the beams of every floor. Remove the ground branch first with Tree Branch or by starting the Z series at the first floor.
  3. Columns (柱): Flip Matrix on the nodes, so each branch is one grid line from bottom to top. Then the same Shift List trick draws every column.

The output is two trees. Beams are grouped by floor, columns by grid line. That grouping is what lets you say "floors 1 to 3 get H-400, floors 4 to 6 get H-350" later.

Try it here

Tree Branch pulls one branch out by its path. Switch between the two trees and step through the branches.

In Rhino

  1. Build the frame with four sliders: storeys, bays, storey height (階高) and bay width (スパン).
  2. Put a Param Viewer on the beams and on the columns. Confirm the branch counts match the live example.
  3. Use Tree Branch with path {0} to isolate the first-floor beams, and give them a different preview colour with Custom Preview.

Practice

Predict. Construct Point gets 5 X values as a plain list and 4 Z values grafted. What is the output?

Predict. A floor has 4 nodes. Line from the nodes to the same nodes shifted by 1, with Shortest List. How many beams?

Fix the bug. You wanted one branch of nodes per level, 4 levels of 4 nodes. The Param Viewer shows one branch of 4 points on a diagonal. Click the component whose output needs grafting.

Build challenge: An X brace in one bay on every floor

Add X braces to the middle bay of every storey of your frame, using the node tree and no manual picking.

Done when

  • Two braces per storey in the chosen bay.
  • Changing the storey count keeps the braces in that bay.
Hint 1

Flip Matrix gives one branch per grid line, with nodes from bottom to top.

Hint 2

Tree Branch with paths {j} and {j + 1} gives two neighbouring grid lines. A brace runs from node i on one line to node i + 1 on the other.

Show the solution
  1. Flip Matrix on the nodes. Tree Branch with {1} and {2} for the middle bay of a 3-bay frame.
  2. Brace 1: Line from line {1} to line {2} shifted by 1 (Shift List, Wrap False, Shortest List).
  3. Brace 2: the same with the two lines swapped.

Checklist

Geometry for structures

Frames on a grid only need points and lines. Roofs, arches and shells need curves and surfaces. Three sessions give you the geometry a structural engineer is usually asked to generate.

13Curves and how to divide them

By the end you can place nodes along any curve and you know what "equal division" really means.

Idea

Every curve has a parameter, t, that runs from its start to its end, a little like a kilometre post along a road. Evaluate Curve returns the point at a given t. Right-click a curve input and choose Reparameterize to make t run from 0 to 1, so 0.5 is roughly the middle.

For structures the workhorse is Divide Curve. It cuts a curve into N pieces of equal length along the curve and returns N + 1 points. On a straight chord that means equal spacing. On an arch it does not: the points are evenly spaced along the arc, so their spacing on plan is uneven.

Try it here

An arch with hangers down to a deck. Raise the rise and compare the last line of the readout: the hangers near the supports land closer together on the deck.
ComponentFind it underWhat it gives you
Arc 3PtCurve, PrimitiveA circular arc through three points
InterpolateCurve, SplineA smooth curve through a list of points
Divide CurveCurve, DivisionN + 1 points at equal length along the curve
Evaluate CurveCurve, AnalysisThe point and tangent at parameter t
End PointsCurve, AnalysisStart and end, for placing supports
ExpressionMaths, ScriptA formula you type, applied to every item

In Rhino: a parabolic arch

A parabola carries uniform load in pure compression, which is why arch bridges use it. Its shape is z = 4 f x (L − x) / L².

  1. Make the x values with Range: domain 0 to L, 20 steps.
  2. Place Expression. Zoom in on it to add inputs and name them x, L and f. Double-click it and type 4*f*x*(L-x)/L^2.
  3. Send x and the result into the X and Z of Construct Point, then the points into Interpolate.
  4. Divide the arch with Divide Curve. For hangers at equal spacing on the deck instead, divide the deck line and send those x values through the same Expression.

Practice

Predict. Divide Curve on an arch with N = 8. How many points come out?

Predict. The Expression is 4*f*x*(L-x)/L^2. What does it return at x = L / 2?

Fix the bug. The brief asks for hangers at equal spacing along the deck. Your hangers are vertical but bunch up near the supports. Click the component that needs a different input.

Build challenge: A tied arch

Build a tied arch: a parabolic arch, a straight tie at deck level, and vertical hangers at equal spacing along the deck, with sliders for span, rise and hanger count.

Done when

  • Hangers are vertical and equally spaced on the deck.
  • Every hanger top lies exactly on the arch.
Hint 1

Divide the deck line, then compute each hanger's height with the parabola Expression.

Show the solution
  1. Deck: Line from (0, 0, 0) to (L, 0, 0). Divide Curve, N = hanger count + 1.
  2. Deconstruct Point gives x; Expression 4*f*x*(L-x)/L^2 gives z.
  3. Construct Point (x, 0, z) for the arch nodes; Interpolate for the arch; Line from deck points to arch nodes for the hangers. Cull the first and last pair.

Checklist

14Vectors and moving things

By the end you can copy a truss along a building to make a roof, with every truss kept in its own branch.

Idea

A vector is a direction with a length. Unit X, Unit Y and Unit Z make a vector along an axis, and their input F sets its length. Move shifts geometry by a vector. Loads are vectors too: a 10 kN load downwards is the vector (0, 0, −10).

Move with one truss and a list of vectors is where lists and trees meet. The truss is a list of lines. The vectors are a list as well. Wire them in plainly and Longest List pairs line 0 with vector 0, line 1 with vector 1, and tears the truss apart. Graft the vectors and each one runs separately against the whole truss.

Try it here

Graft is a right-click option on the T input of Move. It is shown here as a toggle so you can switch it. Turn it off once to see the mistake.
ComponentFind it underPorts
Unit X, Unit Y, Unit ZVector, VectorF in; V out
Vector 2PtVector, VectorA, B in; V and length out
AmplitudeVector, VectorSets the length of a vector
MoveTransform, EuclideanG, T in; G out
Mirror, RotateTransform, EuclideanGeometry and a plane or angle

In Rhino

  1. Take your truss from Session 9 and merge its four member sets into one list with Merge.
  2. Build Series into Unit Y into the T input of Move, as in the figure. Right-click T and choose Graft.
  3. Check with a Param Viewer: one branch per truss.
  4. Add purlins (母屋). Move the top chord nodes the same way, then use Flip Matrix so each branch holds the same node on every truss, and run Polyline.

Practice

Predict. Unit Z with F = −10. What vector comes out?

Predict. Move gets a truss of 17 lines and 4 grafted vectors. What is the output?

Fix the bug. You wanted 4 copies of a 17-member truss. You got 17 lines scattered over 4 positions. Click the component with the port that needs Graft.

Build challenge: Trusses on a falling roof

Copy your truss 7 times along Y at 6 m, with each truss 50 mm lower than the one before, for a roof that falls towards one end.

Done when

  • 7 trusses, one branch each.
  • The last truss is 0.30 m below the first.
Hint 1

Vector XYZ (Vector, Vector) builds a vector from three numbers. Y is the spacing series and Z is the series times −0.05 / 6.

Show the solution

Use the Series index for the drop: multiply the Y distances by −0.05 / 6 so each 6 m step drops 50 mm. Graft the vectors into Move.

Checklist

15Surfaces and grids on them

By the end you can turn a roof surface into a grid of members, including a diagrid.

Idea

A surface has two directions, called U and V, the way a curve has one parameter t. Divide Surface returns a grid of points on it as a tree: one branch per U position, each holding the points along V. From there it is the list work you already know.

  • Lines along V: within each branch, node j to node j + 1.
  • Lines along U: Flip Matrix first, then the same.
  • Diagrid: connect node (i, j) to node (i + 1, j + 1), and node (i + 1, j) to node (i, j + 1). That is one branch shifted against the next.

Try it here

A barrel roof: an arc extruded along Y, then divided. Switch the member pattern and watch the member count.

In Rhino

  1. Build the arc from Session 13 and extrude it with Extrude (Surface, Freeform) along a Unit Y vector.
  2. Add Divide Surface (Surface, Util) with sliders on U and V. Put a Param Viewer on P.
  3. Draw the V lines and the U lines as two separate groups.
  4. For the diagrid, pair each branch with the next one. Shift Paths or Relative Item (both under Sets, Tree) can do it. The simpler route to start with is Flip Matrix, then Shift List inside each branch.

When the surface comes from an architect it will not be a neat extrusion. Reference it from Rhino as in Session 6 and the rest of the definition stays the same.

Practice

Predict. Divide Surface with U = 6 and V = 4. How many points, and in how many branches?

Predict. A diagrid on a grid of 6 by 4 cells. How many members?

Build challenge: Edge beams for the barrel roof

On your barrel roof, add edge beams along the two long edges, separate from the other ribs, so they can get a heavier section later.

Done when

  • The edge beams are their own output, two curves.
  • Changing U or V keeps them on the edges.
Hint 1

The first and last branch of the Divide Surface tree are the two edges.

Show the solution
  1. Check in a Param Viewer which way your branches run. If each branch is a line of points along the long edge, Tree Branch with the first and last path gives the two edges.
  2. If the branches run across the roof instead, use Flip Matrix first.
  3. Polyline through each edge branch.

Checklist

Design with data

Architects use Grasshopper to shape buildings with numbers: floors that grow and shrink, openings that open towards a view, towers that twist. A structural engineer at an office like Arup sits next to that work every day. These four sessions teach the same tools, and each one ends with the question an engineer would ask.

16Domains, Remap and Graph Mapper

By the end you can turn any list of numbers into the range you need, and shape how a value changes from bottom to top with a curve.

Idea

A domain is a range of numbers, written 0 To 24 in Grasshopper. Bounds finds the domain of a list: the smallest and the largest value. Remap Numbers moves values from one domain to another and keeps their proportions. A value 30% of the way through the source domain lands 30% of the way through the target.

Graph Mapper bends numbers between 0 and 1 along a curve that you choose and can edit by dragging its grips. Put the three together and you get the most common pattern in design work:

  1. Take an index, such as the floor number: 0, 1, 2 and up.
  2. Remap it to 0 To 1 with Bounds as the source.
  3. Shape it with Graph Mapper.
  4. Remap it again to the real design range, such as a plate scale from 0.7 to 1.2.

The same pattern sets a beam's depth along its span, the camber of a truss (キャンバー), or the size of members up a tower.

Try it here

The left box is the graph, the right is the tower. Each dot on the graph is one floor. The graph shapes here imitate Graph Mapper's types; in Rhino you can also drag the grips to make your own.

In Rhino

  1. Series with step 1 and count 20 for the floor numbers. Multiplication by 4 gives the floor heights.
  2. Bounds (Maths, Domain) on the floor numbers, into the S input of Remap Numbers (Maths, Domain). Leave T at its default, 0 To 1.
  3. Graph Mapper (Params, Input). Right-click it and pick a graph type. Wire the remapped values in.
  4. Construct Domain (Maths, Domain) from two sliders, 0.7 and 1.2, into the T input of a second Remap Numbers.
  5. Floor plates: XY Plane (Vector, Plane) with origins at (0, 0, height), then Rectangle (Curve, Primitive) on each plane with its X and Y inputs set to the domain -15 To 15, so each 30 m square is centred on its plane.
  6. Scale (Transform, Affine) each rectangle about its plane origin by the factor. Then Loft (Surface, Freeform) through all of them for the skin.

Watch out: Graph Mapper expects 0 to 1

A Graph Mapper's graph is drawn for inputs from 0 to 1 unless you change its domain. Feed it floor numbers 0 to 19 directly and almost everything falls off the graph. Always remap first.

Practice

Predict. Remap Numbers gets the value 6, source 0 To 10 and target 100 To 200. What comes out?

Predict. What does Bounds return for the list 3, 9, 1, 7?

Predict. Graph Mapper is set to Linear. What does it do to the values?

Fix the bug. Remap Numbers should turn the floor numbers 0 to 19 into 0 to 1, but the panel stops at 0.25. Click the component that is fed the wrong list.

Build challenge: A haunched beam (ハンチ)

Draw the bottom edge of a 12 m steel beam that is 600 mm deep at both supports and 400 mm deep across the middle, with a smooth change between. Use Graph Mapper for the shape and sliders for both depths.

Done when

  • The depth is 0.6 m at both ends and 0.4 m at mid-span.
  • Changing the graph type changes the shape of the haunch, but never the end depths.
Hint 1

Divide the beam line into points, remap their x positions to 0 To 1, then shape them with a Parabola graph.

Hint 2

The Parabola graph gives 0 at both ends and 1 in the middle. Remap that to the target 0.6 To 0.4, so 0 becomes 0.6 and 1 becomes 0.4.

Show the solution
  1. Divide Curve on the beam line, N = 24. Deconstruct Point for x.
  2. Remap x with Bounds as source, into Graph Mapper set to Parabola.
  3. Remap the result with target 0.6 To 0.4 (Construct Domain with A = 0.6, B = 0.4).
  4. Construct Point (x, 0, −depth) and Interpolate for the bottom edge.

Checklist

17An attractor point on a facade

By the end you can drive a facade pattern from a point, and cut the number of different panels without losing the pattern.

Idea

An attractor is a point that changes things according to their distance from it. Measure the distance from every panel centre to the point, remap those distances, and use the result as the opening size. Openings grow towards a view or shrink towards a neighbour.

The design question that follows always reaches the engineer and the contractor: if every panel is different, every panel is a separate drawing and a separate mould. Rationalising means rounding the sizes into a few types (パネルの種類). Five types can keep the look of a smooth pattern at a fraction of the cost.

Example

  1. Panels: a facade surface into Divide Domain² (Maths, Domain) and Isotrim (Surface, Util). Each panel is a small surface.
  2. Centres: Area (Surface, Analysis) returns the centroid of each panel.
  3. Distance (Vector, Point) from each centroid to the attractor.
  4. Bounds and Remap Numbers turn the distances into opening factors, for example from 0.85 near the point to 0.15 far away.
  5. Scale each panel about its centroid by its factor. That scaled panel is the opening.

Try it here

Drag the green point, or use the Point X and Point Z sliders. Then set Panel types to 4 and watch the number of different opening sizes drop while the pattern stays readable.

In Rhino

  1. Draw a 30 m by 12 m rectangle in the Front view and make a surface from it with PlanarSrf. Reference it in a Surface parameter.
  2. Build the five steps above. Reference a Rhino point as the attractor, so you can drag it with the Gumball.
  3. To rationalise, insert four components between the two Remaps: remap to 0 To 1, multiply by (types − 1), Round (Maths, Util), divide by (types − 1), then remap to your real range.
  4. Count the different sizes: Create Set (Sets, Sets) keeps one copy of each value; List Length counts them.

Practice

Predict. An opening factor of 0.5 scales a 2 m by 3 m panel about its centre. What is the opening area?

Predict. You rationalise into 3 types between 0.2 and 0.8. Which factors can a panel have?

Fix the bug. The openings come out many times larger than the panels. Click the component that receives the wrong numbers.

Build challenge: Two attractors

Add a second attractor point. Each opening should respond to whichever point is nearer.

Done when

  • Openings grow near either point.
  • Moving one point changes only the panels nearer to it.
Hint 1

Measure the distance to each point, then keep the smaller of the two for every panel.

Show the solution
  1. Two Distance components, one per attractor.
  2. Minimum (Maths, Util) of the two distance lists, item by item.
  3. The rest is unchanged: Bounds, Remap, Scale. A Point parameter can also hold several points; then use Closest Point (Vector, Point), whose D output is the distance to the nearest one.

Above: the rounding chain for panel types, for reference. Remap to 0 To 1, multiply, round, divide, then remap to your range before Scale.

Checklist

18A twisting tower and its diagrid

By the end you can build a twisting, tapering tower, wrap it in a diagrid, and say what the twist does to its columns.

Idea

A tower is a list of floor plates. Give each floor an angle and a scale and the whole form follows. Graph Mapper decides how the twist is shared: evenly, mostly at the top, or slowly at both ends.

For the engineer, a twist means that a column following the corners leans, and a leaning column pushes sideways at every floor. A diagrid (ダイアグリッド) avoids that: diagonal members in a triangulated net carry both gravity and wind or earthquake load. Towers such as 30 St Mary Axe in London, engineered by Arup, use one.

Try it here

Switch Skin between floor plates and diagrid. With plates, watch the corner lines lean more as you add twist. The diagrid nodes are on every second floor.

In Rhino

  1. Floor plates as in Session 16: planes at each floor height and a 30 m square on each.
  2. Angles: remap the floor numbers to 0 To 1, Graph Mapper, then multiply by the total twist in degrees.
  3. Rotate (Transform, Euclidean) each plate about its own plane. Its A input expects radians: convert with Radians (Maths, Trigonometry), or right-click A and choose Degrees.
  4. Taper: Scale each plate about its centre with a factor that runs from 1 at the base to your top scale.
  5. Diagrid: Divide Curve on every second plate gives the nodes, one branch per level. Connect node j on one level to nodes j and j + 1 on the next with Shift List. On every second level, shift the division by half a spacing so the diagonals cross between floors.

Watch out: degrees and radians

Grasshopper's angle inputs work in radians unless you tell them otherwise. A twist of 90 typed as radians is about 14 full turns. If your tower looks like a spring, check the angle input first.

Practice

Predict. A 40-floor tower twists 120° in total with a Linear graph. How much does each floor rotate relative to the one below?

Predict. With a Sigmoid graph instead, where do the floors rotate fastest?

Fix the bug. The tower should twist 90 degrees from base to top, but the plates spin round many times. Click the component whose input receives the wrong unit.

Build challenge: How much do the corner columns lean?

Draw a column through the corner of every floor plate of a twisting tower, and find the largest angle a column segment makes with the vertical.

Done when

  • Four corner polylines, one per corner.
  • A panel shows the largest lean in degrees, and it grows when you increase the twist.
Hint 1

Explode each plate to get its corners: Discontinuity (Curve, Analysis) or Control Points gives them. Then Flip Matrix so each branch is one corner up the tower.

Hint 2

Vector 2Pt between consecutive corners, then Angle (Vector, Vector) against Unit Z. Degrees from Radians' partner, Degrees (Maths, Trigonometry).

Show the solution
  1. Discontinuity on each plate rectangle gives its 4 corners, in a tree by floor. Flip Matrix makes one branch per corner.
  2. Polyline per branch for the columns.
  3. Vector 2Pt from each corner to the same corner one floor up (Shift List, Wrap False), Angle against Unit Z, Degrees, then Sort List and List Item i = −1 for the largest.

Checklist

19Panels on a curved roof

By the end you can measure how far each panel of a curved roof is from flat, and choose a geometry that gives flat panels.

Idea

Glass and metal panels are cheapest when they are flat. On most curved surfaces, the four corners of a panel do not lie in one plane. The panel is warped, and the amount is called its deviation from flat. Plane Fit (Vector, Plane) finds the plane closest to a set of points and reports how far they are from it.

Three ways out, each with a cost:

  • Triangles are always flat, but you get twice the panels and more joints.
  • Smaller panels warp less, but there are more of them.
  • A translation surface, made by sliding one curve along another, gives flat four-sided panels on a doubly curved roof. Engineers such as Jörg Schlaich and Hans Schober used this for glass grid shells.

Try it here

Compare the three surfaces at the same grid. The translation dome reads 0 mm everywhere, the spherical dome varies, and the hypar saddle is warped by the same amount in every panel.

In Rhino

  1. A hypar from four corner points: 4Point Surface (Surface, Freeform) with two high and two low corners.
  2. Divide Domain² and Isotrim for the panels.
  3. Deconstruct Brep (Surface, Analysis): its V output gives the corner points of each panel, one branch per panel.
  4. Plane Fit on those points. Its dx output is the deviation. Multiply by 1000 for millimetres.
  5. Compare with a tolerance using Larger Than (Maths, Operators), and colour the panels with Custom Preview.

Practice

Predict. Which panel shape is always flat, whatever the surface?

Predict. On a hypar, you halve the panel size in both directions. Roughly what happens to each panel's deviation?

Fix the bug. You expected one deviation per panel, but the panel shows a single number. Click the component to remove.

Build challenge: Flat panels on a dome

Build a dome-like roof from two arcs as a translation surface, panel it with quads, and show that every panel is flat.

Done when

  • Every panel's deviation is below 0.1 mm.
  • The roof is curved in both directions.
Hint 1

Sum Surface (Surface, Freeform) makes a surface from two edge curves by sliding one along the other.

Show the solution
  1. Two arcs that share an end point: one in the XZ plane, one in the YZ plane.
  2. Sum Surface from the two arcs.
  3. Divide Domain², Isotrim, Deconstruct Brep, Plane Fit as in the session. All dx values are close to zero.

Checklist

Structural analysis

Karamba3D is a finite element plug-in that lives inside Grasshopper. Your lines become beams, you add supports and loads, and results come back as numbers and colours that update when a slider moves. Four sessions take you from one beam to a frame, always with a hand check.

20Install Karamba3D and analyse one beam

By the end Karamba3D runs on your Mac and its deflection for a simple beam agrees with 5wL⁴/384EI.

Idea

Every Karamba model is assembled from the same parts, in the same order: elements, supports, loads, then Assemble Model, then Analyze, then a view. If you give no cross section or material, Karamba uses a default for each, so always set them yourself.

Your Mac and Karamba3D. The current version, 3.1, runs on Windows only. On a Mac you install version 2.2, and on an Apple Silicon Mac it only loads when Rhino is opened in Rosetta mode. This session uses 2.2. On a Windows PC at a lab or office you will meet 3.1: the workflow is the same idea, but some component names and options differ, so keep the 3.1 manual open the first time.

Example: install on your Mac

  1. Quit Rhino. In Finder open Applications, select Rhino 8, choose File, Get Info, and tick Open using Rosetta.
  2. Open Rhino, type PackageManager, search for Karamba3D, choose version 2.2 and install it. Restart Rhino.
  3. Open Grasshopper. A Karamba3D tab is now in the component bar.

Without a licence Karamba runs in one of two modes. The free mode has no element limit but leaves out some components. The manual marks those with a blue diamond, and Utilization of Elements is one of them. The full-feature trial has everything but stops at 20 beams and 50 shells. A student licence costs €30 plus VAT and removes both limits.

Example: the chain for one beam

Part one: build the model. Elements, supports and loads all end in Assemble Model. Port names are shortened here. In Grasshopper, hover over any port to read its full name and its unit.
Part two: solve and look. Analyze passes the solved model on to the view components and reports the largest displacement.
  1. Line from (0, 0, 0) to (6, 0, 0), then Line to Beam.
  2. Cross Sections, set to I-Profile in its drop-down: height 30, flange width 15, flange thickness 0.9, web thickness 0.65. Karamba takes section sizes in centimetres. That is H-300×150×6.5×9.
  3. Support at the start point with Tx, Ty, Tz and Rx switched on, and a second Support at the end point with Ty and Tz. A button is on when it is black. Six restraints is the minimum for anything in 3D, and Rx stops the beam spinning about its own axis.
  4. Loads: a uniform line load on the beam with the vector (0, 0, −10), which is 10 kN/m downwards. In 2.2 line loads are in the Beam Loads component as the Block type. Leave its start and end at 0 and 1 so the load covers the whole span.
  5. Assemble Model, then Analyze. Hover over the outputs of Analyze to find the maximum displacement, and put a panel on it.
  6. ModelView to scale the deformation, and BeamView to draw the bending moment.

Try it here

The hand calculation for the same beam, with JIS table values for the section and E = 205,000 N/mm². Use it to predict the Karamba result before you run it.

Why Karamba will not match to the last digit. Its I-Profile has no root fillets, so its I is about 6,930 cm⁴ against 7,210 in the JIS table, which adds about 4% to the deflection. Its library steel follows Eurocode, with E = 210,000 N/mm² against the 205,000 used in Japan, which takes about 2% off. It may also include a little shear deformation that the hand formula leaves out. Agreement within a few percent means your model is right.

Practice

Predict. You double the span of a simply supported beam under the same uniform load. What happens to the midspan deflection?

Predict. In which unit does Karamba's I-Profile expect its height and width?

Fix the bug. Analyze is red and gives no result. Both supports have only Tz switched on. Click a component to fix.

Build challenge: Check a cantilever

Model a 3 m cantilever in H-300×150×6.5×9 with a 10 kN point load at the tip. Compare Karamba's tip deflection with PL³/3EI.

Done when

  • The fixed end has all six restraints and the tip has none.
  • Karamba's result is within a few percent of 0.61 cm.
Hint 1

PL³/3EI = 10 × 3³ / (3 × 14,781) m. EI for this section is in the Session 20 example.

Show the solution
  1. Line from (0, 0, 0) to (3, 0, 0), Line to Beam with the I-Profile.
  2. Support at (0, 0, 0) with all six buttons on.
  3. Point-Load at (3, 0, 0), force (0, 0, −10).
  4. Hand value: 270 / 44,343 = 0.0061 m, about 0.61 cm.

Checklist

21Analyse the truss

By the end your truss from Session 9 shows tension and compression in colour, and the chord force agrees with M / H.

Idea

A truss member carries axial force (軸力) only. In Karamba, Line to Beam has a Bending input. Set it to False and the beams lose their bending stiffness and become truss members.

A plane truss in 3D space can also move sideways out of its plane. Nothing pushes it that way, but the manual is clear that what counts is whether a displacement is possible, not whether a force acts. So besides the two bearings, restrain Ty at every node.

Example

  1. Merge all truss lines into one list and wire them into Line to Beam with Bending = False.
  2. Supports: Tx, Ty, Tz at the left bottom node (a pin, ピン支点). Ty and Tz at the right bottom node (a roller, ローラー支点). One more Support fed with all the nodes and only Ty on.
  3. Loads: Point-Load at the top nodes. With a line load w, each inner node takes P = w L / n and the two end nodes take half. The force vector is (0, 0, −P).
  4. Assemble, Analyze, then Beam Forces. Its N output is the axial force of each member.
  5. In BeamView switch on Axial Stress. Karamba draws compression in red and tension in blue, the same colours this page uses.

Try it here

Forces in kN, tension positive. Change the truss type in the dark box and watch which members swap between tension and compression. Member labels appear when there is room for them.
Check yourself: in a Pratt truss under gravity, are the diagonals in tension or compression?

Tension, and the verticals are in compression. A Howe truss is the reverse. Steel trusses are often Pratt for that reason: the long members are in tension, where buckling is not a concern, and the short verticals take the compression.

Watch out: Analyze refuses, or the deflection is enormous

That is a mechanism: some part of the model can move freely. Check the out-of-plane restraints first, then look for nodes that only almost touch by switching on node tags in ModelView. If you cannot find it, set Bending back to True. For a well-triangulated truss the axial forces change very little.

Practice

Predict. In a Howe truss under gravity load, are the verticals in tension or compression?

Predict. M = 360 kN·m at mid-span and the truss is 3 m deep. About how large is the chord force?

Fix the bug. Your Pratt truss under roof load shows the top chord in tension and the bottom chord in compression. Click the component that causes it.

Build challenge: Add self-weight

Add the truss's own weight with a gravity load in the same load case, and find how much it adds to the largest chord force.

Done when

  • A Gravity load with vector (0, 0, −1) is in load case 0.
  • You can say the chord force with and without self-weight.
Hint 1

Gravity is one of the load types in the Loads component. Karamba computes the weight from the cross sections and material.

Show the solution
  1. Loads, set to Gravity, vector (0, 0, −1), LCase 0.
  2. Merge it with the point loads into Assemble Model.
  3. Compare Beam Forces N before and after. For light pipe trusses expect a few percent.

Checklist

22Analyse the portal frame

By the end you can read a bending moment diagram from Karamba and check a laterally loaded frame by hand.

Idea

A rigid frame (ラーメン) resists load by bending, so keep Bending on. The results you care about are the bending moment (曲げモーメント), the shear force (せん断力), the axial force, and the sway at beam level, which gives the storey drift angle (層間変形角). In Japan that angle is normally limited to 1/200 in the first-stage seismic check.

Load cases keep different actions apart. A point load goes into load case 0 unless you feed a number into its LCase input. A common split is vertical load in case 0 and lateral load in case 1, so you can read the long-term (長期) results alone and then the results with seismic load added (短期).

Example

  1. Take the three exploded segments from Session 5 into Line to Beam.
  2. Supports at A and D. Fixed (固定) means all six buttons on. Pinned means Tx, Ty and Tz only.
  3. Loads: a Point-Load at B with the vector (P, 0, 0), and a line load on the beam.
  4. Assemble, Analyze, then Beam Forces for N, V and M. In BeamView open Section Forces and switch on the bending moment.

Try it here

All three members are H-400×200×8×13. Start with the beam load at 0 and compare the pinned and the fixed base: watch the sway and where the moment goes.

Watch out: two pinned bases in 3D

A frame on two pins can still rotate about the line through its bases, like a door on two hinges. In a 2D hand calculation you never notice. In Karamba it is a mechanism. Add Ty at the two top nodes, or Rx at the bases.

Practice

Predict. A portal on pinned bases carries P = 40 kN at beam level. The columns are 5 m tall. About how large is the column-top moment?

Predict. You change the bases from pinned to fixed. What happens to the sway?

Fix the bug. The portal sways about 22 mm by hand, but Karamba reports 0.002 cm. Click the component that causes it.

Build challenge: A two-bay portal

Extend the portal to two bays with a middle column. Under the same lateral load, compare the column-top moments in the outer and middle columns.

Done when

  • Three columns, two beams, all rigidly connected.
  • You can say which column takes the largest moment, and why.
Hint 1

The middle column has a beam on both sides, so its top is restrained more than the outer columns.

Show the solution
  1. Five points for the polyline: base A, top B, middle top M, top C, base D, plus a separate middle column line.
  2. Supports at all three bases.
  3. Expect the middle column to take the largest moment, roughly twice an outer one, because it is stiffer at its top.

Checklist

23Sections, utilisation and Japanese practice

By the end you can give different sections to different member groups, and you know what Karamba's utilisation number does and does not mean in Japan.

Idea

Members get a section through their name. Feed a text such as top, bottom or diag into the Id input of Line to Beam. Then wire a cross section into Assemble Model and tell it which Id it belongs to. This is why you kept the member sets in separate groups and trees.

Karamba reports utilisation, the ratio of stress to strength. Two things to know before you trust it. BeamView's utilisation uses normal stress only, without shear or buckling. The Utilization of Elements component does consider buckling, but follows Eurocode 3. Neither is the Japanese check.

ItemKarambaJapanese practice
Steel gradeEurocode grades such as S235, yield 235 N/mm²SN400 or SS400, F = 235 N/mm²
Young's modulus (ヤング係数)210,000 N/mm²205,000 N/mm²
CheckUtilisation to Eurocode 3Allowable stress design (許容応力度設計): 検定比 = σ / f
Strength usedYield strengthLong-term f = F / 1.5 = 156 N/mm². Short-term f = F
SectionsBuilt-in table, organised by country and shapeJIS H-sections. If a size is missing, define it with I-Profile or read your own table from a file

So treat Karamba's utilisation as a quick way to compare options, and compute the 検定比 yourself. It is two components: divide N by the area, or M by the section modulus (断面係数), then divide by f. The allowable stress for compression and for bending is lower than F / 1.5 when buckling governs, and that part stays a hand or office-tool check.

Example: JIS H-sections used on this page

SectionA, cm²Ix, cm⁴Zx, cm³
H-200×100×5.5×826.671,810181
H-250×125×6×936.973,960317
H-300×150×6.5×946.787,210481
H-350×175×7×1162.9113,500771
H-400×200×8×1383.3723,5001,170
H-500×200×10×16112.346,8001,870
Check yourself: a bottom chord carries 420 kN of long-term tension. Which is the lightest section in the table that passes?

You need A of at least 420,000 / 156 = 2,692 mm², which is 26.9 cm². H-200×100 has 26.67 cm² and gives 157 N/mm², a 検定比 of 1.01, so it fails by a hair. H-250×125 gives 114 N/mm² and a 検定比 of 0.73. A real check would also deduct bolt holes.

Where Grasshopper sits in an office

Grasshopper and Karamba are used most in the early stages: generating geometry for a complex roof, comparing ten structural options in an afternoon, finding where the forces go. The calculation submitted for building confirmation (確認申請) is normally produced in the office's own analysis software. Your definition's job is to get a good scheme to that point quickly, and to hand over clean centre lines.

In Rhino

  1. Give your truss members the Ids top, bottom, vert and diag.
  2. Assign a heavier section to the chords than to the web members through Assemble Model.
  3. From Beam Forces, compute your own 検定比 for the tension members with Division components and show the largest one in a panel.

Practice

Predict. What is the long-term allowable tensile stress for SN400 steel?

Predict. A tension member carries 300 kN in H-200×100×5.5×8, A = 26.67 cm². What is its long-term 検定比?

Build challenge: A check table in one panel

Show the worst 検定比 of each member group (top chord, bottom chord, verticals, diagonals) in one panel, one line per group.

Done when

  • Four lines in a panel, each with the group name and its ratio.
  • The numbers update when you change a section.
Hint 1

Sort List followed by List Item with i = −1 gives the largest value in a list. Concatenate (Sets, Text) joins a name and a number.

Show the solution
  1. Beam Forces N per group (Select Elements by Id, or Dispatch).
  2. Division by area, Division by 156, then Sort List and List Item with i = −1 for the largest.
  3. Format or Concatenate with the group name, then Merge the four texts into one panel.

Checklist

Member design

Analysis tells you the forces. Design tells you whether the members can carry them. These three sessions build the Japanese allowable stress checks (許容応力度設計) into Grasshopper: buckling, bending with axial force, and load combinations, ending in a check report you could hand to a senior engineer.

24Column buckling

By the end you can work out a column's allowable compressive stress fc from its slenderness, and find the lightest section that carries a load.

Idea

A slender member in compression fails by buckling (座屈) sideways long before the steel yields. How slender it is depends on two things:

  • The buckling length lk (座屈長さ) = K × L, where K depends on how the ends are held. In theory K is 0.5 with both ends fixed, 0.7 with one fixed and one pinned, 1.0 with both pinned, and 2.0 for a cantilever.
  • The radius of gyration i (断面二次半径) of the section. An H-section has a large ix and a small iy, so unless it is braced it buckles about its weak axis.

The slenderness ratio (細長比) is λ = lk / i. Japanese practice for steel with F = 235 N/mm² then gives the long-term allowable compressive stress fc:

Critical slenderness (限界細長比)Λ = √(π²E / 0.6F) ≈ 120
When λ ≤ Λfc = {1 − 0.4(λ/Λ)²} F / ν, ν = 3/2 + 2/3 (λ/Λ)²
When λ > Λfc = 0.277 F / (λ/Λ)²
Short-term1.5 times the long-term value
Slenderness limitλ ≤ 200 for columns and λ ≤ 250 for other compression members (Building Standard Law Enforcement Order, Article 65)

Example

An H-250×250×9×14 column, 4 m tall, pinned at both ends, carries N = 600 kN long-term. iy = 6.32 cm and A = 91.43 cm².

  1. λ = 400 / 6.32 = 63.3, below Λ.
  2. λ/Λ = 0.528, so ν = 1.5 + 0.667 × 0.279 = 1.686.
  3. fc = (1 − 0.4 × 0.279) × 235 / 1.686 = 123.8 N/mm².
  4. σc = 600,000 / 9,143 = 65.6 N/mm², so the 検定比 is 65.6 / 123.8 = 0.53.

Try it here

The red curve is fc against λ. Your column is the green dot, at its stress. It passes while the dot is under the curve. Change the ends to fixed, fixed and watch the dot slide left.

In Rhino

  1. Keep a small section table in a panel or a CSV file read with Read File: name, A, ix, iy, Zx. Pick a row with List Item and split it into numbers with Text Split (Sets, Text).
  2. Buckling length: Multiplication of L and K. Slenderness: Division by iy (and by ix), then Maximum (Maths, Util) of the two.
  3. Two Expressions, one for each fc formula, with inputs λ, Λ and F.
  4. Larger Than compares λ with Λ. Pick'n'Choose (Sets, List) uses that result to pick the right formula: 0 picks the first stream, 1 the second.
  5. σc = N / A, then the ratio σc / fc. Show it in a panel, and colour the column with Custom Preview when it is over 1.

Watch out: theoretical K values

The K values above are the theoretical ones. Real ends are never perfectly fixed, so design guides often use larger values, and your office will have its own rule. In a moment frame, the column's buckling length is often taken as the storey height. Ask before you choose.

Practice

Predict. The same column changes from pinned at both ends to fixed at both ends. What happens to fc?

Predict. A member has λ = 130. Which formula gives fc?

Predict. An unbraced H-section column. Which radius of gyration do you use?

Fix the bug. A 4 m pinned H-300×300 column is shown with λ = 30.5 and looks very safe. Click the component or panel that makes it unsafe.

Build challenge: The lightest column for 900 kN

A 4 m column, pinned at both ends, carries 900 kN long-term. From the nine H-sections used in this course, find the lightest one that passes.

Done when

  • Your definition checks every section at once and lists those that pass.
  • It names the lightest passing section.
Hint 1

Put all nine sections in lists and run the check on every one together. Dispatch with Smaller Than (ratio below 1) keeps the ones that pass.

Hint 2

Sort the passing sections by area with Sort List (it can sort a second list along with the keys) and take the first.

Show the solution
  1. Three lists from your table: names, A and iy.
  2. λ = 400 / iy for all nine at once, fc with the two formulas and Pick'n'Choose, ratio = 900,000 / (A × 100) / fc.
  3. Dispatch on ratio < 1, then Sort List by A.
  4. The answer is H-250×250×9×14, with a ratio of 0.80. H-400×200×8×13 has less area, 83.37 cm² against 91.43, but it fails at 1.09 because its iy is only 4.56 cm.

Checklist

25Bending plus axial force

By the end you can check a column that carries both axial force and bending, and say what the check assumes.

Idea

A frame column carries axial force from the floors above and bending from the frame action. The two stresses add up, so the check adds the two ratios (組合せ応力):

Compression and bendingσc / fc + σb / fb ≤ 1
σcN / A
σbM / Z

fb, the allowable bending stress, equals ft = F / 1.5 only when the compression flange cannot buckle sideways. An unbraced H-section can twist and buckle sideways under bending (横座屈), and the code then gives a smaller fb. Square hollow sections (角形鋼管) do not suffer this, and they are equally stiff in both directions. That is one reason Japanese moment-frame columns are usually square tubes.

Try it here

The starting values fail by 3%. Find two different changes that make the column pass. The green triangle is where the sum is 1 or less.

In Rhino

  1. Take the column forces from Karamba's Beam Forces: N and the moment M about the strong axis, at both ends of each element.
  2. σc = N / A and σb = M / Z with Division. Watch the units: kN and cm² give kN/cm²; multiply by 10 for N/mm².
  3. Reuse your fc from the last session. fb = 156 for a braced member.
  4. Add the two ratios and take the largest along the member with Sort List or Bounds.

Practice

Predict. σc / fc = 0.45 and σb / fb = 0.40. Does the member pass?

Predict. The same stresses are short-term instead. What is the ratio now?

Predict. Why do Japanese moment frames usually use square tube columns rather than H-sections?

Build challenge: Check every column of a frame

For the multi-storey frame from Session 12, analysed in Karamba with gravity and lateral load, compute σc/fc + σb/fb for every column element and colour the columns by it.

Done when

  • One ratio per column element.
  • Columns over 1.0 are drawn in a warning colour.
  • A panel shows the worst column and its ratio.
Hint 1

Select Elements (or Ids such as col) gives you only the column elements' forces from Beam Forces.

Hint 2

Gradient (Params, Input) maps a number from 0 to 1 to a colour for Custom Preview.

Show the solution
  1. Give the columns the Id col in Line to Beam. Beam Forces with Beams|Ids set to col.
  2. N and M at both ends: take the larger |M| per element.
  3. Ratio per element as in the session; Gradient with limits 0 and 1.2 into Custom Preview.
  4. Sort List with the ratios as keys and the element names as values; the last item is the worst column.

Checklist

26Load combinations and the check report

By the end your definition checks long-term and short-term combinations, drift and deflection, and writes a one-panel report.

Idea

Allowable stress design checks combinations of loads (荷重の組合せ), each against its own allowable stress:

CombinationLoadsAllowable
Long-term (長期)G + P: dead and live loadLong-term, such as F / 1.5
Short-term (短期), earthquakeG + P + K and G + P − K1.5 × long-term
Short-term, snow or windG + P + S, G + P + W1.5 × long-term

K appears with both signs because an earthquake can come from either side. Snow rules differ in heavy-snow areas (多雪区域), so check the rules for your site. On top of the stress checks come the stiffness checks: storey drift angle under K, normally 1/200 or less, and beam deflection under long-term load, where many offices aim for span / 300.

A linear analysis can be added up. Put G in load case 0 and K in load case 1, and the result of G + K is the sum of the two cases. You do not need to run the analysis again for each combination.

Try it here

The yellow panel is the report: one line per member with its worst ratio in each combination, then drift and deflection. Raise K until something fails, then change one section to fix it.

In Rhino

  1. Give the vertical loads LCase 0 and the lateral loads LCase 1.
  2. Beam Forces once with LCase 0 and once with LCase 1. Combine them with Addition and Subtraction: G + K and G − K.
  3. Ratios for each combination. Divide the short-term ones by 1.5, or multiply the allowables.
  4. Drift: Nodal Displacements for LCase 1 at beam level, divided by the storey height.
  5. Report: Format (Sets, Text) builds a line such as Left column 0.71 0.93 OK. Merge the lines into one panel.

Practice

Predict. Why check G − K as well as G + K?

Predict. σ from G is 90 N/mm² and σ from K is 120 N/mm². Long-term f = 156 N/mm². What is the short-term ratio for G + K?

Predict. A 4 m storey sways 18 mm under K. Does it meet 1/200?

Fix the bug. The long-term check for case G passes with 0.77, but by hand σ = 180 N/mm² fails against 156. Click the component or panel that causes it.

Build challenge: Add a snow case

Add a snow load S on the beam as load case 2, with the combination G + S checked against short-term allowables, and add a line for it to your report.

Done when

  • The report has a G + S column for every member.
  • The worst combination is named for each member.
Hint 1

Use the same pattern: a third Beam Forces with LCase 2, then Addition with case 0.

Show the solution
  1. A line load on the beam with LCase 2.
  2. Beam Forces for LCase 2, Addition with case 0, ratio against 1.5 × long-term.
  3. Extend Format to five numbers, and use List Item on the sorted combination names to name the worst.

Checklist

Optimisation

Once a definition can size and check its own members, Grasshopper can search through hundreds of designs for you. These two sessions use Galapagos, which comes with Grasshopper, and then look at what to do when there is more than one goal.

27Galapagos: the lightest roof truss

By the end you can set up Galapagos with a genome, a fitness and a penalty, and judge whether its answer is any good.

Idea

Galapagos (Params, Util) is an evolutionary solver. You give it two things:

  • A genome: the sliders it is allowed to move. Here they are the depth, the number of panels, and a 0, 1, 2 slider for the truss type.
  • A fitness: one number to make as small or as large as possible. Here it is the steel weight of one truss, in kilograms.

It tries a population of random designs, keeps the fittest, breeds new designs by mixing and mutating their sliders, and repeats for many generations. It cannot read your checks, so you build them into the fitness: if a design breaks the deflection limit, add a large penalty to its weight so it can never win.

Galapagos does not promise the best possible answer. When the search space is small, as here with 435 combinations, you can check its answer by trying them all (brute force).

Example

  1. The truss from Session 9 with sliders for depth H (1.2 to 4.0 m), panels n (4 to 12, step 2) and type (0 to 2).
  2. Sizing: for each member group, the lightest steel pipe (鋼管, STK400) from a list that passes its check. Tension: σ ≤ 156 N/mm². Compression: σ ≤ fc from Session 24, with the member length as buckling length. Every member: λ ≤ 250.
  3. Fitness: total weight, plus 10 × weight × the amount by which the deflection exceeds span / 300.

Try it here

Start the solver and watch the population close in. The dashed line is the lightest possible weight at each depth, found by trying all 435 designs. Run it again with a new seed: the answer may change, but it lands near the bottom of the dashed curve.

In Rhino

  1. Place Galapagos. Drag from its Genome input to each slider you want it to move. Galapagos only accepts sliders and gene pools as genes.
  2. Wire one number into Fitness: your weight plus penalty.
  3. Double-click Galapagos to open its editor. On the Options tab, set Fitness to Minimize.
  4. On the Solvers tab, press Start Solver. When it stops, pick the best design in the list and press Reinstate to set the sliders to it.
  5. Sizing inside Grasshopper is easiest if the section of each group is also a gene: a slider that picks a row from your section table. Add a penalty when any 検定比 is over 1. With a full Karamba licence, Optimize Cross Section can do the sizing instead, but it checks to Eurocode, not the Japanese rules.

Watch out: a flat optimum

Eight of the designs here weigh within 3% of the best one. When the optimum is flat, the lightest design is rarely the right one: choose among the near-best by depth, number of joints, or appearance. Say that in your report instead of quoting one magic number.

Practice

Predict. Why add a large penalty to the weight of a design that breaks the deflection limit?

Predict. Can Galapagos move a number typed into a Panel?

Predict. Two runs with different seeds give slightly different best designs. What does that tell you?

Fix the bug. Galapagos was meant to find the lightest truss, but it keeps choosing the deepest and heaviest one. Click the component whose input is wired to the wrong output.

Build challenge: Let Galapagos size the members

Add four section sliders, one per member group, that each pick a pipe from a table. Add them to the genome, with a penalty for any 検定比 above 1, and let Galapagos find depth, panels, type and sections together.

Done when

  • The genome has 7 sliders.
  • No member in the best design has a ratio above 1.
  • The best weight is within about 10% of the 1,107 kg found by brute force on this page.
Hint 1

A penalty of 1,000 kg for each member over 1.0 is simple and works.

Hint 2

Seven genes take longer. In the Galapagos options, raise the population, or let it run more generations.

Show the solution
  1. A table of pipes with A and i. Four sliders from 0 to the last row, each into List Item.
  2. Ratios for every member as in Session 24. Larger Than 1, then Mass Addition (Maths, Operators) counts the failures.
  3. Fitness = weight + 1,000 × failures + the deflection penalty.

Checklist

28Trade-offs and the Pareto front

By the end you can show a client the trade-off between two goals and explain which designs are worth discussing.

Idea

Real decisions have more than one goal. A deeper truss is lighter, but it costs ceiling height and cladding. A stiffer truss is heavier. A design is Pareto optimal when no other design is better on both goals at once. Those designs form the Pareto front; every design off the front can be beaten on both goals.

The engineer's job is to show the front and say where the good choices are. The client or architect then picks a point on it. Galapagos searches for one number only. Plug-ins such as Wallacei and Octopus search for several at once, but they run on Windows, so try them on a lab or office PC.

Try it here

Each blue dot is one truss that passes the member checks. Green is the front. Lower the maximum depth to 2.0 m, as an architect might for headroom, and see what it costs in steel.

In Rhino

  1. Data Recorder (Params, Util) records every value that passes through it. Record weight and depth while Galapagos runs, or while you step a slider.
  2. Plot the results in Rhino: Construct Point with x = weight / 1000 and y = depth. Scale the axes so the cloud is readable.
  3. Mark the front: sort by weight, then keep each point whose depth is lower than every lighter point's. A short GhPython script does this neatly; by eye on the plot is fine to start.

Practice

Predict. Design A weighs 1,200 kg with a depth of 2.4 m, B weighs 1,350 kg at 2.0 m, and C weighs 1,400 kg at 2.4 m. Which design is not on the Pareto front?

Predict. The architect caps the depth at 2.0 m. What happens to the lightest acceptable design?

Build challenge: A trade-off chart in Rhino

Record at least 30 truss designs with Data Recorder and plot steel weight against depth as points in Rhino. Mark the Pareto front.

Done when

  • At least 30 points, with labelled axes made from text dots or lines.
  • The front is highlighted in a different colour.
Hint 1

Use Text Tag (Display, Dimensions) to label a few points with their depth and panel count.

Show the solution
  1. Data Recorder on weight and on depth, with the same capacity.
  2. Construct Point (weight / 1000, depth, 0).
  3. Sort List by weight, then a running minimum of depth picks out the front; draw those points in green with Custom Preview.

Checklist

Form-finding

Some shapes are not designed so much as found. A hanging chain takes the shape that carries its load in pure tension; turned upside down, that shape carries the same load in pure compression. These two sessions use Kangaroo, the physics solver that comes with Grasshopper in Rhino 8, to find such shapes and then check them as structures.

29From a hanging chain to an arch

By the end you can form-find an arch with Kangaroo and show, with Karamba, why it carries its load almost without bending.

Idea

Robert Hooke published the idea as a Latin anagram in 1676: as hangs the flexible line, so but inverted will stand the rigid arch. A chain can only pull, so the shape it hangs in is the line of its forces. Flip it, and every link pushes instead of pulls, still along the line. Gaudí designed the church at Colònia Güell this way, with weighted strings.

  • Under its own weight, spread evenly along its length, a chain hangs as a catenary.
  • Under a load spread evenly along the horizontal, like a deck hung from it, it hangs as a parabola. That is why the parabolic arch in Session 13 suits a bridge.

Kangaroo works with goals. Length (Line) holds a link at a length, Anchor holds a point still, Load pushes a point. The Solver moves all the points until every goal is balanced as well as it can be.

Try it here

Run the solver, then flip to the arch. The blue area is the bending moment in a circular arch of the same rise under the same loads. The found shape's moment is almost zero; compare the last two readouts.

In Rhino

  1. A 20 m line, divided into links: Divide Curve, then Polyline and Explode, gives the link lines.
  2. On the Kangaroo2 tab, Length (Line) with the links and a length of 1.12 × the link length, so the chain is 12% longer than the span.
  3. End Points of the original line into two Anchor goals.
  4. Load on every point with the vector (0, 0, −1).
  5. Entwine or Merge all the goals into the Solver's GoalObjects input. Its output points form the hanging chain.
  6. Flip: Scale NU (Transform, Affine) with a Z factor of −1. Then Line to Beam in Karamba, pinned supports at both ends, and the same loads pointing down.

Watch out: one load case only

The found shape is free of bending only for the load that found it. A live load on half the span, or wind, bends it. A real arch still needs bending stiffness; form-finding gives you the best starting shape, not a finished design.

Practice

Predict. A chain carries a deck load spread evenly along the horizontal. What shape does it hang in?

Predict. You make the chain longer, so it sags more. What happens to the horizontal force H at the supports?

Predict. The found arch carries a live load on the left half only. What happens?

Fix the bug. The chain swings away to one side and never settles. Click the component that needs another input.

Build challenge: An unevenly loaded arch

Put twice the load on the left half of the chain and form-find again. Flip it, then analyse the symmetric arch from the session under this uneven load and compare the largest moments.

Done when

  • The new shape is lopsided, with its lowest point shifted to the left.
  • You can state the largest moment in the symmetric arch under the uneven load.
Hint 1

Dispatch the points by x below 10 m and give the two Load goals different strengths.

Show the solution
  1. Deconstruct Point, Smaller Than 10 on x, Dispatch the points.
  2. Two Load goals: (0, 0, −2) on the left set and (0, 0, −1) on the right.
  3. Analyse both arches in Karamba with the uneven loads. The symmetric arch now bends; the arch found for this load does not.

Checklist

30From a hanging net to a gridshell

By the end you can form-find a gridshell roof, check it in Karamba, and say how its supports change its shape.

Idea

The same idea works in 3D. Hang a net from its corners or edges and it takes a shape in pure tension; flip it and you have a gridshell (グリッドシェル) in compression. The Mannheim Multihalle, a timber gridshell by Carlfried Mutschler and Frei Otto with Ove Arup & Partners as engineers, completed in 1975, took its form from a hanging model.

Which points you anchor changes everything. A net held at its corners sags along its free edges; held on all four edges it forms a dome. Link lengths matter too: equal-length laths are easy to build, so a good gridshell keeps its member lengths close to each other.

Try it here

Run the solver with each anchor setting. Thicker links carry more force. Read the last readout: how much do the link lengths spread after solving?

In Rhino

  1. A flat grid: Mesh Plane (Mesh, Primitive), 20 by 20 m with 10 by 10 faces.
  2. Mesh Edges (Mesh, Analysis) gives the links. Length (Line) with 1.1 × their length.
  3. Anchors: the end points of the boundary edges, which Mesh Edges returns from its first output, or the four corner vertices only.
  4. Load on every vertex with (0, 0, −1). Solver, then Scale NU with Z = −1 to flip.
  5. In Karamba: Line to Beam on the flipped edges, pinned supports at the anchored points, and the same loads pointing down. Check that the members are in compression.

Practice

Predict. Same net and length factor. Which anchor setting gives the deeper sag at the centre?

Predict. After flipping, what kind of force do the links carry under the form-finding load?

Build challenge: A gridshell that rises exactly 4 m

Use Galapagos to find the length factor that gives a gridshell rise of exactly 4.00 m, held on all four edges.

Done when

  • The rise is within 10 mm of 4.00 m.
  • Galapagos has the length factor as its only gene.
Hint 1

Fitness: the absolute difference between the rise and 4, minimised. Absolute (Maths, Operators) gives it.

Hint 2

Kangaroo must finish solving before Galapagos reads the fitness. Turn the solver's reset on for every new slider value, or use the BouncySolver, which solves in one go.

Show the solution
  1. Rise: Deconstruct Point on the solved points, Bounds on z, the larger end.
  2. Fitness = Absolute(rise − 4); Galapagos Minimize; genome = the length factor slider.
  3. Make sure each Galapagos step gets a fully solved shape before it is measured.

Checklist

Projects

Four projects that work like small office jobs, each with a brief, things to hand in, and a comparison table (比較検討表) that ranks your options. The briefs are exercises: their loads and limits are set for practice, not taken from a real design. Keep every definition; together they are your portfolio.

31Truss roof: the geometry

By the end you have a truss roof over a hall, controlled by five sliders and organised so that someone else can read it.

The brief

A hall 24 m wide and 36 m long, the size of a school gymnasium (体育館). Steel trusses span the 24 m and stand 6 m apart. Start with a depth of span / 10 and 6 panels.

SliderStart valueDrives
Span L24 mNode spacing along X
Depth H2.4 mTop chord height
Panels n6Series step and count
Spacing s6 mCopy distance along Y
Trusses7Number of copies

In Rhino

  1. One truss: reuse Session 9. Keep top chord, bottom chord, verticals and diagonals as four separate outputs.
  2. Make it a Pratt truss, with the diagonals running down towards midspan in both halves.
  3. The row: reuse Session 14. Graft the vectors, one branch per truss.
  4. Purlins and a bottom chord tie between trusses: Flip Matrix, as in Session 14.
  5. Lay the canvas out in named groups from left to right: Inputs, One truss, Roof, Analysis, Results.
  6. Bake one version to layers named by member type.

Practice

Predict. The roof has 7 trusses with 6 panels each. How many truss members are there in total?

Predict. The trusses are 6 m apart and the hall is 36 m long. How many trusses do you need, counting both gable ends?

Checklist

32Truss roof: analyse, check and present

By the end you have analysed one roof truss, checked it three ways, and written down what you found.

Idea

A roof load is an area load q in kN/m². One inner truss collects a strip as wide as the truss spacing, so its line load is w = q × s, and each top node takes P = w L / n. Analyse one truss in its plane before you try the whole roof. It is quicker to check and tells you nearly everything.

Try it here

Predict first, then build. The roof load slider starts at 1.5 kN/m² as a placeholder: use the dead and live loads from your own project.

In Rhino

  1. Add Karamba to the truss as in Session 21. Compute P from q, s, L and n with Multiplication and Division, so the load follows the sliders.
  2. Check 1, statics: the chord force against M / H.
  3. Check 2, stress: your own 検定比 for the most loaded tension member.
  4. Check 3, stiffness: midspan deflection against your limit. A common office target for steel roof members is span / 300. Confirm the one your project uses.
  5. Move the depth slider from 1.6 m to 3.2 m in steps and note the chord force and deflection each time. Which depth would you propose, and why?
  6. Write half a page: the brief, a screenshot of the definition, a screenshot of the result, the three checks, your proposed depth.

Watch out: the 20-beam limit

A truss with 6 panels has 25 members, which is over the limit of the full-feature trial. Either drop to 4 panels (17 members), run in free mode and do the stress check by hand, or buy the student licence.

Take it further

  • Add the buckling check from Session 24 to the compression members, and let Galapagos from Session 27 choose the depth.
  • Fill the comparison table below with three depths you tried, to practise for the projects that follow.
CriterionWeightDepth ADepth BDepth C
Depth, m (lower is better)
Steel in one truss, kg (lower is better)
Midspan deflection, mm (lower is better)
Largest 検定比 (lower is better)
Score out of 100---

Fill in a row for every option to see the ranking.

Practice

Predict. The roof load is 1.5 kN/m² and the trusses are 6 m apart. What is the line load on an inner truss?

Predict. What line load does a gable-end truss carry, with the same numbers?

Checklist

33Footbridge: three options

By the end you have one definition that draws three structural options for a park footbridge, switchable with one value list.

ProjectPark footbridge (歩道橋)
Span30 m, simply supported
Clear width3 m
Your roleOption study
Hand inEnd of session 34

A city park needs a footbridge across a river, 30 m between abutments. The landscape architect asks which steel structure suits it best and wants three options compared on one page.

Requirements for this exercise
  • Pedestrian load 5 kN/m² on the deck, carried by two main trusses or arches, one on each side.
  • Deflection under that load no more than span / 500.
  • Nothing may stand more than 2.5 m above the deck, so the view is kept.
Options
  • A. Pratt truss
  • B. Warren truss
  • C. Tied arch with vertical hangers, as in the Session 13 challenge, with its rise kept under 2.5 m

Steps

  1. Start from your truss definition (Session 9) and your tied arch (Session 13 challenge). Put each in a named group.
  2. One Value List (Params, Input) with Pratt, Warren and Tied arch. Stream Filter picks which option's lines go on to the analysis.
  3. Deck: the bottom chord or tie carries cross beams every panel; the load on one main structure is 5 × 3 / 2 = 7.5 kN/m.
  4. Give every option the same inputs: span, depth or rise, and number of panels or hangers.

Try it here

A quick hand check for the two truss options, sized with pipes as in Session 27. Use it to choose sensible depths before you model, then confirm the numbers in Karamba.

Practice

Predict. What line load does one main truss carry?

Predict. The brief limits deflection to span / 500. What is that for this bridge?

Checklist

34Footbridge: analyse and compare

By the end you have analysed all three options and written a one-page recommendation backed by numbers.

Steps

  1. Karamba for each option: pinned at one end, roller at the other, out-of-plane restraints as in Session 21, the 7.5 kN/m load at the nodes.
  2. Check members with your report from Session 26: tension, buckling for compression, and the deflection limit.
  3. Record steel weight, deflection, the largest 検定比, depth or rise, and the number of different member sizes for each option.
  4. Fill in the comparison table. Set the weights to what this client cares about, and be ready to defend them.
  5. Write half a page: the brief in one line, a picture of each option, the table, your recommendation, and one risk to check next.

Comparison table

CriterionWeightA. PrattB. WarrenC. Tied arch
Steel in one main structure, kg (lower is better)
Midspan deflection, mm (lower is better)
Largest 検定比 (lower is better)
Height above deck, m (lower is better)
Different member sizes (lower is better)
Openness of the view, 1 to 5 (higher is better)
Score out of 100---

Fill in a row for every option to see the ranking.

Practice

Predict. The table ranks option B first, but its score is only 2 points above A. What should your report say?

Checklist

35Atrium gridshell: form and panels

By the end you have three roof forms for a glazed courtyard, each with its panel flatness measured.

ProjectSchool courtyard roof (中庭)
Plan20 m × 20 m
SupportsAll four edges
Your roleForm and structure study
Hand inEnd of session 36

A school wants to roof its courtyard with glass. The building around it can support the roof on all four edges. The architect wants a light steel grid, about 2 m by 2 m, and asks which form to take forward.

Requirements for this exercise
  • Rise between 2.5 m and 4 m.
  • Glass panels should be flat; the glass supplier accepts up to 5 mm of warp per panel, a figure set for this exercise.
  • Load for checking: 1.5 kN/m² over the plan, all members in compression under it if possible.
Options
  • A. Form-found net, flipped (Session 30)
  • B. Spherical dome (Session 19)
  • C. Translation dome (Session 19 challenge)

Steps

  1. Build all three forms over the same 20 m square with the same 10 by 10 grid and the same rise.
  2. Measure every panel's warp with Plane Fit, and count the panels over 5 mm.
  3. For option A, use Galapagos from the Session 30 challenge to hit the rise exactly.

Practice

Predict. Which option should give flat quad panels without any extra work?

Checklist

36Atrium gridshell: analyse and compare

By the end you have analysed the three forms and can explain why the form-found one works hardest for its weight.

Steps

  1. Karamba for each form: the grid as beams with one pipe size, pinned along all four edges, 1.5 kN/m² turned into node loads (load × the plan area around each node).
  2. Read the largest deflection, the largest 検定比 and how many members go into tension.
  3. Size the pipe so the worst member passes, and record the steel weight.
  4. Fill in the table and write your recommendation, including what the glass supplier needs to hear.

Comparison table

CriterionWeightA. Form-foundB. SphereC. Translation
Steel weight, t (lower is better)
Largest deflection, mm (lower is better)
Largest 検定比 (lower is better)
Panels warped over 5 mm (lower is better)
Members in tension (lower is better)
Score out of 100---

Fill in a row for every option to see the ranking.

Checklist

37Diagrid tower: form and facade

By the end you have a parametric tower with three twist options, a diagrid and an attractor facade on one side.

ProjectOffice tower, concept stage
Height30 storeys × 4 m
Plate30 m square
Your roleStructure and facade study
Hand inEnd of session 38

The architect is choosing between a straight tower and two twisting ones, and wants the facade to open towards the park on the south side. You are asked what the twist does to the structure and to the facade.

Options
  • A. No twist
  • B. 45° twist
  • C. 90° twist
Requirements for this exercise
  • A diagrid on the perimeter, nodes every two floors.
  • Openings larger towards a park point on the south side, rationalised into at most 6 panel types.

Steps

  1. Tower and diagrid from Session 18, with the twist on a Value List of 0, 45 and 90.
  2. Facade panels between the diagrid nodes on the south face, openings from the attractor in Session 17, rationalised to 6 types.
  3. Count the different diagrid member lengths for each option, rounded to 10 mm. Fewer lengths mean simpler fabrication.

Practice

Predict. Which option should have the fewest different diagrid member lengths?

Checklist

38Diagrid tower: analyse and compare

By the end you know how the twist changes the tower's lateral stiffness and its steel, with numbers for each option.

Steps

  1. Karamba: the diagrid members as beams with one pipe size, fixed at the base, floor plates as rigid rings (stiff beams around each node level).
  2. Lateral load: a horizontal point load at every node level. Use 100 kN per level as a placeholder for this exercise.
  3. Read the top sway and the storey drift angles; compare with 1/200.
  4. Record steel weight, top sway, member lengths and facade panel types for each option, then fill in the table.

Comparison table

CriterionWeightA. 0°B. 45°C. 90°
Top sway, mm (lower is better)
Diagrid steel, t (lower is better)
Different member lengths (lower is better)
Facade panel types (lower is better)
Architectural intent, 1 to 5 (higher is better)
Score out of 100---

Fill in a row for every option to see the ranking.

Checklist

39A one-page portfolio sheet

By the end you have one A3 sheet that shows how you think, ready for an Arup or KKE application or interview.

Idea

An interviewer looks at a portfolio page for less than a minute. The page should show a question, a method, options, a comparison and a decision, in that order. Pick your strongest project, usually the footbridge or the gridshell.

Layout for an A3 landscape sheet. Read from top left to bottom right, as a reviewer would.

Steps

  1. Clean the definition: inputs on the left, results on the right, every group named, no loose wires. Add a short Scribble (Params, Util) title to each group.
  2. Capture the canvas with File, Export Quick Image, and the Rhino views with ViewCaptureToFile, all at the same size.
  3. Lay out the sheet in the order above. Keep text short: a reviewer reads the headings and the numbers.
  4. Practise saying the page out loud in two minutes, in English and in Japanese.

Practice

Predict. What should a reviewer understand first from the sheet?

Checklist

Glossary

Terms from this course with the Japanese you will hear at a design office. Component names stay in English in Grasshopper, whatever language Rhino is set to.

EnglishJapanese
Node節点
Member部材
Centre line of a member部材芯
Grid line通り芯
Column柱
Girder, main beam大梁
Secondary beam小梁
Braceブレース
Purlin母屋
Spanスパン
Storey height階高
Rigid frameラーメン
Portal frame門形ラーメン
Trussトラス
Top chord, bottom chord上弦材,下弦材
Vertical, diagonal束材,斜材
Plan, framing elevation伏図,軸組図
EnglishJapanese
Support支点
Pin, roller, fixedピン,ローラー,固定
Load荷重
Dead load, live load固定荷重,積載荷重
Seismic load地震荷重
Long-term, short-term長期,短期
Axial force軸力
Shear forceせん断力
Bending moment曲げモーメント
Deflectionたわみ
Storey drift angle層間変形角
Cross section断面
Second moment of area断面二次モーメント
Section modulus断面係数
Young's modulusヤング係数
Allowable stress許容応力度
Utilisation ratio検定比

Member design, design and optimisation

EnglishJapanese
Buckling座屈
Buckling length座屈長さ
Slenderness ratio細長比
Radius of gyration断面二次半径
Critical slenderness限界細長比
Allowable compressive stress許容圧縮応力度
Lateral-torsional buckling横座屈
Combined stress組合せ応力
Load combination荷重の組合せ
Snow load積雪荷重
Heavy-snow area多雪区域
Allowable stress design許容応力度設計
Square hollow section角形鋼管
Steel pipe鋼管
EnglishJapanese
Haunchハンチ
Camberキャンバー
Wind post間柱
Gabled portal frame山形ラーメン
Diagridダイアグリッド
Gridshellグリッドシェル
Form-findingフォームファインディング
Optimisation最適化
Panel typesパネルの種類
Courtyard中庭
Footbridge歩道橋
Option comparison table比較検討表
Building confirmation確認申請
Gymnasium体育館

Sources and further reading

Where the facts on this page come from, checked in October 2026. Prices and versions change, so follow the links before you buy.

The solvers on this page are for learning. They are checked against hand calculations and are not a design tool.