Rhino

Rhino

The term common is meant to be just that: an SDK that can be used across Rhino platforms. A plugin built with RhinoCommon could potentially run on both Windows and Mac platforms with no changes…

Inside RhinoCommon

RhinoCommon is composed of the following pieces. These files are included with Rhino for Windows and Mac:

  1. RhinoCommon.dll – This is a pure .NET DLL that plugins can reference and use to work with Rhino.
  2. RhinoCommon.xml – This is an XML file that contains SDK documentation comments specific to RhinoCommon.dll. Programming development environments like Visual Studio and MonoDevelop use this XML file to display tooltips and other helpful information while the developer writes code.
  1. rhcommon_c.dll and monomanager.rhp – These are C++ shared libraries compiled for specific target platforms (Win64 and macOS). These libraries are used by RhinoCommon, but should never be directly accessed by plugin developers.

Rhino uses RhinoCommon

All .NET plugins that ship with Rhino for Windows and Rhino for Mac, including the Python interpreter, reference RhinoCommon.

In 2011, Grasshopper was rewritten using RhinoCommon. This was a big project and took some time to complete, but once done it provided performance improvements and better memory management. This is also a step toward Grasshopper running on Rhino for Mac.

The Python script engine is entirely based on RhinoCommon. All python scripts use RhinoCommon to work with Rhino. Typically, if it is difficult to write a Python script using a RhinoCommon API, then the RhinoCommon SDK needs to be fixed.