erdevelop_ / courses / grasshopper Glossary Tools TR
Courses · Grasshopper

Grasshopper Course

An intensive 7-day programme for façade and architectural designers. In the first days you get the logic of Grasshopper, lists and the data tree right; then you build a definition that panels a curved façade, analyses it, generates patterns, searches for the best solution and exports the panel list.

7 days~5 hours a dayEnglishComponent names in English

Before you start

Who is it for

Façade, architectural and product designers who know Rhino at a basic level and want to start Grasshopper or go beyond "playing with sliders". If you don't know Rhino at all, do the first four days of the Rhino course on this site first.

What you need

  • Rhino 8 (Grasshopper comes with Rhino; the 90-day trial is enough).
  • Basic curve and surface modelling in Rhino.
  • Excel (for the panel list on day 7).

Programme

DayTopicWhat you learnTime
Day 1Canvas, components and a first definitionParameters and components, wires, slider, Series, Loft, layout and Bake~5 hours
Day 2Lists and numbers: a twisting towerSeries, Range, Remap, Graph Mapper, list operations, Longest List~5 hours
Day 3The data treePaths, Graft, Flatten, Simplify, Flip Matrix, panels from a grid~5 hours
Day 4Surface panelling and warpuv, Isotrim, warp analysis and colour, number of panel types, Box Morph~5 hours
Day 5Attractors and patternsMeasure-normalise-shape-apply, perforated panel, Image Sampler, sun fins~5 hours
Day 6Analysis and GalapagosDesign scores, Data Recorder, type reduction, optimisation with fitness~5 hours
Day 7Clusters, output and PythonClusters and User Objects, numbering, CSV list, Bake with attributes, Script~5 hours

There is a checklist at the end of each day. As you tick items, your progress is saved in this browser. If you only study on weekday evenings, the programme takes about two weeks. Component names follow Rhino 8 Grasshopper; the Script component and the model object components do not exist in Rhino 7.

DAY 01

Canvas, components and a first definition

~5 hours · 0/6 checks

Goal and the logic of Grasshopper

By the end of the day you will have your first slider-driven definition: circles arrayed along a curve, changing in size and number, and a surface generated from them. You will learn to work quickly and tidily on the Grasshopper canvas. Time about 5 hours. Files: Gun1.3dm and Gun1.gh.

Grasshopper is a visual programming environment running inside Rhino. Geometry is not drawn by hand; a recipe is built. When you change a number in the recipe, the whole result is recalculated.

By hand in Rhino In Grasshopper
Run a command, edit the result Connect components with wires, the result appears by itself
Change = redraw from scratch Change = move a slider
No history The definition itself is the history
Result is a Rhino object Result is a preview; becomes a Rhino object when baked

1. Canvas and basic concepts (1 hour)

  1. Type Grasshopper in the Rhino command line. A separate window opens.
  2. Components are in the tabs at the top: Params, Maths, Sets, Vector, Curve, Surface, Mesh, Intersect, Transform, Display.
  3. Quick add: double-click an empty part of the canvas and type the component name (slider, circle, divide curve).
12Number Slider · CountCurveDivideCNKPTtCirclePRC0 501 602 70 …Paneldata flows from left to rightsingle itemlisttree (many branches)
Anatomy of the canvas: parameters hold data, components process the inputs on the left and pass them to the outputs on the right. The look of a wire tells the structure of the data it carries.
Concept Meaning
Parameter A box holding data: Number, Point, Curve, Surface, Brep
Component An operation taking inputs and giving outputs: Divide Curve, Loft, Move
Wire Connects an output to an input; data flows left to right
Orange component Warning (e.g. empty input). Hover and read the message
Red component Error; no result is produced

Shortcuts

Shortcut Function
Double-click Component search
Shift + drag wire Add a second wire to an input
Ctrl + drag wire Remove a wire
Ctrl + Shift + drag Move connected wires to another input
Ctrl + E Disable / enable component
Ctrl + Q Toggle preview
Ctrl + G Group selected components

