Hide menu
Loading...
Searching...
No Matches
Shell

Defines a shell.

A shell is intended to represent a connected set of faces.

Extends

Constructors

Constructor

‍new Shell(face?): Shell

Creates a shell optionally initialized with a face.

Parameters

face?

Face

Optional initial face.

Returns

Shell

Overrides

Shape.constructor

Accessors

id

Get Signature

‍get id(): bigint

Returns the unique identifier of the object.

Returns

bigint

Inherited from

Shape.id


name

Get Signature

‍get name(): string | null

Name of the shape.

The default value is null.

Returns

string | null

Set Signature

‍set name(name): void

Sets the name of the shape.

Parameters

name

string | null

Shape name.

Returns

void

Inherited from

Shape.name


type

Get Signature

‍get type(): ShapeType

Type of the shape.

Returns

ShapeType

Inherited from

Shape.type

Methods

addAssociatedPMI()

‍addAssociatedPMI(elementOrElements): void

Adds one or more PMI elements associated with the shape.

Parameters

elementOrElements

PMIElement | PMIElement[]

PMI element or elements.

Returns

void

Inherited from

Shape.addAssociatedPMI


append()

Call Signature

‍append(face): boolean

Appends a face to the shell.

Returns true if face was added, or false if it is already present in the shell.

Parameters

face

Face

Face to append.

Returns

boolean

Call Signature

‍append(faces): boolean

Appends faces to the shell.

Returns true if all provided faces were added, or false if one or more faces are already present in the shell. Already present faces are skipped.

Parameters

faces

Face[]

Faces to append.

Returns

boolean


computeCompoundTriangulation()

Computes a compound polygonal representation of the shell faces.

Param

defaultMaterial

Default material assigned to faces without their own material.

Call Signature

‍computeCompoundTriangulation(defaultMaterial): ShapeCompoundTriangulation<false>

Computes a compound polygonal representation of the shell faces.

Parameters

defaultMaterial

VisualMaterial

Default material assigned to faces without their own material.

Returns

ShapeCompoundTriangulation<false>

Call Signature

‍computeCompoundTriangulation(defaultMaterial): ShapeCompoundTriangulation

Computes a compound polygonal representation of the shell faces.

Parameters

defaultMaterial

VisualMaterial | null

Default material assigned to faces without their own material.

Returns

ShapeCompoundTriangulation