Skip to content
Shapemetry

@huukhanhnguyen/model / schema/viewChain

schema/viewChain

FoldViewOptions

FoldViewOptions = { evaluateArg?: (input) => unknown; isEnabled?: (node) => boolean; resolveCamera?: (key) => CameraObject | undefined; sectionData?: readonly SectionPlaneRef[]; }

evaluateArg?

optional evaluateArg?: (input) => unknown

Evaluate one expression arg. Default = empty-context parse/eval (literals and param-free formulas). Model.evaluateView passes a scope-backed evaluator so cut/pose track live parameters.

Parameters

input

string

Returns

unknown

isEnabled?

optional isEnabled?: (node) => boolean

enabled expression evaluator; default truthy unless evaluates falsy.

Parameters

node

Operation

Returns

boolean

resolveCamera?

optional resolveCamera?: (key) => CameraObject | undefined

For view3d's camera arg — resolve a camera cameras[] entry by key (fail-soft: a missing/unresolvable key falls through to the inline pose args, same as an absent arg). Undefined when the caller has no cameras lane (e.g. a standalone test).

Parameters

key

string

Returns

CameraObject | undefined

sectionData?

optional sectionData?: readonly SectionPlaneRef[]

For viewSection.plane — the scene's section-plane objects, each keyed by its objects[] identity, searched for the named one (findSectionPlane).


ViewHeadMethod

ViewHeadMethod = typeof VIEW_HEAD_METHOD_NAMES[number]


VIEW_HEAD_METHOD_NAMES

const VIEW_HEAD_METHOD_NAMES: readonly ["viewPlan", "viewSection", "viewElevation", "view3d", "viewDetail"]

The methods that may HEAD a view chain — each names how the drawing's camera is set up (a cut height, a section plane, a free camera, a flat source). A HEADLESS chain has no head and is not placeable.

Last updated: 📖 1 min readEdit on GitHub