Grasshopper
Hello There!
Having done a few workshops in rhino and grasshopper before Fabricademy, I wish I had known how to document earlier. Anyway, it's not too late, I'm learning grasshopper basics in Fabricademy again, and I want to document it along with my earlier learning so that people interested in computational design can benefit from it.
Inspiration¶
Earlier Works¶
Here are some of my earlier works.
Introduction to Grasshopper¶
About Grasshopper¶
Grasshopper, a visual programming editor was developed by David Rutten at Robert McNeel & Associates as a plug-in for Rhino3D.
Grasshopper and Rhino offer us the opportunity to define precise parametric control over models, the capability to explore generative design workflows, and a platform to develop higher-level programming logic all within an intuitive, graphical interface.
History
The origins of Grasshopper can be traced to the functionality of Rhino3d Version 4’s “Record History” button. This built-in feature enabled users to store modeling procedures implicitly in the background as you go.
Back in 2008, David posed the question: “What if you could have more explicit control over this history?” and the precursor to Grasshopper, Explicit History, was born. Years later, Grasshopper is now a robust visual programming editor that can be extended by suites of externally developed add-ons.
Useful links:
Interface¶
-
Windows title bar
-
Main Menu bar: Access commands, options and help.
-
Component Palette : Organizes components into categories and sub-categories. Categories are displayed as tabs, and subcategories are displayed as drop-down panels.
-
Canvas Toolbar: The canvas toolbar provides quick access to a number of frequently used Grasshopper features. Also used to to change the view of the output
-
Canvas: The canvas is the primary workspace for creating Grasshopper definitions.
-
Recently accessed: Shows the files most recently accessed and will display a red rectangular box if the file cannot be found.
-
Search : Find components by name, by doubleclicking on any empty space on the canvas and in the name of the component.
-
Radial Menu: The Radial UI menu allows you to quickly access frequently used menu items. Access it by pressing the middle mouse button.
Workflow¶
Parameters and Components¶
Grasshopper consists of two primary types of user objects: parameters and components. Parameters store data, whereas components perform actions that result in data.
Components¶
The color of the component on the canvas indicates its state. An active component becomes green as shown below.
Wire Connections¶
Creating Objects¶
There are two ways to start modeling on Grasshopper:
1) Draw reference curves and planes on Rhino and define them as parameters on Grasshopper.
2) Defining starting curves and points using just parameters and components on Grasshopper
Lists¶
One of the most powerful features of Grasshopper is the ability to quickly build and manipulate lists of data.
When storing data in a list, it’s helpful to know the position of each 1) Item in that list so that we can begin to access or manipulate certain items. The position of an item in the list is called its 2) Index Number.
Data Tree¶
The data tree is the hierarchical organization of the data. Each branch of the tree can contain data. This can be a variety of data , surfaces, curves, points etc
Trees can be of great help for performing operations over different sets of data simultaneously without creating copies of the script, as well as keeping relevant information together to avoid unnecessary operations.
Rather than having to identify an index number of an item to make an edit in a list which is a tedious task, data tree is a much more useful way of organizing this data.
This is because you can easily access and operate on all the points in a given row or column, delete every second row of points, connect alternating points, etc.
There are different ways to understand Data Tree
Point and Curve Attractor¶
In Grasshopper, any geometry referenced from Rhino or created within Grasshopper can be used as an attractor. Attractors can influence any number of parameters of surrounding objects including scale, rotation, color, and position. These parameters are changed based on their relationship to the attractor geometry.
Resource Book - Rhino and Grasshopper 101
Basics¶
You can download the files here to learn basics by Eugenio Bettucchi
Uaeful link Here
To create a line between two points.
To construct a point from {xyz} coordinates.
Vector xyz: To Create a vector from {xyz} components.
Move: To Translate (move) an object along a vector.
Unit vector parallel to the world {X} axis
Unit vector parallel to the world {Y} axis
Unit vector parallel to the world {z} axis
Rotate: To Rotate an object in a plane.
XY Plane: World XY plane.
Scale: To Scale an object uniformly in all directions.