Is there any possibility to use Rhino C++ geometry library on Console App for debugging reasons?
Most of the time I just need to print values without any interface, which would make my work faster, instead of loading each time Rhino that takes quite some time.
On C# it works with RhinoCommon. But I have no idea how to link Rhino C++ to console App.
I think this is what I am looking for, I hope the syntax is the same as Rhino C++ plugin (except ui)
I often just use data types such as polylines, curves, points, clouds, meshes.
How do you reference the OpenNurbs? Do you need to link only headers or also libraries?
The syntax is even pretty similar to RhinoCommon, except that everything is preceded by ON_ and C++ syntax conventions are mostly followed.
These are all available, but what you can’t do is manipulate Rhino in any way.
Check this out:
I don’t know whether this is legal, but I often times just copy the relevant cpp hpp file pairs to my project. I mostly always need only a couple of types, like the ones you name above, and not the entire “framework”. You need to make sure you also copy the relevant dependencies though. The people that programmed openNurbs did a wonderful job at keeping it quite modular and easy to understand. It’s a piece of art, if you ask me.
P.S.: It’s quite funny that you have two accounts here. Or is it a clone?
Would it be possible to show how this is done via linker and project properties?
I kind of understand the 2nd and the 3rd pragma that links to .lib file, but I do not understand what pragma message means.
I suspect the x64 dynamic libraries after building OpenNurbs project file are located here.
Is it right? Because the name is not zlibx64.lib but zlib.lib
P.S. The two accounts appeared once I started working at EPFL, because we had to get Rhino lab license, so now I switching between different computers. It is confusing ;D
Sorry, but I’m not a Windows, nor Visual Studio user, so I can’t be of much help here.
#pragmas are preprocessor directives for the compiler. This entails that #pragma message( " --- openNURBS Release x64 (64 bit) build." ) will output exactly that message to a terminal or shell, before the compiler gets to work.
It’s probably also important to know that these are Visual C++ directives, which probably don’t work on Linux or macOS.
If I remember correctly, on macOS the build usually gets put into /usr/local/lib or somewhere similar, not inside the opennurbs directory.
I open this project and build it manually:
C:\IBOIS57_Code\Software\CPP\opennurbs-7.6.21127.19001\freetype263
This does not work:
#pragma once
// defining OPENNURBS_PUBLIC_INSTALL_DIR enables automatic linking using pragmas
#define OPENNURBS_PUBLIC_INSTALL_DIR "C:/IBOIS57/_Code/Software/CPP/opennurbs-7.6.21127.19001/"
// uncomment the next line if you want to use opennurbs as a DLL
//#define OPENNURBS_IMPORTS
#include "C:/IBOIS57/_Code/Software/CPP/opennurbs-7.6.21127.19001/opennurbs_public.h"
And only if the #define OPENNURBS_IMPORTS is uncommented, it works
#pragma once
// defining OPENNURBS_PUBLIC_INSTALL_DIR enables automatic linking using pragmas
#define OPENNURBS_PUBLIC_INSTALL_DIR "C:/IBOIS57/_Code/Software/CPP/opennurbs-7.6.21127.19001/"
// uncomment the next line if you want to use opennurbs as a DLL
#define OPENNURBS_IMPORTS
#include "C:/IBOIS57/_Code/Software/CPP/opennurbs-7.6.21127.19001/opennurbs_public.h"
I can build console app with OpenNurbs, but visual studio shows a lot of errors: