Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
Support of polygonal surface meshes and polyhedral volume meshes

The concept of cell interface allows you to define any combination of any type of cell from a basic triangle to a complex polygon for surfaces and from tetrahedron to complex polyhedron for volumes. We call a polygonal surface mesh an unstructured surface mesh containing at least one cell which is not a rectangle or a triangle. We call a polyhedral volume mesh an unstructured volume mesh containing at least one cell which is not a tetrahederon, hexahedron, wedge or pyramid. An unstructured mixed mesh is a mesh made up of cells of various types. Mixed meshes are completely supported as long as each cell type implements all the required MiCell methods.

Some extraction algorithms will work if you provide the implementation of some of these cell interface methods. For instance, probing into a polyhedral cell can be performed if the getWeight method is implemented. For polyhedrons, the MxPolyhedronCellExtract class provides a basic implemention of getWeight for a generic convex polyhedron using a barycentric method. You can provide your own method corresponding to a particular cell shape.

However, for polyhedral volume meshes, some algorithms such as isosurface and geometrical slice (plane, cylinder and sphere slice), do not work on cells which return an empty edgeList in the implementation of getIsosurfaceTopology(). This is usually the case for other cells than tetrahedron, hexahedron, wedge or pyramid. In this case, the extraction algorithm will not be able to compute any results on polyhedral cells leaving holes. Thus, for extracting an isosurface on a polyhedral mesh an application must insert a MoTessellator node in the scene graph next to the MoMesh describing the polyhedral mesh. This tessellator node must refer to a specific polyhedral tessellator like provided by MiTessellator::getNewTessellatorPolyhedron().

2 alternative ways can also be used but usually not as straightforward to implement in an application:

  • Implement the getSubTetrahedronNodesIndex() method from the MiVolumeCell interface. This method should return the indices of each sub tetrahedron making up the polyhedral cell. Obviously, this method may be difficult to implement for complex polyhedrons. In this case use the second method described below.
  • Convert the mesh containing polyhedral cells to a mixed mesh using the MiPolyhedralToMixVolume extract class. This conversion tool is another type of extractor which takes a polyhedral volume mesh as input and produces a mixed volume mesh made up of a combination of tetrahedrons, hexahedrons, wedges and pyramids compatible with the marching cube algorithm. The following example shows how to convert a polyhedral volume mesh to a mixed mesh compatible with the isosurface marching cube algorithm:
MiPolyhedralToMixVolume* extract = MiPolyhedralToMixVolume::getNewInstance( mesh );
const MeXVolumeMeshUnstructured tessMesh = extract->convert();