RhinoCommon is nearly ready on Mac

RhinoWIP now supports plugin development. Using the RhinoCommon SDK you can now write plugins that run on both Rhino 5 for Windows and Rhino 5 for Mac.

Download RhinoWIP for Mac build 5B92w here.

We plan to release plugin support with Rhino 5.1 for Mac.

To get started, follow these guides:

  1. What Is RhinoCommon?
  2. What are Mono & Xamarin?
  3. Installing the Tools (Mac)
  4. Your First Plugin (Mac)
  5. Debug in RhinoWIP (Mac)
  6. Plugin Installers (Mac)

We need your feedback:

  • Were you able to create a basic plugin?
  • What’s not working?
  • Did you have trouble following the guides?
  • What is confusing?

The help you can provide testing is welcome and appreciated.

12 Likes

I’m wondering about the c++ sdk, is that also on the roadmap for Mac?

A C/C++ SDK is not currently on the Rhino 5 for Mac roadmap.

Hi. I develop the OctaneRender for Rhino plugin, and would love to migrate the plugin to OSX. I ran http://www.mono-project.com/MoMA to the plugin RHI and it reported a lot of errors - predominantly due to the use of System.Runtime.InteropServices.DllImportAttribute() - required for the C# code to interface to the Octane dll. Do you think this will be a showstopper?

Thanks

Paul

1 Like

I don’t think that is a showstopper. This is exactly what we do with RhinoCommon. There are many DLLImports in RhinoCommon for calling into native code. You will need to be able to compile an Octane.dylib which is the C++ equivalent of Octane.dll on Mac. I believe @dale is putting together a sample plug-in that uses a native library on Mac.

I will be out of town next week. But I’ll post something when I get back.

Thanks,

– Dale

Awesome - thanks.

hey paul

so does this mean you guys are dropping cuda or at least incorporating openCL as an alternative?
or am i misreading/misassuming/misinterpreting the fact that you want octane for rhino on mac?
thanks

so does this mean you guys are dropping cuda or at least incorporating openCL as an alternative? or am i misreading/misassuming/misinterpreting the fact that you want octane for rhino on mac?

Octane currently runs nicely on OSX with Nvidia card equipped machines (so I have ported a few of the Octane plugins to OSX). And Octane 3 will support OpenCL. OTOY • OTOY unveils OctaneRender 3: Massive upgrade to the world’s best GPU renderer defines the state of the art for VFX in films, games and beyond

Paul

neat.
thanks for the info.

Hi - I have installed Xamariin Studio on OSX Mavericks (and RhinoWIP, which works nicely). I initially went to install on my Win dev PC, but got very nervous about what it was going to updated (Android SDK, Java, etc) - and I didn’t want to run the risk of corrupting my dev environment. So I installed on OSX instead.

I opened my existing C# .NET RhinoCommon project and worked through a few minor issues (the csprog file was referring to some Window folders that didn’t exist on OSX). The main issue now is that…

using Rhino.Render.UI;

…will not compile. I cannot find the right Reference for it. I have included Eto, Rhino.UI, RhinoCommon, RhinoMac. Is there something I am missing pls?

Thanks

Paul

Hey Paul, I;m sorry I didn’t mention it. Much of the Render namespace is missing from RhinoCommon on Mac because we were never able to get a full implementation on the underlying RDK in place for the initial release of Mac Rhino.

It would be helpful for @andy and me to know which classes/functions in the Render.UI namespace you are calling on the Windows version so we can at least focus our effort on those pieces.

As a test, I compiled the Octane plugin on Win7 using Xamarin, and it runs under Rhino (for Windows). So partial success!

Compiling the plugin on Xamarin for Mac, I get the following errors:

