I’m trying to build a standalone application that runs Rhino geometry; rather, my goal is to create a C++ DLL (Geometry Engine) that can be called from C# (the main code). This approach is intended to leverage C++ for computational optimization, particularly for geometry operations, while keeping the main logic in C#.
However, I’m facing challenges in setting up the C++ part as a DLL. I believe I need to #include <Rhino3dm.h>, but I haven’t been able to find a way to make this work. I’ve gone through the McNeel documentation, but it primarily explains how to create a plugin rather than a DLL. I also tried downloading the rhino3dm repository, but I couldn’t locate the required file.
Do you have any guidance on how to properly set up a C++ DLL with Rhino3dm?
The easiest is maybe to use a PlugIn project that you create from the templates available in Visual Studio (see Extension > Browse for “Project tempaltes for Rhino 3D”), then change the output extension back to DLL, and remove any plug-in and command code. This will give you a project that has the right include paths and linking set up.
If this means you don’t want a licensed version of Rhino involved then the only support available from McNeel is their OpenNurbs toolkit. This provides means to read and write Rhino files and a very limited amount of geometry manipulation. The rest is up to you.
On the other hand, if your goal is to extend the functionality of Rhino, then a plugin is the way to go. A rhino plugin is in fact a renamed DLL.