GRASSHOPPER NOTES – PRINCIPLES

Week 06 | Introduction to Grasshopper: Primitive Geometry + Data Tree (LINES FROM POINTS)

GOAL: To learn the basics of Grasshopper and its relationship to Rhino by creating lines from points; to explain the fundamentals of Grasshopper’s Data Tree organization.

CLASS EXERCISES
| Introduction to Grasshopper: interface + components (types, uses, etc.) |

Launching a Grasshopper Script:

  1. Many .gh scripts have a corresponding Rhino file that must be launched first. Typically, these two files will have similar naming schemes but one will have the extension .3dm and the other will be .gh
  2. If there is a corresponding Rhino script, double click to launch it. If there isn’t a corresponding file you may open a new Rhino file or select one of the templates.
  3. Once the rhino file is open, type “Grasshopper” into the command line and press enter.
  4. After Grasshopper loads you can open the corresponding Grasshopper file in several ways:
    1. Click the green & white “Open” icon and navigate to the file location.
    2. Click File>Open and navigate to the file location.
    3. Drag the file directly into the Grasshopper window.

Script 3.1A: Single line from points: create points in both Rhino and Grasshopper, create line, preview on/off, bake.

  • NOTES | Components you will need:
    • [Point] Holds 3D point(s) in a list.
    • [ConstructPoint] Create a 3D point in Grasshopper that will appear in Rhino. 
    • [Slider] A range of numerical values that can be quickly changed.
    • [Line] Creates line between two points.
    • [Panel] View and create custom notes and data.
  • STEP 01: Create two points
    • Method 01: First,  create two points in Rhino. Reference these points in individual [Point] components. Create a Point component, then > right click > “Set One Point” > select the Rhino 3D point. Do this for both point components.
    • Method 02: Create two [ConstructPoint] components and three [Slider] components for each. Use these sliders for the X, Y, Z inputs to create the points within Grasshopper.
  • STEP 02: Create line (curve)
    • Retrieve a [Line] component. Plug output of points into input of the line. Note: there are multiple types of line components, make sure that you use the one with the subtext ‘Create a line between two points.”

Script 3.1B: Multiple lines from points, graft/flatten (Data Trees).

  • NOTES: Components you will need.
    • [Point] Holds 3D point geometry.
    • [ConstructPoint] Create a 3D point in Grasshopper.
    • [Slider] A range of numerical values.
    • [Line] Creates line between two points.
    • [Panel] Custom notes and data.
    • [Move] Move geometry in a direction.
    • [DivideCurve] Divide curves into equal length segments.
    • [ParamViewer] Visualize data structure.
    • [ListItem] Access a specific item from a list.
    • [GraftTree] Removes all branches (condenses list into one group of information).
    • [FlattenTree] Creates branch (adds a level of hierarchy by placing each object in the list into its own group).
  • STEP 01: Copy previous script
    • Use Ctrl+C, Ctrl+V to do this and place the copy in a new location on the Grasshopper canvas.
  • STEP 02: “Copy” line
    • Use a [Move] component in Grasshopper to “copy” the initial line to a second location within Rhino.
  • STEP 03: Divide lines
    • Use [DivideCurve] to create equidistant number of points on each line.
  • STEP 04: Create lines between points
    • Use the previously created points in conjunction with the [Line] component to create straight curves between them.
    • Use the [GraftTree] and [FlattenTree] components to understand underlying data structure.

Deliverable (due at end of class period): a screenshot using Snip&Sketch in Windows or use the command ViewCaptureToFile in Rhino.

| External Forces + Simple Operations (ATTRACTOR BASED ALGORITHMS)|
Script 3.1c: Circles derived from GH square grid, first same radii, then with point-attractor cluster.
Script 3.1d: 3D sub-divided NURBS surface point-attractor.
Deliverable (due at end of class period): a screen capture of your script.

Skip to toolbar