RW3DM project provides executables for exporting and importing OpenNURBS/Rhino .3DM files in JSON format. It utilizes OpenNURBS library for reading and writing .3DM files and JsonCpp for importing and exporting geomdl geometry data.
You can download the precompiled Windows 64-bit binaries under Actions tab.
If you prefer to compile the binaries on your own, you can follow the following list as a reference:
git clone https://github.com/orbingol/rw3dm.git
cd rw3dm
git submodule update --init
mkdir build
cd build
cmake ..
or use CMake GUIbuild
directory.Release
from the build combobox, then right click on INSTALL
and choose Rebuild
make install
inside the build
directorybuild/install
by defaultRW3DM_INSTALL_DIR
variable while configuring the project with CMakecd install
or the one you configured with CMake during step 6If you prefer to update the compiled binaries on your own, you can follow the following list as a reference:
git pull --rebase
git submodule update
on2json
executable can be used to convert .3DM files to JSON format supported by geomdl.
The JSON files can be imported via geomdl's exchange.import_json
API call.
json2on
executable can be used to convert JSON format supported by geomdl to .3DM files.
The JSON files can be exported via geomdl's exchange.export_json
API call.
Run on2json
and json2on
to see the available command-line arguments:
extract_curves
: Extract curves (Default is extract surfaces)normalize
: Normalize knot vectors and scale trim curves to [0,1] domainsense
: Extract surface and trim curve direction w.r.t. the faceshow_config
: Print the configurationsilent
: Disable all printed messagestrims
: Extract trim curvesExample: on2json MyONFile.3dm extract_curves=True
, extracts curves from MyONFile.3dm