Mesh
- class cee.usg.Mesh()
A mesh defines the surface elements and nodes for a
Part
in aGeometry
A mesh is defined by a node array with x,y,z values and the element nodes describing the index of the nodes in each element. The number of nodes per element is defined by either a singleElementType for meshes where all the elements have the same number of nodes or by an array (elementTypeArr) with one item per element describing the number of nodes in that element.
Mesh is an immutable class, so if you need to change something you will have to construct a new mesh.
Constructors
Methods
Constructors
constructor
- cee.usg.Mesh.constructor(nodeArr, singleElementType, elementNodeIndexArr, optionalData)
Create a mesh.
- Arguments
nodeArr (
ArrayLike[number]
) –singleElementType (
number
) –elementNodeIndexArr (
ArrayLike[number]
) –optionalData (
cee.usg.OptionalMeshData
) –
- Return type
cee.usg.Mesh
For mesh with only one element type (all elements have the same number of element nodes) use the singleElementType version. This is more compact for storage.
The nodeArr is an array of all the nodes in the mesh as an array with [x0, y0, z0, x1, y1, z1, …].
If you have a varying number of element nodes in your elements, specify that with an array (elementTypeArr) with one item per element specifying the number of nodes for that element.
- cee.usg.Mesh.constructor(nodeArr, elementTypeArr, elementNodeIndexArr, optionalData)
Create a mesh.
- Arguments
nodeArr (
ArrayLike[number]
) –elementTypeArr (
ArrayLike[number]
) –elementNodeIndexArr (
ArrayLike[number]
) –optionalData (
cee.usg.OptionalMeshData
) –
- Return type
cee.usg.Mesh
For mesh with only one element type (all elements have the same number of element nodes) use the singleElementType version. This is more compact for storage.
The nodeArr is an array of all the nodes in the mesh as an array with [x0, y0, z0, x1, y1, z1, …].
If you have a varying number of element nodes in your elements, specify that with an array (elementTypeArr) with one item per element specifying the number of nodes for that element.
Accessors
- cee.usg.Mesh.elementCount
The number of elements in the mesh.
- cee.usg.Mesh.elementNodeIndexArray
Returns an array containing the node indices for each element node in the mesh.
- cee.usg.Mesh.elementTypeArray
If not single element type, this array contains the number of elements for all elements in the mesh
- cee.usg.Mesh.nodeArray
A readonly array containing the nodes of the mesh
- cee.usg.Mesh.nodeCount
The number of nodes in the mesh.
- cee.usg.Mesh.singleElementType
Returns the number of nodes in each element if all elements in the mesh have the same number of nodes
Returns 0 if there are multiple element types.
Methods
getBoundingBox
- cee.usg.Mesh.getBoundingBox()
Returns the
BoundingBox
of the mesh.- Return type
cee.BoundingBox