Skip to main content
Version: Next

Class: ClusteredAreaCollection

Defined in: packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:14

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

Constructor

new ClusteredAreaCollection(): ClusteredAreaCollection

Returns

ClusteredAreaCollection

Accessors

isEmpty

Get Signature

get isEmpty(): boolean

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

Returns

boolean

Implementation of

AreaCollection.isEmpty

Methods

addAreas()

addAreas(boxes): void

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

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

Parameters

boxes

Iterable<Box3>

Returns

void

Implementation of

AreaCollection.addAreas


areas()

areas(): Generator<Box3>

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

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>

Implementation of

AreaCollection.areas


intersectsBox()

intersectsBox(box): boolean

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

Return whether the input box intersects the AreaCollection.

Parameters

box

Box3

Returns

boolean

Implementation of

AreaCollection.intersectsBox


intersectWith()

intersectWith(boxes): void

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

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