error CS0234: The type or namespace name `UI' does not exist in the namespace `Rhino.Render'. Are you missing an assembly reference?
error CS0234: The type or namespace name `Fields' does not exist in the namespace `Rhino.Render'. Are you missing an assembly reference?
error CS0246: The type or namespace name `IUserInterfaceSection' could not be found. Are you missing an assembly reference?
error CS0246: The type or namespace name `RenderMaterial' could not be found. Are you missing an assembly reference?
error CS0246: The type or namespace name `RenderPipeline' could not be found. Are you missing an assembly reference?
error CS0246: The type or namespace name `UserInterfaceSection' could not be found. Are you missing an assembly reference?
error CS0246: The type or namespace name `RenderContent' could not be found. Are you missing an assembly reference?
error CS0246: The type or namespace name `UserInterfaceSection' could not be found. Are you missing an assembly reference?
error CS0115: `PhysicalcSoftware.OctaneRender.RhinoPlugin.OctaneRenderMaterial.TypeName' is marked as an override but no suitable property found to override
error CS0115: `PhysicalcSoftware.OctaneRender.RhinoPlugin.OctaneRenderMaterial.TypeDescription' is marked as an override but no suitable property found to override
error CS0115: `PhysicalcSoftware.OctaneRender.RhinoPlugin.OctaneRenderMaterial.Icon(System.Drawing.Size)' is marked as an override but no suitable method found to override
error CS0115: `PhysicalcSoftware.OctaneRender.RhinoPlugin.OctaneRenderMaterial.OnAddUserInterfaceSections()' is marked as an override but no suitable method found to override
error CS0115: `PhysicalcSoftware.OctaneRender.RhinoPlugin.OctaneRenderMaterial.SimulateMaterial(ref Rhino.DocObjects.Material, bool)' is marked as an override but no suitable method found to override
error CS0246: The type or namespace name `RenderMaterial' could not be found. Are you missing an assembly reference?
error CS0246: The type or namespace name `CreatePreviewEventArgs' could not be found. Are you missing an assembly reference?
error CS0234: The type or namespace name `RenderWindow' does not exist in the namespace `Rhino.Render'. Are you missing an assembly reference?
error CS0115: `PhysicalcSoftware.OctaneRender.RhinoPlugin.OctaneRenderForRhinoPlugIn.OctaneRenderPipeline.OnRenderBegin()' is marked as an override but no suitable method found to override
error CS0115: `PhysicalcSoftware.OctaneRender.RhinoPlugin.OctaneRenderForRhinoPlugIn.OctaneRenderPipeline.ContinueModal()' is marked as an override but no suitable method found to override
error CS0246: The type or namespace name `RenderEndEventArgs' could not be found. Are you missing an assembly reference?
error CS0115: `PhysicalcSoftware.OctaneRender.RhinoPlugin.OctaneRenderForRhinoPlugIn.OctaneRenderPipeline.OnRenderWindowBegin(Rhino.Display.RhinoView, System.Drawing.Rectangle)' is marked as an override but no suitable method found to override
error CS1715: `PhysicalcSoftware.OctaneRender.RhinoPlugin.OctaneRenderForRhinoPlugIn.CustomOptionPage.PageControl': type must be `object' to match overridden member `Rhino.UI.StackedDialogPage.PageControl'
/Users/paul/Downloads/Rhino/../../../../Applications/RhinoWIP.app/Contents/Resources/RhinoCommon.dll (Location of the symbol related to previous error)
error CS0246: The type or namespace name `RenderWindow' could not be found. Are you missing an assembly reference?
error CS0426: The nested type `RenderContentTableEventArgs' does not exist in the type `Rhino.RhinoDoc'
error CS0234: The type or namespace name `RenderContentEventArgs' does not exist in the namespace `Rhino.Render'. Are you missing an assembly reference?
error CS0234: The type or namespace name `RenderContentChangedEventArgs' does not exist in the namespace `Rhino.Render'. Are you missing an assembly reference?

Hi Dan,

Thanks for the post and the exciting release of this new opportunity.

I finally got over the biggest obstacle of testing my plugin build for Mac (that is the purchase of a Mac computer).

Some pretty exciting news that I’ve now been able to build and test the import of an IFC file in the Mac build. Here’s an image .

The guides are good. It’s not clear to me how Xamarin knows to debug the assembly (with Windows you explicitly nominate) and I have had some problems with debugging my project but I think if I can screen share with Steve or yourself we might resolve this. Note that I didn’t start this project from the Xamarin wizard, it was a copy of an existing windows project.

Anyway, it’s great news. I still need to enable ETO versions of my dialogs and build the other plugins. If there are any interested users, please get in touch.

Cheers,

Jon

2 Likes

Jon-

Wow, glad to hear that was the biggest obstacle! (Not to down-play the price of a Mac these days).

This is awesome news. I think this may be the first screenshots we’ve seen of a 3rd-party Rhino for Mac plugin.

We do some trickery on the Rhino-side to look in some common search-paths for the plugin itself…this adds some convenience should be able to debug and run the plugin without having to explicitly load the plugin itself.

Yes, let’s get this sorted out together.

Very cool. I presume you only needed to change your references a little…or?

Hopefully, porting to ETO will be as easy as the rest of the process.

Very, very good news. Thanks the screenshots. Looks like we’ll need to ship 5.1 soon!

I’m a user rather than a developer but I cannot emphasise enough how important rendering plugins will be. We are an architect start up and recently purchased 2 licenses of rhino for Mac. Saying that, I’ve been using it for almost the entire time the development version has been available. I’ve used the windows version fairly extensively too.

The ability to render directly from the same app you are modelling in makes the workflow so much more streamlined.

Mcneel - please prioritise this. I really hope we are talking months not years before the rendering plugins start to become available.

If anyone wishes to test a plugin in RhinoMac, I’ve uploaded the .macrhi to install to http://www.geometrygym.com/downloads

This includes the BullAnt plugin with computational geometry tools such as geodesic domes, mesh relaxation, mesh inflation and many more. It also includes ggRhinoIFC to import and export IFC files.

Refer also to http://geometrygym.blogspot.com.au/2015/09/geometry-gym-mac-plugins.html
Any suggestions or feedback is very much appreciated.

Cheers,

Jon

2 Likes

It runs great on a Mac, as the standalone. The plugin would be nice for convenience, but the standalone is far more polished for controls (both Mac and windows) Perhaps (let’s hope) the Mac version Plugin would one-up the Windows Rhino Plugin in terms of interface design quality.

Awesome Jon! I do believe this is the first public announcement of a Rhino for Mac plugin. Cool!

We have been making a couple of last-minute changes to the RhinoCommon API - mostly adding back some functionality that was removed - and we did bump the version number of RhinoCommon in Rhino for Mac. So - with the “official” 5.1 update to Rhino for Mac - there will be a version compatibility error with what you currently have posted…but you know, that’s an easy fix: just open the sln and rebuild. Sorry about that! Such is life when you’re as far ahead of the curve as you are.

Ok, back to getting this 5.1 update out the door.

I am getting 51 of these errors everytime I open WIP. The commands are still there. I may just uninstall, because it is a bit annoying. How would I do that, just go into plugins and delete it?

Image at startup …