Skip to content
Shapemetry

Types - Sheets

API reference for ./evaluate/sheets 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.

SheetValue

type

One composed sheet: content inside the page that BOUNDS it.

A sheet is an OBJECT whose space is finite, so this is an object's content plus the bound, and nothing else.

Model.evaluateSheet returns it inside the shared envelope — Resolved<SheetValue> (frame.ts) — exactly as views return Resolved<ViewValue>. There is no ResolvedSheet name: it restated { key, label?, value } by hand.

The bound is a SIZE, not a box, and that is the one place a sheet differs from a view: a view's crop floats in the view plane (both corners carry information, so it is a BoundingBox2d), while the paper's corner IS the origin — every composed entity lands in [0,width] × [0,height]. Storing minX/minY for paper would be storing two constant zeros.

type SheetValue
// = {
    /** The evaluated title-block name, e.g. "GROUND FLOOR PLAN" — CONTENT
     *  printed on the paper (title-vs-label law), which is why it rides the
     *  VALUE and not the envelope's editor-chrome `label`. `Sheet.title` is an
     *  expression (titleValue law); this is what it evaluated to. "" when the
     *  sheet declares none. */
    title: string;
    /** Paper millimetres, x right, y DOWN from the top-left corner. */
    entities: Entity[];
    /** The bound — paper millimetres. */
    width: number;
    height: number;
    /** Drawing scale, model mm per paper mm (50 = 1:50). MEASURED when the
     *  sheet auto-fits its views, so it is not recoverable from the `Sheet`.
     *  ABSENT when nothing was measurable and nothing was declared — that is
     *  "no answer", never a default; the title block prints its own "—" for
     *  that case. */
    scale?: number;
}
Last updated: 📖 1 min readEdit on GitHub