@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
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?
optionalfilter?:ViewFilterRule[]
key
key:
string
label?
optionallabel?:string
style?
optionalstyle?: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?
optionalcolor?:string
halftone?
optionalhalftone?:boolean
lineStyle?
optionallineStyle?:LineStyle
lineWidth?
optionallineWidth?: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?
optionalequals?:string|string[]
key
key:
string
notEquals?
optionalnotEquals?:string|string[]
override?
optionaloverride?:ViewFilterOverride