Patterns
ModelJson.patterns.
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AddPatternMethod } from "./AddPatternMethod.js";
import type { Argument } from "./Argument.js";
import type { PatternStepNode } from "./PatternStepNode.js";
import type { PropertyNode } from "./PropertyNode.js";
/**
* A `patterns[]` entry: identity `key`, plus `steps` — one `lineFamily`
* step per drawn family, non-empty (enforced post-deserialize, see
* `crate::validate`) — plus a `properties` list carrying only `attributes`.
*/
export type PatternNode = {
/**
* identity — unique in the document's one key namespace, every lane.
*/
key: string,
/**
* intent — editor-chrome display name, printed verbatim.
*/
label?: string,
/**
* intent — the one closed-literal patterns-lane head.
*/
method: AddPatternMethod,
/**
* intent — this head takes no args; kept for NODE LAW shape parity.
*/
args?: Array<Argument>,
/**
* intent — one `lineFamily` step per drawn family, non-empty.
*/
steps: Array<PatternStepNode>,
/**
* intent — `attributes` only.
*/
properties?: Array<PropertyNode>, };// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* The one patterns-lane head method.
*/
export type AddPatternMethod = "addPattern";// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Argument } from "./Argument.js";
import type { LineFamilyMethod } from "./LineFamilyMethod.js";
/**
* One `patterns[].steps` entry — a drawn line family. Carries the same
* shape as `StepNode` (H9): a pattern step is a step.
*/
export type PatternStepNode = {
/**
* intent — editor chrome, verbatim; no UI reads it yet.
*/
label?: string,
/**
* intent — the one closed-literal pattern-step method.
*/
method: LineFamilyMethod,
/**
* intent — the method's arguments.
*/
args?: Array<Argument>, };// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* The one pattern-lane step method, a closed literal.
*/
export type LineFamilyMethod = "lineFamily";// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* intent — how the line itself is drawn.
*/
export type LineStyle = "solid" | "dashed" | "dotted";// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* One value + its domain — the shape of every arg (a parameter's value, a
* step arg, a properties arg). `min`/`max` are numeric-only; `options`, when
* present, is the arg's whole domain.
*/
export type Argument = {
/**
* identity — the arg's name, unique among its owning node's `args`.
*/
key: string,
/**
* geometry — an expression string; may be empty (an unselected file
* parameter authors nothing, so this arg's min/max/options do not apply).
*/
input: string,
/**
* intent — expression → number, inclusive lower bound.
*/
min?: string,
/**
* intent — expression → number, inclusive upper bound.
*/
max?: string,
/**
* intent — expression → non-empty array, the arg's whole domain.
*/
options?: string, };Catalog methods
Every engine_catalog node whose context names "patterns" — the addPattern head plus lineFamily.
3 catalog method(s) whose context names "patterns".
addPattern
Pattern · step · returns pattern · context: patterns
Default key: pattern.
Hatch pattern record, identified by its node key; its line families are
lineFamilysteps.
No args.
attributes
Attributes · step · returns object · context: properties, materials, layers, patterns
Default key: attributes.
Free-form domain bag.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
value | object | function | {} |
lineFamily
Line Family · step · returns pattern · context: patterns
Default key: lineFamily.
One infinite parallel-line family drawn over a hatch region.
| key | type | default | min | max | options | tooltip |
|---|---|---|---|---|---|---|
angle | angle | 0 | Direction of the family, degrees counter-clockwise from hatch-space +X. | |||
origin | object | [0, 0] | A point the first line passes through, in hatch space [x, y]. Not rewritten on a unit change. | |||
shift | length | 0 | Slide along the line direction between one line and the next; visible once dashes breaks the line up. | |||
spacing | length | Distance across, between one line and the next. Strictly greater than 0. | ||||
dashes | length[] | Repeating pen cycle (SVG stroke-dasharray spelling); absent = a solid line. | ||||
lineWidth | length | Stroke width. Absent = the renderer's hairline. | ||||
color | color | #rrggbb. Absent = inherit from the placement's material. | ||||
dotSize | length | Diameter painted for a zero-length dash. Absent = lineWidth. |
📖 1 min read