Hide menu
Loading...
Searching...
No Matches
Solid

Defines a solid.

A solid is intended to represent a finite volume bounded by one or more shells.

Extends

Constructors

Constructor

‍new Solid(shell?): Solid

Creates a solid optionally initialized with a shell.

Parameters

shell?

Shell

Optional initial shell.

Returns

Solid

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(shell): boolean

Appends a shell to the solid.

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

Parameters

shell

Shell

Shell to append.

Returns

boolean

Call Signature

‍append(shells): boolean

Appends shells to the solid.

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

Parameters

shells

Shell[]

Shells to append.

Returns

boolean


computeCompoundTriangulation()

Computes a compound polygonal representation of the solid shells.

Param

defaultMaterial

Default material assigned to faces without their own material.

Call Signature

‍computeCompoundTriangulation(defaultMaterial): ShapeCompoundTriangulation<false>

Computes a compound polygonal representation of the solid shells.

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 solid shells.

Parameters

defaultMaterial

VisualMaterial | null

Default material assigned to faces without their own material.

Returns

ShapeCompoundTriangulation