developer:sdksamples:meshtypes


Table of Contents

Mesh Types

C++, .NET

Summary: Discusses the types of meshes found in Rhino.

Question

This question pertains to the ON_Brep::GetMeshes(), or OnBrep.GetMeshes() in .NET, routine of the SDK. I have found that very adequate meshes can be pulled from this routine when specifying ON::render_mesh, or Ion.mesh_type.render_mesh in .NET. I noticed that you can also run this routine with an enumeration for an “analysis mesh”, a “default mesh”, a “preview mesh” or “any mesh”.

Can anyone please explain the differences between all of these options? If I were to hard code my plug-in to always request the render meshes, would

there ever be a condition in which the document's breps would not produce them?

Answer

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 plug-ins. 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 plug-ins that call SDK functions.

developer/sdksamples/meshtypes.txt · Last modified: 2010/01/26 16:37 (external edit) Driven by DokuWiki Recent changes RSS feed

 © 1997-2012 

McNeel North America Europe Latin AmericaAsia