About Rhino3dmIO and JavaScript

Dear Rhino Developers forum,

I need some valuable advise.
–Can I use Rhino3dmIO for Java Scripting via Node.js ?
– Is there a new version of Rhino3dmIO for Rhino 6 ?
–What is the dll name for Grasshopper plugin development for external application?
–I saw two web interfaces which are using Grasshopper dll with webGL . One is ShapeDiver.

Please give some advice, so I can start properly integrating my plugins with web interfaces.
I make Rhinocommon SDK , custom Grasshopper components in c# dot net most of the time for specific Architectural design projects. I also make Revit plugins in c# dot net. I am also developing webGL interfaces. I made c++ Plugin for Rhino 4 and 5 , in recent past. All I want to say, if you tell me to develop an indivisual plugin , I can make them saparately. But my knowledge is limited, when it comes to integrate c# dll of a specific software and Javascript.
But with some advise, I will be able to progress.
I am using Node.js for connecting different JavaScript Library. But not sure yet which Rhino dll I should use, I guess Rhino3dmIO …But what is the option for Grasshopper DLL?
Any clue on Java script side will be very helpfull.
I tried with Edge.js, for c#, but I used normal RhinoCommon.dll, so it failed.
Please let me know, if Rhino3dmIO.dll will work with edge.js or not.
If you know completely new path, then please advise. But I think if Node.js way is worked out then it will be very stable solution.

Best regards

You can bind the OpenNURBS C++ SDK to Node.js using the infrastructure provided for Node/C++ integration. Edge JS should be able to load and run Rhino3dmIO but I would recommend you to create better binding for node. Depends a lot on what you need to do with that.

1 Like

Dear Alberto, Many thanks for the reply ! It is a big help !
Would you please elaborate a bit what you said below:
" I would recommend you to create better binding for node. Depends a lot on what you need to do with that."

What could be the limitations of Edge.js for Rhino3dmIO? Where edge’js can stumble? please explain a bit more. I only worked out simple c# code inside edge.js.
So not sure where edge.js can have some limitations for Rhino3dmIO. Please give me some more insite into it.
Do you know about which grasshopper dll, I should use with Node.js?

Best regards

What I understand is that you want to load some 3DM file into your node.js application right? If I would need to do such a thing and my app runs on node.js I would create an addon. This will bind the C++ features of OpenNURBS to Node.js and I would use that to manipulate the data in the 3DM.

If otherwise you want to extend Rhino and Grasshopper with javascript then we are talking about a different thing. Then I would use JScript.NET to create such extensions. But in order to do so I would create a Rhino C# host plugin and a GH host component for JScript that will call my scripts.

Hope this will help you, if you have any question just ping me here :wink:


1 Like

OK . Thanks a lot ! Yes I forgot about Node.js addon, but it will be another struggle :smiley: :smiley:
Still very good advise and many thanks ! I will be back with question, by tomorrow again.

This might be of interest: rhino3dm. This repo provides javascript and python libraries for reading, writing, and manipulating rhino3dm objects.