Rhinocommon with Xamarin on OS X platform

I would like to read 3dm files and extract sections of 3d geometry or calculate areas of surfaces within an application written in C# using Xamarin on a mac platform. Is it possible to use Rhinocommon within Xamarin? I downloaded Rhinocommon source and examples from github but had no luck so far.

We need to ship an OSX compatible version of Rhino3dmIo which we currently don’t have. @dan or @alain would this be something you guys can help put together?

@stevebaer Sure, I’ll look into it.

@vassilisstratis Out of curiosity, are you using MonoMac or Xamarin.Mac?

I use the current version of Xamarin Studio for OS X which is backed up by MonoMac.

Does this imply that there is no possible way to access a 3dm file from a OSX app made with MonoMac?

I tried to use the Rhinocommon with MS Visual Studio Express (latest version) with no luck.


If you’re using he latest version of Visual Studio there’s a NuGet package available.

  • In Solution Explorer right-click on your project file and select “Manage NuGet Packages …” from the context menu.
  • From the dialog expand “Online” on the left and click on nuget.org
  • search for “Rhino3dmIO” in the top right search box
  • install and you should be good to go.

Not on OSX; we need to produce an OSX compatible binary which is something @dan is currently looking into.

Thank you for yours answers. I managed to get it work with Visual Studio on Windows running using Parallels… Now I have to figure out how to section surfaces programmatically and then keep the section curves and possibly do some useful stuff with them.

Just to be clear, you would need to use Rhino to generate the section curves since intersection and area calculations are NOT part of the open source Rhino3dmIo toolkit.

The toolkit would be used for reading 3dm files with the curve information and getting Curve classes that you can do something with.

Thank you for your answer. I have seen examples of C# code in this forum using the Rhino.Geometry.AreaMassProperties class.

I am a bit confused. If I have the Rhinoceros modeler installed (say version 5 for example). Is it possible to use such methods inside C# code?

I think there are two different assemblies being discussed here.

RhinoCommon - this is the assembly that Rhino plug-ins and python scripts have access to. This assembly makes things like intersections and mass property calculations available. RhinoCommon only works when you are running in the Rhino process.

Rhino3dmIo - this is an assembly that can be used outside of Rhino. It’s primary purpose is for reading and writing 3dm files. Intersections and mass property calculations are not available in this assembly.