Mesh

class cee.usg.Mesh()

A mesh defines the surface elements and nodes for a Part in a Geometry.

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

cee.usg.Mesh.constructor()
Mesh(nodeArr: ArrayLike, singleElementType: number, elementNodeIndexArr: ArrayLike, optionalData: OptionalMeshData): Mesh

Create a 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.

Parameters

nodeArr: ArrayLike

singleElementType: number

elementNodeIndexArr: ArrayLike

optionalData: OptionalMeshData

Returns: Mesh

Mesh(nodeArr: ArrayLike, elementTypeArr: ArrayLike, elementNodeIndexArr: ArrayLike, optionalData: OptionalMeshData): Mesh

Parameters

nodeArr: ArrayLike

elementTypeArr: ArrayLike

elementNodeIndexArr: ArrayLike

optionalData: OptionalMeshData

Returns: Mesh

Accessors

cee.usg.Mesh.elementCount()
get elementCount(): number

The number of elements in the mesh.

Returns: number

cee.usg.Mesh.elementNodeIndexArray()
get elementNodeIndexArray(): ArrayLike

Returns an array containing the node indices for each element node in the mesh.

Returns: ArrayLike

cee.usg.Mesh.elementTypeArray()
get elementTypeArray(): ArrayLike

If not single element type, this array contains the number of elements for all elements in the mesh

Returns: ArrayLike

cee.usg.Mesh.nodeArray()
get nodeArray(): ArrayLike

A readonly array containing the nodes of the mesh

Returns: ArrayLike

cee.usg.Mesh.nodeCount()
get nodeCount(): number

The number of nodes in the mesh.

Returns: number

cee.usg.Mesh.singleElementType()
get singleElementType(): number

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.

Returns: number

Methods

cee.usg.Mesh.getBoundingBox()
getBoundingBox(): BoundingBox

Returns the BoundingBox of the mesh.

Returns: BoundingBox