# 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

- `constructor`

Accessors

- `elementCount`
- `elementNodeIndexArray`
- `elementTypeArray`
- `nodeArray`
- `nodeCount`
- `singleElementType`

Methods

- `getBoundingBox`

## Constructors

`Mesh.``constructor`(nodeArr, singleElementType, elementNodeIndexArr[, optionalData])

  Arguments: | nodeArr (`ArrayLike`) – None singleElementType (`number`) – None elementNodeIndexArr (`ArrayLike`) – None optionalData (`OptionalMeshData`) – optional None

  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.

  Return type: | Mesh

`Mesh.``constructor`(nodeArr, elementTypeArr, elementNodeIndexArr[, optionalData])

  Arguments: | nodeArr (`ArrayLike`) – None elementTypeArr (`ArrayLike`) – None elementNodeIndexArr (`ArrayLike`) – None optionalData (`OptionalMeshData`) – optional None
  Return type: | Mesh

## Accessors

`Mesh.``elementCount`()

  The number of elements in the mesh.

  Return type: | number

`Mesh.``elementNodeIndexArray`()

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

  Return type: | ArrayLike <number>

`Mesh.``elementTypeArray`()

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

  Return type: | ArrayLike <number>

`Mesh.``nodeArray`()

  A readonly array containing the nodes of the mesh

  Return type: | ArrayLike <number>

`Mesh.``nodeCount`()

  The number of nodes in the mesh.

  Return type: | number

`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.

  Return type: | number

## Methods

### getBoundingBox

`Mesh.``getBoundingBox`()

  Returns the `BoundingBox` of the mesh.

  Return type: | BoundingBox

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Web in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...