public interface MiVolumeCell extends MiCell
A volume cell is a polyhedron element that connects adjacent nodes of a volume mesh.
This class defines additional methods beyond MiCell
to gives a
complete description of a volume cell.
getNumFacets()
, getNodesIndexOfFacet(int, long[])
.
getIsosurfTopology(int, int[])
and
getMarchingCaseId(boolean[], long)
.
The utility classes MxXXXCellExtract
can be used to help the
application implement the various methods of MiCell
and
MiVolumeCell
. These classes provide static implementations of the
necessary methods for the most common linear volume cells.
Modifier and Type | Method and Description |
---|---|
double[] |
getFacetCenter(int facet,
MiGeometryI geometry)
Gets the center of the specified cell facet.
|
int[] |
getIsosurfTopology(int caseId,
int[] edges)
Returns an array containing the topological polygons defining the part of
the isosurface topology in this cell.
|
int |
getMarchingCaseId(boolean[] nodesSign,
long beginNodeId)
Gets the isosurface "marching cube" entry according to the sign of each
node in the cell.
|
long[] |
getNodesIndexOfFacet(int facet,
long[] facetNodes)
Returns an array containing node indices belonging to a given facet.
|
int |
getNumFacets()
Gets the number of facets.
|
getCenter, getNodeIndex, getNumNodes, getRelativeSize, isPointInsideCell
int getNumFacets()
long[] getNodesIndexOfFacet(int facet, long[] facetNodes)
If the specified array length is equals to the number of node indices to be returned, they are returned therein. Otherwise, a new array is allocated.
For instance an implementation of this method for a linear tetrahedron cell like the following one
should return an array filled by = {node0,node2,node3} if the facet
argument corresponds to the pink one (Provided that
MiCell.getNodeIndex(int)
follows this tetrahedron node numbering.)
facet
- The index of the facet (where 0 <= facet < getNumFacets
).facetNodes
- The array into which the node indices of the facet are to be
stored if its length is equals to the number of node indices to be
returned; otherwise, a new array is allocated for this purpose.int[] getIsosurfTopology(int caseId, int[] edges)
This method is used during isosurface and slice extraction on an
unstructured mesh (for instance
MoMeshPlaneSlice
,
MoMeshIsosurface
,
MiIsosurfExtractUnstructured
). Static implementations are provided for the most common basic volume
cells:
MxHexahedronCellExtract.getIsosurfTopology(int, int[])
MxTetrahedronCellExtract.getIsosurfTopology(int, int[])
MxWedgeCellExtract.getIsosurfTopology(int, int[])
MxPyramidCellExtract.getIsosurfTopology(int, int[])
If the specified array is large enough to contain the number of node indices to be returned, they are returned therein. Otherwise, a new array is allocated.
caseId
- the isosurf "marching cube" entry for this cell. This is the value
returned by getMarchingCaseIdedges
- The array into which the node indices defining the isosurf
topology in this cell are to be stored if its length is large
enough; otherwise, a new array is allocated for this purpose. New
pairs of node ids are stored into the array, each pair of nodes
must correspond to an edge of the cell which is cut by the
isosurface. An edge is cut by the isosurface when the two nodes of
the edge have different signs. The pair of nodes must be correctly
ordered to define a non manifold polygon. When the isosurface part
is made up of several polygons, each polygon must be separated by
MxMeshViz.END_LIST
. The end of
the polygons list must be indicated by a pair of
MxMeshViz.END_LIST
.int getMarchingCaseId(boolean[] nodesSign, long beginNodeId)
The return entry corresponds to the first argument of
getIsosurfTopology(int, int[])
This method is used during
isosurface and slice extraction on an unstructured mesh (for instance
MoMeshPlaneSlice
,
MoMeshIsosurface
,
MiIsosurfExtractUnstructured
).
Note: MeshViz XLM assumes that the cell does not contain any part of an isosurf if and only if the "marching cube" entry equals 0. Thus if all the bits in this word are 1, the method returns 0.
nodesSign
- An array containing as many booleans as the number of nodes in the
mesh. nodesSign[i]
is relative to the sign of the
isovalue-i-th node's value.beginNodeId
- is the first node id used by the mesh topology (see
MiTopologyExplicitI.getBeginNodeId()
.nodesSign[getNodeIndex(i)]
.double[] getFacetCenter(int facet, MiGeometryI geometry)
This method is not used by all extraction classes.
facet
- index of the facet (where 0 <= facet < getNumFacets
).geometry
- geometry of the mesh, it is used to retrieve the node coordinates
of this cellGenerated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com