2. First definition: circles along a curve (1.5 hours)

  1. Draw a curve in Rhino (a free arc with InterpCrv).
  2. In Grasshopper place a Curve parameter, right-click > Set one Curve, select the curve.
  3. Number Slider: integer, 2-50, named Adet (count).
  4. Divide Curve: C = curve, N = Adet. Points on the curve and the curve tangent (T) at each point are output.
  5. Get planes perpendicular to the curve with Perp Frames (or Plane Normal with the points and tangents of Divide Curve).
  6. Circle: Plane = perpendicular planes, Radius = a new slider (Yaricap, radius, 10-200).
  7. Move the sliders: the number and size of the circles change instantly.
  8. Loft: join the circles into a pipe surface.

Varying radius

  1. Series: Start 50, Step 10, Count = Adet. Gives each circle a different radius.
  2. Connect the Series output to the Radius input of Circle. The pipe thickens from one end to the other.
  3. See the numbers inside the Series output with a Panel component.

3. Data types and conversions (1 hour)

  1. Type 100 in a Panel and connect it to a Circle's Radius input: the text is converted to a number automatically.
  2. Create a point with Construct Point (X, Y, Z); split its coordinates with Deconstruct Point.
  3. Create a vector with Unit Z and Amplitude; move the circles by this vector with Move.
  4. Right-click an input: options such as Reparameterize, Reverse, Flatten, Graft appear. We will see them in detail on day 3.
  5. Right-click a parameter and choose Internalise data: the Rhino geometry is copied into the definition. The definition now works independently of the Rhino file.

4. Layout and Bake (45 min)

  1. Select related components, group them with Ctrl + G and name the group: Input, Circles, Surface.
  2. Place inputs on the left and outputs on the right. Try to keep wires from crossing.
  3. Give sliders meaningful names (right-click > name box).
  4. Right-click the Loft output > Bake. Choose a layer. A real surface is created in Rhino.
  5. A baked object is independent of the definition; if you change the definition you need to bake again.
  6. Save: Gun1.gh (Grasshopper file) and Gun1.3dm (Rhino file) are saved separately.

End-of-day check (15 min)

If you can tick them all, move on to day 2.

Bonus: Give the radii with a Graph Mapper instead of Series: bring Series to 0-1 with Remap Numbers, pass it through the Graph Mapper, then remap back to 50-200. Control the pipe's profile by changing the graph's shape.

DAY 02

Lists and numbers: a twisting tower

~5 hours · 0/5 checks

Goal

By the end of the day you will have a definition for a tower façade that twists floor by floor and tapers towards the top. Each floor outline is controlled with lists, number sequences and the Graph Mapper. Time about 5 hours. File: Gun2_Kule.gh.

In Grasshopper most operations are done not with one object but with lists. If you give a component 30 numbers it runs 30 times. Whoever can manage lists knows half of Grasshopper.

1. Number sequences and domains (1 hour)

Component What it produces Example
Series N numbers from a start + step 0, 4000, 8000 … (floor levels)
Range Divides a domain into N parts 10 steps between 0 and 1
Construct Domain A domain (min, max) 0 To 90
Remap Numbers Moves numbers from one domain to another 0-1 → 0-90 degrees
Bounds Creates a domain from a list's min and max domain of a distance list
Random Random numbers depending on a seed panel colour variation
Expression Formula: x*2+y angle calculation

Exercise: floor levels

  1. Sliders: Kat_Sayisi (number of floors) = 30, Kat_Yuksekligi (storey height) = 4000.
  2. Series: Start 0, Step = Kat_Yuksekligi, Count = Kat_Sayisi. A list of floor levels.
  3. Draw a 30 x 20 m rectangle (ground floor outline) in Rhino and connect it to a Curve parameter.
  4. Unit Z (Factor = floor levels) and Move: move the rectangle to each level. 30 floor outlines are created.

2. Twisting and tapering (1.5 hours)

  1. Range: Domain 0 To 1, Steps = Kat_Sayisi - 1. A ratio from 0 to 1 for each floor.
  2. Twist: move the 0-1 range to 0-90 degrees with Remap Numbers and convert to radians with Radians.
  3. Get the centre of each outline with Area and rotate each outline about its own centre with Rotate.
  4. Taper: pass the ratios through a Graph Mapper (Bezier or Sine type), remap the result to 1.0-0.6 and scale the outlines with Scale.
  5. Generate the façade surface from the outlines with Loft.
  6. Move the handles of the Graph Mapper curve: the tower bulges in the middle and tapers at the top.
