@snaptrude/plugin-core 0.0.0-dev-20260907135026 → 0.0.0-dev-20260908074328

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/api-manifest.json +12 -151
  3. package/dist/api/core/geom/create/index.d.ts +86 -559
  4. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  5. package/dist/api/core/geom/query/brep.d.ts +0 -50
  6. package/dist/api/core/geom/query/brep.d.ts.map +1 -1
  7. package/dist/api/core/geom/query/curve.d.ts +35 -58
  8. package/dist/api/core/geom/query/curve.d.ts.map +1 -1
  9. package/dist/api/core/geom/query/edge.d.ts +2 -2
  10. package/dist/api/core/geom/query/face.d.ts +0 -45
  11. package/dist/api/core/geom/query/face.d.ts.map +1 -1
  12. package/dist/api/core/geom/update/curve.d.ts +5 -5
  13. package/dist/api/core/geom/update/profile.d.ts +1 -1
  14. package/dist/api/design/create/index.d.ts +29 -6
  15. package/dist/api/design/create/index.d.ts.map +1 -1
  16. package/dist/api/design/delete/index.d.ts +20 -2
  17. package/dist/api/design/delete/index.d.ts.map +1 -1
  18. package/dist/api/design/query/geometry/index.d.ts +1 -27
  19. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  20. package/dist/api/design/query/index.d.ts +2 -47
  21. package/dist/api/design/query/index.d.ts.map +1 -1
  22. package/dist/api/design/query/spaces.d.ts +66 -5
  23. package/dist/api/design/query/spaces.d.ts.map +1 -1
  24. package/dist/api/design/update/index.d.ts +0 -87
  25. package/dist/api/design/update/index.d.ts.map +1 -1
  26. package/dist/api/entity/referenceLine.d.ts +2 -2
  27. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  28. package/dist/api/entity/space.d.ts +7 -5
  29. package/dist/api/entity/space.d.ts.map +1 -1
  30. package/dist/api/entity/story.d.ts +4 -4
  31. package/dist/api/presentation/placedViews.d.ts +35 -1
  32. package/dist/api/presentation/placedViews.d.ts.map +1 -1
  33. package/dist/api/presentation/sheets.d.ts +20 -2
  34. package/dist/api/presentation/sheets.d.ts.map +1 -1
  35. package/dist/api/program/spreadsheet.d.ts +4 -4
  36. package/dist/errors/codes.d.ts +8 -3
  37. package/dist/errors/codes.d.ts.map +1 -1
  38. package/dist/handles.d.ts +3 -12
  39. package/dist/handles.d.ts.map +1 -1
  40. package/dist/index.cjs +2766 -3030
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.ts +0 -1
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +2761 -2996
  45. package/dist/index.js.map +1 -1
  46. package/package.json +1 -1
  47. package/snaptrude-plugin-core-0.11.0.tgz +0 -0
  48. package/src/api/core/geom/create/index.ts +84 -588
  49. package/src/api/core/geom/query/brep.ts +0 -51
  50. package/src/api/core/geom/query/curve.ts +2 -25
  51. package/src/api/core/geom/query/edge.ts +2 -2
  52. package/src/api/core/geom/query/face.ts +0 -49
  53. package/src/api/design/create/index.ts +34 -8
  54. package/src/api/design/delete/index.ts +20 -1
  55. package/src/api/design/query/geometry/index.ts +0 -29
  56. package/src/api/design/query/index.ts +2 -50
  57. package/src/api/design/query/spaces.ts +68 -0
  58. package/src/api/design/update/index.ts +0 -94
  59. package/src/api/entity/space.ts +2 -0
  60. package/src/api/presentation/placedViews.ts +29 -1
  61. package/src/api/presentation/sheets.ts +19 -3
  62. package/src/errors/codes.ts +30 -2
  63. package/src/handles.ts +3 -15
  64. package/src/index.ts +0 -1
  65. package/test/errors.test.mjs +4 -0
  66. package/dist/massParameters.d.ts +0 -319
  67. package/dist/massParameters.d.ts.map +0 -1
  68. package/src/massParameters.ts +0 -472
  69. package/test/massParameters.test.mjs +0 -500
