Types - Entities
API reference for ./evaluate/entities 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.
CurveEntity
type
Curve stream entity — geometry is a PolyCurve (ordered chain of tagged 3D segments; one segment is a valid composite).
type CurveEntity
// = EntityBase & { geometry: PolyCurve; }Entity
type
The entity stream union — every kind a fold can put on the stream. There is no type discriminant: a consumer sniffs the SHAPE of geometry to narrow a member of this union.
type Entity
// = CurveEntity | ShellEntity | PointEntity | MeshEntity | AnnotationEntity | SectionEntity | HatchEntity | LightEntity | BlockEntityEntityBase
type
The base fields every scene entity carries.
type EntityBase
// = {
id: string;
visible?: boolean;
layer?: string;
material?: string;
label?: string;
sourceKey?: string;
/** View-family membership — absent === "3d" (the 3D body). Any non-"3d"
* family is authored drawing content, routed verbatim to the view whose
* family matches. */
view?: ViewFamily;
/** Authoring-safety marker: this entity is immune to every LATER step of
* the fold it is flowing through — transforms, props, selection and
* booleans all skip it, and the block-behavior phase (which runs after
* the fold) skips it too. Stamped by the `applyLocked` step; the only
* lever that changes a locked entity afterwards is editing the step that
* produced it.
*
* It lives on the ENTITY and not on the node because entities are what
* the later steps skip: the fold's partition was always computed by
* tracking which entities a locked node had produced, so the flag simply
* moved to where it was already being read (2026-08-15).
*
* Plain boolean, never an expression — a parametric lock defeats the
* point. Composes independently with `visible` and with a step's
* `enabled` (disabled = bypassed and creates nothing; locked = runs
* normally, output shielded). packages/draw3d refuses gesture edits
* (gizmo / push-pull / point handles) on a locked entity; selection,
* inspection and measure stay allowed. */
locked?: boolean;
/** Free-form classification data (attributes.type = "door" / "outlet" /
* ifcClass …). Not read by the engine itself; a reader (schedule, IFC
* export, plugin) groups or filters by it. */
attributes?: Record<string, unknown>;
}HatchCellEntity
type
Allowed hatch cell members — point/curve/face only (validated at authoring).
type HatchCellEntity
// = PointEntity | CurveEntity | ShellEntityHatchEntity
type
Hatch stream entity — pattern content in the uv of one trimmed face. Sniff: geometry has cell.
type HatchEntity
// = EntityBase & { geometry: Hatch; }LightEntity
type
Light stream entity — geometry is a Light (the emitting shape plus what it radiates). A luminaire is an ORDINARY entity: no behavior, no flag on every other entity, nothing the stream has to special-case. Its housing (the can, the shade, the glass) is separate solid geometry, grouped with it when they should move together. Sniff: geometry has lumens.
type LightEntity
// = EntityBase & { geometry: Light; }MeshEntity
type
Opaque n-gon polygon mesh entity — closed BY TYPE: only the mesh→mesh op family consumes it. Sniff: geometry has positions AND faces.
type MeshEntity
// = EntityBase & { geometry: Mesh; }PointEntity
type
Point marker (render-only visualization entity — not a construction atom).
type PointEntity
// = EntityBase & { geometry: Point; }ShellEntity
type
One shell as flat tables (vertices/edges/loops/faces). One entity = one shell; whole-body grouping is derived, not stored. Sniff: "loops" in
geometry. ONE conversion door: model's domains/brepFace.ts.
type ShellEntity
// = EntityBase & { geometry: Shell; }ViewFamily
type
The view family an entity belongs to. Absent on an entity === "3d". The runtime VIEW_FAMILIES array stays in scene — this package is declarations-only, so only the union moves.
type ViewFamily
// = "3d" | "plan" | "section" | "elevation" | "pattern" | "detail"