MeshQuery

class cee.usg.MeshQuery()

Class for querying the FEA mesh in an UnstructGridModel.

You can use this class to both interrogate a mesh in its local coordinates and to query a state in the model. If a state is specified the returned data will be in global coordinates, taking any displacement and transformation result into account.

Constructors

cee.usg.MeshQuery.constructor()
MeshQuery(mesh: Mesh): MeshQuery

Create the query object.

If a mesh is specified, the query will be based on the mesh elements and nodes. The coordinate system of the returned data will be in mesh local coordinates.

If a state and part index is specified, the results (displacement and transformations) will be applied if in use. So, in this case the coordinate system of the returned data will be in global coordinates.

Parameters

mesh: Mesh

Returns: MeshQuery

MeshQuery(state: State, partIndex: number): MeshQuery

Parameters

state: State

partIndex: number

Returns: MeshQuery

Methods

cee.usg.MeshQuery.getElementCentroid()
getElementCentroid(elementIndex: number): Vec3

Returns the centroid of the given element

If a mesh is specified in the constructor, the coordinate system of the returned data will be in mesh local coordinates. If a state and part index is specified in the constructor, the coordinate system of the returned data will be in global coordinates.

Parameters

elementIndex: number

Returns: Vec3

cee.usg.MeshQuery.getElementNodeIndices()
getElementNodeIndices(elementIndex: number): ArrayLike

Returns an array containing the node indices for each element node in the given element

Parameters

elementIndex: number

Returns: ArrayLike

cee.usg.MeshQuery.getElementSurfaceNormal()
getElementSurfaceNormal(elementIndex: number): Vec3

Returns the surface normal of the given element

If a mesh is specified in the constructor, the coordinate system of the returned data will be in mesh local coordinates. If a state and part index is specified in the constructor, the coordinate system of the returned data will be in global coordinates.

Parameters

elementIndex: number

Returns: Vec3

cee.usg.MeshQuery.getNodePosition()
getNodePosition(nodeIndex: number): Vec3

Returns the position of the given node in the given part in this state.

If a mesh is specified in the constructor, the coordinate system of the returned data will be in mesh local coordinates. If a state and part index is specified in the constructor, the coordinate system of the returned data will be in global coordinates.

Parameters

nodeIndex: number

Returns: Vec3