Grasshopper

algorithmic modeling for Rhino

Scripting and Code Tutorials

Grasshopper contains a VB.net and C# component. These components allow you to run your own custom code within Grasshopper. Understanding how to make even simple code components can be very useful in Grasshopper definitions.


The VB.NET and C#.NET components in Grasshopper access the Rhino .NET SDK (Software Developers Kit) and OpenNURBS (Geometry format) within Rhino. As you learn about the Code components, knowing a bit about the SDK and OpenNurbs will be useful.

Note to RhinoScript users: There has been many requests to support RhinoScript in Grasshopper. This is not technically possible. We are working on making VB.net more accessible to Rhinoscript coders. The following tutorials are created to help RhinoScripters to make the transition to VB.net within Grasshopper. In the future we are looking to add many of the RhinoScript style functins into VB.net.

The last chapters in the Grasshopper Primer are a great introduction to the VB.net component within Grasshopper. Topics range from:


An Introduction to Scripting
  • Script components Basics
  • Debuging Information
  • Introduction to Visual Basic DotNET
  • VB Variables, Arrays and Lists
  • VB Conditional Statements, Loops
  • Recursion
  • Lists and Trees Grasshopper
  • File I/O


Rhino .NET SDK Overview
  • Understanding NURBS
  • OpenNURBS Objects Hierarchy
  • Class Structures OpenNURBS
  • Geometry Transformation in the SDK
  • Global Utility Functions

Click here to download the Grasshopper Primer...



Further specific sample definitions and code examples can be found here:



General information on the SDK and VB.NET is also available:

Comment

You need to be a member of Grasshopper to add comments!

Join Grasshopper

Comment by Steve Lewis on November 22, 2013 at 3:07pm

who said VB is going to be phased out? That is the first I have heard I strongly doubt it will as both C#.NET and VB.NET compile to the exact same CLR

Comment by Jacky Liang on November 13, 2013 at 8:15am

Is there any tutorials for explicitly C#? It appears the second edition only has VB, which appears it will be phased out soon.

Comment by kawamura on January 26, 2013 at 6:09pm

 I will be stuiding Mathematical modeling with grasshopper

Comment by WonfungGorl on May 14, 2012 at 5:25am

Very well ! I am going to learn grasshopper!

© 2014   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service