Grasshopper and Rhino: C# Scripting
2h 48mIntermediate2020-08-31
Authors

Jeremy Graham
Registered Architect
Course details
Grasshopper, the visual programming plugin for Rhino, offers many features that can help you generate complex parametric models. Want to push the boundaries of what Grasshopper can do even further? This course shows you how. Join instructor Jeremy Graham as he goes over the fundamentals of C# programming in Grasshopper, explaining how to extend the plugin's functionality by working directly with the Rhino API. To begin, Jeremy demonstrates how to set up Grasshopper to work with C#. He then covers basic C# concepts like strings, collections, and arrays, and steps through how to build all kinds of geometry with C#. After completing the course, you'll have the knowledge you need to start using C# to extend the functionality of Grasshopper and improve your ability to formulate innovative designs.
Skills covered
GrasshopperRhinoRobert McNeel & AssociatesC#Product and Industrial Design3D ModelingVisualization and Real-TimeAECProduct and ManufacturingAnimation and IllustrationProgramming LanguagesMicrosoftSoftware DevelopmentDeep Dive (X:Y)
Concepts
Introduction
- Pushing Grasshopper with C#
- What you should know
Grasshopper Setup
- The C# component
- Data access
- Object-oriented programming
- RhinoCommon
- Searching RhinoCommon
- Script editor structure
C# Basics
- Commenting
- Variables
- Numbers
- Strings
- Collections
- Arrays
- Comparing with operators
- Conditionals
- Logical operators
- Looping with the for loop
- Foreach looping
- Nested loops
- Methods
- Reference vs. value types
- Try and catch
Building Geometry
- Creating curves
- Transforming
- Surfaces
- Divisions
- DataTrees
- Paneling
- Splitting
- Recursion
- Baking
Conclusion
- Next steps