ParaShape

OperationNode

Source: packages/parametric/src/nodes/OperationNode.ts

Properties

NameTypeDescription
methodstringRegistry method name (e.g. "polyline", "move", "solidUnion").
keystringIdentifier naming this node's result in expressions (stream after it).
labelArgumentNode | nullOptional label argument rendered as the node's display name.
enabledArgumentNode | nullOptional enable expression — falsy = this step is bypassed (input passes through unchanged). null = always enabled.
argsArgumentNode[]Argument nodes that parametrize this operation.
definitionEntityDefinition | nullRegistry definition backing this operation (create/compute + args meta).
_stateChainState | nullCached output state of this step (stream after it).
returnstring | nullEntity kind this operation is documented to return (definition return).
isProducerbooleanTrue when this operation ADDS to the stream (create form / engine producer).

Methods

SignatureDescription
setLabel(expr: string | null): voidSet or clear (null/"") the label expression.
setEnabled(expr: string | null): voidSet or clear (null/"") the enable expression.
copy(): OperationNodeDuplicate this operation in its collection, inserting it right after the original.
evaluateStep(input: ChainState, definitions?: DefinitionMap): ChainState | Promise<ChainState>Run this step over the previous step's state, returning the cached output when neither this node nor its input changed. When the step's create/compute returns a thenable, the fold stays a Promise from here on; fail-soft applies identically whether the step throws synchronously or its promise rejects.
referenceValue(): EntityJSON[]The baked entity array of this step's cached state — what an expression referencing this node's key receives. Pulls the owning fold first so the state is fresh.
invalidateCreated(): voidForce the created part to rebuild on the next pull (used after structural cache invalidation, e.g. a replaced sub-model).
evaluate(listener?: () => void): unknownAn operation never computes standalone — the owning fold pulls it through evaluateStep(), which is what CONSUMES isDirty. The inherited BaseNode.evaluate() would clear the flag around a stub compute() and silently drop the edit signal (the next fold pass would serve the stale cached step), so return the cached value without touching dirtiness.