@hatiolab/figure-model 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asset-types.d.ts +1 -1
- package/dist/asset-types.d.ts.map +1 -1
- package/dist/asset.d.ts.map +1 -1
- package/dist/asset.js +6 -5
- package/dist/asset.js.map +1 -1
- package/dist/authoring-actions.d.ts +2 -795
- package/dist/authoring-actions.d.ts.map +1 -1
- package/dist/authoring-actions.js +66 -3777
- package/dist/authoring-actions.js.map +1 -1
- package/dist/authoring-bindings.d.ts +35 -0
- package/dist/authoring-bindings.d.ts.map +1 -0
- package/dist/authoring-bindings.js +241 -0
- package/dist/authoring-bindings.js.map +1 -0
- package/dist/authoring-dimensions.d.ts +10 -0
- package/dist/authoring-dimensions.d.ts.map +1 -0
- package/dist/authoring-dimensions.js +88 -0
- package/dist/authoring-dimensions.js.map +1 -0
- package/dist/authoring-fastening.d.ts +24 -0
- package/dist/authoring-fastening.d.ts.map +1 -0
- package/dist/authoring-fastening.js +562 -0
- package/dist/authoring-fastening.js.map +1 -0
- package/dist/authoring-geometry.d.ts +119 -0
- package/dist/authoring-geometry.d.ts.map +1 -0
- package/dist/authoring-geometry.js +419 -0
- package/dist/authoring-geometry.js.map +1 -0
- package/dist/authoring-nodes.d.ts +77 -0
- package/dist/authoring-nodes.d.ts.map +1 -0
- package/dist/authoring-nodes.js +310 -0
- package/dist/authoring-nodes.js.map +1 -0
- package/dist/authoring-occupancy.d.ts +28 -0
- package/dist/authoring-occupancy.d.ts.map +1 -0
- package/dist/authoring-occupancy.js +784 -0
- package/dist/authoring-occupancy.js.map +1 -0
- package/dist/authoring-proportion.d.ts +27 -0
- package/dist/authoring-proportion.d.ts.map +1 -0
- package/dist/authoring-proportion.js +378 -0
- package/dist/authoring-proportion.js.map +1 -0
- package/dist/authoring-size.d.ts +17 -0
- package/dist/authoring-size.d.ts.map +1 -0
- package/dist/authoring-size.js +140 -0
- package/dist/authoring-size.js.map +1 -0
- package/dist/authoring-types.d.ts +753 -0
- package/dist/authoring-types.d.ts.map +1 -0
- package/dist/authoring-types.js +42 -0
- package/dist/authoring-types.js.map +1 -0
- package/dist/command-preview.d.ts +1 -1
- package/dist/command-preview.d.ts.map +1 -1
- package/dist/command-preview.js +1 -0
- package/dist/command-preview.js.map +1 -1
- package/dist/contract.d.ts +129 -3
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +1 -1
- package/dist/contract.js.map +1 -1
- package/dist/cost.d.ts.map +1 -1
- package/dist/cost.js +3 -0
- package/dist/cost.js.map +1 -1
- package/dist/create.d.ts +36 -0
- package/dist/create.d.ts.map +1 -1
- package/dist/create.js +60 -0
- package/dist/create.js.map +1 -1
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +4 -3
- package/dist/document.js.map +1 -1
- package/dist/editor-workspace.d.ts +3 -3
- package/dist/editor-workspace.d.ts.map +1 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +3 -1
- package/dist/examples.js.map +1 -1
- package/dist/gate.d.ts.map +1 -1
- package/dist/gate.js +2 -0
- package/dist/gate.js.map +1 -1
- package/dist/graph-types.d.ts +3 -2
- package/dist/graph-types.d.ts.map +1 -1
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +3 -3
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/joint-list.js +1 -1
- package/dist/joint-list.js.map +1 -1
- package/dist/joint-part-edits.d.ts +40 -0
- package/dist/joint-part-edits.d.ts.map +1 -0
- package/dist/joint-part-edits.js +488 -0
- package/dist/joint-part-edits.js.map +1 -0
- package/dist/joint-writing.d.ts +50 -0
- package/dist/joint-writing.d.ts.map +1 -0
- package/dist/joint-writing.js +847 -0
- package/dist/joint-writing.js.map +1 -0
- package/dist/json.d.ts.map +1 -1
- package/dist/json.js +11 -8
- package/dist/json.js.map +1 -1
- package/dist/kernel-version.d.ts +1 -1
- package/dist/kernel-version.js +1 -1
- package/dist/package.d.ts +15 -3
- package/dist/package.d.ts.map +1 -1
- package/dist/package.js +58 -0
- package/dist/package.js.map +1 -1
- package/dist/part-edit.d.ts +1 -1
- package/dist/part-edit.d.ts.map +1 -1
- package/dist/part-edit.js +7 -4
- package/dist/part-edit.js.map +1 -1
- package/dist/proposal.d.ts +1 -1
- package/dist/proposal.d.ts.map +1 -1
- package/dist/proposal.js +5 -2
- package/dist/proposal.js.map +1 -1
- package/dist/render-batches.d.ts +10 -2
- package/dist/render-batches.d.ts.map +1 -1
- package/dist/render-batches.js +19 -5
- package/dist/render-batches.js.map +1 -1
- package/dist/resize-plan.d.ts +1 -1
- package/dist/resize-plan.d.ts.map +1 -1
- package/dist/robots.d.ts.map +1 -1
- package/dist/robots.js +3 -1
- package/dist/robots.js.map +1 -1
- package/dist/room.d.ts +1 -1
- package/dist/room.d.ts.map +1 -1
- package/dist/room.js +2 -1
- package/dist/room.js.map +1 -1
- package/dist/shape-edit.js +4 -4
- package/dist/shape-edit.js.map +1 -1
- package/dist/shape-ops.d.ts +62 -7
- package/dist/shape-ops.d.ts.map +1 -1
- package/dist/shape-ops.js +117 -8
- package/dist/shape-ops.js.map +1 -1
- package/dist/slot-layout-presets.d.ts +102 -0
- package/dist/slot-layout-presets.d.ts.map +1 -0
- package/dist/slot-layout-presets.js +185 -0
- package/dist/slot-layout-presets.js.map +1 -0
- package/dist/slot-layout.d.ts +16 -1
- package/dist/slot-layout.d.ts.map +1 -1
- package/dist/slot-layout.js.map +1 -1
- package/docs/modeller-interaction-performance-2026-10-07.md +40 -8
- package/docs/shape-contract.md +46 -0
- package/package.json +1 -1
|
@@ -0,0 +1,753 @@
|
|
|
1
|
+
import type { FigureCavityRequest, FigureSectionRequest } from './shape-edit.ts';
|
|
2
|
+
import type { SlotLayout } from './slot-layout.ts';
|
|
3
|
+
import type { Axis, DetailLevel } from './words.ts';
|
|
4
|
+
import type { FigurePlacement } from './asset-types.ts';
|
|
5
|
+
/** The six faces of a box-shaped part, and the axis each one faces along. */
|
|
6
|
+
export declare const FIGURE_FACES: {
|
|
7
|
+
readonly left: "x";
|
|
8
|
+
readonly right: "x";
|
|
9
|
+
readonly bottom: "y";
|
|
10
|
+
readonly top: "y";
|
|
11
|
+
readonly back: "z";
|
|
12
|
+
readonly front: "z";
|
|
13
|
+
};
|
|
14
|
+
export type FigureFace = keyof typeof FIGURE_FACES;
|
|
15
|
+
/**
|
|
16
|
+
* The face a part is fastened by: one of its six, or `centre` -- its own middle, which every shape has (ADR-0093,
|
|
17
|
+
* 2026-09-26). Fastened by its centre, the part's middle is on the target's face (plus the gap), and a turn there
|
|
18
|
+
* turns it about its middle: a roller spinning in place.
|
|
19
|
+
*/
|
|
20
|
+
export type FigureChildFace = FigureFace | 'centre';
|
|
21
|
+
/**
|
|
22
|
+
* UsdPhysics's joint types (ADR-0093, amended 2026-09-25: the joint follows USD). A `fixed` joint is a fastening; a
|
|
23
|
+
* `revolute` joint turns -- with no limits it turns without end, its value a phase (-180..180), as USD's revolute
|
|
24
|
+
* joint without limits does; a `prismatic` joint slides.
|
|
25
|
+
*/
|
|
26
|
+
export declare const FIGURE_JOINT_TYPES: readonly ["fixed", "revolute", "prismatic"];
|
|
27
|
+
export type FigureJointType = (typeof FIGURE_JOINT_TYPES)[number];
|
|
28
|
+
/** UsdPhysics's axis tokens. */
|
|
29
|
+
export type FigureJointAxis = 'X' | 'Y' | 'Z';
|
|
30
|
+
/**
|
|
31
|
+
* A joint, in UsdPhysics's words (ADR-0093): `body0` is what it hangs from -- a part's face, or the plane the figure is
|
|
32
|
+
* mounted on -- and `body1` the part it carries, by one of its faces. The joint frame is on body0's face (USD's
|
|
33
|
+
* `localPos0`), body1's face lies in it (`localPos1`); a moving joint turns about or slides along `axis` there.
|
|
34
|
+
* Angles are degrees and lengths millimetres, as in a USD stage with `metersPerUnit = 0.001`. The rest pose is every
|
|
35
|
+
* joint at 0.
|
|
36
|
+
*
|
|
37
|
+
* extensions, which USD has no field for: every length may be an expression of the figure's design inputs (a
|
|
38
|
+
* joint on a link moves when the link grows); the faces are named features; `mimic` (URDF's, and PhysX's and Newton's
|
|
39
|
+
* extensions); `travel`, a slide whose length follows a part's size.
|
|
40
|
+
*/
|
|
41
|
+
export interface FigureJoint {
|
|
42
|
+
id: string;
|
|
43
|
+
type: FigureJointType;
|
|
44
|
+
body0: {
|
|
45
|
+
part: string;
|
|
46
|
+
face: FigureFace;
|
|
47
|
+
} | {
|
|
48
|
+
plane: 'mounting-plane';
|
|
49
|
+
};
|
|
50
|
+
body1: {
|
|
51
|
+
part: string;
|
|
52
|
+
face: FigureChildFace;
|
|
53
|
+
};
|
|
54
|
+
/** Where on body0's face, and how body1 stands in the joint frame (quarter turns only, in degrees). */
|
|
55
|
+
origin?: {
|
|
56
|
+
facing?: 'meet' | 'flush';
|
|
57
|
+
gap?: FigureMeasure;
|
|
58
|
+
align?: Partial<Record<Axis, FigureFaceAlignment>>;
|
|
59
|
+
turn?: Partial<Record<Axis, number>>;
|
|
60
|
+
/**
|
|
61
|
+
* Degrees about the normal of the face the child is fastened by (r3 §6's twist): the faces still meet, so any
|
|
62
|
+
* angle holds -- a fan's blades at 120°, a spoke at 45°. `turn` stays quarter turns. Twisted, the child's place
|
|
63
|
+
* across the face is measured from the face's centre in the twisted frame: a blade `align.x.mm` 200 out and
|
|
64
|
+
* twisted 120° stands 200 out along the blade, about the hub. Edges cannot be lined up with a twisted child.
|
|
65
|
+
*/
|
|
66
|
+
twist?: number;
|
|
67
|
+
};
|
|
68
|
+
/** The axis a moving joint turns about or slides along, in the joint frame (USD `physics:axis`). */
|
|
69
|
+
axis?: FigureJointAxis;
|
|
70
|
+
/** USD `physics:lowerLimit` / `physics:upperLimit`: degrees for revolute, millimetres for prismatic. */
|
|
71
|
+
lowerLimit?: number;
|
|
72
|
+
upperLimit?: number;
|
|
73
|
+
/**
|
|
74
|
+
* extension: a prismatic joint whose distance follows the figure -- its value is a share (0..1 unless the limits
|
|
75
|
+
* say otherwise) of this length: a part's width, the instance's, times and plus -- or a sum of such lengths, plus.
|
|
76
|
+
*/
|
|
77
|
+
travel?: FigureTravel;
|
|
78
|
+
/** The state input that is the joint's value: its id (the joint's by default), label, starting value and sweep. */
|
|
79
|
+
state?: {
|
|
80
|
+
id?: string;
|
|
81
|
+
label?: string;
|
|
82
|
+
start?: number;
|
|
83
|
+
sweep?: number;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* extension (URDF's mimic): the value is the leader's times `multiplier` plus `offset`, in this joint's unit. A sum
|
|
87
|
+
* follows several leaders, each times its own multiplier (ADR-0107 decision 2): a palletizer's wrist is -(J2 + J3),
|
|
88
|
+
* so its tool stays level. A follower has no control of its own either way.
|
|
89
|
+
*/
|
|
90
|
+
mimic?: FigureMimic;
|
|
91
|
+
/**
|
|
92
|
+
* extension (r3 §8, a row of copies -- USD's PointInstancer, URDF has none): the part fastened is repeated along
|
|
93
|
+
* `axis` across the parent's face, from the parent's one edge to the other. Without `count` the row fills that
|
|
94
|
+
* length, as many copies as fit at `pitch`, and so follows the parent's size; with `count`, that many spread evenly
|
|
95
|
+
* over it. Only a fastening repeats. What is fastened to the part is on every copy, and every copy moves on the part's
|
|
96
|
+
* one control (ADR-0093, 2026-09-26). A row inside a row is a grid, each along its own axis.
|
|
97
|
+
* `rise`: each copy stands `mm` further along a second axis than the one before -- a stair's steps (G2).
|
|
98
|
+
*/
|
|
99
|
+
repeat?: {
|
|
100
|
+
axis: FigureJointAxis;
|
|
101
|
+
pitch: FigureMeasure;
|
|
102
|
+
count?: number;
|
|
103
|
+
rise?: {
|
|
104
|
+
axis: FigureJointAxis;
|
|
105
|
+
mm: number;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export declare const SIGN: Record<FigureFace, number>;
|
|
110
|
+
/**
|
|
111
|
+
* What a dimension follows. Named rather than implied, because "as wide as the gate" and "as wide as the
|
|
112
|
+
* opening" and "as wide as the rail" are three different intentions that happen to agree at one size.
|
|
113
|
+
*/
|
|
114
|
+
export type FigureDimensionSource =
|
|
115
|
+
/** The instance's own size on an axis, as a board scales it. */
|
|
116
|
+
{
|
|
117
|
+
of: 'instance';
|
|
118
|
+
axis: Axis;
|
|
119
|
+
}
|
|
120
|
+
/** A design input the author declared, such as an opening width that is not the whole figure's width. */
|
|
121
|
+
| {
|
|
122
|
+
of: 'input';
|
|
123
|
+
input: string;
|
|
124
|
+
}
|
|
125
|
+
/** Another part's dimension on an axis. */
|
|
126
|
+
| {
|
|
127
|
+
of: 'part';
|
|
128
|
+
part: string;
|
|
129
|
+
axis: Axis;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* A length a command takes: a fixed number of millimetres, or something the figure already knows, so the value
|
|
133
|
+
* keeps up when the instance is resized. `{ from: ..., times, plus }` reads the same sources a dimension link
|
|
134
|
+
* does, which is why an opening can be "the instance's width" in a gap as well as in a dimension. `{ sum, plus }`
|
|
135
|
+
* adds several such terms (ADR-0107 decision 2); the one-term form is the sum of one term, written shorter.
|
|
136
|
+
*/
|
|
137
|
+
export type FigureMeasure = number | {
|
|
138
|
+
from: FigureDimensionSource;
|
|
139
|
+
times?: number;
|
|
140
|
+
plus?: number;
|
|
141
|
+
} | {
|
|
142
|
+
sum: FigureMeasureTerm[];
|
|
143
|
+
plus?: number;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* One term of a length that is a sum (ADR-0107 decision 2): a source times a multiple. A quadruped stands as high as
|
|
147
|
+
* its hip, thigh, shin and foot are long together. `{ from, times, plus }` is the sum of one term.
|
|
148
|
+
*/
|
|
149
|
+
export interface FigureMeasureTerm {
|
|
150
|
+
from: FigureDimensionSource;
|
|
151
|
+
times?: number;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* How far a slide goes at 1 when its control is a share (0..1): a source times and plus, a sum of sources plus, or
|
|
155
|
+
* without a source just `plus` millimetres.
|
|
156
|
+
*/
|
|
157
|
+
export type FigureTravel = {
|
|
158
|
+
source?: FigureDimensionSource;
|
|
159
|
+
times?: number;
|
|
160
|
+
plus?: number;
|
|
161
|
+
} | {
|
|
162
|
+
sum: FigureMeasureTerm[];
|
|
163
|
+
plus?: number;
|
|
164
|
+
};
|
|
165
|
+
/** A follower's value: one leader's times a multiplier, or the sum of several leaders' each times its own, plus `offset`. */
|
|
166
|
+
export type FigureMimic = {
|
|
167
|
+
joint: string;
|
|
168
|
+
multiplier: number;
|
|
169
|
+
offset?: number;
|
|
170
|
+
} | {
|
|
171
|
+
sum: Array<{
|
|
172
|
+
joint: string;
|
|
173
|
+
multiplier: number;
|
|
174
|
+
}>;
|
|
175
|
+
offset?: number;
|
|
176
|
+
};
|
|
177
|
+
/** The joints a follower follows, each with its multiplier: one for a one-leader mimic, none for a joint that leads itself. */
|
|
178
|
+
export declare function figureMimicLeadersOf(j: {
|
|
179
|
+
mimic?: FigureMimic | unknown;
|
|
180
|
+
}): Array<{
|
|
181
|
+
joint: string;
|
|
182
|
+
multiplier: number;
|
|
183
|
+
}>;
|
|
184
|
+
/** Whether a length is written as something to follow: one source, or a sum of one term or more, each with a source. */
|
|
185
|
+
export declare const followsSomething: (measure: unknown) => boolean;
|
|
186
|
+
/** A length that follows something, as its terms and its margin; undefined for a number (or nothing). */
|
|
187
|
+
export declare function followedTermsOf(measure: FigureMeasure | undefined): {
|
|
188
|
+
terms: FigureMeasureTerm[];
|
|
189
|
+
plus: number;
|
|
190
|
+
sum: boolean;
|
|
191
|
+
} | undefined;
|
|
192
|
+
/** Where a part sits inside the face it is fastened to, on one of that face's two axes. */
|
|
193
|
+
export type FigureFaceAlignment = 'centre' | 'min' | 'max' | {
|
|
194
|
+
mm: FigureMeasure;
|
|
195
|
+
};
|
|
196
|
+
/** A reference an edit would leave on a face it takes away, and where it goes instead (ADR-0100 A8). */
|
|
197
|
+
export interface FigureFaceRemap {
|
|
198
|
+
ref: {
|
|
199
|
+
kind: 'joint' | 'feature';
|
|
200
|
+
id: string;
|
|
201
|
+
};
|
|
202
|
+
to: {
|
|
203
|
+
face: string;
|
|
204
|
+
} | 'detach';
|
|
205
|
+
}
|
|
206
|
+
export type FigureAuthoringAction =
|
|
207
|
+
/**
|
|
208
|
+
* "This side of this part follows that." The value becomes `source × times + plus`, as graph nodes, so it
|
|
209
|
+
* keeps following after the instance is resized; or, given `sum`, the sum of each term's source times its own
|
|
210
|
+
* multiple, plus. An axis that already follows something is refused unless `replace` says so: a link is never
|
|
211
|
+
* overwritten in passing.
|
|
212
|
+
*/
|
|
213
|
+
({
|
|
214
|
+
kind: 'link-dimension';
|
|
215
|
+
part: string;
|
|
216
|
+
axis: Axis;
|
|
217
|
+
plus?: number;
|
|
218
|
+
replace?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* The author's "and narrow the sizes the figure may be placed at to what it then allows": a link that takes a
|
|
221
|
+
* difference (a leaf the opening less its gaps) makes the smallest sizes impossible, and without this the
|
|
222
|
+
* link is refused -- measuring again cannot help, since the link is not there to measure. The authored size
|
|
223
|
+
* must still lie inside.
|
|
224
|
+
*/
|
|
225
|
+
narrowRange?: boolean;
|
|
226
|
+
} & ({
|
|
227
|
+
source: FigureDimensionSource;
|
|
228
|
+
times?: number;
|
|
229
|
+
} | {
|
|
230
|
+
sum: FigureMeasureTerm[];
|
|
231
|
+
}))
|
|
232
|
+
/**
|
|
233
|
+
* "This part follows the figure's size." One step for what took four: when the figure has no size, it is declared
|
|
234
|
+
* from its parts as they rest (and the range folded to what the figure holds); then each named measure follows the
|
|
235
|
+
* size in the proportion it has now, so nothing moves at the drawn size. A measure that follows something else is
|
|
236
|
+
* made to follow the size instead. No axes names every measure the shape has along X, Y and Z.
|
|
237
|
+
*/
|
|
238
|
+
| {
|
|
239
|
+
kind: 'follow-size';
|
|
240
|
+
part: string;
|
|
241
|
+
axes?: Axis[];
|
|
242
|
+
}
|
|
243
|
+
/** "Stop following; this side is this long." The explicit way back to a fixed dimension. */
|
|
244
|
+
| {
|
|
245
|
+
kind: 'unlink-dimension';
|
|
246
|
+
part: string;
|
|
247
|
+
axis: Axis;
|
|
248
|
+
mm: number;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* "Fasten this face of this part to that face of that one."
|
|
252
|
+
*
|
|
253
|
+
* Two faces do not place a part by themselves, so the rest is named too, with defaults:
|
|
254
|
+
* - `facing`: `meet` (the default) puts the two faces against each other, the part outside its target past
|
|
255
|
+
* that face — a leaf under a rail. `flush` lays them in the same plane pointing the same way, the part
|
|
256
|
+
* inside its target — a panel set level with the front of a frame.
|
|
257
|
+
* - `gap`: millimetres between the faces along the target face's normal. 0 by default.
|
|
258
|
+
* - `align`: where the part sits within the face, on each of the face's own two axes. `centre` by default;
|
|
259
|
+
* `min` and `max` bring the part's own edges level with the target's, and stay level as either is
|
|
260
|
+
* resized, because all of it is written as graph nodes.
|
|
261
|
+
*
|
|
262
|
+
* Both parts must be box-shaped and unturned: a face of a turned body is not an axis-aligned plane, and this
|
|
263
|
+
* command says nothing about rotation. A fastening that would make a part its own ancestor is refused.
|
|
264
|
+
*/
|
|
265
|
+
| {
|
|
266
|
+
kind: 'attach';
|
|
267
|
+
part: string;
|
|
268
|
+
face: FigureChildFace;
|
|
269
|
+
/** The face of another part, or the plane the figure is mounted on, which is a thing a part can stand on. */
|
|
270
|
+
to: {
|
|
271
|
+
part: string;
|
|
272
|
+
face: FigureFace;
|
|
273
|
+
} | {
|
|
274
|
+
plane: 'mounting-plane';
|
|
275
|
+
};
|
|
276
|
+
facing?: 'meet' | 'flush';
|
|
277
|
+
gap?: FigureMeasure;
|
|
278
|
+
align?: Partial<Record<Axis, FigureFaceAlignment>>;
|
|
279
|
+
/** Degrees about the face's normal (the record's `origin.twist`). */
|
|
280
|
+
twist?: number;
|
|
281
|
+
replace?: boolean;
|
|
282
|
+
}
|
|
283
|
+
/** "This part is not fastened to anything any more." It keeps where it is now, in the asset frame. */
|
|
284
|
+
| {
|
|
285
|
+
kind: 'detach';
|
|
286
|
+
part: string;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* "This is a joint" -- URDF's joint record, with values (ADR-0093): which face of the child sits on which face
|
|
290
|
+
* of the parent, and whether it stays fixed, turns (revolute, continuous) or slides (prismatic). The record is the
|
|
291
|
+
* canon; the joint's graph nodes are made from it. `id` names it; a record with an id already there replaces it.
|
|
292
|
+
*/
|
|
293
|
+
/** `narrowRange` as for `link-dimension`: a joint that rows its part makes the largest size finite. */
|
|
294
|
+
| {
|
|
295
|
+
kind: 'set-joint';
|
|
296
|
+
joint: FigureJoint;
|
|
297
|
+
narrowRange?: boolean;
|
|
298
|
+
}
|
|
299
|
+
/** "This joint is gone." Its child stays where it stands, fastened to nothing. */
|
|
300
|
+
| {
|
|
301
|
+
kind: 'remove-joint';
|
|
302
|
+
id: string;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* "This is the room it takes up" — a proposal the author has looked at, confirmed as it stands. `padding` widens
|
|
306
|
+
* the room on each side of an axis by that many millimetres. It is added to the expressions read from the parts,
|
|
307
|
+
* so the room still follows when the instance is resized; a fixed number typed by hand would not (chief
|
|
308
|
+
* architect's ruling 2026-09-24). Negative padding is refused.
|
|
309
|
+
*/
|
|
310
|
+
| {
|
|
311
|
+
kind: 'declare-occupancy';
|
|
312
|
+
proposal: FigureOccupancyProposal;
|
|
313
|
+
placement?: FigurePlacement;
|
|
314
|
+
padding?: Partial<Record<Axis, number>>;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* "Author this figure from the floor, the ceiling, a wall or its centre" (ADR-0097, designer 2026-09-27). The figure's
|
|
318
|
+
* own setting, apart from its room: a new figure with no part can choose it, and nothing is made up for it -- no room,
|
|
319
|
+
* no part. A part already fastened to the mounting plane by a face the new placement does not take is refused, not
|
|
320
|
+
* fastened again quietly.
|
|
321
|
+
*/
|
|
322
|
+
| {
|
|
323
|
+
kind: 'set-placement';
|
|
324
|
+
placement: FigurePlacement;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* "This figure takes its size from the place a board gives it, within this range." Declares the instance-size
|
|
328
|
+
* inputs `size.x · size.y · size.z` a part can then follow (`link-dimension` with `of: 'instance'`). Without them
|
|
329
|
+
* a board draws the figure at its authored size whatever box it is placed in. `at` is the authored size; absent,
|
|
330
|
+
* it is what the parts take up now. The range is the author's; the command refuses only a size the figure cannot
|
|
331
|
+
* take, found by `figureInstanceSizeLimitsOf` and folded by `foldInstanceSizeRange`
|
|
332
|
+
* (chief architect's ruling 2026-09-24). `replace` changes the range of sizes already declared.
|
|
333
|
+
*/
|
|
334
|
+
| {
|
|
335
|
+
kind: 'declare-instance-size';
|
|
336
|
+
range: Record<Axis, {
|
|
337
|
+
min: number;
|
|
338
|
+
max: number;
|
|
339
|
+
}>;
|
|
340
|
+
at?: Partial<Record<Axis, number>>;
|
|
341
|
+
replace?: boolean;
|
|
342
|
+
}
|
|
343
|
+
/** "This face is what it is mounted on." A separate choice from the room it takes up. */
|
|
344
|
+
| {
|
|
345
|
+
kind: 'set-mounting-face';
|
|
346
|
+
part: string;
|
|
347
|
+
face: FigureFace;
|
|
348
|
+
}
|
|
349
|
+
/** "It is not mounted on anything in particular." */
|
|
350
|
+
| {
|
|
351
|
+
kind: 'clear-mounting-face';
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* "This part stays where it is on this axis." A position worked out from other values (so a part rises with the figure's height) becomes
|
|
355
|
+
* the part's own number at its current value, as a part made in the modeller has it -- the way out when a resize
|
|
356
|
+
* leaves a part in the air. A part fastened to another is placed by that; detach it first.
|
|
357
|
+
*/
|
|
358
|
+
| {
|
|
359
|
+
kind: 'fix-position';
|
|
360
|
+
part: string;
|
|
361
|
+
axis: Axis;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* "This part keeps its place in proportion to the figure's size on this axis." Where the part is now becomes a share of the instance size (`size.<axis>`), so at twice the size it is twice as far from the
|
|
365
|
+
* origin -- the bottom for Y on a figure standing on the floor, the centre for X and Z. The instance size must be
|
|
366
|
+
* declared on that axis. A part fastened to another is placed by that; detach it first. With `link-dimension`
|
|
367
|
+
* (`times` the part's share of the size) it is the way to make a part grow with the figure instead of filling what
|
|
368
|
+
* is left: ROBOT_ARM's tool flange filled the height the arm did not use, and at twice the height it grew from
|
|
369
|
+
* 46 mm to 1,946 mm below a wrist that had moved on.
|
|
370
|
+
*/
|
|
371
|
+
| {
|
|
372
|
+
kind: 'scale-position';
|
|
373
|
+
part: string;
|
|
374
|
+
axis: Axis;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* "The whole figure grows by one ratio." Declares `sizing: 'uniform'` and feeds every reader of the instance size
|
|
378
|
+
* the size that ratio gives: u = geomean(size.x/x₀, size.y/y₀, size.z/z₀), and each axis reads u × its authored
|
|
379
|
+
* size. A jointed figure placed at twice the height then stands 1.26 times larger all round, feet on the floor, the
|
|
380
|
+
* top of its box empty -- a mechanism does not shear (chief architect's ruling 2026-09-24). Only what reads the size
|
|
381
|
+
* follows; a part's own fixed number stays fixed, and the release gate says so (`SIZING_NOT_UNIFORM`).
|
|
382
|
+
*/
|
|
383
|
+
| {
|
|
384
|
+
kind: 'scale-uniformly';
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* "Every length follows the one ratio." For a figure that grows by one ratio (`scale-uniformly` first): each part's
|
|
388
|
+
* own measure, each fastening's offset and gap in millimetres, and each row's pitch become their value now over the
|
|
389
|
+
* size the figure is at now, times that size -- written as the links a person would write one by one, so any part
|
|
390
|
+
* can be given its own number again (`unlink-dimension`). A measure that already follows something is left, and
|
|
391
|
+
* named (`proposeFigureProportion`). Angles, ratios and counts are not lengths (chief architect's ruling 2026-09-25).
|
|
392
|
+
*/
|
|
393
|
+
| {
|
|
394
|
+
kind: 'follow-size-in-proportion';
|
|
395
|
+
}
|
|
396
|
+
/** "This figure is authored to this detail": S, M, L or XL, and so its part limit (`PART_LIMIT`). `null` declares none. */
|
|
397
|
+
| {
|
|
398
|
+
kind: 'set-detail-level';
|
|
399
|
+
level: DetailLevel | null;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* "The copies of this repeated part stand this far apart." A row that fills the length it is given takes as many copies as fit at the pitch; the pitch becomes the part's own number,
|
|
403
|
+
* `<part>.repeat.pitch`, so it is edited, dragged and undone as any other value. Its lowest value keeps the copy
|
|
404
|
+
* count within the kernel's limit at the largest size the figure takes. A row of a fixed count is refused for now:
|
|
405
|
+
* its pitch is built into its length.
|
|
406
|
+
*/
|
|
407
|
+
| {
|
|
408
|
+
kind: 'set-repeat';
|
|
409
|
+
part: string;
|
|
410
|
+
pitch: number | FigureMeasure;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* "The figure has this design value" -- a number of its own, in a unit, held to a range (ADR-0096): what a row's pitch
|
|
414
|
+
* can be read from and what a board can be given to set. The id is new; the value lies within the range.
|
|
415
|
+
*/
|
|
416
|
+
| {
|
|
417
|
+
kind: 'add-design-input';
|
|
418
|
+
id: string;
|
|
419
|
+
unit: 'mm' | 'ratio' | 'deg' | 'count';
|
|
420
|
+
min: number;
|
|
421
|
+
max: number;
|
|
422
|
+
value: number;
|
|
423
|
+
}
|
|
424
|
+
/** "This design input is held to this range." Its value stays within it; the size inputs have declare-instance-size. */
|
|
425
|
+
| {
|
|
426
|
+
kind: 'set-input-range';
|
|
427
|
+
input: string;
|
|
428
|
+
min: number;
|
|
429
|
+
max: number;
|
|
430
|
+
}
|
|
431
|
+
/** "A board may set this design input per instance", shown with this name (ADR-0096). Again with a label: renamed. */
|
|
432
|
+
| {
|
|
433
|
+
kind: 'publish-input';
|
|
434
|
+
input: string;
|
|
435
|
+
label: string;
|
|
436
|
+
hint?: string;
|
|
437
|
+
}
|
|
438
|
+
/** "A board no longer sets this design input." */
|
|
439
|
+
| {
|
|
440
|
+
kind: 'unpublish-input';
|
|
441
|
+
input: string;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* "Repeat this part along this axis across what it is fastened to." Copies `pitch` apart from the parent's one edge
|
|
445
|
+
* to the other, as many as fit (`count: 'fills'`, the default) or a given number spread evenly; the row follows the
|
|
446
|
+
* parent's size. The part must be fastened, keep still and hold nothing. Written into its fastening's record.
|
|
447
|
+
*/
|
|
448
|
+
/**
|
|
449
|
+
* A row that fills its parent holds at most REPEAT_LIMIT copies, so a figure whose size it follows has a largest size.
|
|
450
|
+
* `narrowRange` is the author's "and narrow the sizes the figure may be placed at to what it then allows", as for
|
|
451
|
+
* `link-dimension`: without it such a row is refused while the declared range reaches past it.
|
|
452
|
+
*/
|
|
453
|
+
| {
|
|
454
|
+
kind: 'make-repeat';
|
|
455
|
+
part: string;
|
|
456
|
+
axis: Axis;
|
|
457
|
+
pitch: number;
|
|
458
|
+
count?: number | 'fills';
|
|
459
|
+
rise?: {
|
|
460
|
+
axis: Axis;
|
|
461
|
+
mm: number;
|
|
462
|
+
};
|
|
463
|
+
narrowRange?: boolean;
|
|
464
|
+
}
|
|
465
|
+
/** "This part stands once again", where its fastening puts it. */
|
|
466
|
+
| {
|
|
467
|
+
kind: 'remove-repeat';
|
|
468
|
+
part: string;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* "Move this part by so much, turn it by so much" -- a drag on the canvas. The part keeps how its place is worked out
|
|
472
|
+
* (a place that follows the figure's size still follows it) and gets the drag added as its own
|
|
473
|
+
* number: `<part>.position.nudge.<axis>` beside a worked-out place, the part's own `<part>.position.<axis>` where it
|
|
474
|
+
* had a plain number. Turns likewise, in degrees. `grow` multiplies a measure by the drag's factor and keeps how it
|
|
475
|
+
* is worked out: `<part>.dimension.scale.<axis>` beside the measure's rule, so the part still follows the figure's
|
|
476
|
+
* size, times what the author gave it. A cylinder's X and Z are its
|
|
477
|
+
* one radius. A part carried by a joint or fastened to another is placed by that and is refused.
|
|
478
|
+
*/
|
|
479
|
+
| {
|
|
480
|
+
kind: 'nudge-part';
|
|
481
|
+
part: string;
|
|
482
|
+
by?: Partial<Record<Axis, number>>;
|
|
483
|
+
turn?: Partial<Record<Axis, number>>;
|
|
484
|
+
grow?: Partial<Record<Axis, number>>;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* "Things are held here." A seat (things rest on it) or a grip (things are held in it), on a face of a part. The
|
|
488
|
+
* place is that face as the part stands, so it follows the part through its resizes and its motion: a grip on a
|
|
489
|
+
* robot's tool moves with the arm. `accepts` names the types it takes -- the format has no "anything" (a `slot`
|
|
490
|
+
* that took anything was ambiguous; ADR-0087 decision 3). `capacity` is how many at once. `region` is the room a
|
|
491
|
+
* held thing may take, in millimetres around the place; left out, the room is not checked, not unlimited.
|
|
492
|
+
* `replace` changes a place that already has this id.
|
|
493
|
+
*/
|
|
494
|
+
| {
|
|
495
|
+
kind: 'add-binding';
|
|
496
|
+
id: string;
|
|
497
|
+
label: string;
|
|
498
|
+
role: 'seat' | 'grip';
|
|
499
|
+
part: string;
|
|
500
|
+
face: FigureFace;
|
|
501
|
+
accepts: readonly string[];
|
|
502
|
+
capacity: number;
|
|
503
|
+
region?: Record<Axis, number>;
|
|
504
|
+
replace?: boolean;
|
|
505
|
+
}
|
|
506
|
+
/** "Nothing is held here any more." */
|
|
507
|
+
| {
|
|
508
|
+
kind: 'remove-binding';
|
|
509
|
+
id: string;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* "Things are held in these slots" (ADR-0118): tiers and slots laid out by a rule on a horizontal face of a part. Each
|
|
513
|
+
* slot becomes a place `t{tier}_s{slot}` and must name the types it takes. The count and the ids are the author's;
|
|
514
|
+
* resizing the figure does not change them. Setting it again replaces the layout.
|
|
515
|
+
*/
|
|
516
|
+
| {
|
|
517
|
+
kind: 'set-slot-layout';
|
|
518
|
+
label: string;
|
|
519
|
+
role: 'seat' | 'grip';
|
|
520
|
+
anchors: {
|
|
521
|
+
id: string;
|
|
522
|
+
part: string;
|
|
523
|
+
face: FigureFace;
|
|
524
|
+
}[];
|
|
525
|
+
layout: SlotLayout;
|
|
526
|
+
}
|
|
527
|
+
/** "No slot layout any more." */
|
|
528
|
+
| {
|
|
529
|
+
kind: 'remove-slot-layout';
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* "This figure is a carrier MCS calls this, this big" (ADR-0123): the CARRIERTYPE code, written as compared, and the
|
|
533
|
+
* physical size in mm. `null` declares the figure no carrier.
|
|
534
|
+
*/
|
|
535
|
+
| {
|
|
536
|
+
kind: 'set-carrier';
|
|
537
|
+
carrier: {
|
|
538
|
+
type: string;
|
|
539
|
+
dimensions: {
|
|
540
|
+
width: number;
|
|
541
|
+
length: number;
|
|
542
|
+
height: number;
|
|
543
|
+
};
|
|
544
|
+
} | null;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* "This figure is called this." The name a person reads in the catalogue — not the type a board calls it by,
|
|
548
|
+
* which lives on the row. Blank is refused, as the format refuses it; surrounding space is dropped.
|
|
549
|
+
*/
|
|
550
|
+
| {
|
|
551
|
+
kind: 'rename';
|
|
552
|
+
name: string;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Round a pushed rectangle's corners (ADR-0100 A2): one radius for all four, or a reach per plane axis; 0 is a sharp
|
|
556
|
+
* corner again, `null` takes the rounding away. The part keeps its id, its outer size and its faces.
|
|
557
|
+
*/
|
|
558
|
+
| {
|
|
559
|
+
kind: 'set-section-corner';
|
|
560
|
+
part: string;
|
|
561
|
+
corner: number | Partial<Record<Axis, number>> | null;
|
|
562
|
+
remap?: FigureFaceRemap[];
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Give a pushed rectangle or ellipse an inside, change it, or take it away (ADR-0100 A3, A4): walls, and each end open
|
|
566
|
+
* or closed by a thickness. Refused when it takes away a face something is fastened to.
|
|
567
|
+
*/
|
|
568
|
+
| {
|
|
569
|
+
kind: 'set-cavity';
|
|
570
|
+
part: string;
|
|
571
|
+
cavity: FigureCavityRequest | null;
|
|
572
|
+
remap?: FigureFaceRemap[];
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* A pushed part's section in one step (ADR-0100 §3.2): a drawn section's points, a rectangle's or an ellipse's widths
|
|
576
|
+
* across, the push's length -- each face kept where the part's relations keep it, as a size typed into its field.
|
|
577
|
+
*/
|
|
578
|
+
| ({
|
|
579
|
+
kind: 'set-section';
|
|
580
|
+
part: string;
|
|
581
|
+
remap?: FigureFaceRemap[];
|
|
582
|
+
} & FigureSectionRequest);
|
|
583
|
+
/**
|
|
584
|
+
* What taking a part away changed besides the part (chief architect's ruling 2026-09-27, ADR-0093): nothing the author
|
|
585
|
+
* did not pick goes with it; what hung from it, moved with it or followed it is let go, and named here, and one undo
|
|
586
|
+
* brings it all back.
|
|
587
|
+
*/
|
|
588
|
+
export interface RemovalNotice {
|
|
589
|
+
/** Parts that hung from it: they stand where they stood at rest, fastened to nothing; `control` moved one and went with its joint. */
|
|
590
|
+
released: Array<{
|
|
591
|
+
part: string;
|
|
592
|
+
control?: string;
|
|
593
|
+
}>;
|
|
594
|
+
/** Values that followed its size or place, now the numbers they were. */
|
|
595
|
+
fixed: Array<{
|
|
596
|
+
part: string;
|
|
597
|
+
value: number;
|
|
598
|
+
unit: string;
|
|
599
|
+
}>;
|
|
600
|
+
/** Parts that moved with its joint (or a released part's), each with a control of its own now. */
|
|
601
|
+
controls: Array<{
|
|
602
|
+
part: string;
|
|
603
|
+
control: string;
|
|
604
|
+
min: number;
|
|
605
|
+
max: number;
|
|
606
|
+
}>;
|
|
607
|
+
/** The figure stood on its face; it stands on no face of its own now. */
|
|
608
|
+
mountingFace?: boolean;
|
|
609
|
+
/** Places declared on it (a gripper's grip): they were its, and went with it. */
|
|
610
|
+
bindings?: Array<{
|
|
611
|
+
id: string;
|
|
612
|
+
label?: string;
|
|
613
|
+
}>;
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* "This part moves like this."
|
|
617
|
+
*
|
|
618
|
+
* Added on top of whatever the part is fastened to, never instead of it: the motion becomes its own node between
|
|
619
|
+
* the part's pose and the frame it is fastened into, so the fastening is still there and still holds when the
|
|
620
|
+
* parent is resized (designer's ruling 2026-09-23 — attachment and motion may not overwrite one pose).
|
|
621
|
+
*
|
|
622
|
+
* Named rather than assumed:
|
|
623
|
+
* - `frame`: which frame the axis is measured in. `attachment`, the default, is the frame the part is fastened
|
|
624
|
+
* into — the parent's, or the asset's for a part fastened to nothing. `asset` is only accepted for a part
|
|
625
|
+
* fastened to nothing, where the two are the same frame; for a fastened part the axis would have to be
|
|
626
|
+
* re-expressed, and this command does not do that quietly.
|
|
627
|
+
* - `state`: the control a person moves — its id, unit, range and starting value, and optionally the name it
|
|
628
|
+
* shows under and how long it takes to travel its range.
|
|
629
|
+
* - `travel`: for a `ratio` control on a slide, how far the part goes at 1. It can follow the instance or a
|
|
630
|
+
* part, so a gate opens by its own width whatever the gate's width is. A `mm` control needs none: it is the
|
|
631
|
+
* distance.
|
|
632
|
+
* - `clip`: optional, and named. A clip is declared, never inferred from an id.
|
|
633
|
+
*/
|
|
634
|
+
export interface FigureMotionRequest {
|
|
635
|
+
kind: 'add-motion';
|
|
636
|
+
part: string;
|
|
637
|
+
motion: {
|
|
638
|
+
kind: 'slide' | 'turn';
|
|
639
|
+
axis: Axis;
|
|
640
|
+
frame?: 'attachment' | 'asset';
|
|
641
|
+
};
|
|
642
|
+
state: {
|
|
643
|
+
id: string;
|
|
644
|
+
unit: 'mm' | 'deg' | 'ratio';
|
|
645
|
+
min: number;
|
|
646
|
+
max: number;
|
|
647
|
+
start?: number;
|
|
648
|
+
label?: string;
|
|
649
|
+
sweep?: number;
|
|
650
|
+
};
|
|
651
|
+
travel?: FigureTravel;
|
|
652
|
+
clip?: {
|
|
653
|
+
name: string;
|
|
654
|
+
duration: number;
|
|
655
|
+
keys: Array<{
|
|
656
|
+
at: number;
|
|
657
|
+
value: number;
|
|
658
|
+
}>;
|
|
659
|
+
loop?: 'wrap' | 'hold';
|
|
660
|
+
accumulates?: boolean;
|
|
661
|
+
};
|
|
662
|
+
replace?: boolean;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* The room a figure takes up, worked out from its parts.
|
|
666
|
+
*
|
|
667
|
+
* Proposing and declaring are two steps on purpose (designer's ruling 2026-09-23). What the parts come to is
|
|
668
|
+
* a candidate; the author confirms it. Nothing here ever widens a declaration that is already in the asset
|
|
669
|
+
* because the model changed — a figure that has outgrown its declared volume is something the gate reports, not
|
|
670
|
+
* something an authoring command papers over. Re-propose and confirm again.
|
|
671
|
+
*
|
|
672
|
+
* `over` says which question is being answered, because they have different answers:
|
|
673
|
+
* - `rest`: the room the figure takes up as it stands, every control at its starting value.
|
|
674
|
+
* - `range`: the room it takes up anywhere in its travel, every control swept over its whole range.
|
|
675
|
+
*
|
|
676
|
+
* Naming the face the figure is mounted on is a separate command. It is a different claim from how much room
|
|
677
|
+
* the figure takes up, and an author may want one without the other.
|
|
678
|
+
*/
|
|
679
|
+
export interface FigureOccupancyProposal {
|
|
680
|
+
over: 'rest' | 'range';
|
|
681
|
+
/** What the bounds come to at the asset's current design inputs, so a person sees what they are confirming. */
|
|
682
|
+
at: Record<Axis, {
|
|
683
|
+
min: number;
|
|
684
|
+
max: number;
|
|
685
|
+
}>;
|
|
686
|
+
/** The parts the bounds were read from. */
|
|
687
|
+
parts: string[];
|
|
688
|
+
/** Parts left out, and why. A proposal never pretends to cover what it could not read. */
|
|
689
|
+
skipped: Array<{
|
|
690
|
+
part: string;
|
|
691
|
+
reason: string;
|
|
692
|
+
}>;
|
|
693
|
+
/**
|
|
694
|
+
* The figure this was read from, as one value. Confirming a proposal against a different figure is refused:
|
|
695
|
+
* comparing the list of parts was not enough, because widening a part keeps the list and changes the answer
|
|
696
|
+
* (designer's counterexample 2026-09-23 — a 100 mm part grown to 300 mm slipped an unseen volume through).
|
|
697
|
+
*/
|
|
698
|
+
basis: string;
|
|
699
|
+
}
|
|
700
|
+
/** The places things are held, with the part and face each sits on -- what a screen lists. */
|
|
701
|
+
export interface FigureBindingPlace {
|
|
702
|
+
id: string;
|
|
703
|
+
label: string;
|
|
704
|
+
role: 'seat' | 'grip';
|
|
705
|
+
part: string | null;
|
|
706
|
+
face: FigureFace | null;
|
|
707
|
+
accepts: string[];
|
|
708
|
+
capacity: number;
|
|
709
|
+
region: Record<Axis, number> | null;
|
|
710
|
+
/** For a place unfolded from the slot layout (ADR-0118): which slot it is and where on the face. */
|
|
711
|
+
slot?: {
|
|
712
|
+
tier: number;
|
|
713
|
+
slot: number;
|
|
714
|
+
anchorId: string;
|
|
715
|
+
tierPosition: {
|
|
716
|
+
x: number;
|
|
717
|
+
y: number;
|
|
718
|
+
z: number;
|
|
719
|
+
};
|
|
720
|
+
tierRotation: number;
|
|
721
|
+
offset: {
|
|
722
|
+
x: number;
|
|
723
|
+
z: number;
|
|
724
|
+
};
|
|
725
|
+
rotation: number;
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
/** What 「every length follows the one ratio」 changes, and what it leaves and why. */
|
|
729
|
+
export interface FigureProportionPlan {
|
|
730
|
+
/** A part's own measure on a shape axis, and the share of the figure's size on that axis it becomes. */
|
|
731
|
+
dimensions: Array<{
|
|
732
|
+
part: string;
|
|
733
|
+
axis: Axis;
|
|
734
|
+
times: number;
|
|
735
|
+
}>;
|
|
736
|
+
/** A fastening's length in millimetres: an offset along a face axis, the gap, or a row's pitch. */
|
|
737
|
+
lengths: Array<{
|
|
738
|
+
joint: string;
|
|
739
|
+
at: 'gap' | 'pitch' | Axis;
|
|
740
|
+
axis: Axis;
|
|
741
|
+
times: number;
|
|
742
|
+
}>;
|
|
743
|
+
/**
|
|
744
|
+
* What stays as it is, with why. `follows`: it follows something already -- it grows with the ratio if what it
|
|
745
|
+
* follows does. Otherwise it is a length this command does not write, and keeps its number.
|
|
746
|
+
*/
|
|
747
|
+
skipped: Array<{
|
|
748
|
+
what: string;
|
|
749
|
+
reason: string;
|
|
750
|
+
follows?: true;
|
|
751
|
+
}>;
|
|
752
|
+
}
|
|
753
|
+
//# sourceMappingURL=authoring-types.d.ts.map
|