Grasshopper and Rhino: Python Scripting

Grasshopper and Rhino: Python Scripting

5h 4mBeginner2018-08-08

Authors

Jeremy Graham

Jeremy Graham

Registered Architect

Course details

Grasshopper allows designers to perform graphical, component-based algorithmic modeling in Rhino. Python extends this functionality, allowing you to create custom scripts for Grasshopper and perform more complex workflows by working directly with the Rhino API. This course introduces the Python programming language to designers who want to do more with Grasshopper. Learn the basics of Python, including variables, data types, conditionals, and loops, and discover how to import additional libraries to extend Grasshopper. Instructor and computational design expert Jeremy Graham then introduces workflows for lofting, sorting, and baking geometry in Grasshopper—using powerful and fast Python scripts that push the boundaries of this visual programming tool.

Learning objectives
Python components
Accessing the Rhino API
Python programming basics
Importing modules and libraries
Grasshopper workflows
Evaluating surfaces
Creating and splitting surfaces
Transforming geometry
Baking geometry from Python into Rhino
Adding text objects
Exporting rendered frames for animation

Skills covered

GrasshopperRhinoRobert McNeel & AssociatesPythonProgramming LanguagesOpen SourceSoftware DevelopmentDeep Dive (X:Y)

Concepts

Introduction

  • Welcome
  • What you should know
  • Exercise files

Working with Python

  • Python component basics
  • What is OOP
  • Rhinoscriptsyntax
  • RhinoCommon

Python Basics

  • Variables
  • Numbers
  • Strings
  • Lists and tuples
  • Comparing with operators
  • Making decisions with conditionals
  • Comparing Booleans
  • For loop
  • While loop
  • Nested loops
  • Defining custom functions

Importing Modules and Libraries

  • Modules
  • IronPython and Python
  • Importing libraries
  • Grasshopper library
  • Grasshopper components
  • Grasshopper Parallel
  • Creating and saving modules

Grasshopper Workflows

  • Evaluating surfaces
  • Creating panels
  • Splitting
  • Sorting
  • Attractors
  • Transforming
  • Lofting
  • Analysis
  • Accessing the Rhino document
  • Baking form
  • Adding text
  • Animating form
  • Animating renders

Conclusion

  • Next steps
100,000 Toman