floor outlines (elevation)Graph Mapper0 → 1 (floor ratio)from above: twist
Tower definition: a 0-1 ratio for each floor; the twist angle and scale derive from this ratio. The Graph Mapper sets the character of the taper.

3. List operations (1.5 hours)

Component Function
List Item Item at a given index (starts at 0)
List Length Number of items
Cull Index / Cull Pattern Remove items by index or True/False pattern
Shift List Shift the list (to pair with the neighbouring item)
Dispatch Split a list in two using a pattern
Sort List Sort by key
Reverse List Reverse
Sub List Items in a range
list0123456789List Item i=30123456789Cull Pattern TF0×2×4×6×8×Dispatch (every 5th)A 0A 1A 2A 3B 4A 5A 6A 7A 8B 9Shift List +11234567890
Basic list operations: picking an index, culling with a pattern, splitting in two with a pattern and pairing with the neighbour by shifting. Indices start at 0.

Exercise: technical floors

  1. Every 10th floor is a technical floor and should show in a different colour.
  2. Dispatch pattern: False, False, False, False, False, False, False, False, False, True (type line by line in a Panel). The pattern repeats along the list.
  3. Output A is normal floors, output B technical floors. Show technical floors in a different colour with Custom Preview.
  4. Pair each floor outline with the one above with Shift List and Loft between them: each floor becomes a separate surface strip.

Data matching

When you give two lists to a component, Grasshopper pairs items in order. If the lists differ in length, the last item of the shorter list is repeated (Longest List). If you give 3 points and 5 radii, the last point is used three times. Most unexpected results come from this rule.

4. Checking and saving (30 min)

  1. Show critical lists with Panel components: levels, angles, scales.
  2. Check the list structure with Param Viewer: one branch, 30 items.
  3. Group the definition: Levels, Twist, Taper, Surface.
  4. Save: Gun2_Kule.gh.

End-of-day check (15 min)

If you can tick them all, move on to day 3.

Bonus: Give each floor's twist angle small random deviations with Random (e.g. ±3°). Try different variations by changing the seed.

DAY 03

The data tree

~5 hours · 0/6 checks

Goal

By the end of the day you will be able to read and manage the data tree and generate panels from a point grid by collecting each panel's 4 corners in the right branches. Time about 5 hours. File: Gun3_Agac.gh.

The data tree is Grasshopper's hardest but most powerful topic. A list is data in a single row. A tree is several lists organised by path names. Panelling, per-floor operations, façade zones and every "group by group" task are done with trees.

1. Reading the tree (1 hour)

View Meaning
{0} Single branch; a normal list
{0;0}, {0;1}, {0;2} 3 sub-branches inside group 0
{0;2}(5) Item 5 in branch {0;2}
Thin single-line wire Single item
Double-line wire List (single branch)
Dashed double-line wire Tree (several branches)
  1. Place a Param Viewer and connect it to any output. It shows the branches and item counts. Right-click > Draw Tree to see the tree as a diagram.
  2. Connect a Panel: the header and content of each branch are listed.
  3. Tree Statistics: number of branches, paths and number of items in each branch.
{0}{0;0}0123{0;1}0123{0;2}01233 branches × 4 itemsFlatten{0} · 12 itemsGrafteach item in its own branch
Data tree: paths ({0;1}) name the branches. Flatten reduces all to one branch, Graft puts each item in its own branch.

2. Tree operations (1.5 hours)

