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


Constructors

MeshQuery.constructor(mesh)
Arguments:
  • mesh (Mesh) – None

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.

Return type:

MeshQuery

MeshQuery.constructor(state, partIndex)
Arguments:
  • state (State) – None

  • partIndex (number) – None

Return type:

MeshQuery

Methods

getElementCentroid

MeshQuery.getElementCentroid(elementIndex)
Arguments:
  • elementIndex (number) – None

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.

Return type:

Vec3

getElementNodeIndices

MeshQuery.getElementNodeIndices(elementIndex)
Arguments:
  • elementIndex (number) – None

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

Return type:

ArrayLike <number>

getElementSurfaceNormal

MeshQuery.getElementSurfaceNormal(elementIndex)
Arguments:
  • elementIndex (number) – None

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.

Return type:

Vec3

getNodePosition

MeshQuery.getNodePosition(nodeIndex)
Arguments:
  • nodeIndex (number) – None

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.

Return type:

Vec3