@@ -1,472 +0,0 @@
1
- import * as z from "zod"
2
-
3
- /**
4
- * Mass **creation-parameter records** — the recipe a parametric mass was built
5
- * from, shared verbatim by plugin-core, the Snaptrude host, and the agent
6
- * runtime (one schema, three repos — no hand-mirrored DTOs).
7
- *
8
- * A record is present on a mass committed from a `core.geom.create` brep
9
- * constructor that carries a recipe (the four primitives, extrusion,
10
- * revolution, loft, sweep). A fillet, chamfer, shell or offset of a **recorded**
11
- * solid keeps the record: `kind` stays the base constructor and the step is
12
- * appended to the record's `operations` list (see {@linkcode OperationRecord}).
13
- * The record is absent — `null` — for everything
14
- * else: drawn masses, imported geometry, booleans, split parts,
15
- * `brepFromFaces`/`brepFromMesh`, and any operation on a solid that carried no
16
- * record. Geometry there is not a pure function of a legible parameter set, and
17
- * a record must never be a lie.
18
- *
19
- * Read one with `design.query.getParameters`.
20
- *
21
- * Everything here is **pure JSON** by construction — plain objects, numbers and
22
- * arrays only, one `{x, y, z}` point shape everywhere (no tuples, no class
23
- * instances): records are persisted by enumerable-field reflection, cloned with
24
- * `structuredClone`, and round-tripped through the collaboration wire.
25
- */
26
-
27
- /** A point in space. The single point shape used across every record. */
28
- export type XYZ = { x: number; y: number; z: number }
29
-
30
- /**
31
- * One boundary curve of a profile record.
32
- *
33
- * The two spline forms are either/or, never both: a curve authored through
34
- * points carries `splineThrough` (patch the points and the fit re-runs), and a
35
- * curve with no through-point provenance — read back off an edge, or authored
36
- * from control vertices — carries `splinePoles` and is re-minted verbatim.
37
- * There is no variant holding both, so a `throughPoints` edit can never leave
38
- * stale poles behind.
39
- */
40
- export type CurveRecord =
41
- | { type: "line"; start: XYZ; end: XYZ }
42
- | { type: "arc"; start: XYZ; end: XYZ; centre: XYZ; axis: XYZ }
43
- | { type: "circle"; centre: XYZ; axis: XYZ; radius: number }
44
- /** Authored via splineFromPoints / profileFromSplinePoints. The through-points
45
- * ARE the recipe; regeneration re-runs the versioned fit (fitVersion).
46
- * Chained runs in one contour re-fit as ONE loop; use splinePoles to keep tangents. */
47
- | { type: "splineThrough"; fitVersion: 1; throughPoints: XYZ[] }
48
- /** No through-point provenance (authored from CVs, or read back off an edge).
49
- * Regenerable verbatim — re-mint the curve from these exact data. */
50
- | { type: "splinePoles"; degree: number; knots: number[]; mults: number[]; poles: XYZ[] }
51
-
52
- /** A closed boundary loop, as an ordered list of curves. */
53
- export type ProfileRecord = { curves: CurveRecord[] }
54
-
55
- /** An outer loop plus its holes — the cross-section shape of a recipe. */
56
- export type ContourRecord = { outer: ProfileRecord; holes: ProfileRecord[] }
57
-
58
- /** Optional loft behaviour switches, mirroring `core.geom.create.brepFromLoft`. */
59
- export type LoftOptions = {
60
- compatibility?: "strict" | "auto"
61
- seamAlignment?: "authored" | "auto"
62
- }
63
-
64
- /** Optional sweep scale law and corner transition, mirroring `core.geom.create.brepFromSweep`. */
65
- export type SweepOptions = {
66
- startScale?: number
67
- endScale?: number
68
- scales?: number[]
69
- transition?: "miter" | "round" | { bevel: number }
70
- }
71
-
72
- /** A face's surface kind — the vocabulary of `core.geom.query.face.getSurfaceKind`. */
73
- export type SurfaceKind = "plane" | "cylinder" | "cone" | "sphere" | "torus" | "spline"
74
-
75
- /** An edge's curve kind. Both spline forms of {@linkcode CurveRecord} report `"spline"`. */
76
- export type CurveKind = "line" | "arc" | "circle" | "spline"
77
-
78
- /**
79
- * Which EDGE of the input solid an operation used: its index in
80
- * `core.geom.query.brep.listEdges` order at authoring time, the indices of the
81
- * two faces it lies between, and its curve kind. This is topology, not
82
- * coordinates — it survives a scalar edit of the base recipe (which moves every
83
- * edge) and trips on a reorder or a topology change. Read-only: to blend a
84
- * different edge, re-select it on the new shape and re-apply the operation.
85
- */
86
- export type EdgeSelector = { index: number; faces: [number, number]; curve: CurveKind }
87
-
88
- /**
89
- * Which FACE of the input solid an operation used: its index in
90
- * `core.geom.query.brep.listFaces` order, its surface kind, and the number of
91
- * edges in its outer loop. Read-only, like {@linkcode EdgeSelector}.
92
- */
93
- export type FaceSelector = { index: number; kind: SurfaceKind; edgeCount: number }
94
-
95
- /** The input solid's topology at authoring time — the counts a replay checks first. */
96
- export type TopologyCounts = { faceCount: number; edgeCount: number }
97
-
98
- /**
99
- * One kernel operation applied to the base recipe's solid, in order. `input`
100
- * pins the topology the operation was authored against, so a base edit that
101
- * changes the topology is refused rather than mis-applied.
102
- *
103
- * Edit one by patching the whole list back:
104
- * `design.update.parameters(mass, { operations })`.
105
- */
106
- export type OperationRecord =
107
- | { op: "fillet"; edges: EdgeSelector[]; radius: number; input: TopologyCounts }
108
- | { op: "chamfer"; edges: EdgeSelector[]; distance: number; input: TopologyCounts }
109
- | { op: "shell"; openFaces: FaceSelector[]; thickness: number; input: TopologyCounts }
110
- | { op: "offset"; distance: number; input: TopologyCounts }
111
-
112
- /**
113
- * A mass's creation recipe: the constructor `kind`, a schema `version`, the
114
- * `values` that constructor was called with, and the kernel `operations`
115
- * (fillet / chamfer / shell / offset) applied on top, in order. Points and axes
116
- * are in the mass's own local frame when stored; `design.query.getParameters`
117
- * returns them in world coordinates. `operations` is frame-free. One variant
118
- * per constructor `kind`; its `values` are that constructor's own arguments.
119
- *
120
- * `kind` stays the base constructor even after operations: a shelled, filleted
121
- * sphere is still `{ kind: "sphere", operations: [shell, fillet] }`.
122
- */
123
- export type MassParametersRecord =
124
- | {
125
- kind: "sphere"
126
- version: 1
127
- values: { centre: XYZ; radius: number }
128
- operations?: OperationRecord[]
129
- }
130
- | {
131
- kind: "cylinder"
132
- version: 1
133
- values: { base: XYZ; axis: XYZ; radius: number; height: number }
134
- operations?: OperationRecord[]
135
- }
136
- | {
137
- kind: "cone"
138
- version: 1
139
- values: { base: XYZ; axis: XYZ; baseRadius: number; topRadius: number; height: number }
140
- operations?: OperationRecord[]
141
- }
142
- | {
143
- kind: "torus"
144
- version: 1
145
- values: { centre: XYZ; axis: XYZ; majorRadius: number; minorRadius: number }
146
- operations?: OperationRecord[]
147
- }
148
- | {
149
- kind: "extrusion"
150
- version: 1
151
- values: { contour: ContourRecord; direction: XYZ; amount: number }
152
- operations?: OperationRecord[]
153
- }
154
- | {
155
- kind: "revolution"
156
- version: 1
157
- values: {
158
- contour: ContourRecord
159
- axisOrigin: XYZ
160
- axisDirection: XYZ
161
- angleInDegrees: number
162
- }
163
- operations?: OperationRecord[]
164
- }
165
- | {
166
- kind: "loft"
167
- version: 1
168
- values: { sections: ContourRecord[]; options?: LoftOptions }
169
- operations?: OperationRecord[]
170
- }
171
- | {
172
- kind: "sweep"
173
- version: 1
174
- values: { profile: ContourRecord; path: XYZ[]; options?: SweepOptions }
175
- operations?: OperationRecord[]
176
- }
177
-
178
- /**
179
- * One value of a {@linkcode MassParametersPatch} — whatever a record's `values`
180
- * key (or `operations`) may hold. Scalars and points merge by key; every array
181
- * form replaces the list whole.
182
- */
183
- export type ParameterPatchValue =
184
- | number
185
- | XYZ
186
- | XYZ[]
187
- | ContourRecord
188
- | ContourRecord[]
189
- | LoftOptions
190
- | SweepOptions
191
- | OperationRecord[]
192
-
193
- /**
194
- * The argument of `design.update.parameters`: either a **partial** of a
195
- * record's `values` (plus an optional `operations` list) — keys you leave out
196
- * stay as they are — or the **whole record** you read from
197
- * `design.query.getParameters`, edited. `kind` and `version` are immutable.
198
- */
199
- export type MassParametersPatch = MassParametersRecord | Record<string, ParameterPatchValue>
200
-
201
- // ── Schemas ─────────────────────────────────────────────────────────────────
202
- // Array bounds are CONTRACT, not silent truncation: a record beyond them fails
203
- // validation. They keep a record inside the serialization budget of the save
204
- // and collaboration payloads it rides in. They bind RECORDS only — the shipped
205
- // creator schemas (loft sections, sweep path, fillet/chamfer edges, shell faces)
206
- // stay uncapped as in 0.9.x; an over-cap call builds and the host simply mints
207
- // no record for it (the recipe-less fallback).
208
-
209
- /** Maximum through-points in one authored spline curve record. */
210
- export const MAX_SPLINE_THROUGH_POINTS = 256
211
- /** Maximum control points in one exact-NURBS spline curve record. */
212
- export const MAX_SPLINE_POLES = 512
213
- /** Maximum path points in a sweep record. */
214
- export const MAX_SWEEP_PATH_POINTS = 512
215
- /** Maximum cross-sections in a loft record. */
216
- export const MAX_LOFT_SECTIONS = 32
217
- /** Maximum kernel operations chained onto one recipe. */
218
- export const MAX_OPERATIONS = 8
219
- /** Maximum boundary curves in one profile loop record. */
220
- export const MAX_PROFILE_CURVES = 256
221
- /** Maximum hole loops in one contour record. */
222
- export const MAX_CONTOUR_HOLES = 64
223
- /** Maximum edges one fillet/chamfer operation may select. */
224
- export const MAX_OPERATION_EDGES = 64
225
- /** Maximum faces one shell operation may open. */
226
- export const MAX_OPERATION_FACES = 32
227
-
228
- /** A point in space — `{ x, y, z }`, all finite. */
229
- export const XYZ: z.ZodType<XYZ, XYZ> = z.strictObject({
230
- x: z.number().finite(),
231
- y: z.number().finite(),
232
- z: z.number().finite(),
233
- })
234
-
235
- /** One boundary curve of a profile record. See {@linkcode CurveRecord}. */
236
- export const CurveRecord: z.ZodType<CurveRecord, CurveRecord> = z.discriminatedUnion("type", [
237
- z.strictObject({ type: z.literal("line"), start: XYZ, end: XYZ }),
238
- z.strictObject({ type: z.literal("arc"), start: XYZ, end: XYZ, centre: XYZ, axis: XYZ }),
239
- z.strictObject({
240
- type: z.literal("circle"),
241
- centre: XYZ,
242
- axis: XYZ,
243
- radius: z.number().finite().positive(),
244
- }),
245
- z.strictObject({
246
- type: z.literal("splineThrough"),
247
- fitVersion: z.literal(1),
248
- throughPoints: z.array(XYZ).min(2).max(MAX_SPLINE_THROUGH_POINTS),
249
- }),
250
- z.strictObject({
251
- type: z.literal("splinePoles"),
252
- degree: z.number().int().positive(),
253
- knots: z.array(z.number().finite()).min(2),
254
- mults: z.array(z.number().int().positive()).min(2),
255
- poles: z.array(XYZ).min(2).max(MAX_SPLINE_POLES),
256
- }),
257
- ])
258
-
259
- /** A closed boundary loop. See {@linkcode ProfileRecord}. */
260
- export const ProfileRecord: z.ZodType<ProfileRecord, ProfileRecord> = z.strictObject({
261
- curves: z.array(CurveRecord).min(1).max(MAX_PROFILE_CURVES),
262
- })
263
-
264
- /** An outer loop plus its holes. See {@linkcode ContourRecord}. */
265
- export const ContourRecord: z.ZodType<ContourRecord, ContourRecord> = z.strictObject({
266
- outer: ProfileRecord,
267
- holes: z.array(ProfileRecord).max(MAX_CONTOUR_HOLES),
268
- })
269
-
270
- /** Optional loft behaviour switches. See {@linkcode LoftOptions}. */
271
- export const LoftOptions: z.ZodType<LoftOptions, LoftOptions> = z.strictObject({
272
- compatibility: z.enum(["strict", "auto"]).optional(),
273
- seamAlignment: z.enum(["authored", "auto"]).optional(),
274
- })
275
-
276
- /** Optional sweep scale law and corner transition. See {@linkcode SweepOptions}. */
277
- export const SweepOptions: z.ZodType<SweepOptions, SweepOptions> = z.strictObject({
278
- startScale: z.number().finite().optional(),
279
- endScale: z.number().finite().optional(),
280
- scales: z.array(z.number().finite()).optional(),
281
- transition: z
282
- .union([
283
- z.literal("miter"),
284
- z.literal("round"),
285
- z.strictObject({ bevel: z.number().finite() }),
286
- ])
287
- .optional(),
288
- })
289
-
290
- const FaceIndex = z.number().int().nonnegative()
291
-
292
- /** See {@linkcode EdgeSelector}. */
293
- export const EdgeSelector: z.ZodType<EdgeSelector, EdgeSelector> = z.strictObject({
294
- index: FaceIndex,
295
- faces: z.tuple([FaceIndex, FaceIndex]),
296
- curve: z.enum(["line", "arc", "circle", "spline"]),
297
- })
298
-
299
- /** See {@linkcode FaceSelector}. */
300
- export const FaceSelector: z.ZodType<FaceSelector, FaceSelector> = z.strictObject({
301
- index: FaceIndex,
302
- kind: z.enum(["plane", "cylinder", "cone", "sphere", "torus", "spline"]),
303
- edgeCount: z.number().int().positive(),
304
- })
305
-
306
- /** See {@linkcode TopologyCounts}. */
307
- export const TopologyCounts: z.ZodType<TopologyCounts, TopologyCounts> = z.strictObject({
308
- faceCount: z.number().int().positive(),
309
- edgeCount: z.number().int().positive(),
310
- })
311
-
312
- /** See {@linkcode OperationRecord}. */
313
- export const OperationRecord: z.ZodType<OperationRecord, OperationRecord> = z.discriminatedUnion(
314
- "op",
315
- [
316
- z.strictObject({
317
- op: z.literal("fillet"),
318
- edges: z.array(EdgeSelector).min(1).max(MAX_OPERATION_EDGES),
319
- radius: z.number().finite().positive(),
320
- input: TopologyCounts,
321
- }),
322
- z.strictObject({
323
- op: z.literal("chamfer"),
324
- edges: z.array(EdgeSelector).min(1).max(MAX_OPERATION_EDGES),
325
- distance: z.number().finite().positive(),
326
- input: TopologyCounts,
327
- }),
328
- z.strictObject({
329
- op: z.literal("shell"),
330
- openFaces: z.array(FaceSelector).min(1).max(MAX_OPERATION_FACES),
331
- thickness: z.number().finite().positive(),
332
- input: TopologyCounts,
333
- }),
334
- z.strictObject({
335
- op: z.literal("offset"),
336
- distance: z
337
- .number()
338
- .finite()
339
- .refine((value) => value !== 0, { message: "distance must be non-zero" }),
340
- input: TopologyCounts,
341
- }),
342
- ],
343
- )
344
-
345
- // `operations` rides beside `values` on every kind — additive and optional, so
346
- // `version` stays 1. A 4A-era reader safeParse-fails on a record carrying one
347
- // and degrades the mass to non-parametric; it never blocks a load.
348
- // No `.min(1)`: `design.update.parameters` documents `{ operations: [] }` as the
349
- // drop-every-operation idiom, and the whole record you read back — edited to an
350
- // empty list — must patch the same way. The host normalises `[]` to an absent
351
- // key before storing, so a stored record never carries one.
352
- const RecordOperations = z.array(OperationRecord).max(MAX_OPERATIONS).optional()
353
-
354
- /**
355
- * A mass's creation recipe. See {@linkcode MassParametersRecord}.
356
- *
357
- * `version` is a literal `1`: a restore that reads an unknown version fails
358
- * `safeParse` and the mass degrades to non-parametric — editability is lost,
359
- * geometry never is, and load is never blocked. Future versions add a migration
360
- * at the restore site.
361
- */
362
- export const MassParametersRecord: z.ZodType<MassParametersRecord, MassParametersRecord> = z.discriminatedUnion("kind", [
363
- z.strictObject({
364
- kind: z.literal("sphere"),
365
- version: z.literal(1),
366
- values: z.strictObject({ centre: XYZ, radius: z.number().finite().positive() }),
367
- operations: RecordOperations,
368
- }),
369
- z.strictObject({
370
- kind: z.literal("cylinder"),
371
- version: z.literal(1),
372
- values: z.strictObject({
373
- base: XYZ,
374
- axis: XYZ,
375
- radius: z.number().finite().positive(),
376
- height: z.number().finite().positive(),
377
- }),
378
- operations: RecordOperations,
379
- }),
380
- z.strictObject({
381
- kind: z.literal("cone"),
382
- version: z.literal(1),
383
- values: z.strictObject({
384
- base: XYZ,
385
- axis: XYZ,
386
- baseRadius: z.number().finite().positive(),
387
- topRadius: z.number().finite().nonnegative(),
388
- height: z.number().finite().positive(),
389
- }),
390
- operations: RecordOperations,
391
- }),
392
- z.strictObject({
393
- kind: z.literal("torus"),
394
- version: z.literal(1),
395
- values: z.strictObject({
396
- centre: XYZ,
397
- axis: XYZ,
398
- majorRadius: z.number().finite().positive(),
399
- minorRadius: z.number().finite().positive(),
400
- }),
401
- operations: RecordOperations,
402
- }),
403
- z.strictObject({
404
- kind: z.literal("extrusion"),
405
- version: z.literal(1),
406
- values: z.strictObject({
407
- contour: ContourRecord,
408
- direction: XYZ,
409
- amount: z.number().finite(),
410
- }),
411
- operations: RecordOperations,
412
- }),
413
- z.strictObject({
414
- kind: z.literal("revolution"),
415
- version: z.literal(1),
416
- values: z.strictObject({
417
- contour: ContourRecord,
418
- axisOrigin: XYZ,
419
- axisDirection: XYZ,
420
- angleInDegrees: z.number().finite().positive().max(360),
421
- }),
422
- operations: RecordOperations,
423
- }),
424
- z.strictObject({
425
- kind: z.literal("loft"),
426
- version: z.literal(1),
427
- values: z.strictObject({
428
- sections: z.array(ContourRecord).min(2).max(MAX_LOFT_SECTIONS),
429
- options: LoftOptions.optional(),
430
- }),
431
- operations: RecordOperations,
432
- }),
433
- z.strictObject({
434
- kind: z.literal("sweep"),
435
- version: z.literal(1),
436
- values: z.strictObject({
437
- profile: ContourRecord,
438
- path: z.array(XYZ).min(2).max(MAX_SWEEP_PATH_POINTS),
439
- options: SweepOptions.optional(),
440
- }),
441
- operations: RecordOperations,
442
- }),
443
- ])
444
-
445
- /**
446
- * One value of a parameter patch. See {@linkcode ParameterPatchValue}.
447
- *
448
- * Deliberately a CLOSED union of the shapes a record's `values` actually hold —
449
- * no `z.unknown()`, nothing recursive: an unrecognised value is a VALIDATION at
450
- * the wire, not a silent write of nonsense onto a mass.
451
- */
452
- export const ParameterPatchValue: z.ZodType<ParameterPatchValue, ParameterPatchValue> = z.union([
453
- z.number().finite(),
454
- XYZ,
455
- z.array(XYZ).max(MAX_SWEEP_PATH_POINTS),
456
- ContourRecord,
457
- z.array(ContourRecord).max(MAX_LOFT_SECTIONS),
458
- LoftOptions,
459
- SweepOptions,
460
- z.array(OperationRecord).max(MAX_OPERATIONS),
461
- ])
462
-
463
- /**
464
- * The argument of `design.update.parameters`. See {@linkcode MassParametersPatch}.
465
- * The full-record form is recognised by carrying both `kind` and `values`;
466
- * which keys a kind actually has is checked host-side, where the error can name
467
- * them.
468
- */
469
- export const MassParametersPatch: z.ZodType<MassParametersPatch, MassParametersPatch> = z.union([
470
- MassParametersRecord,
471
- z.record(z.string(), ParameterPatchValue),
472
- ])