on2json: Failed to convert solid CAD models to JSON
Closed this issue · 2 comments
I tried to extract the surface control points of a solid model using the on2json executable, but the operation failed. After analysing the case, I found that rw3dm does not support converting solid models; instead, the same object is constructed using the NURBS surfaces and joined to form a solid will work fine.
Note: By solid model, I mean, cad models created by extruding from a curve etc.
Steps to reproduce the behaviour:
- I am attaching a sample .3DM file of a cuboid body.
- Run the on2json executable to extract only the surfaces: on2json cuboid.3dm extract_curves=false;
- The error screenshot is attached.
@pimakshay Sorry for my late response.
I have pinpointed the issue. rw3dm determines the type of input using object_type
enum defined in opennurbs_defines.h
file. This file comes with OpenNURBS and provides the object types, such as surface, curve, volume, etc. The file cuboid.3dm
contains an object with the type ON_Extrusion
as you explained in your note.
I will add the option to extract data from extruded objects and release it in a few days.