A Simple Way to Learn Rhino Common through Rhino Python

I was asked a couple of times about what is the best way to learn Rhino Common, which are the library that Rhino Grasshopper and Rhino Python is based on. Of course there are always the helpful McNeel Rhino Common developer page and Grasshopper discussion forum on VB .net and C# available that we can learn from.

However, if you are already familiar with Rhino Python or Rhinoscript, a even simpler method is available. This method will allow users to see what actual Rhino Common functions are used in the Rhino Python functions and learn from it. I will show how this method works.

In Rhino Python editor, there is a somewhat “buggy” debugger available.

rhino python editor

rhino python editor

Break points can be inserted to the editor.(Click on the empty area by the line or go to that line and click the toggle break point button.)

break point in rhino python editor

break point in rhino python editor

When running the script in debug mode, the script will stop at the break point.

step into in rhino python debugger

“step into” function in rhino python debugger

If you use the step into function of the debugger, you can step into the actual Python code. A new tab will automatically pop up if the definition is in some other file. For example, here is the rs.CurveFrame function. You can learn so much about Rhino Common from stepping through the code.

curve frame function

curve frame function