public class PbMesh extends PbBase
PbMesh2D
) or a volume mesh (see PbMesh3D
). A surface mesh can be either 2D (its nodes have 2 coordinates) or 3D (its nodes have 3 coordinates). Each node is referred to by an index named node_index.
A mesh is composed of a list of cells. A cell is a "simple" basic volume or surface element that connects adjacent nodes of the mesh. Surface meshes can be defined by triangles, quadrangles and polygonal cells. Volume meshes can be defined by tetrahedrons, hexahedrons, prisms, or pyramid cells. A cell is defined by the list of nodes (node indices) that it connects. The order of the nodes that define a cell is the same for each cell in the mesh. Each cell is referred to by an index named cell_index.
A list of value-set can be defined. A value is a scalar (float), string, or a vector. Each value is located on mesh node, so the number of values in a set must be equal to the number of mesh's nodes. Each set of values can be named by a string.
A scalar value set is used to color the representations of the mesh. A string value set is used by some charting representations. A vector value set is used to make "hedgehog" vector field representations, or streamline representations. Each data-set is referred by an index named set_index. This index is used by classes of mesh representation to indicate which value set must be used for coloring. (see PoMesh.valuesIndex
and PoMesh.vecsIndex
). Mapping a scalar value onto a color is done by PbDataMapping
or PoDataMapping
classes (and derived).
Data duplication: If the last argument is_data_duplicate of a constructor of a derived class is false, the geometry and values sets are not copied by the object.
In this case, the methods setGeometry, addValuesSet, addStringsSet and addVecsSet save only the adress of the user data set and it is the application's responsibility to manage the validity of data during the existence of the mesh object.
Modifier and Type | Class and Description |
---|---|
static class |
PbMesh.CellBox |
static class |
PbMesh.ContainingCell |
static class |
PbMesh.CoordinatesInfo |
static class |
PbMesh.DataBindings
Data binding.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
PER_CELL
Deprecated.
Use
PbMesh.DataBindings.PER_CELL instead. |
static int |
PER_NODE
Deprecated.
Use
PbMesh.DataBindings.PER_NODE instead. |
VERBOSE_LEVEL, ZeroHandle
Modifier and Type | Method and Description |
---|---|
void |
addStringsSet(int set_index,
java.lang.String[] val)
Calls addStringsSet(set_index, val, "").
|
void |
addStringsSet(int set_index,
java.lang.String[] val,
java.lang.String set_name)
Adds a set of string values .
|
void |
addValuesSet(int set_index,
float[] val)
Calls addValuesSet(set_index, val, "").
|
void |
addValuesSet(int set_index,
float[] val,
PbMesh.DataBindings binding)
Calls addValuesSet(set_index, val, binding, "").
|
void |
addValuesSet(int set_index,
float[] val,
PbMesh.DataBindings binding,
java.lang.String set_name)
Adds a set of scalar values that can be located either at nodes or at cells.
|
void |
addValuesSet(int set_index,
float[] val,
java.lang.String set_name)
Adds a set of scalar values.
|
void |
addVecsSet(int set_index,
SbVec3f[] val)
Calls addVecsSet(set_index, val, "").
|
void |
addVecsSet(int set_index,
SbVec3f[] val,
java.lang.String set_name)
Adds a set of vector values .
|
PbMesh.ContainingCell |
findContainingCell(SbVec3f point,
float tolerance)
Find the cell that contains the point.
|
PbMesh.ContainingCell |
findContainingCell(SbVec3f point,
float tolerance,
PbCell adjacent_cell) |
float |
getArea()
Gets the area of the mesh.
|
PbMesh.CellBox |
getBiggestCellBox()
Gets the biggest cell's bounding box, returns also the index of this cell .
|
SbBox3f |
getBoundingBox()
Gets the bounding box of the mesh.
|
PbCell |
getCell(int cell_index)
Gets the cell with index cell_index.
|
PbMesh.CoordinatesInfo |
getCoordinates()
Get the current coordinates of the nodes of this mesh.
|
java.nio.FloatBuffer |
getDirectValuesSet(int set_index)
Gets a set of scalar values.
|
java.nio.FloatBuffer |
getDirectVecsSet(int set_index)
Gets a set of vector values.
|
float |
getMaxValuesSet(int set_index)
Gets the max of a set of scalars.
|
float |
getMaxVecsSet(int set_index)
Gets the max module of a set of vectors.
|
float |
getMinValuesSet(int set_index)
Gets the min of a set of scalars.
|
float |
getMinVecsSet(int set_index)
Gets the min module of a set of vectors.
|
SbVec3f |
getNodeCoord(int nod_index)
Gets the coordinates of a node.
|
int |
getNumCells()
Gets the number of cells in the mesh.
|
int |
getNumNodes()
Gets the number of nodes in the mesh.
|
int |
getNumStringsSet()
Gets the number of set of string values.
|
int |
getNumValuesSet()
Gets the number of set of scalar values.
|
int |
getNumVecsSet()
Gets the number of set of vector values.
|
PbMesh.CellBox |
getSmallestCellBox()
Gets the smallest cell's bounding box, returns also the index of this cell .
|
java.lang.String |
getStringsSetName(int set_index)
Gets the name associated to a string values set.
|
PbMesh.DataBindings |
getValuesBinding(int set_index)
Gets the binding of the scalar value set.
|
float[] |
getValuesSet(int set_index)
Gets a set of scalar values.
|
java.lang.String |
getValuesSetName(int set_index)
Gets the name associated to a scalar values set.
|
SbVec3f[] |
getVecsSet(int set_index)
Gets a set of vector values.
|
java.lang.String |
getVecsSetName(int set_index)
Gets the name associated to a vec values set.
|
float |
getVolume()
Gets the volume of the mesh.
|
boolean |
isDataDuplicated()
Returns true if mesh's data are duplicated, false otherwise.
|
void |
removeAllStringsSet()
Remove all sets of strings values.
|
void |
removeAllValuesSet()
Remove all sets of scalar values.
|
void |
removeAllVecsSet()
Remove all sets of vector values.
|
boolean |
removeStringsSet(int set_index)
Remove a set of string values.
|
boolean |
removeValuesSet(int set_index)
Remove a set of scalar values.
|
boolean |
removeVecsSet(int set_index)
Remove a set of vector values.
|
void |
setCoordinates(float[] x_nod,
float[] y_nod,
float[] z_nod)
Set new node coordinates without modifying the mesh topology.
|
enableConnection, isConnectionEnabled, touch
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int PER_CELL
PbMesh.DataBindings.PER_CELL
instead.@Deprecated public static final int PER_NODE
PbMesh.DataBindings.PER_NODE
instead.public void addValuesSet(int set_index, float[] val)
public void addValuesSet(int set_index, float[] val, PbMesh.DataBindings binding)
public void addStringsSet(int set_index, java.lang.String[] val)
public void addVecsSet(int set_index, SbVec3f[] val)
public java.lang.String getStringsSetName(int set_index)
public java.lang.String getVecsSetName(int set_index)
public void addVecsSet(int set_index, SbVec3f[] val, java.lang.String set_name)
public java.lang.String getValuesSetName(int set_index)
public java.nio.FloatBuffer getDirectValuesSet(int set_index)
public SbVec3f[] getVecsSet(int set_index)
public boolean removeValuesSet(int set_index)
public java.nio.FloatBuffer getDirectVecsSet(int set_index)
public float[] getValuesSet(int set_index)
public SbVec3f getNodeCoord(int nod_index)
public SbBox3f getBoundingBox()
public int getNumCells()
public float getMinValuesSet(int set_index)
public int getNumNodes()
public PbMesh.DataBindings getValuesBinding(int set_index)
set_index
- the index of the set of scalar values.
public void addStringsSet(int set_index, java.lang.String[] val, java.lang.String set_name)
public void addValuesSet(int set_index, float[] val, PbMesh.DataBindings binding, java.lang.String set_name)
PoMeshLevelSurf
(just for coloring, the level surface of value per cell is not taken into account)
PoMeshSkin
PoMeshCrossSection
The other classes use inherited coloring mode when the PER_CELL binding is used.
set_index
- the index of the new set added.
val
- the array of values. Its size must be either the number of nodes or the number of cells depending on the binding argument.
binding
- specifies the location of the values.
set_name
- string associated with this set of values.
NOTE: This method must be called after a setGeometry method because the size of the argument
val is determined by the number of nodes in the mesh. The setGeometry methods are defined in subclasses of PbMesh
.public boolean isDataDuplicated()
PbMesh
object.public void addValuesSet(int set_index, float[] val, java.lang.String set_name)
set_index
- the index of the new set added.
val
- the array of values. Its size must be the number of nodes.
set_name
- string associated with this set of values.
NOTE: This method must be called after a setGeometry method because the size of the argument
val is determined by the number of nodes in the mesh. The setGeometry methods are defined in subclasses of PbMesh
.public boolean removeStringsSet(int set_index)
public float getMaxValuesSet(int set_index)
public PbMesh.CellBox getBiggestCellBox()
public float getVolume()
public float getArea()
public float getMinVecsSet(int set_index)
public float getMaxVecsSet(int set_index)
public PbCell getCell(int cell_index)
public PbMesh.CellBox getSmallestCellBox()
public void removeAllVecsSet()
public PbMesh.CoordinatesInfo getCoordinates()
xnod
- array of x coord
ynod
- array of y coord
znod
- array of z coord
size_xnod
- size of the array xnod
size_ynod
- size of the array ynod
size_znod
- size of the array znodpublic void removeAllStringsSet()
public boolean removeVecsSet(int set_index)
public void removeAllValuesSet()
public int getNumValuesSet()
public int getNumVecsSet()
public PbMesh.ContainingCell findContainingCell(SbVec3f point, float tolerance, PbCell adjacent_cell)
public PbMesh.ContainingCell findContainingCell(SbVec3f point, float tolerance)
PbCell.getValue
). Attention! This method returns always the same address of an internal private cell. This private cell is updated each time findContainingCell is called.public void setCoordinates(float[] x_nod, float[] y_nod, float[] z_nod)
public int getNumStringsSet()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com