Operation What it does When
Flatten Reduces all branches to a single branch Counting or summing everything in one list
Graft Puts each item in its own branch A separate operation per item (each panel's own points)
Simplify Removes unnecessary common path prefixes When tree paths get long and confusing
Flip Matrix Turns rows into columns Swapping horizontal and vertical groups in a grid
Partition List Splits a list into groups of N Splitting every 4 points into one panel
Path Mapper Renames paths by a rule Advanced regrouping
Explode Tree / Entwine Splits branches into separate outputs / combines them Processing branches separately

Most of these operations also exist as components, but Graft, Flatten, Simplify and Reverse can also be applied by right-clicking an input or output directly. A small icon appears at the end of the wire.

Exercise: matching with Graft

  1. Give 5 points and 3 radii to Circle: 5 circles (Longest List).
  2. Graft the radius input: 3 branches with 5 circles each. Each point is paired with each radius (cross matching).
  3. Graft the points as well and compare the result.

3. Panels from a grid (1.5 hours)

Goal: collect the 4 corners of each panel in order from a point grid and generate surfaces. This is the core of façade panelling.

  1. Square (Vector > Grid) or Rectangular grid: 6 x 4 cells, cell size 1500 x 4000. Outputs: points (as a tree, each column a branch) and cells.
  2. Inspect the point tree in a Param Viewer: {0;0} … {0;6}, 5 points in each branch.
  3. The corners of each panel are: points i and i+1 in the same branch and points i and i+1 in the neighbouring branch.
  4. Get the i+1 points with Shift List (Wrap = False) and remove the last item with Cull Index.
  5. For the neighbouring branch, flip the tree with Flip Matrix, apply the same operation and flip back. Or simpler: shift the branches with Shift Paths.
  6. Combine the four lists with Merge (order: bottom left, bottom right, top right, top left) to get 4 grafted points per panel.
  7. Generate the panels with 4Point Surface. You should get 24 panels.
  8. Check the panel count with Flatten.

Building this method once by hand settles the tree logic. In practice the same job is done in a single component with Isotrim, which we will see on day 4.

4. Checking (45 min)

  1. Get each panel's area with Area and see in the Param Viewer that the tree structure is preserved: the areas are also in column branches.
  2. Mass Addition sums per branch in a tree: the total area of each column. For the total façade area, Flatten first.
  3. Group the definition and save.

End-of-day check (15 min)

If you can tick them all, move on to day 4.

Bonus: On the same grid, build a "brick bond" pattern by offsetting every second panel: separate the odd branches with Dispatch and apply Shift List to only one of them.

DAY 04

Surface panelling and warp

~5 hours · 0/5 checks

Goal

By the end of the day you will have a definition that panels a curved façade surface parametrically, measures each panel's deviation from flatness (warp) and shows it in colour, and gives the panels thickness and frames. Time about 5 hours. File: Gun4_Panel.gh.

1. Surface parameters (45 min)

Every surface has its own internal coordinate system: U and V. Each point on the surface is defined by a (u, v) pair.

  1. Prepare a curved façade surface in Rhino (e.g. a Loft curved in plan and leaning forward at the top).
  2. Connect it to a Surface parameter.
  3. Evaluate Surface: uv = {0.5, 0.5}. Right-click the S input > Reparameterize: the surface domain becomes 0-1, so (0.5, 0.5) is always the middle of the surface.
  4. Outputs: point (P), normal (N), plane (F). The normal direction will be used for panel thickness and sun analysis.
  5. Surface Closest Point: finds the nearest uv on the surface to a point in Rhino.

2. Panelling with Isotrim (1 hour)

  1. Sliders: U_Adet (U count) = 10, V_Adet (V count) = 4.
  2. Divide Domain²: divides the surface's uv domain into U x V parts.
  3. Isotrim (SubSrf): a sub-surface for each part. 40 panels.
  4. Areas with Area, count with List Length.
  5. For the panel corner points use Deconstruct Brep (V output) or Evaluate Surface with uv = {0,0}, {1,0}, {1,1}, {0,1} (S input grafted and reparameterized).
0123UVDivide Domain²U × V cellsIsotrim: eachcell one panel
The surface uv domain is divided into U × V cells and Isotrim makes a panel from each cell. Corners are taken in the order uv = 0,0 · 1,0 · 1,1 · 0,1.

3. Planarity (warp) analysis (1.5 hours)

On a curved façade the panels are not flat. If flat glass is to be used, each panel's deviation must stay below a limit.

  1. Get the 4 corners of each panel (grafted, 4 points per branch).
  2. Take the points with indices 0, 1, 2 with List Item and build a plane with Plane 3Pt.
  3. Project the point with index 3 onto this plane with Plane Closest Point; the D output is the deviation distance.
  4. Flatten the results and show them in a Panel. Find the largest value with Bounds.
  5. Colour: bring the deviations to 0-1 with Remap Numbers, pass them through a Gradient component (green → yellow → red) and show the panels in these colours with Custom Preview.
  6. Threshold: slider Warp_Tol = 3 mm. Separate the panels exceeding the threshold with Larger Than and read their number.
0123Dplane through 0-1-2, distance of 3 to the plane = warp0 mmabove Warp_TolGradient + Custom Preview
Warp calculation: the distance of the fourth corner to the plane through the other three. The result is turned into colour and applied to the panels; red ones may not be possible with flat glass.

Number of panel types

In fabrication the real cost driver is the number of panel types.

  1. Get each panel's width and height (distances between corner points).
  2. Round to 10 mm with Round and create a key such as 1500x4000 with Concatenate.
  3. Find the unique types with Create Set. Number of types = length of the Create Set output.
  4. Find which type each panel belongs to with Member Index. On day 7 we will write this to the panel list.

4. Thickness and frame (1 hour)

  1. For each panel take the normal at the mid-point and set it to the glass thickness (30 mm) with Amplitude.
  2. Thicken the panel surface along the normal with Extrude.
  3. Frame: get the panel edges with Brep Edges, Join Curves, offset 50 mm inwards with Offset Curve on Surface (or Offset Curve for planar panels), then Boundary Surfaces between the two curves and Extrude.
  4. Alternative: place a single panel module (frame + glass) drawn in Rhino into each panel with Box Morph. Use Surface Box for the target boxes.
source module(drawn in Rhino)Box Morphtarget: Surface Boxes on the surface
Box Morph: bends a single module (frame + glass) into each box on the surface.

End-of-day check (15 min)

If you can tick them all, move on to day 5.

Bonus: To keep the panel width fixed at 1500 mm, calculate U_Adet automatically from the length of the surface: measure the bottom edge with Length, divide by 1500 and round to an integer with Round.

DAY 05

Attractors and patterns

~5 hours · 0/6 checks

Goal

By the end of the day you will have made two façade patterns that vary according to a point or an image: perforated cladding with varying hole diameters and vertical sun fins with varying angles. Time about 5 hours. File: Gun5_Desen.gh.

An attractor is a way of deriving a value from its relationship to a point, curve or image. Most parametric façades are made with this simple idea.

1. Attractor logic (1 hour)

Every attractor definition follows the same four steps:

  1. Measure: Find a value for each item (e.g. Distance to the attractor point).
  2. Normalise: Bring the values to 0-1 with Bounds + Remap Numbers.
  3. Shape: Give the change its character with a Graph Mapper (linear, smooth, sharp).
  4. Apply: Remap the 0-1 value to the desired range and give it to the geometry (radius, angle, height).
DistancemeasureBounds + Remap0–1Graph MappershapeRemap → Rapplyattractor point
The four steps of an attractor and the result: perforations growing towards the attractor point.

2. Perforated cladding (2 hours)

Goal: on a 3000 x 1500 mm aluminium panel, holes that grow as they get closer to the attractor point.

  1. Draw a 3000 x 1500 rectangle in Rhino. Make a surface with Boundary Surfaces.
  2. Hole centres on a 30 x 15 grid with Divide Domain² + Evaluate Surface (uv = {0.5, 0.5}). Or an irregular distribution with Populate Geometry.
  3. Place a point in Rhino and connect it to a Point parameter: the attractor.
  4. Distance: the distance of each centre to the attractor.
  5. Bounds + Remap Numbers: 0-1. Give the target domain as 1 To 0 so that the nearest is 1.
  6. Shape with a Graph Mapper, then bring to a 5-40 mm diameter range with Remap.
  7. Circle: centres and radii (diameter / 2).
  8. Fabrication check: the smallest hole must not be under 5 mm and the bridge between two holes not under 3 mm. Calculate the bridge by subtracting the largest diameter from the grid spacing and show it in a Panel.
  9. Drag the attractor in Rhino: the pattern changes live.

Pattern from an image

  1. Image Sampler: choose a black-and-white image (not a logo, but an abstract gradient or a photo of clouds).
  2. Give the hole centres according to the image's 0-1 domain (use the uv values as X and Y with Deconstruct Point).
  3. The brightness value sets the hole diameter. Seen from a distance the image appears on the façade.

3. Sun fins (1.5 hours)

Goal: in front of the curved façade from day 4, a vertical fin at each axis. The angle of the fins changes with the distance to an attractor curve.

  1. Divide the bottom edge of the day 4 surface at 500 mm intervals with Divide Curve: fin points.
  2. Set up a plane perpendicular to the façade at each point (Perp Frames or with the surface normal).
  3. Fin: a 250 x 3500 mm rectangle on each plane (Rectangle + Boundary Surfaces), 300 mm in front of the façade.
  4. Draw a curve in Rhino as the attractor. Find each fin's distance to the curve with Curve Closest Point.
  5. Remap the distance to 0-1, then to 0-75 degrees. Rotate each fin about its own vertical axis with Rotate (angle in radians: Radians).
  6. Change the curve in Rhino: the fins ripple.

End-of-day check (15 min)

If you can tick them all, move on to day 6.

Bonus: Use two attractors: combine the two distances for each item with Minimum. Or round the hole diameters to three standard punch sizes (10, 20, 30 mm); the fabricator cuts with only three punches.

DAY 06

Analysis and Galapagos

~5 hours · 0/5 checks

Goal

By the end of the day you will be able to compare design options with numbers and search automatically with Galapagos for the values that best meet a goal. You will try reducing panel types and searching for a fin angle based on the sun. Time about 5 hours. File: Gun6_Analiz.gh.

The real gain of parametric design is testing not one design but hundreds of variations. For that each variation must have a score.

1. Measuring: design scores (1 hour)

Common criteria in a façade definition:

Criterion How it is calculated
Number of panels List Length
Number of panel types Round + Create Set (day 4)
Maximum warp Plane Closest Point + Bounds (day 4)
Total glass area Area + Mass Addition
Area facing the sun Angle between panel normal and sun vector × area
  1. Open the day 4 definition and collect these criteria in one group: Scores.
  2. Show each criterion in a Panel. Watch the numbers as the design changes.
  3. Data Recorder: records a value at each change. Record how the number of panel types changes while you move a slider.

2. Reducing panel types (1.5 hours)

Goal: reduce the number of types on a curved façade by equalising panel widths within small tolerances.

  1. Calculate each panel's width, sort and view in a Panel: because of the curvature they all differ by a few mm.
  2. Connect the rounding step to a slider: Adim (step) = 1, 5, 10, 25 mm.
  3. Round the widths to this step and read the number of types with Create Set.
  4. As the step grows the number of types falls, but joint widths change. Calculate the joint difference (actual width - rounded width) and show the largest.
  5. Choose the largest step within the acceptable joint tolerance (e.g. ±5 mm).
actual width14931495149614981499150015011503150415061507step 10 mm14901500150015001500150015001500150015101510result11 different widths → 3 types · largest joint difference 5 mm
Reducing panel types: widths are rounded to the chosen step. As the step grows, the number of types falls and the joint difference grows; balance them against the tolerance.

3. Searching with Galapagos (1.5 hours)

Galapagos changes sliders (genes) to find the values that make a number (fitness) largest or smallest.

Genomeslider: Aci (angle)Definitionfins + raysFitnessa single numberGalapagosselect · crossover · mutatethe best value after thousands of trials: Reinstate
The Galapagos loop: it changes slider values, the definition produces a score, Galapagos keeps the values giving the best score and tries new ones.

Exercise: fin angle based on the sun

  1. Use the sun fins from day 5, but this time all fins rotate by the same angle: slider Aci (angle, 0-90).
  2. Sun vector: draw a line in Rhino (from the sun to the façade) and get the vector with Vector 2Pt. For the real sun position the Ladybug plug-in can be used.
  3. A simple measure of the sun reaching the façade panels: a ray (Line SDL) from the mid-point of each glass panel towards the sun and its intersection with the fins via Brep | Line. A ray that intersects = in shade.
  4. Score: the ratio of glass panels in shade. This value should be as large as possible.
  5. But at 90° the fins close the façade completely. Add a second criterion: the ratio of a view ray perpendicular to the façade hitting the fins (loss of view).
  6. Fitness: shade ratio - 0.5 × view loss (with Expression).
  7. Place the Galapagos component: connect the Aci slider to the Genome input and the Expression output to the Fitness input. Double-click, Maximize, Start Solver.
  8. Galapagos tries different angles and finds the best result. To apply the found angle choose Reinstate from the results list.

Caution

  • Galapagos is only as good as your score definition. A badly defined fitness gives results that are mathematically correct but architecturally absurd.
  • With many genes and a slow definition, a search can take hours. Speed up the definition first (turn off previews, disable heavy components).

End-of-day check (15 min)

If you can tick them all, move on to day 7.

Bonus: Give Galapagos two genes: U_Adet and V_Adet. Fitness: minimise the number of panel types while keeping the maximum warp below the threshold (add a large penalty to the score if the threshold is exceeded).

DAY 07

Clusters, output and Python

~5 hours · 0/5 checks

Goal

On the last day you make the definition usable by others: repeated parts become clusters, panels are numbered and labelled, the panel list is written to CSV and the result is baked with layers and attributes. You will also write a small Python script. Time about 5 hours. File: Gun7_Cikti.gh.

1. Cluster (1 hour)

A cluster turns a group of components into a single component. The definition becomes simpler and the same operation can be used in other definitions.

  1. Select the warp calculation components from day 4 (Plane 3Pt, Plane Closest Point and the list operations between them).
  2. Right-click > Cluster. It becomes a single component.
  3. Double-click the cluster: you go inside. Name the inputs and outputs with Cluster Input and Cluster Output components: Paneller (panels) → Warp.
  4. Save the cluster as a user object with File > Create User Object. It appears as your own component in the Grasshopper tabs.
List ItemPlane 3PtList ItemPlane CPFlattenselected componentsClusterWarpPaneller (panels)Warpsaved as a User Object
Cluster: a group of components becomes a single component with named inputs and outputs; the definition is simplified and can be reused in other work.

2. Numbering and labels (1 hour)

  1. Arrange the panels in the order you want: first floor (V), then left to right (U). If needed use Sort List by the Z and X values of the mid-points.
  2. Numbers from 1 to the panel count with Series, then Format with P-{0:000}: P-001, P-002…
  3. Text Tag 3D: write labels at each panel's mid-point, facing the normal direction.
  4. Add the panel types to the label: P-012 · T3 with Concatenate.

3. Panel list: CSV (1 hour)

  1. Prepare one row per panel: panel no., type, width, height, area, warp.
  2. Join as P-001;T1;1500;4000;6.00;0.8 with Concatenate or Format.
  3. Add the header row at the top with Merge: Panel;Tip;Genislik;Yukseklik;Alan;Warp (panel; type; width; height; area; warp).
  4. Connect the result to a Panel, right-click the Panel > Stream Contents, file name panel_listesi.csv.
  5. Open the CSV in Excel (separator semicolon). Compare the total area with the Mass Addition result in the definition.

4. Bake: with layers and attributes (45 min)

  1. The classic way: right-click the output > Bake, choose a layer. All panels go to one layer.
  2. In Rhino 8 there are model object components inside Grasshopper: they write geometry to Rhino with layer, name and user text. Bake the panels so that they go to different layers by type (Panel::T1, Panel::T2) and the panel number is written to the object name.
  3. Click a panel in Rhino and check its name and Attribute User Text in Properties.

5. Python with the Script component (1 hour)

Some tasks are long with components but short with a few lines of code. In Rhino 8 the Script component runs Python 3 and C#.

  1. Place a Script component on the canvas and set its language to Python 3.
  2. Inputs: genislik (width, List Access), adim (step, Item Access). Output: tipler (types).
  3. Code:
# Round the widths to the step and give each panel a type code (T1, T2...)
rounded = [round(g / adim) * adim for g in genislik]
unique = sorted(set(rounded))
tipler = ["T{}".format(unique.index(y) + 1) for y in rounded]

The type calculation you did with several components on days 4 and 6 is now in a single component. Choosing the input access type (Item / List / Tree) correctly matters: List Access makes the component receive the whole list at once.

Script (Py3)genislik ▤adim •tipler▤ List Access · • Item Accesswidthroundedtype14961500T215031500T214881490T115091510T3
Script component: a few lines of Python round the widths and give each panel a type code. The input access type determines whether the code receives a single item or the whole list.

End-of-day check (15 min)

After the week

  • Plug-ins: Ladybug (sun and climate analysis), Kangaroo (form finding, membranes), Pufferfish and LunchBox (panelling helpers), Elefront or the Rhino 8 model components (advanced baking). All are downloaded from food4Rhino.
  • Transfer to BIM: To bring the panels you generate in Grasshopper into Revit, day 5 of the Revit course on this site covers Rhino.Inside.Revit.
  • Rhino foundation: For surface quality and drawing production, see the Rhino course.