Site Tools


Python scripting for Rhino and Grasshopper

What is Python

Python is a modern “programming language”, it is typically easier to learn and use than other non-scripting style languages like VB.NET, C#, or C++. Yet it is quite powerful.

You may need Python if you want to:

  • Automate a repetitive task in Rhino much faster than you could do manually
  • Perform tasks in Rhino or Grasshopper that you don't normally have access to in the standard set of Rhino commands or Grasshopper components
  • Generate geometry using algorithms
  • Many many other things. It is a programming language after all.

Getting Started / Tutorials

Windows and Mac

Both the Windows and Mac versions of Rhino contain support for the Python scripting language.

Since Rhino python scripting is available on both platforms, the same python scripts can run on both “breeds” of Rhino!

Python in Rhino Resources

RhinoScript style functions - Once you understand a bit about Python, importing the rhinoscriptsyntax module will give your python script access to Rhino functions. This package defines a large set of functions for working with Rhino. More information about these functions can be found at rhinoscriptsyntax

Using RhinoCommon - Python scripts also have full access to the .NET framework including access to Rhino's RhinoCommon SDK. A description of accessing RhinoCommon from python scripts can be found at PythonAndRhinoCommon

Examples - can be found in the above rhinoscriptsyntax and RhinoCommon pages.

Questions?

Visit the http://discourse.mcneel.com/category/scripting to get answers from the Rhino development team and other Rhino users with scripting experience.

What about RhinoScript?

Rhino already has scripting language called RhinoScript. There are no plans to stop supporting RhinoScript and we will continue to add functions to RhinoScript based on requests.

developer/python.txt · Last modified: 2014/06/26 (external edit) · Currently locked by: 68.180.225.102