On RenderMesh: generation method and diff vs default mesh


I am developing on the free OpenNURBS toolkit. I am trying to extract mesh data from NURBS. I know with the free openNURBS toolkit does not create mesh. A work around I am trying is to get the mesh data from rendermesh. It seems that as long as a user has ever used shaded mode, the model will have rendermesh in every breps and extrusion. I am not exactly sure though, so I’d appreciate it if anyone can confirm this?
Another assumption of this work around is that rendermesh looks the same as the defaultmesh( I assume default mesh is the mesh you get by calling createMesh). Is it true that rendermesh is the same as defaultmesh?

Thanks a lot!

Not necessarily, because a user can choose not to save the render mesh with the option “save small”. Also, the render mesh sons can be customized, so the mesh need not be the default mesh.
Just out of curiosity, if you rely on a file that was generated in Rhino, why do you use opennurbs, instead of the full Rhino sdk?

Thank you Menno! To answer your question, we are developing a larger platform that supports more file formats than just Rhino. Our software architecture works better with OpenNurbs toolkit so we’d like to evaluate it’s feasibility first.

A follow up question is what generates default mesh? in what scenario will default mesh be missing?

Thank you!

Hi Yifan,

Here is a code snipped that might help you.

The most common way to generate render meshes in Rhino is to either Shade or Render a viewport. Meshes can be generated on other indirect ways too.

Render meshes might be missing from a file if the user never shaded or renders a viewport. Also, uses often run the “SaveSmall” command to purge models of their cached render meshes to save disk space.

– Dale

Thanks Dale.

We are switching to developing a plugin in light of your information.