OpenNURBS.NET.dll

Hi Team,

My donNet application refers the OpenNURBS.NET.dll file.
Earlier, my application was 32Bit & the OpenNURBS.NET.dll was also 32Bit.
So everything used to work well.

Now, I am moving my application to 64Bit platform.
I tried to find the 64Bit version of OpenNURBS.NET.dll, but couldn’t find anything.
My colleague mentioned that this DLL used to ship with previous versions of Rhino.
Does anyone know where I can find the 64Bit OpenNURBS.NET.dll?

I checked Rhino 4 & 5 installations on my machine, but this DLL is not present there.
Has the DLL name been changed?

Regards,
Nikhil

openNURB.NET has been replaced by Rhino3dmIo a number of years ago. This asssembly will read and write up to V5 files and supports both 32 and 64 bit processes.

Rhino3dmIo can be found on the nuget gallery. Unfortunately the code is considerably different so there may be a significant amount of changesi you may have to make.

Thanks Steve for the info.
I have downloaded the Rhino3dmIo.dll & referred it in my application.
I have modified the code accordingly.

There are three methods that I am struggling to find which were part of the old dll.

  1. ON_BrepEdge.Trim(int eti):
    Looks like this method is upgraded now to,
    BRepEdge.Trim(double startParam, double endParam) OR BrepEdge.Trim(Interval interval).
    I am struggling to find a connection between the older & the newer version of this method.
    How can I use it?
  2. ON_Surface.GetSurfaceSize(double width, double height)
    Which is the substitute method for this in Surface class?
  3. ON_BrepFace.GetClosestPoint()
    I couldn’t find this method in BrepFace class. Has it been removed?

Where can I get the chm help file for Rhino3dmIo dll?
Your help is greatly appreciated.

1 Like

There are a number of things that the standalone version of openNURBS (Rhino3dmIO) will not do:

http://wiki.mcneel.com/developer/opennurbs/limitations

– Dale

That’s means I can’t use the Rhino3dmIo anymore.

Should I use the Rhino 5 SDK instead?
Which DLLs do I need to refer in my application now?
Any examples would be helpful.

I tried using RhinoCommon.DLL in my project but it gives error ‘Can’t load rhCommon_c.dll’ or its dependencies’.
I read it on this link that the Rhinocommon dll won’t work unless loaded by Rhino.exe.
My application should only open the Rhino.exe in silent mode. Is this possible?

Keep in mind that openNURBS, and Rhino3dmIO, is just a toolkit for reading and writing models in the 3DM format. It is not a full-featured geometry library.

If you need a full-featured geometry library and you like Rhino, then you might consider writing an add-on (or plug-in) for Rhino using either the Rhino SDK (C++) or RhinoCommon (.NET). Our full-featured development platform is Rhino.

I tried using the Rhino_DotNet.dll from 64 bit directory.
When my application is set to use .Net framework version 4.5, I am getting error as ClassID not registered.
Why am I getting the ClassID error? Manual registration of my project DLL is successful from CMD.
The classID belongs to my application class.
Do I need to add any other references to my project?

I’m sorry, but I cannot tell what you are doing.

Are you writing a plug-in for Rhino and trying to reference Rhino_DotNet?

We will need more information to be helpful - thanks!

Hi Dale,

I have resolved the issue now using RhinoCommon DLL.
I had referred 32 bit version of this DLL earlier instead of 64 bit.
Therefore I was getting the ‘rhinocommon_c not found’ error.
My mistake. Sorry for the trouble. Thanks a lot.

My application works fine on Windows 8.1 Pro machine, but it fails on Windows 10 machines.
Does the RhinoCommon support Win10?
Am I missing anything here?

RhinoCommon will not work outside of Rhino. Do not copy DLLs out of the Rhino system directory for use in a separate applicate, this is just not going to work. For a stand alone application, Rhino3dmIo is the .NET assembly that you should be using. Sorry if there was any confusion about thsi.

I will need to check on the three functions that you mentioned to see what the status is on their existence in Rhino3dmIo.

Hi Steve,
I have already tried using Rhino3dmIo library. Those 3 functions do not exist in it.
I did copy those files & Rhino.exe to my applications output directory. It worked with Win 8.1 Pro, but failed with Win 10.

If I can’t copy those DLLs from system directory, can I at least refer them directly in my application?
Is there any entry in the registry that can give me path of the Rhino5 x64 system directory?

This just isn’t going to work, sorry. If you’ve gotten anything to work at all means you were lucky, but there are so many functions in RhinoCommon (the dll that ships with Rhino) that depend on the Rhino executable be running and so many dll interdependencies beyond the few that you mentioned that this technique is bound to fail. I won’t be able to support this technique of using RhinoCommon.

What we need to do is figure out how to get these functions you requested added into Rhino3dmIo.

Right…I agree with you
Is there a way to do that?
As it is an opensource project, can’t we just add these methds to the code & generate a new Rhino3dmIo dll?

Also, if I use Rhino3dmIo, will my application work on Win10?

Steve,
Any thoughts on this?

Yes, Rhino3dmIo is an open source project so you could add the needed functions.


Unfortunately adding these functions requires a bit of C++ knowledge and the process that we take to make these functions callable from the C# code. We don’t have any existing documentation on this process.

I’m trying to figure out how to fit these additions into my current workload.

Hi Steve. Any updates on this. I have customers waiting on this.
Adding those functions to the standalone version DLL would be really helpful.

I can probably get items (1) and (2) into Rhino3dmIo, but the GetClosestPoint function will not be available. I somewhat doubt it ever worked in the standalone toolkits since that is typically a function we don’t give away.

Thanks Steve.
That would be a start.
Please let me know when we can expect these changes.
Meanwhile, I will try to find a workaround for Item#3 in our code.
I am pretty sure that it used to work fine in Standalone toolkit previously.

Team, any update on this?
Can we get those 3 functions incorporated in Rhino3dmIO dll?

Let me explain how my application works:

  1. My application allows the user to select a 3dm file on his machine.
  2. Then it calls opennurbsdotNET dll’s Open file method.
  3. It retrieves the geometry & converts it to our own BRep structure.
  4. Then we perform some steps on these BRep entities.

This means that my application is the starting point of the entire process. Therefore I cannot make use of plugins.
As it works in standalone mode, Rhino exe is not run in the background.
I am okay if we have to run it in the background as well.
Please suggest a suitable alternative.(.NET platform)