Skip to main content
Version: 4.x

Class: ClusteredAreaCollection

AreaCollection that stores a representative box set by merging inserted boxes that are overlapping or close to each other. It uses simple heuristics to determine which boxes are to be merged.

Implements

Constructors

new ClusteredAreaCollection()

new ClusteredAreaCollection(): ClusteredAreaCollection

Returns

ClusteredAreaCollection

Accessors

isEmpty

get isEmpty(): boolean

Returns

boolean

Implementation of

AreaCollection . isEmpty

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:17

Methods

addAreas()

addAreas(boxes): void

Add areas to be covered by the representative set of this AreaCollection.

Parameters

boxes: Iterable<Box3>

Returns

void

Implementation of

AreaCollection . addAreas

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:35


areas()

areas(): Generator<Box3, any, unknown>

Return some set of boxes that cover the boxes inserted with addAreas. It is required that each inserted box is completely covered by some subset of boxes in the set returned from areas

Returns

Generator<Box3, any, unknown>

Implementation of

AreaCollection . areas

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:21


intersectWith()

intersectWith(boxes): void

Alter the representative set to cover only the intersection between the representative set of this AreaCollection and the incoming boxes. Note that the intersection of two representative sets A' and B' that represent the original box sets A and B will cover the intersection between A and B, and will thus be a valid representative set for the intersection of A and B.

Parameters

boxes: Iterable<Box3>

Returns

void

Implementation of

AreaCollection . intersectWith

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:39


intersectsBox()

intersectsBox(box): boolean

Return whether the input box intersects the AreaCollection.

Parameters

box: Box3

Returns

boolean

Implementation of

AreaCollection . intersectsBox

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:25