docs / Measure & verify
Measure & verify
Ask the kernel what you actually built, and check it before shipping.
boundingBox() asks the kernel what you actually built. Here it checks the fillet did not change the overall width.
const bracket = box(60, 40, 12).fillet(3);
const bb = await bracket.boundingBox();
if (Math.abs(bb.size[0] - 60) > 1e-6) {
throw new Error('fillet changed the overall width: ' + bb.size[0]);
}
return bracket;Calls
| Call | What it does |
|---|---|
Shape.boundingBox(opts?: { exact?: boolean }) => Promise<{ min: [number, number, number]; max: [number, number, number]; size: [number, number, number]; center: [number, number, number] }> | Axis-aligned bounding box in the CURRENT world frame (after every transform appended so far), in mm. |
Scene.bbox : { min: [number, number, number]; max: [number, number, number] } | Lazy axis-aligned bounding box over all transformed parts. |
Curve3D.length() => number | Total arc length in mm. |
Shape.lower() => Promise<OcctBackend> | Eagerly lower this Shape for inspection. |
kinematic : KinematicFacade | Namespace with four in-process feasibility checks an agent can run before declaring a mechanism design done: kinematic.checkMountingHoleConsistency(arm) (fastener-side hole agreement; dispatches to the v0.7.4 substrate), kinematic.checkSweptCollision(arm, opts?) (sampled-pose collision sweep across declared joint ranges), kinematic.checkReachable(arm, opts) (IK reachability — analytical Pieper first, DLS numeric fallback), kinematic.checkLoadCapacity(arm, opts?) (closed-form Euler-Bernoulli beam load check). |
dfmSpec(spec: { minWall?: number; minClearance?: number; includeArticulatedMates?: boolean; ignore?: [string, string][]; exclude?: string[]; channels?: Array<{ part: string; name: string; openings: number; sealed?: boolean }> }) => DfmSpecHandle | Declare printability (design-for-manufacture) gates for the model. |