Skip to Content
Bear documentation
API referenceBlueprintsConnectors

solids

Import from bear/blueprints/connectors/solids.

Type Aliases

SolidLoader

type SolidLoader = (solid) => Promise<Geometry["manifold"]>;

Defined in: bear/blueprints/connectors/solids.ts:30

Loads one shape's mesh, given the record's pointer to it.

Parameters

ParameterType
solidConnectorSolid

Returns

Promise<Geometry["manifold"]>

Functions

loadSolid()

function loadSolid(solid): Promise<Manifold | undefined>;

Defined in: bear/blueprints/connectors/solids.ts:63

A connector's load: its record's mesh, when it has one.

Parameters

ParameterType
solidConnectorSolid | undefined

Returns

Promise<Manifold | undefined>


setConnectorSolidLoader()

function setConnectorSolidLoader(next): void;

Defined in: bear/blueprints/connectors/solids.ts:58

Swap where solids are read from. Pass undefined to restore the bucket. Tests use this; nothing in a running model does.

Parameters

ParameterType
nextSolidLoader | undefined

Returns

void


solidGeometry()

function solidGeometry(loaded, box): Geometry;

Defined in: bear/blueprints/connectors/solids.ts:75

A connector's solid: the manufacturer's mesh when it could be had, and the part's own box when it could not. One rule, so a record with no published solid and a build with nowhere to read one from come out the same way — as the box the part is already sized by.

Parameters

ParameterType
loadedManifold | undefined
boxBox

Returns

Geometry

On this page