Skip to content
Shapemetry

Types - Kernel

API reference for ./model/kernel on @huukhanhnguyen/types.

See the Guide for the package's role.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

BooleanOperation

type

Unit H: boolean ops take/return solid JSON documents.

type BooleanOperation
// = (documentA: string, documentB: string) => string

ExtrudeFace

type

type ExtrudeFace
// = {
    loops: Point[][];
}

HandleOperation

type

Unit H: ops take/return solid or shell JSON documents (no arena handles).

type HandleOperation
// = (document: string) => string

SolidMeasurements

type

Exact measurements of one body, taken in the kernel.

type SolidMeasurements
// = {
    /** Enclosed volume, mm³, unsigned. */
    volume: number;
    /** Sum of every face's own area, mm². */
    surfaceArea: number;
    /** Center of mass of the enclosed material, world space. */
    centerOfMass: Point;
}
Last updated: 📖 1 min readEdit on GitHub