Mesh Types
Windows only

Which Mesh?

There is an ON_Brep::GetMeshes() routine of the C/C++ SDK. You might find that very adequate meshes can be pulled from this routine when specifying ON::render_mesh. You may have also noticed that you can also run this routine with an enumeration for an “analysis mesh,” a “default mesh,” a “preview mesh,” or “any mesh.”

What are the differences between all of these options?

Discussion

Here is an overview of the mesh types:

  1. ON::render_mesh is a mesh for, obviously, rendering. This rendering can be for shaded or rendered display. It can also be used by rendering plugins. The quality of these meshes is controlled by the Meshes page in the Document Properties dialog, but can also be overridden on a per-object basis.
  2. ON::analysis_mesh is used by analysis modes, such as curvature, draft angle, environment map, and zebra.
  3. ON::preview_mesh is used when you use the Mesh command and poke the preview button - the pipeline needs a way to display preview meshes and this is it.
  4. ON::default mesh returns ON::render_mesh if it exists. Otherwise it returns ON::analysis_mesh if it exists.
  5. ON::any_mesh is only used when we want delete all meshes at one time.

NOTE: render and analysis meshes do not appear automatically. Some command must trigger their creation, whether its just setting viewport for rendered display or running an analysis command. The can also be generated from plugins that call SDK functions.