w3 Logic & Data

Workshop 3 begins an introduction to scripting in Grasshopper using VB.NET components. The emphasis is on exposure to various data types, flow control and basic geometry. These examples, therefore, focus primarily on reorganizing data into new arrangements and coordinating separate data sources, while relying on nonscripted Grasshopper components for most of the geometric operations.

Planarity / Graphic Representation

Subdivide a surface and create planar panels color coded by deviation from support surface.
From the Athens workshop (originally written by LaN) ghx here
Plane CP, Gradient

First DotNet VB Script: create a series of points and rectangles with a given length and width ghx here
For Loops, On3dPoints, OnPolyline

A variety of ways to make curves with a VB Component ghx here
Nested Loops, On3dPointArrray, OnPolyline, OnNurbsCurve, InterpCurve

Disturb points like a magnetic field with multiple reaction curves using Curve Closest Point and VB Components to define Data Trees, Mathematical operations, and Vector Functions. ghx here
Conditionals, Pull, Curve CP, On3dVector, Math., VB DataTree, GH_Path

An extension of the previous definition, this adds lines drawn with VB Components (also 3D Proximity) applied to the disturbed grid to create various networks between geometries. ghx here
Proximity, OnPolyline


Reading a Comma Separated Value list to create a Network Topology ghx here
Conditionals, For Each, Read .txt, .Split, VB DataTree, GH_Path

Constructing faces from a Network Topology, Reading Space Separated Values ghx here
Read.txt, .Split, Proximity, Plane CP, Convex Hull, Region Difference

Reading values from and writing to .xls/.ods spreadsheets with Open Office Calc
written by LaN
ghx here

Reading values from spreadsheets with Open Office Calc to control a component schedule
written by LaN
ghx here


Grasshopper Forum Scripting & Code Tutorials
Grasshopper Primer 2nd Edition pp. 98-161
National University of Singapore Scripting Resources
Rhino .NET SDK
GHX forum discussion on VB.NET resources
Essential Mathematics for Computational Design -Rajaa Isaa