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!

Comment by hilda ezzat on July 17, 2022 at 10:24pm

hi, can you help me figure out this commends name?

Comment by EHSAN SAMADI on January 6, 2018 at 3:24am

http://developer.rhino3d.com/api/RhinoCommonWin/html/M_Rhino_Geomet...

Comment by EHSAN SAMADI on January 6, 2018 at 3:23am

hi please teh help me to write offset brep in rhino6 c# grasshoperoffset%20brep.gh

Comment by Krzysztof Nazar on August 23, 2017 at 4:38pm

Hi,
I had a pleasure to lead C# for GH workshops with Petras Vestartas. There was an additional edition in Berlin for which I prepared a C# in a nutshell reference. I will update it with some walkthrough examples in the future. Reference can be found here: Basic C# for GH3d Reference @issuu
All example files and .pdf are here: OneDrive

Enjoy, feedback is welcome.

Comment by waad saeed on August 3, 2017 at 2:32am

any articles (books) for connecting to Graghisoft / archicad..?

Comment by Petras Vestartas on December 12, 2016 at 8:30am

We (Petras Vestartas, Krzysztof Nazar, Adrian Krezlik ) have been organizing workshop for C# (Visual Studio), RhinoCommon and Grasshopper components. 

If there is an interest for tutorials and documentation here is the link:

C# Tutorials

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 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!

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service