I am trying to convert 3DM BRep and Extrusion geometry data into 3DM Mesh data. I have two 3DM files: one contains a Box extrusion in Rendered mode, called BoxWithRender.3dm, and the other contains the same Box extrusion in Wireframe mode, called BoxWithWireFrame.3dm. I am reading the Box extrusion using the OpenNURBS API and attempting to convert the Box Extrusion object into Mesh geometry data.
When I use the BoxWithRender.3dm file, the Box extrusion geometry is successfully converted to Mesh geometry. However, when I use the BoxWithWireFrame.3dm file, the Box extrusion geometry does not get converted into Mesh geometry.
In summary, the conversion works successfully when the source file is in Rendered mode, but fails when the source file is in Wireframe mode.
I am using below api’s
For Extrusion => Extrusion.GetMesh(MeshType.Any)
For BRepFace => BRepFace.GetMesh(MeshType.Any)
The opennurbs library will not convert an extrusion or brepface to mesh, or create a mesh for you, opennurbs is a file I/O library for the 3dm file format. As you have noticed, when mesh(es) are present in the file, you’ll get them; otherwise you won’t.
Note that for my second point this is something you need to do in Rhino. I’ll adapt my reply so that it is clear.
As @menno mentioned the public OpenNURBS SDK does not ship meshers. Are you using the Rhino3dm nuget package to create code that writes and reads 3dm files outside of Rhino?
In that case you will have to either use Rhino to open and resave the file. Or you have to bring your own mesher. The Rhino3dm package does not provide you with one.