Shapemetry API / Compound
Class: Compound
Defined in: nurbsBrep/topo/Compound.ts:17
A topological compound: a group of solids.
Compounds allow treating multiple disjoint solids as a single modelling entity (e.g. the result of a boolean split).
Constructors
Constructor
new Compound(
solids):Compound
Defined in: nurbsBrep/topo/Compound.ts:22
Parameters
solids
Solid[]
Returns
Compound
Properties
index
readonlyindex:number
Defined in: nurbsBrep/topo/Compound.ts:18
solids
solids:
Solid[]
Defined in: nurbsBrep/topo/Compound.ts:20
The solids contained in this compound.
Accessors
solidCount
Get Signature
get solidCount():
number
Defined in: nurbsBrep/topo/Compound.ts:52
Number of solids in this compound.
Returns
number
Methods
fromStep()
staticfromStep(content):Compound
Defined in: nurbsBrep/topo/Compound.ts:32
Read every solid body of a STEP AP203 file into one compound — the loss-free way to import a multi-body assembly (where Solid.fromStep reads a single body and rejects multi-body files).
Parameters
content
string
Returns
Compound
toStep()
toStep():
string
Defined in: nurbsBrep/topo/Compound.ts:37
Serialize every body of this compound into one multi-body STEP document.
Returns
string
equals()
equals(
other):boolean
Defined in: nurbsBrep/topo/Compound.ts:42
Identity comparison (two handles refer to the same compound).
Parameters
other
Compound
Returns
boolean
explode()
explode():
Solid[]
Defined in: nurbsBrep/topo/Compound.ts:47
Return a shallow copy of the solids array.
Returns
Solid[]
boundingBox()
boundingBox():
BoundingBox
Defined in: nurbsBrep/topo/Compound.ts:57
Compute the union of all solid bounding boxes.
Returns
fuseAll()
fuseAll():
Solid
Defined in: nurbsBrep/topo/Compound.ts:80
Fuse (union) all solids into a single solid. Only disjoint solids are supported: merges their shells into one multi-lump solid. Overlapping solids require the boolean module (not available); call solid.union() directly.