Hide menu
Loading...
Searching...
No Matches
Wire

Defines a wire.

A wire is intended to represent a connected set of edges.

Extends

Constructors

Constructor

new Wire(edge?): Wire

Creates a wire optionally initialized with an edge.

Parameters

edge?

Edge

Optional initial edge.

Returns

Wire

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

append()

Call Signature

append(edge): boolean

Appends an edge to the wire.

Returns true if edge was added, or false if it is already present in the wire.

Parameters

edge

Edge

Edge to append.

Returns

boolean

Call Signature

append(edges): boolean

Appends edges to the wire.

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

Parameters

edges

Edge[]

Edges to append.

Returns

boolean


computeCompoundTriangulation()

Computes a compound polygonal representation of the wire edges.

Param

Default material assigned to edges without their own material.

Call Signature

computeCompoundTriangulation(defaultMaterial): ShapeCompoundTriangulation<false>

Computes a compound polygonal representation of the wire edges.

Parameters

defaultMaterial

VisualMaterial

Default material assigned to edges without their own material.

Returns

ShapeCompoundTriangulation<false>

Call Signature

computeCompoundTriangulation(defaultMaterial): ShapeCompoundTriangulation

Computes a compound polygonal representation of the wire edges.

Parameters

defaultMaterial

VisualMaterial | null

Default material assigned to edges without their own material.

Returns

ShapeCompoundTriangulation