liminfo

Grasshopper Reference

Free reference guide: Grasshopper Reference

26 results

About Grasshopper Reference

The Grasshopper Reference is a comprehensive cheat sheet for Rhino's visual programming environment, covering core components for parametric design workflows. The essentials section documents number generation with Series (start/step/count) and Range (domain division into N+1 values), list manipulation with List Item (index-based extraction with wrap support), Dispatch (True/False pattern splitting into two groups), and Cull Pattern/Cull Nth/Cull Duplicates for filtering. Remap Numbers is covered for domain-to-domain value transformation, essential for connecting sliders to surface parameters and normalizing data.

The surface operations section explains NURBS surface creation from control point grids (Surface From Points with interpolation toggle), Evaluate Surface for extracting 3D points, normals, and local frames at UV coordinates, Isotrim (SubSrf) for UV-domain-based panel subdivision using Divide Domain^2, Loft for connecting multiple section curves (Normal/Loose/Tight/Straight/Developable types), and Offset Surface for double-skin facade and structural gap modeling. The data tree section covers the fundamental {A;B;C} path notation, Flatten for merging all branches into a single list, Graft for separating items into individual branches, Flip Matrix for row/column transposition, and Entwine for combining multiple inputs into one tree.

The reference includes scripting with C# (RunScript with typed parameters and ref outputs) and GhPython (Rhino.Geometry access, ghpythonlib.components for calling GH components from Python), plus the Expression component for inline math (Math.Sin, Math.Sqrt, ternary operators). The plugins section covers Kangaroo Physics (Bouncy/Zombie Solver, Anchor/Spring/Pressure goals for minimal surface and tensile structure form-finding), Ladybug/Honeybee (sun path, radiation analysis, energy simulation with EPW files), Weaverbird (Catmull-Clark/Loop subdivision, Dual Mesh, wireframe patterns), Lunchbox (Diamond/Hexagonal/Quad panels, math surfaces), and Anemone for iterative loops.

Key Features

  • Core component reference: Series (start/step/count), Range (0-1 domain division), Remap Numbers (domain mapping), List Item (index extraction), Dispatch and Cull Pattern (list filtering)
  • NURBS surface operations: Surface From Points with control point grids, Evaluate Surface (UV to point/normal/frame), Isotrim paneling with Divide Domain^2, Loft types, and Offset Surface
  • Data tree mastery guide: {A;B;C} path notation, Flatten (tree to list), Graft (items to branches), Flip Matrix (row/column transpose), Entwine (merge inputs to tree), and matching rules
  • C# and Python scripting: RunScript typed parameters, Rhino.Geometry point/plane/circle creation, ghpythonlib.components bridge, and Expression component math functions
  • Kangaroo Physics plugin: Bouncy/Zombie Solver, Anchor/Spring/Length/Pressure goals for minimal surface form-finding and fabric draping simulation
  • Ladybug/Honeybee environmental analysis: sun path diagrams, solar radiation analysis, building energy simulation, daylight analysis with EPW weather data integration
  • Weaverbird mesh operations: Catmull-Clark and Loop subdivision, Stellate/Thicken, Dual Mesh, wireframe/window patterns for architectural facade design
  • Data matching rules (Longest List, Shortest List, Cross Reference) and Graph Mapper (Bezier, Gaussian, Perlin curves) for controlling parametric value distributions

Frequently Asked Questions

What is the difference between Series and Range components in Grasshopper?

Series generates numbers from a start value with a fixed step for a specified count (e.g., Series(0, 30, 12) produces 12 values: 0, 30, 60, ..., 330). Range divides a domain into N equal parts, producing N+1 values (e.g., Range(0 to 1, 10) produces 11 values: 0.0, 0.1, 0.2, ..., 1.0). Use Series for evenly spaced sequences and Range for parameter-based curve or surface division where you need values normalized between 0 and 1.

What is a data tree in Grasshopper and why is it important?

A data tree is Grasshopper's hierarchical data structure that organizes lists into branches identified by paths like {0;0}, {0;1}, {1;0}. Unlike simple lists, data trees preserve the relationship between groups of data, for example keeping points organized by which curve they were divided from. Understanding Flatten (merge all branches), Graft (separate items into branches), and Flip Matrix (transpose rows/columns) is essential for controlling how components process multi-branch data.

How do I create paneled surfaces using Isotrim and Divide Domain^2?

Connect your surface to Divide Domain^2 with U and V division counts (e.g., U=10, V=5 creates 50 UV domain cells). Then connect the Divide Domain^2 output to Isotrim (SubSrf), which extracts a sub-surface for each domain cell. This produces 50 individual surface panels. Right-click the surface input on Divide Domain^2 and select Reparameterize to ensure the UV domain is normalized to 0-1. This is the fundamental technique for architectural facade paneling.

What are the different Loft types and when should I use each?

Normal creates a standard lofted surface between curves. Loose produces a loose approximation that does not pass exactly through the input curves. Tight forces the surface to pass through each curve precisely. Straight creates ruled surfaces with linear connections between corresponding points. Developable creates a surface that can be unrolled flat without distortion, useful for fabrication. Always ensure curve directions (seams) match using the Flip component before lofting.

How do I use Kangaroo Physics for form-finding in Grasshopper?

Connect goals to either the Bouncy Solver (real-time interactive) or Zombie Solver (background calculation, faster). Common goals include: Anchor to fix points, Spring to create elastic connections, Length(Line) to set target edge lengths, and Pressure for pneumatic inflation. For a minimal surface, create a mesh boundary, anchor the edge vertices, apply a Length goal to all edges, and let the solver find the equilibrium shape. This is used for tensile structure and fabric draping design.

What is the difference between Flatten, Graft, and Entwine in data tree operations?

Flatten collapses all tree branches into a single list at path {0}, losing the original branch structure. Graft converts each item in a list into its own individual branch (e.g., {0} = {A,B,C} becomes {0;0}={A}, {0;1}={B}, {0;2}={C}), essential for one-to-many operations. Entwine merges multiple separate inputs into one data tree with different paths, unlike Merge which combines data into the same path. Use Graft when you need each item processed independently, such as drawing individual circles at each point.

How do I write custom scripts in Grasshopper using C# or Python?

For C#, use Maths > Script > C# Script. The RunScript method receives typed inputs (List<Point3d>, double) and outputs via ref parameters. For Python, use Maths > Script > Python Script with import Rhino.Geometry as rg to access geometry classes. You can also call Grasshopper components from Python: import ghpythonlib.components as ghcomp; pts = ghcomp.DivideCurve(curve, 10, False). Add/remove input parameters with the +/- buttons and set Type Hints for proper data conversion.

What are the three data matching rules and how do they affect component behavior?

Longest List (default): shorter lists repeat their last item to match the longest (A={1,2,3}, B={10,20} gives A+B={11,22,23}). Shortest List: processing stops at the shortest input (A+B={11,22}). Cross Reference: every combination is computed (A={1,2}, B={10,20} gives {11,21,12,22}). Set matching via right-click on the component. Understanding these rules is critical for controlling parametric relationships, especially when inputs have different list lengths.