Skip to content
Shapemetry

@huukhanhnguyen/types / evaluate/view

evaluate/view

FlatView

FlatView = ViewBase & { source: string; }

Space = a flat component; its content is already 2D.


FoldedView

FoldedView = FlatView | SectionView | ProjectionView | ViewBase

One view after a fold. ViewBase-as-member is open (§10.1) — not decided. Distinct from the authoring View chain (model/modelDocument.ts).


ProjectionView

ProjectionView = ViewBase & { camera: string; }

Axis is a free human choice, so it comes from a CameraObject. camera is that object's key — placement from its instance, projection from its camera field. A CameraData has no axis after the pose/projection split (objects/camera.ts). A drawing still takes its paper frame from the layout; fov/height are ignored there.


SectionPlaneRef

SectionPlaneRef = { data: SectionData; key: string; }

One SectionObject in the scene, paired with its objects[] key. A viewSection head's plane arg resolves against a list of these (model's findSectionPlane) so a NAMED plane can be picked when the scene holds several — matching by the object's actual identity, not by position in the list. SectionData alone (the object's data payload) carries no key: object-tier identity lives on the object, never inside its data document (ARCHITECTURE.md's Objects section).

data

data: SectionData

key

key: string


SectionView

SectionView = ViewBase & { cut: Plane; }

Space is cut by a plane; the plane gives the axis. Section up is the first world axis not parallel to the normal, projected onto the plane, tried Z then X (puts world X up the sheet on a plan — the common convention is Y / north up).


ViewBase

ViewBase = { filter?: ViewFilterRule[]; key: string; label?: string; style?: string; }

filter?

optional filter?: ViewFilterRule[]

key

key: string

label?

optional label?: string

style?

optional style?: string


ViewFilterOverride

ViewFilterOverride = { color?: string; halftone?: boolean; lineStyle?: LineStyle; lineWidth?: number; }

Per-rule graphic override — rides the same channel per-layer graphics ride: color/lineStyle/lineWidth win over the document's layer/material lookup. halftone renders at a fixed reduced opacity.

color?

optional color?: string

halftone?

optional halftone?: boolean

lineStyle?

optional lineStyle?: LineStyle

lineWidth?

optional lineWidth?: number


ViewFilterRule

ViewFilterRule = { equals?: string | string[]; key: string; notEquals?: string | string[]; override?: ViewFilterOverride; }

One AND-combined test against a field of a data document — key "layer" and "material" read the ENTITY ROW's own lane reference (rowLayerOf / rowMaterialOf; no *Data carries one), any other key reads attributes[key]. equals/notEquals accept a single value OR an array (any-of / none-of). override applies a graphic override to every document the rule matches.

equals?

optional equals?: string | string[]

key

key: string

notEquals?

optional notEquals?: string | string[]

override?

optional override?: ViewFilterOverride

Last updated: 📖 3 min readEdit on GitHub