Skip to content

editorGlobalsCSGMeshOperation

Class: CSGMeshOperation

Hierarchy

CSGMeshOperation

SplitMeshOperation

BooleanMeshOperation

Index

Constructors

Properties

Methods

Constructors

constructor

+ new CSGMeshOperation(base: Mesh, candidates: Mesh[], operationType: CSGOperationType): CSGMeshOperation

Overrides MeshOperation.constructor

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:27

Parameters:

Name Type
base Mesh
candidates Mesh[]
operationType CSGOperationType

Returns: CSGMeshOperation

Properties

Protected base

base: Mesh = null

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:25


Protected candidates

candidates: Mesh[] = null

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:26


Protected operationType

operationType: CSGOperationType

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:27

Methods

Protected _ensureValidStartingState

_ensureValidStartingState(): void

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:183

Make sure the meshes are in a valid state to start operations

Returns: void


Protected _generateResults

_generateResults(meshes: MeshAndImplementation[], resultImplementations: IMeshImplementation[], candidatesAreGone: boolean, firstImplementationOnNegativeSide?: boolean): IMeshOperationResult[]

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:95

Parameters:

Name Type Default
meshes MeshAndImplementation[] -
resultImplementations IMeshImplementation[] -
candidatesAreGone boolean false
firstImplementationOnNegativeSide? boolean -

Returns: IMeshOperationResult[]


Protected _getAffectedMeshes

_getAffectedMeshes(): Mesh[]

Overrides MeshOperation._getAffectedMeshes

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:81

Returns: Mesh[]


Protected _getMeshOffStrings

_getMeshOffStrings(meshes: Mesh[]): string[]

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:85

Parameters:

Name Type
meshes Mesh[]

Returns: string[]


Protected _meshFromOff

_meshFromOff(offString: string, meshToMapCoordinatesTo: IPositionableElement): IMeshImplementation[]

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:166

Parameters:

Name Type
offString string
meshToMapCoordinatesTo IPositionableElement

Returns: IMeshImplementation[]


Protected _meshPointFromAssemblySpace

_meshPointFromAssemblySpace(mesh: IPositionableElement, point: Vector3): Vector3

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:162

Parameters:

Name Type
mesh IPositionableElement
point Vector3

Returns: Vector3


Protected Abstract _performOperation

_performOperation(meshes: MeshAndImplementation[]): PromiseIMeshOperationResult[]›

Overrides MeshOperation._performOperation

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:79

Parameters:

Name Type
meshes MeshAndImplementation[]

Returns: PromiseIMeshOperationResult[]›


Abstract canBeConsolidatedWith

canBeConsolidatedWith(otherOperation: CSGMeshOperation): boolean

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:45

Some operations can be consolidated in order to bring up performance. This method determines whether this and the other operation can be consolidated.

Consolidation can be done if the base mesh and operation type are the same. FULL_SPLIT does not support consolidation.

Parameters:

Name Type Description
otherOperation CSGMeshOperation the other operation to check

Returns: boolean


Abstract consolidateWith

consolidateWith(otherOperation: CSGMeshOperation): void

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:53

Consolidates this operation with another one, making the other operation instance obsolete.

Parameters:

Name Type Description
otherOperation CSGMeshOperation -

Returns: void


execute

execute(): PromiseIMeshOperationResult[]›

Inherited from MeshOperation.execute

Defined in src/model/data/Concepts/Mesh/MeshOperation.ts:47

Performs the operation.

Returns: PromiseIMeshOperationResult[]›

Promise that will resolve to an array of IMeshOperationResults, each result being related to one of the affected meshes.


getBase

getBase(): Mesh

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:55

Returns: Mesh


getCandidates

getCandidates(): Mesh[]

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:64

Returns: Mesh[]


getId

getId(): string

Inherited from MeshOperation.getId

Defined in src/model/data/Concepts/Mesh/MeshOperation.ts:30

this is used to identify for which operation a UI progress bar is being shown, collisions are unlikely and have no severe consequences.

Returns: string

a random string-identifier that should be unique across all MeshOperations


getOperationType

getOperationType(): CSGOperationType

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:75

Returns: CSGOperationType


hasBeenStarted

hasBeenStarted(): boolean

Inherited from MeshOperation.hasBeenStarted

Defined in src/model/data/Concepts/Mesh/MeshOperation.ts:37

Returns: boolean

true, if this operation has been started execution


setBase

setBase(base: Mesh): void

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:59

Parameters:

Name Type
base Mesh

Returns: void


setCandidates

setCandidates(candidates: Mesh[]): void

Defined in src/model/data/Concepts/Mesh/CSGMeshOperation.ts:68

Parameters:

Name Type
candidates Mesh[]

Returns: void