Opennurbs_public, example_read, Render mesh = nullptr

Hi, i use the sample project(example_read.exe) to read the mesh data, i found that if the rhino render mode is “line frame mode”, the mesh data is null, but if i switch to “shade mode”, the mesh data is not null, why?

1.3dm (184.3 KB)
2.3dm (177.9 KB)

That is because when you create a geometry in wireframe mode there is no need for the render meshes. Saving a file with all viewports in that mode will have no render meshes on the geometry. The render meshes are needed for all modes that draw the surfaces, meaning shaded, rendered, raytraced, etc.

This is how Rhino works.

how can i change the render mode in opennurbs and create mesh data?

With just the public OpenNURBS library you can’t mesh surfaces as the public library does not contain the meshing algorithms. It also doesn’t contain most of the geometry operations like booleans etc. For that you need the full OoenNURBS SDK and a valid Rhino license, run the code in Rhino.