I wanted to use the 3dmioToolkit under linux, which was a bit of a hassle. Here’s a small writeup on how to get it going under debian (this is tested under the debian testing distribution, but I think this will work for most of the distributions out there.)
I’m by no means an expert in c++. This is the first time I’ve been able to work/hack a c/c++ project into playing nice.
- Make sure you have monodevelop installed, mono and things to install a reasonable .net environment.
- Make sure you have basic compile tools available. (make, g++, automake, etc).
For debian installing the basic compile tools will be this (possibly some packages missing)
apt-get install mono-complete monodevelop
apt-get install build-essential
Clone the patched rhinocommon git repository
git clone https://github.com/arendvw/rhinocommon
Check out the rhino3dmio-linux branch
git checkout rhino3dmio-linux
And download the opennurbs sources from here and unzip the file in the rhinocommon/c/opennurbs folder.
These changes made it compile and play nice with mono under linux
See the this commit on github
To build the native library
make command in c/ folder of the repository. The resulting library will be in
Alternatively, the method used for the other platforms also works for linux now
./build_native.py -p linux
To build the .net library
- Open monodevelop and compile the
Rhino3dmIOproject, by hitting F7. (You may need to select the correct framework first)
Do a test
- Build the
example_readproject from monodevelop. There can be a post-build error, that the native library cannot be found. This is not a problem.
- Run the test with
mono example_read.exe -out:test.txt AirCleaner.3dm. test.txt should now contain a dump of AirCleaner.3dm.
I’ve not yet created a pull request, is anyone at the opennurbs team interested in including this in the rhino3dmio-toolkit?