@snaptrude/plugin-core 0.9.16-networks-20261012.1 → 0.9.17
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/CHANGELOG.md +6 -0
- package/api-manifest.json +9711 -0
- package/dist/api/analysis/daylight.d.ts +5 -5
- package/dist/api/analysis/solar.d.ts +2 -2
- package/dist/api/core/camera/index.d.ts +0 -29
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/zoom/index.d.ts +0 -13
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +21 -40
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +97 -120
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +12 -13
- package/dist/api/design/create/opening-fields.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +24 -18
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +27 -797
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +0 -16
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +30 -30
- package/dist/api/design/selection/index.d.ts +10 -10
- package/dist/api/design/types/index.d.ts +24 -40
- package/dist/api/design/types/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +3 -40
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +8 -8
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +10 -10
- package/dist/api/presentation/annotate.d.ts +22 -38
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +5 -23
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +21 -32
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +6 -106
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/sections.d.ts +461 -0
- package/dist/api/presentation/sections.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/api/presentation/sheets.d.ts +19 -175
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +5 -103
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +6 -6
- package/dist/index.cjs +2434 -3619
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2421 -3501
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/generate-manifest.mjs +0 -5
- package/src/api/core/camera/index.ts +0 -29
- package/src/api/core/zoom/index.ts +0 -13
- package/src/api/design/create/bulk-items.ts +16 -23
- package/src/api/design/create/index.ts +119 -129
- package/src/api/design/create/opening-fields.ts +12 -15
- package/src/api/design/doors/index.ts +42 -58
- package/src/api/design/family.ts +32 -662
- package/src/api/design/index.ts +4 -34
- package/src/api/design/types/index.ts +24 -31
- package/src/api/design/update/index.ts +3 -41
- package/src/api/design/windows/index.ts +22 -40
- package/src/api/presentation/annotate.ts +58 -90
- package/src/api/presentation/export.ts +6 -32
- package/src/api/presentation/index.ts +23 -39
- package/src/api/presentation/placedViews.ts +28 -119
- package/src/api/presentation/sections.ts +420 -0
- package/src/api/presentation/sheets.ts +20 -181
- package/src/api/presentation/views.ts +6 -46
- package/dist/api/design/bim.d.ts +0 -209
- package/dist/api/design/bim.d.ts.map +0 -1
- package/dist/api/design/catalog.d.ts +0 -320
- package/dist/api/design/catalog.d.ts.map +0 -1
- package/dist/api/design/networks.d.ts +0 -1703
- package/dist/api/design/networks.d.ts.map +0 -1
- package/dist/api/presentation/drawingContract.d.ts +0 -32
- package/dist/api/presentation/drawingContract.d.ts.map +0 -1
- package/dist/api/presentation/drawings.d.ts +0 -3523
- package/dist/api/presentation/drawings.d.ts.map +0 -1
- package/dist/api/presentation/viewPresets.d.ts +0 -222
- package/dist/api/presentation/viewPresets.d.ts.map +0 -1
- package/src/api/design/bim.ts +0 -121
- package/src/api/design/catalog.ts +0 -203
- package/src/api/design/networks.ts +0 -607
- package/src/api/presentation/drawingContract.ts +0 -70
- package/src/api/presentation/drawings.ts +0 -1179
- package/src/api/presentation/viewPresets.ts +0 -241
- package/test/drawingContract.test.mjs +0 -288
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../types";
|
|
3
3
|
import { BrepHandle, ComponentHandle } from "../../handles";
|
|
4
|
-
import { NetworkFamilyContract } from "./networks";
|
|
5
4
|
/**
|
|
6
5
|
* `snaptrude.design.family.*` — author NATIVE parametric families from a JSON spec.
|
|
7
6
|
*
|
|
@@ -12,52 +11,19 @@ import { NetworkFamilyContract } from "./networks";
|
|
|
12
11
|
* compiles that into a live parametric definition the user can place, flex and
|
|
13
12
|
* save to their library.
|
|
14
13
|
*
|
|
15
|
-
* ##
|
|
14
|
+
* ## Workflow
|
|
16
15
|
*
|
|
17
16
|
* ```
|
|
18
|
-
* getReference() read the spec DSL once — grammar, ops, expressions,
|
|
19
|
-
*
|
|
20
|
-
* prepare({ bundle }) validate + compile; nothing committed, nothing in the viewport
|
|
17
|
+
* getReference() read the spec DSL once — grammar, ops, expressions, example
|
|
18
|
+
* prepare({ bundle }) validate + compile + show a live ghost; nothing committed
|
|
21
19
|
* flex({ values }) re-run at new values; returns the geometry delta
|
|
22
20
|
* place({ position }) put it in the model — saves the family as the first instance drops
|
|
23
21
|
* place() save the family, then arm placement — the USER clicks to drop it
|
|
24
|
-
* create() save an EDIT of a saved family — the app asks the user
|
|
25
22
|
* create({ teamId }) share with a team; a save with nothing placed also drops one instance
|
|
26
23
|
* ```
|
|
27
24
|
*
|
|
28
25
|
* `place` saves the prepared family to the user's personal library, so it
|
|
29
|
-
* survives reload with no extra step; finish
|
|
30
|
-
* `place`, not on `create` (`create` ends only an edit of a saved family, below).
|
|
31
|
-
*
|
|
32
|
-
* Architectural types use `create({ name })` to save the prepared recipe.
|
|
33
|
-
* Saving does not assign a family to a native host.
|
|
34
|
-
* Read `design.catalog` and pass the saved `{ id, version }` reference to the
|
|
35
|
-
* native `design.create` method with its contour, wall profile, or straight axis.
|
|
36
|
-
* Standalone placement does not create a native host. Selecting a Draw type
|
|
37
|
-
* does not register an API type. Native creator values use mm, while this
|
|
38
|
-
* generic family API uses SU. Read `family_authoring` for the full workflow.
|
|
39
|
-
*
|
|
40
|
-
* ## Door and window templates
|
|
41
|
-
*
|
|
42
|
-
* Start with `getTemplate({ kind: "door" | "window", subType? })`, edit the
|
|
43
|
-
* recipe's style while keeping its contract, then `prepare` → `flex` → `create`.
|
|
44
|
-
* Place the saved family with
|
|
45
|
-
* `design.create.door(familyId, hostWall, position, { version, values, hinge }, facing)`
|
|
46
|
-
* or `design.create.window` with the same positional signature. Positions,
|
|
47
|
-
* hinge and facing are vec3 handles; values use the authored parameter keys.
|
|
48
|
-
* Templates produce ParametricComponents, not separate OpeningComponents. Read
|
|
49
|
-
* and edit their instances through `getParameters` / `setParameters`.
|
|
50
|
-
* The contract maps opening dimensions to parameter keys; do not assume the
|
|
51
|
-
* recipe names its width parameter `width`. Generic family lengths use SU.
|
|
52
|
-
* Hosted door/window `create({ name })` saves without placing a standalone
|
|
53
|
-
* sample. Supply the host and position in a subsequent placement.
|
|
54
|
-
*
|
|
55
|
-
* ## Changing a saved family
|
|
56
|
-
*
|
|
57
|
-
* Open it with `get({ id })` or `get({ component })`, edit with `prepare` /
|
|
58
|
-
* `flex`, then `create()`. The app — not the agent — asks the user whether to
|
|
59
|
-
* update that family (this project's placed copies move to the new version) or
|
|
60
|
-
* save a new family. Do not ask this yourself; report the returned `decision`.
|
|
26
|
+
* survives reload with no extra step; finish on `place`, not on `create`.
|
|
61
27
|
*
|
|
62
28
|
* ## Read getReference() first
|
|
63
29
|
*
|
|
@@ -104,8 +70,6 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
104
70
|
* Read this before authoring a family for the first time in a session. The
|
|
105
71
|
* DSL is a closed language — a guessed op or function is a rejected spec.
|
|
106
72
|
*
|
|
107
|
-
* @param args Optional section, or its bare name. Omit for the core reference.
|
|
108
|
-
* Fetch architectural, networks or relations only when the family needs them.
|
|
109
73
|
* @returns The reference text
|
|
110
74
|
*
|
|
111
75
|
* @examplePrompt How do I write a parametric family spec?
|
|
@@ -116,53 +80,7 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
116
80
|
* const { reference } = await snaptrude.design.family.getReference()
|
|
117
81
|
* ```
|
|
118
82
|
*/
|
|
119
|
-
abstract getReference(
|
|
120
|
-
/**
|
|
121
|
-
* Worked example families to learn from: real, tested bundles by discipline
|
|
122
|
-
* (architecture, structure, MEP, furniture). With no `id`, returns the
|
|
123
|
-
* catalogue — each example's id, label, discipline and the patterns it
|
|
124
|
-
* teaches — filtered by `discipline` / `tag` when given. With an `id`,
|
|
125
|
-
* returns that example's full bundle. Fetch the one closest to the task
|
|
126
|
-
* before authoring and borrow its patterns; examples are patterns to
|
|
127
|
-
* combine, not templates to copy whole.
|
|
128
|
-
*
|
|
129
|
-
* @param args - `{ id }` for one bundle, or `{ discipline?, tag? }` to list
|
|
130
|
-
* @returns The catalogue, or one example with its bundle
|
|
131
|
-
*
|
|
132
|
-
* @examplePrompt Show me an example of a structural family
|
|
133
|
-
* @examplePrompt How is a hosted door family written?
|
|
134
|
-
*
|
|
135
|
-
* # Example
|
|
136
|
-
* ```ts
|
|
137
|
-
* const list = await snaptrude.design.family.getExamples({ discipline: "mep" })
|
|
138
|
-
* const ex = await snaptrude.design.family.getExamples({ id: list[0].id })
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
abstract getExamples(args?: PluginDesignFamilyGetExamplesArgs | string): PluginApiReturn<PluginFamilyExampleSummary[] | PluginFamilyExample>;
|
|
142
|
-
/**
|
|
143
|
-
* Get a validated starter recipe for a door or window, with an opening
|
|
144
|
-
* contract, host wall-thickness binding and role-named parts. Edit profiles,
|
|
145
|
-
* panels, glazing, hardware and materials while preserving the contract.
|
|
146
|
-
* Use `prepare` / `flex` to check the recipe, then `create` to save it and
|
|
147
|
-
* `design.create.door(familyId, hostWall, position, { version, values }, facing)`
|
|
148
|
-
* (or `window`) to place it. Edit the resulting ParametricComponent through
|
|
149
|
-
* `getParameters` / `setParameters`, not a separate opening API.
|
|
150
|
-
*
|
|
151
|
-
* `subType` defaults to `singleDoor` / `fixedWindow`. An unsupported subType
|
|
152
|
-
* returns the kind's default template, a note in `guidance`, and `available`
|
|
153
|
-
* templates. Start from the closest recipe and set `root.subType` to your token.
|
|
154
|
-
*
|
|
155
|
-
* @param args The opening kind and optional subtype token
|
|
156
|
-
* @returns The bundle, parameter-key contract, subtype, guidance and available templates
|
|
157
|
-
* @example
|
|
158
|
-
* const { bundle, contract } = await snaptrude.design.family.getTemplate({
|
|
159
|
-
* kind: "door", subType: "doubleDoor",
|
|
160
|
-
* })
|
|
161
|
-
* // Flex the authored width key, not an assumed parameter name (lengths in SU).
|
|
162
|
-
* await snaptrude.design.family.prepare({ bundle })
|
|
163
|
-
* await snaptrude.design.family.flex({ values: { [contract.width]: 4 } })
|
|
164
|
-
*/
|
|
165
|
-
abstract getTemplate(args: PluginDesignFamilyGetTemplateArgs): PluginApiReturn<PluginFamilyTemplateResult>;
|
|
83
|
+
abstract getReference(): PluginApiReturn<PluginFamilyReference>;
|
|
166
84
|
/**
|
|
167
85
|
* Validate, compile and preview a family spec. Nothing is committed to the
|
|
168
86
|
* model or the library — call {@linkcode PluginDesignFamilyApi.place} to put
|
|
@@ -200,8 +118,7 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
200
118
|
* buckets are the host's own diff of what the geometry did — flexing a
|
|
201
119
|
* driving parameter and reporting them demonstrates the family is parametric.
|
|
202
120
|
*
|
|
203
|
-
* @param args The parameter values to change
|
|
204
|
-
* record) to report or photograph the current draft without rebuilding it.
|
|
121
|
+
* @param args The parameter values to change
|
|
205
122
|
* @returns The new build plus the geometry delta
|
|
206
123
|
*
|
|
207
124
|
* @examplePrompt Change it to 6 bays
|
|
@@ -213,44 +130,22 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
213
130
|
* console.log(`removed ${changed.removed}, rebuilt ${changed.rebuilt}`)
|
|
214
131
|
* ```
|
|
215
132
|
*/
|
|
216
|
-
abstract flex(args
|
|
133
|
+
abstract flex(args: PluginDesignFamilyFlexArgs): PluginApiReturn<PluginFamilyFlexResult>;
|
|
217
134
|
/**
|
|
218
|
-
*
|
|
219
|
-
* family — that family's recipe, opened as the new draft.
|
|
220
|
-
*
|
|
221
|
-
* - No arguments: the prepared draft, or `null` when nothing is prepared.
|
|
222
|
-
* - `{ id, version? }`: open a saved family from the library (newest version
|
|
223
|
-
* when `version` is omitted).
|
|
224
|
-
* - `{ component }`: open the family (at its version) of that placed copy.
|
|
135
|
+
* The prepared family's spec bundle, or `null` when nothing is prepared.
|
|
225
136
|
*
|
|
226
|
-
*
|
|
227
|
-
* saved family it is. Edit it with `prepare` / `flex`, then call `create`.
|
|
228
|
-
* On that save the APP shows the user its own window asking whether to
|
|
229
|
-
* update the family (every placed copy in this project moves to the new
|
|
230
|
-
* version) or save it as a new family — "new family" is the default. Never
|
|
231
|
-
* ask the user this yourself, and never promise either outcome: report what
|
|
232
|
-
* `create` returns.
|
|
233
|
-
*
|
|
234
|
-
* @param args Optional: which saved family to open
|
|
235
|
-
* @returns The bundle (plus `editing` when it edits a saved family), or `null`
|
|
236
|
-
*
|
|
237
|
-
* @examplePrompt Make the chairs I placed 50 mm wider
|
|
238
|
-
* @examplePrompt Change the Louvre Screen family so its blades are deeper
|
|
137
|
+
* @returns The draft bundle, or `null`
|
|
239
138
|
*
|
|
240
139
|
* # Example
|
|
241
140
|
* ```ts
|
|
242
|
-
* const
|
|
243
|
-
* const family = await snaptrude.design.family.get({ component })
|
|
244
|
-
* // family.editing → { familyId, version, name, library }
|
|
141
|
+
* const bundle = await snaptrude.design.family.get()
|
|
245
142
|
* ```
|
|
246
143
|
*/
|
|
247
|
-
abstract get(
|
|
144
|
+
abstract get(): PluginApiReturn<PluginFamilyBundle | null>;
|
|
248
145
|
/**
|
|
249
|
-
* Every
|
|
146
|
+
* Every parametric family registered in this session — native and imported.
|
|
250
147
|
*
|
|
251
|
-
* @
|
|
252
|
-
* object-shaped so existing callers retain version, openingKind and subType.
|
|
253
|
-
* @returns Summary objects, or `id | label | category | kind` lines when compact.
|
|
148
|
+
* @returns One summary per family
|
|
254
149
|
*
|
|
255
150
|
* @examplePrompt What families are available?
|
|
256
151
|
*
|
|
@@ -259,30 +154,7 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
259
154
|
* const families = await snaptrude.design.family.list()
|
|
260
155
|
* ```
|
|
261
156
|
*/
|
|
262
|
-
abstract list(
|
|
263
|
-
compact: true;
|
|
264
|
-
}): PluginApiReturn<string[]>;
|
|
265
|
-
abstract list(args?: PluginDesignFamilyListArgs & {
|
|
266
|
-
compact?: false;
|
|
267
|
-
}): PluginApiReturn<PluginFamilySummary[]>;
|
|
268
|
-
abstract list(args?: PluginDesignFamilyListArgs): PluginApiReturn<PluginFamilySummary[] | string[]>;
|
|
269
|
-
/**
|
|
270
|
-
* Read one saved catalog definition without opening a draft or placing geometry.
|
|
271
|
-
* Both id and version are required. The catalog checks access on every read.
|
|
272
|
-
* Length defaults and bounds are in mm, ready for network graph overrides;
|
|
273
|
-
* angle parameters retain degrees, identified by each parameter's unit.
|
|
274
|
-
* existing getParameters/place/setParameters continue to use Snaptrude units.
|
|
275
|
-
* Defaults include current catalog overrides, which can change without a new version.
|
|
276
|
-
* No scene, registry, history, or persistence state is changed.
|
|
277
|
-
* Missing/inaccessible pins and invalid recipes fail; no latest-version fallback.
|
|
278
|
-
* This metadata does not certify connectors or engineering compatibility.
|
|
279
|
-
*
|
|
280
|
-
* @param args Exact saved catalog id and version, from list()
|
|
281
|
-
* @returns Compact parameter metadata, not geometry or the recipe bundle
|
|
282
|
-
* @example
|
|
283
|
-
* const definition = await snaptrude.design.family.getDefinition({ id, version })
|
|
284
|
-
*/
|
|
285
|
-
abstract getDefinition(args: PluginDesignFamilyGetDefinitionArgs): PluginApiReturn<PluginFamilyDefinition>;
|
|
157
|
+
abstract list(): PluginApiReturn<PluginFamilySummary[]>;
|
|
286
158
|
/**
|
|
287
159
|
* Put a family into the model — either the prepared draft or any family from
|
|
288
160
|
* {@linkcode PluginDesignFamilyApi.list}.
|
|
@@ -305,13 +177,6 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
305
177
|
* To COPY a placed component, place its family again at the new position with
|
|
306
178
|
* the same `values` — there is no separate copy call.
|
|
307
179
|
*
|
|
308
|
-
* HOSTED families (doors, windows — anything with an `opening`, a `host`
|
|
309
|
-
* block, or a void with `cuts: "host"`) take `host`: a wall or a placed
|
|
310
|
-
* family. The family is set into the host's face nearest `position` (the
|
|
311
|
-
* host's middle when omitted), and the host is cut — a system wall by the
|
|
312
|
-
* wall cutter, a family by its own recipe. Host-bound parameters then follow
|
|
313
|
-
* the host (a door's wall thickness follows the wall).
|
|
314
|
-
*
|
|
315
180
|
* @param args Which family, where, and at what parameter values
|
|
316
181
|
* @returns What was placed; `component` is present only in positioned mode
|
|
317
182
|
*
|
|
@@ -331,9 +196,6 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
331
196
|
*
|
|
332
197
|
* // interactive — the user clicks
|
|
333
198
|
* await snaptrude.design.family.place()
|
|
334
|
-
*
|
|
335
|
-
* // hosted — a door in a wall, near a point along it
|
|
336
|
-
* await snaptrude.design.family.place({ id: doorId, host: wall, position: { x: 3, y: 0, z: 0 } })
|
|
337
199
|
* ```
|
|
338
200
|
*/
|
|
339
201
|
abstract place(args?: PluginDesignFamilyPlaceArgs): PluginApiReturn<PluginFamilyPlaceResult>;
|
|
@@ -370,34 +232,6 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
370
232
|
* that does not is accepted and stored (it round-trips to Revit) but nothing
|
|
371
233
|
* visible happens — say so rather than claiming a change the user cannot see.
|
|
372
234
|
*
|
|
373
|
-
* NESTED children: `children: { "<path>": { key: value } }` sets a nested
|
|
374
|
-
* child's own values (every copy of it). A value its parent sets is sent up
|
|
375
|
-
* to what it follows when that is a plain relationship; otherwise it is
|
|
376
|
-
* refused with what to change instead (see `refused`).
|
|
377
|
-
*
|
|
378
|
-
* LINKS: `links: { key: { from, expr } }` makes this family's `key` follow
|
|
379
|
-
* another placed object — `from` is a family (it reports its parameters and
|
|
380
|
-
* outputs) or a wall (it reports thickness, length, height); `expr` is an
|
|
381
|
-
* expression over those reports. `null` removes a link. Links that would
|
|
382
|
-
* make objects follow each other in a loop are refused. Values accept unit
|
|
383
|
-
* literals ("600mm").
|
|
384
|
-
*
|
|
385
|
-
* RELATIONS: `relations: { add: [...], remove: ["r1"] }` sets how the family
|
|
386
|
-
* sits against other placed objects or cuts its host:
|
|
387
|
-
* - `attach` — `{ kind: "attach", side: "base" | "top", to: <object> | { level, face? }, offset? }`:
|
|
388
|
-
* sits on a surface, or its top reaches one (reports `reach`, `gap`, `surface`).
|
|
389
|
-
* - `join` — `{ kind: "join", end, to: <family>, toEnd, bindOther? }`: its end moves onto
|
|
390
|
-
* the other's end (reports `angle`, `absAngle`, `mitre`).
|
|
391
|
-
* - `span` — `{ kind: "span", from, to, at? }`: pinned between two objects, running along
|
|
392
|
-
* its +X (reports `distance`, `run`, `rise`, `slope`, `from.*`, `to.*`).
|
|
393
|
-
* - `path` — `{ kind: "path", from? | points, closed? }`: follows a wall's centreline, a
|
|
394
|
-
* family's run or given points (reports `length`; the recipe reads the path).
|
|
395
|
-
* - `cut` — `{ kind: "cut", to: "host" }`: applies recipe voids to the current host.
|
|
396
|
-
* Removing it closes the opening without detaching or deleting the family.
|
|
397
|
-
* Door/window placement adds it. Hosting alone does not cut. No parameter binds.
|
|
398
|
-
* Placement relations take `bind: { <param>: "<expression over its reports>" }`; bound
|
|
399
|
-
* parameters are read-only. A relation with an existing `id` replaces it.
|
|
400
|
-
*
|
|
401
235
|
* `length` values are Snaptrude units: the same 254 mm unit as the kernel's
|
|
402
236
|
* internal (`"babylon"`) unit — convert the user's number with
|
|
403
237
|
* `core.units.convert` first; a bare `400` is 400 SU, not 400 mm. Kernel part
|
|
@@ -412,39 +246,18 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
412
246
|
* # Example
|
|
413
247
|
* ```ts
|
|
414
248
|
* await snaptrude.design.family.setParameters({ component, values: { seats: 8 } })
|
|
415
|
-
* await snaptrude.design.family.setParameters({ component, children: { chair: { width: "380mm" } } })
|
|
416
|
-
* await snaptrude.design.family.setParameters({
|
|
417
|
-
* component: railing,
|
|
418
|
-
* links: { steps: { from: stair, expr: "steps" }, side: { from: stair, expr: "width - 40mm" } },
|
|
419
|
-
* })
|
|
420
|
-
* await snaptrude.design.family.setParameters({
|
|
421
|
-
* component: post,
|
|
422
|
-
* relations: { add: [{ kind: "attach", side: "top", to: slab, bind: { height: "reach" } }] },
|
|
423
|
-
* })
|
|
424
249
|
* ```
|
|
425
250
|
*/
|
|
426
251
|
abstract setParameters(args: PluginDesignFamilySetParametersArgs): PluginApiReturn<PluginFamilyInstanceParameters>;
|
|
427
252
|
/**
|
|
428
253
|
* Save the prepared bundle to the library — the user's personal library
|
|
429
254
|
* unless `teamId` is given. {@linkcode PluginDesignFamilyApi.place} already
|
|
430
|
-
* saves
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
* standalone sample at the current view centre on the active storey
|
|
434
|
-
* (`placed: true`). This includes architectural families: the sample does
|
|
435
|
-
* not assign a family to a native host.
|
|
436
|
-
*
|
|
437
|
-
* When the draft edits a saved family (opened with `get({ id })` /
|
|
438
|
-
* `get({ component })`), or its name is already taken in that library, the
|
|
439
|
-
* APP asks the user in its own window whether to save a new version of that
|
|
440
|
-
* family — every placed copy in this project moves to it, and families
|
|
441
|
-
* nesting it may be offered theirs — or a new family ("new family" is the
|
|
442
|
-
* default). The agent never asks this itself and cannot answer the window.
|
|
443
|
-
* `decision` reports what the user chose; `"cancelled"` means nothing was
|
|
444
|
-
* saved (`ok: false`) and nothing will auto-save until `create` is called again.
|
|
255
|
+
* saves, so `create` is for sharing with a team. When nothing of the family is
|
|
256
|
+
* in the model yet, one instance is also dropped at the centre of the current
|
|
257
|
+
* view on the active storey (`placed: true`), so a save is never invisible.
|
|
445
258
|
*
|
|
446
259
|
* @param args Optional library name and team scope
|
|
447
|
-
* @returns The catalogued definition's id and version
|
|
260
|
+
* @returns The catalogued definition's id and version
|
|
448
261
|
*
|
|
449
262
|
* @examplePrompt Save this as a family called Vertical Louvre
|
|
450
263
|
* @examplePrompt Add it to my library
|
|
@@ -477,42 +290,7 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
477
290
|
* await snaptrude.design.family.delete({ id: "revit:steel-bollard~bef047", instances: true })
|
|
478
291
|
* ```
|
|
479
292
|
*/
|
|
480
|
-
abstract delete(args?: PluginDesignFamilyDeleteArgs
|
|
481
|
-
}
|
|
482
|
-
/** Optional reference sections keep unrelated grammar out of the core response. */
|
|
483
|
-
export declare const PluginFamilyReferenceSection: z.ZodEnum<{
|
|
484
|
-
architectural: "architectural";
|
|
485
|
-
networks: "networks";
|
|
486
|
-
relations: "relations";
|
|
487
|
-
}>;
|
|
488
|
-
export type PluginFamilyReferenceSection = z.infer<typeof PluginFamilyReferenceSection>;
|
|
489
|
-
/** Omit section for the core grammar, workflow and example catalogue. */
|
|
490
|
-
export declare const PluginDesignFamilyGetReferenceArgs: z.ZodObject<{
|
|
491
|
-
section: z.ZodOptional<z.ZodEnum<{
|
|
492
|
-
architectural: "architectural";
|
|
493
|
-
networks: "networks";
|
|
494
|
-
relations: "relations";
|
|
495
|
-
}>>;
|
|
496
|
-
}, z.core.$strip>;
|
|
497
|
-
export type PluginDesignFamilyGetReferenceArgs = z.infer<typeof PluginDesignFamilyGetReferenceArgs>;
|
|
498
|
-
/** Compact output is opt-in: existing object consumers must retain their metadata. */
|
|
499
|
-
export declare const PluginDesignFamilyListArgs: z.ZodObject<{
|
|
500
|
-
compact: z.ZodOptional<z.ZodBoolean>;
|
|
501
|
-
}, z.core.$strip>;
|
|
502
|
-
export type PluginDesignFamilyListArgs = z.infer<typeof PluginDesignFamilyListArgs>;
|
|
503
|
-
/** One worked example in the catalogue returned by `getExamples`. */
|
|
504
|
-
export interface PluginFamilyExampleSummary {
|
|
505
|
-
id: string;
|
|
506
|
-
label: string;
|
|
507
|
-
discipline: "architecture" | "structure" | "mep" | "furniture";
|
|
508
|
-
/** The patterns it demonstrates, e.g. "nesting", "slot", "path", "union", "trim". */
|
|
509
|
-
teaches: string[];
|
|
510
|
-
/** Size of the bundle as compact JSON, kilobytes — what fetching it costs. */
|
|
511
|
-
sizeKB: number;
|
|
512
|
-
}
|
|
513
|
-
/** One worked example with its full bundle, from `getExamples({ id })`. */
|
|
514
|
-
export interface PluginFamilyExample extends PluginFamilyExampleSummary {
|
|
515
|
-
bundle: PluginFamilyBundle;
|
|
293
|
+
abstract delete(args?: PluginDesignFamilyDeleteArgs): PluginApiReturn<PluginFamilyDeleteResult>;
|
|
516
294
|
}
|
|
517
295
|
/** The family-spec DSL reference returned by `getReference`. */
|
|
518
296
|
export interface PluginFamilyReference {
|
|
@@ -531,31 +309,6 @@ export interface PluginFamilyReference {
|
|
|
531
309
|
export interface PluginFamilyBundle {
|
|
532
310
|
root: Record<string, unknown>;
|
|
533
311
|
deps?: Record<string, Record<string, unknown>>;
|
|
534
|
-
/** Connector metadata saved with the recipe; network placement evaluates these expressions. */
|
|
535
|
-
network?: NetworkFamilyContract;
|
|
536
|
-
}
|
|
537
|
-
/** Which saved family a draft edits. */
|
|
538
|
-
export interface PluginFamilyEditing {
|
|
539
|
-
/** Library id of the family being edited. */
|
|
540
|
-
familyId: string;
|
|
541
|
-
/** The version that was opened. */
|
|
542
|
-
version: number;
|
|
543
|
-
/** Its library name — an update saves under this name. */
|
|
544
|
-
name: string;
|
|
545
|
-
/** "your library", or the team library's name. */
|
|
546
|
-
library: string;
|
|
547
|
-
}
|
|
548
|
-
/** What `get` returns: the bundle, plus `editing` when the draft edits a saved family. */
|
|
549
|
-
export interface PluginFamilyGetResult extends PluginFamilyBundle {
|
|
550
|
-
editing?: PluginFamilyEditing;
|
|
551
|
-
}
|
|
552
|
-
/** A family at a version, as `create` reports parents it did or did not update. */
|
|
553
|
-
export interface PluginFamilyVersionRef {
|
|
554
|
-
id: string;
|
|
555
|
-
name: string;
|
|
556
|
-
version: number;
|
|
557
|
-
/** Set when the user chose to update it but the update failed. */
|
|
558
|
-
error?: string;
|
|
559
312
|
}
|
|
560
313
|
/** Axis-aligned extents of a built family. Snaptrude units (1 SU = 254 mm), +Y up. */
|
|
561
314
|
export interface PluginFamilyBBox {
|
|
@@ -589,11 +342,7 @@ export interface PluginFamilyParameter {
|
|
|
589
342
|
export interface PluginFamilyDiagnostic {
|
|
590
343
|
/** JSON pointer, e.g. `"/root/geometry/2/body/0/w"`. */
|
|
591
344
|
path: string;
|
|
592
|
-
code: "schema" | "bad-expression" | "unknown-name" | "unknown-def" | "cycle" | "duplicate-name" | "unbounded-repeat" | "depth" | "bad-dimension" | "proportion"
|
|
593
|
-
/** A part the geometry kernel could not build exactly; drawn approximately. */
|
|
594
|
-
| "kernel-fallback"
|
|
595
|
-
/** A part whose hole loop crosses its outline. */
|
|
596
|
-
| "profile-hole";
|
|
345
|
+
code: "schema" | "bad-expression" | "unknown-name" | "unknown-def" | "cycle" | "duplicate-name" | "unbounded-repeat" | "depth" | "bad-dimension" | "proportion";
|
|
597
346
|
message: string;
|
|
598
347
|
hint?: string;
|
|
599
348
|
}
|
|
@@ -673,13 +422,6 @@ export interface PluginFamilySummary {
|
|
|
673
422
|
version: number;
|
|
674
423
|
label: string;
|
|
675
424
|
category?: string;
|
|
676
|
-
/** The category's type token (`root.subType`), e.g. singleDoor or casementDouble. */
|
|
677
|
-
subType?: string;
|
|
678
|
-
/**
|
|
679
|
-
* Opening contract kind, distinct from provenance (`kind`). Place with the
|
|
680
|
-
* positional `design.create.door` / `window` API and edit via family parameters.
|
|
681
|
-
*/
|
|
682
|
-
openingKind?: "door" | "window";
|
|
683
425
|
/** Number of rows on the family's parameter sheet. */
|
|
684
426
|
parameters: number;
|
|
685
427
|
/**
|
|
@@ -695,93 +437,6 @@ export interface PluginFamilySummary {
|
|
|
695
437
|
*/
|
|
696
438
|
kind: "native" | "revit";
|
|
697
439
|
}
|
|
698
|
-
/** Exact catalog pin. Unsaved session definitions are not catalog inventory. */
|
|
699
|
-
export declare const PluginDesignFamilyGetDefinitionArgs: z.ZodObject<{
|
|
700
|
-
id: z.ZodString;
|
|
701
|
-
version: z.ZodNumber;
|
|
702
|
-
}, z.core.$strip>;
|
|
703
|
-
export type PluginDesignFamilyGetDefinitionArgs = z.infer<typeof PluginDesignFamilyGetDefinitionArgs>;
|
|
704
|
-
/** Saved-family metadata. Physical lengths use mm; angle entries retain degrees. */
|
|
705
|
-
export declare const PluginFamilyDefinitionParameter: z.ZodObject<{
|
|
706
|
-
key: z.ZodString;
|
|
707
|
-
label: z.ZodString;
|
|
708
|
-
type: z.ZodEnum<{
|
|
709
|
-
boolean: "boolean";
|
|
710
|
-
enum: "enum";
|
|
711
|
-
length: "length";
|
|
712
|
-
text: "text";
|
|
713
|
-
integer: "integer";
|
|
714
|
-
}>;
|
|
715
|
-
unit: z.ZodOptional<z.ZodEnum<{
|
|
716
|
-
mm: "mm";
|
|
717
|
-
degrees: "degrees";
|
|
718
|
-
}>>;
|
|
719
|
-
default: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
720
|
-
min: z.ZodOptional<z.ZodNumber>;
|
|
721
|
-
max: z.ZodOptional<z.ZodNumber>;
|
|
722
|
-
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
723
|
-
drivesGeometry: z.ZodBoolean;
|
|
724
|
-
readOnly: z.ZodBoolean;
|
|
725
|
-
formulaDriven: z.ZodBoolean;
|
|
726
|
-
isInstance: z.ZodBoolean;
|
|
727
|
-
}, z.core.$strip>;
|
|
728
|
-
export type PluginFamilyDefinitionParameter = z.infer<typeof PluginFamilyDefinitionParameter>;
|
|
729
|
-
/** Read-only catalog inventory. Boolean defaults retain the family DSL's Yes/No strings. */
|
|
730
|
-
export declare const PluginFamilyDefinition: z.ZodObject<{
|
|
731
|
-
id: z.ZodString;
|
|
732
|
-
version: z.ZodNumber;
|
|
733
|
-
label: z.ZodString;
|
|
734
|
-
category: z.ZodOptional<z.ZodString>;
|
|
735
|
-
lengthUnit: z.ZodLiteral<"mm">;
|
|
736
|
-
parameters: z.ZodArray<z.ZodObject<{
|
|
737
|
-
key: z.ZodString;
|
|
738
|
-
label: z.ZodString;
|
|
739
|
-
type: z.ZodEnum<{
|
|
740
|
-
boolean: "boolean";
|
|
741
|
-
enum: "enum";
|
|
742
|
-
length: "length";
|
|
743
|
-
text: "text";
|
|
744
|
-
integer: "integer";
|
|
745
|
-
}>;
|
|
746
|
-
unit: z.ZodOptional<z.ZodEnum<{
|
|
747
|
-
mm: "mm";
|
|
748
|
-
degrees: "degrees";
|
|
749
|
-
}>>;
|
|
750
|
-
default: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
751
|
-
min: z.ZodOptional<z.ZodNumber>;
|
|
752
|
-
max: z.ZodOptional<z.ZodNumber>;
|
|
753
|
-
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
754
|
-
drivesGeometry: z.ZodBoolean;
|
|
755
|
-
readOnly: z.ZodBoolean;
|
|
756
|
-
formulaDriven: z.ZodBoolean;
|
|
757
|
-
isInstance: z.ZodBoolean;
|
|
758
|
-
}, z.core.$strip>>;
|
|
759
|
-
network: z.ZodOptional<z.ZodObject<{
|
|
760
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
761
|
-
role: z.ZodEnum<{
|
|
762
|
-
pipe: "pipe";
|
|
763
|
-
duct: "duct";
|
|
764
|
-
wire: "wire";
|
|
765
|
-
cable: "cable";
|
|
766
|
-
conduit: "conduit";
|
|
767
|
-
cableDuct: "cableDuct";
|
|
768
|
-
cableTray: "cableTray";
|
|
769
|
-
connector: "connector";
|
|
770
|
-
equipment: "equipment";
|
|
771
|
-
}>;
|
|
772
|
-
lengthParameter: z.ZodOptional<z.ZodString>;
|
|
773
|
-
ports: z.ZodArray<z.ZodObject<{
|
|
774
|
-
id: z.ZodString;
|
|
775
|
-
position: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>;
|
|
776
|
-
direction: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>;
|
|
777
|
-
size: z.ZodString;
|
|
778
|
-
height: z.ZodOptional<z.ZodString>;
|
|
779
|
-
widthDirection: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>>;
|
|
780
|
-
systems: z.ZodArray<z.ZodString>;
|
|
781
|
-
}, z.core.$strict>>;
|
|
782
|
-
}, z.core.$strict>>;
|
|
783
|
-
}, z.core.$strip>;
|
|
784
|
-
export type PluginFamilyDefinition = z.infer<typeof PluginFamilyDefinition>;
|
|
785
440
|
/** What `place` reports. */
|
|
786
441
|
export interface PluginFamilyPlaceResult {
|
|
787
442
|
ok: boolean;
|
|
@@ -809,108 +464,6 @@ export interface PluginFamilyInstanceParameters {
|
|
|
809
464
|
parts?: PluginFamilyPart[];
|
|
810
465
|
/** Present when `getParameters` was asked for a `snapshot`. */
|
|
811
466
|
snapshot?: PluginFamilySnapshot;
|
|
812
|
-
/** The family's `outputs`, as last built. */
|
|
813
|
-
reports?: Record<string, number | string>;
|
|
814
|
-
/** Every declared nested child, as last built. */
|
|
815
|
-
children?: PluginFamilyNestedChild[];
|
|
816
|
-
/** Parameters that follow another object (links) or the host. */
|
|
817
|
-
follows?: PluginFamilyFollow[];
|
|
818
|
-
/** Where a hosted family sits: a system wall, or a family by id. */
|
|
819
|
-
host?: ({
|
|
820
|
-
kind: "wall";
|
|
821
|
-
} | {
|
|
822
|
-
kind: "family";
|
|
823
|
-
id: string;
|
|
824
|
-
}) & {
|
|
825
|
-
/** True when the host no longer has room for it: it is out of the model until it fits again. */
|
|
826
|
-
parked?: boolean;
|
|
827
|
-
};
|
|
828
|
-
/** Guests hosted in THIS family that no longer fit it (parked); they return when they fit. */
|
|
829
|
-
parkedGuests?: {
|
|
830
|
-
id: string;
|
|
831
|
-
family: string;
|
|
832
|
-
}[];
|
|
833
|
-
/** How it sits against other placed objects (attach, join, span, path), with current reports. */
|
|
834
|
-
relations?: PluginFamilyRelation[];
|
|
835
|
-
/** setParameters only: the edits refused, each with what to change instead. */
|
|
836
|
-
refused?: string[];
|
|
837
|
-
}
|
|
838
|
-
/** A nested child of a placed family. */
|
|
839
|
-
export interface PluginFamilyNestedChild {
|
|
840
|
-
/** "chair", or "chair/cushion" for a child of a child — the key for `children` edits. */
|
|
841
|
-
path: string;
|
|
842
|
-
label: string;
|
|
843
|
-
/** The family it is now (a slot's current pick). */
|
|
844
|
-
family: string;
|
|
845
|
-
familyLabel: string;
|
|
846
|
-
/** How many copies the parent places. */
|
|
847
|
-
copies: number;
|
|
848
|
-
slot?: {
|
|
849
|
-
expr: string;
|
|
850
|
-
options: string[];
|
|
851
|
-
};
|
|
852
|
-
values: Record<string, number | string>;
|
|
853
|
-
/** Values the parent sets, with the expression it sets them by. */
|
|
854
|
-
setBy: Record<string, string | undefined>;
|
|
855
|
-
reports: Record<string, number | string>;
|
|
856
|
-
}
|
|
857
|
-
/** A placed relation as stored, plus what it measures now. */
|
|
858
|
-
export type PluginFamilyRelation = PluginFamilyRelationInput & {
|
|
859
|
-
id: string;
|
|
860
|
-
/** "Attached to", "Joins", "Spans between", "Along a path", "Cuts host". */
|
|
861
|
-
label: string;
|
|
862
|
-
summary: string;
|
|
863
|
-
/** False when a target is gone: the family stayed where it was. */
|
|
864
|
-
live: boolean;
|
|
865
|
-
reports: Record<string, number | string>;
|
|
866
|
-
};
|
|
867
|
-
/** One relation to add (`relations.add`). Targets are handles, except a cut's symbolic "host". */
|
|
868
|
-
export type PluginFamilyRelationInput = {
|
|
869
|
-
/** Replaces the relation with this id; a new one gets "r1", "r2"… */
|
|
870
|
-
id?: string;
|
|
871
|
-
/** This family's parameter → an expression over the relation's reports and own parameters. */
|
|
872
|
-
bind?: Record<string, string>;
|
|
873
|
-
} & ({
|
|
874
|
-
kind: "attach";
|
|
875
|
-
side: "base" | "top";
|
|
876
|
-
to: ComponentHandle | {
|
|
877
|
-
level: number;
|
|
878
|
-
face?: "base" | "top";
|
|
879
|
-
};
|
|
880
|
-
offset?: number;
|
|
881
|
-
} | {
|
|
882
|
-
kind: "join";
|
|
883
|
-
end: "start" | "end";
|
|
884
|
-
to: ComponentHandle;
|
|
885
|
-
toEnd: "start" | "end";
|
|
886
|
-
/** The other family's parameters, over the same reports. */
|
|
887
|
-
bindOther?: Record<string, string>;
|
|
888
|
-
} | {
|
|
889
|
-
kind: "span";
|
|
890
|
-
from: ComponentHandle;
|
|
891
|
-
to: ComponentHandle;
|
|
892
|
-
at?: "top" | "centre" | "base";
|
|
893
|
-
} | {
|
|
894
|
-
kind: "path";
|
|
895
|
-
from?: ComponentHandle;
|
|
896
|
-
points?: [number, number, number][];
|
|
897
|
-
closed?: boolean;
|
|
898
|
-
} | {
|
|
899
|
-
/** Apply recipe voids to the existing host without adding another host ID. */
|
|
900
|
-
kind: "cut";
|
|
901
|
-
to: "host";
|
|
902
|
-
bind?: never;
|
|
903
|
-
});
|
|
904
|
-
/** One parameter that follows something else. */
|
|
905
|
-
export interface PluginFamilyFollow {
|
|
906
|
-
key: string;
|
|
907
|
-
/** "relation": set by a placed relation — `from` is the relation's id. */
|
|
908
|
-
kind: "link" | "host" | "relation";
|
|
909
|
-
/** The source's id. */
|
|
910
|
-
from: string;
|
|
911
|
-
fromLabel: string;
|
|
912
|
-
/** The expression over the source's reports (for a host: the report name). */
|
|
913
|
-
expr: string;
|
|
914
467
|
}
|
|
915
468
|
/** What `create` reports. */
|
|
916
469
|
export interface PluginFamilyCreateResult {
|
|
@@ -922,36 +475,6 @@ export interface PluginFamilyCreateResult {
|
|
|
922
475
|
placed?: boolean;
|
|
923
476
|
/** Host guidance for the caller, e.g. that an instance was placed at the view centre. */
|
|
924
477
|
hint?: string;
|
|
925
|
-
/**
|
|
926
|
-
* What the user chose in the app's window: `"version"` (a new version of
|
|
927
|
-
* the saved family), `"new"` (a new family), `"cancelled"` (nothing saved).
|
|
928
|
-
* `"saved"` = no question was needed.
|
|
929
|
-
*/
|
|
930
|
-
decision?: "version" | "new" | "cancelled" | "saved";
|
|
931
|
-
/** The library name it was saved under. */
|
|
932
|
-
name?: string;
|
|
933
|
-
/** Placed copies in this project moved to the new version (the family's and updated parents'). */
|
|
934
|
-
movedCopies?: number;
|
|
935
|
-
/** What the moved copies lost because the new version no longer has it. */
|
|
936
|
-
dropped?: {
|
|
937
|
-
values: Array<{
|
|
938
|
-
copy: string;
|
|
939
|
-
key: string;
|
|
940
|
-
}>;
|
|
941
|
-
childValues: Array<{
|
|
942
|
-
copy: string;
|
|
943
|
-
path: string;
|
|
944
|
-
}>;
|
|
945
|
-
follows: Array<{
|
|
946
|
-
copy: string;
|
|
947
|
-
key: string;
|
|
948
|
-
kind: "link" | "relation";
|
|
949
|
-
}>;
|
|
950
|
-
};
|
|
951
|
-
/** Families nesting this one that the user chose to update, at their new versions. */
|
|
952
|
-
parentsUpdated?: PluginFamilyVersionRef[];
|
|
953
|
-
/** Families nesting this one that keep their version. */
|
|
954
|
-
parentsKept?: PluginFamilyVersionRef[];
|
|
955
478
|
error?: string;
|
|
956
479
|
}
|
|
957
480
|
/** What `delete` reports. */
|
|
@@ -974,30 +497,6 @@ export interface PluginFamilyDeleteResult {
|
|
|
974
497
|
export declare const PluginFamilyBundleSchema: z.ZodObject<{
|
|
975
498
|
root: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
976
499
|
deps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
977
|
-
network: z.ZodOptional<z.ZodObject<{
|
|
978
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
979
|
-
role: z.ZodEnum<{
|
|
980
|
-
pipe: "pipe";
|
|
981
|
-
duct: "duct";
|
|
982
|
-
wire: "wire";
|
|
983
|
-
cable: "cable";
|
|
984
|
-
conduit: "conduit";
|
|
985
|
-
cableDuct: "cableDuct";
|
|
986
|
-
cableTray: "cableTray";
|
|
987
|
-
connector: "connector";
|
|
988
|
-
equipment: "equipment";
|
|
989
|
-
}>;
|
|
990
|
-
lengthParameter: z.ZodOptional<z.ZodString>;
|
|
991
|
-
ports: z.ZodArray<z.ZodObject<{
|
|
992
|
-
id: z.ZodString;
|
|
993
|
-
position: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>;
|
|
994
|
-
direction: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>;
|
|
995
|
-
size: z.ZodString;
|
|
996
|
-
height: z.ZodOptional<z.ZodString>;
|
|
997
|
-
widthDirection: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>>;
|
|
998
|
-
systems: z.ZodArray<z.ZodString>;
|
|
999
|
-
}, z.core.$strict>>;
|
|
1000
|
-
}, z.core.$strict>>;
|
|
1001
500
|
}, z.core.$strip>;
|
|
1002
501
|
/**
|
|
1003
502
|
* Arguments for {@linkcode PluginDesignFamilyApi.prepare}.
|
|
@@ -1018,42 +517,7 @@ export declare const PluginFamilyBundleSchema: z.ZodObject<{
|
|
|
1018
517
|
* the viewport is not moved — and comes back as a PNG data URL in the result's
|
|
1019
518
|
* `snapshot.image`. Through the agent's `run_worker`, return the result and the
|
|
1020
519
|
* image reaches the model as an image.
|
|
1021
|
-
*
|
|
1022
|
-
* `focus` makes it a close-up: `{ parts: ["seat", "back", "slat@*"] }` frames
|
|
1023
|
-
* the joint where those groups meet (`*` matches any run of characters;
|
|
1024
|
-
* nested names are `a/b`), or their full bounds if they do not meet. A margin
|
|
1025
|
-
* of a quarter of their size (at least 50 mm) surrounds the joint.
|
|
1026
|
-
* `{ box: { min, max } }` frames a region in family space
|
|
1027
|
-
* (Snaptrude units, +Y up). Every other part is still drawn; the dimension line
|
|
1028
|
-
* then gives the framed region and the result says `closeUp: true`. A part
|
|
1029
|
-
* name that matches nothing fails the snapshot with a list of real names.
|
|
1030
520
|
*/
|
|
1031
|
-
export declare const PluginFamilySnapshotFocus: z.ZodUnion<readonly [z.ZodObject<{
|
|
1032
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1033
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1034
|
-
box: z.ZodObject<{
|
|
1035
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1036
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1037
|
-
}, z.core.$strip>;
|
|
1038
|
-
}, z.core.$strip>]>;
|
|
1039
|
-
export type PluginFamilySnapshotFocus = z.infer<typeof PluginFamilySnapshotFocus>;
|
|
1040
|
-
/** One close-up tile; omission of view uses the sheet's first view. */
|
|
1041
|
-
export declare const PluginFamilySnapshotCloseUp: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
1042
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1043
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1044
|
-
box: z.ZodObject<{
|
|
1045
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1046
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1047
|
-
}, z.core.$strip>;
|
|
1048
|
-
}, z.core.$strip>]>, z.ZodObject<{
|
|
1049
|
-
view: z.ZodOptional<z.ZodEnum<{
|
|
1050
|
-
top: "top";
|
|
1051
|
-
front: "front";
|
|
1052
|
-
right: "right";
|
|
1053
|
-
iso: "iso";
|
|
1054
|
-
}>>;
|
|
1055
|
-
}, z.core.$strip>>;
|
|
1056
|
-
export type PluginFamilySnapshotCloseUp = z.infer<typeof PluginFamilySnapshotCloseUp>;
|
|
1057
521
|
export declare const PluginFamilySnapshotOption: z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1058
522
|
views: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1059
523
|
top: "top";
|
|
@@ -1062,28 +526,6 @@ export declare const PluginFamilySnapshotOption: z.ZodUnion<readonly [z.ZodBoole
|
|
|
1062
526
|
iso: "iso";
|
|
1063
527
|
}>>>;
|
|
1064
528
|
tileSize: z.ZodOptional<z.ZodNumber>;
|
|
1065
|
-
focus: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
1066
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1067
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1068
|
-
box: z.ZodObject<{
|
|
1069
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1070
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1071
|
-
}, z.core.$strip>;
|
|
1072
|
-
}, z.core.$strip>]>, z.ZodArray<z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
1073
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1074
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1075
|
-
box: z.ZodObject<{
|
|
1076
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1077
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1078
|
-
}, z.core.$strip>;
|
|
1079
|
-
}, z.core.$strip>]>, z.ZodObject<{
|
|
1080
|
-
view: z.ZodOptional<z.ZodEnum<{
|
|
1081
|
-
top: "top";
|
|
1082
|
-
front: "front";
|
|
1083
|
-
right: "right";
|
|
1084
|
-
iso: "iso";
|
|
1085
|
-
}>>;
|
|
1086
|
-
}, z.core.$strip>>>]>>;
|
|
1087
529
|
}, z.core.$strip>]>;
|
|
1088
530
|
export type PluginFamilySnapshotOption = z.infer<typeof PluginFamilySnapshotOption>;
|
|
1089
531
|
/** The picture block on prepare / flex / getParameters results when `snapshot` was asked for. */
|
|
@@ -1092,18 +534,9 @@ export interface PluginFamilySnapshot {
|
|
|
1092
534
|
/** PNG data URL of the composed sheet. */
|
|
1093
535
|
image?: string;
|
|
1094
536
|
views?: ("iso" | "front" | "right" | "top")[];
|
|
1095
|
-
/** [width, height, depth] in
|
|
537
|
+
/** [width, height, depth] in Snaptrude units. */
|
|
1096
538
|
size?: [number, number, number];
|
|
1097
539
|
ms?: number;
|
|
1098
|
-
/** True when the sheet is a close-up (`focus`), not the whole family. */
|
|
1099
|
-
closeUp?: boolean;
|
|
1100
|
-
/** Per-tile results for a focus list. One invalid target does not discard other tiles. */
|
|
1101
|
-
closeUps?: Array<{
|
|
1102
|
-
view: "iso" | "front" | "right" | "top";
|
|
1103
|
-
label: string;
|
|
1104
|
-
size?: [number, number, number];
|
|
1105
|
-
error?: string;
|
|
1106
|
-
}>;
|
|
1107
540
|
/** Set when the picture could not be taken (e.g. the legacy renderer); the call itself still succeeded. */
|
|
1108
541
|
error?: string;
|
|
1109
542
|
}
|
|
@@ -1111,58 +544,10 @@ export declare const PluginDesignFamilyPrepareArgs: z.ZodObject<{
|
|
|
1111
544
|
bundle: z.ZodOptional<z.ZodObject<{
|
|
1112
545
|
root: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1113
546
|
deps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1114
|
-
network: z.ZodOptional<z.ZodObject<{
|
|
1115
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
1116
|
-
role: z.ZodEnum<{
|
|
1117
|
-
pipe: "pipe";
|
|
1118
|
-
duct: "duct";
|
|
1119
|
-
wire: "wire";
|
|
1120
|
-
cable: "cable";
|
|
1121
|
-
conduit: "conduit";
|
|
1122
|
-
cableDuct: "cableDuct";
|
|
1123
|
-
cableTray: "cableTray";
|
|
1124
|
-
connector: "connector";
|
|
1125
|
-
equipment: "equipment";
|
|
1126
|
-
}>;
|
|
1127
|
-
lengthParameter: z.ZodOptional<z.ZodString>;
|
|
1128
|
-
ports: z.ZodArray<z.ZodObject<{
|
|
1129
|
-
id: z.ZodString;
|
|
1130
|
-
position: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>;
|
|
1131
|
-
direction: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>;
|
|
1132
|
-
size: z.ZodString;
|
|
1133
|
-
height: z.ZodOptional<z.ZodString>;
|
|
1134
|
-
widthDirection: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>>;
|
|
1135
|
-
systems: z.ZodArray<z.ZodString>;
|
|
1136
|
-
}, z.core.$strict>>;
|
|
1137
|
-
}, z.core.$strict>>;
|
|
1138
547
|
}, z.core.$strip>>;
|
|
1139
548
|
spec: z.ZodOptional<z.ZodObject<{
|
|
1140
549
|
root: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1141
550
|
deps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1142
|
-
network: z.ZodOptional<z.ZodObject<{
|
|
1143
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
1144
|
-
role: z.ZodEnum<{
|
|
1145
|
-
pipe: "pipe";
|
|
1146
|
-
duct: "duct";
|
|
1147
|
-
wire: "wire";
|
|
1148
|
-
cable: "cable";
|
|
1149
|
-
conduit: "conduit";
|
|
1150
|
-
cableDuct: "cableDuct";
|
|
1151
|
-
cableTray: "cableTray";
|
|
1152
|
-
connector: "connector";
|
|
1153
|
-
equipment: "equipment";
|
|
1154
|
-
}>;
|
|
1155
|
-
lengthParameter: z.ZodOptional<z.ZodString>;
|
|
1156
|
-
ports: z.ZodArray<z.ZodObject<{
|
|
1157
|
-
id: z.ZodString;
|
|
1158
|
-
position: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>;
|
|
1159
|
-
direction: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>;
|
|
1160
|
-
size: z.ZodString;
|
|
1161
|
-
height: z.ZodOptional<z.ZodString>;
|
|
1162
|
-
widthDirection: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>>;
|
|
1163
|
-
systems: z.ZodArray<z.ZodString>;
|
|
1164
|
-
}, z.core.$strict>>;
|
|
1165
|
-
}, z.core.$strict>>;
|
|
1166
551
|
}, z.core.$strip>>;
|
|
1167
552
|
snapshot: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1168
553
|
views: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -1172,28 +557,6 @@ export declare const PluginDesignFamilyPrepareArgs: z.ZodObject<{
|
|
|
1172
557
|
iso: "iso";
|
|
1173
558
|
}>>>;
|
|
1174
559
|
tileSize: z.ZodOptional<z.ZodNumber>;
|
|
1175
|
-
focus: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
1176
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1177
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1178
|
-
box: z.ZodObject<{
|
|
1179
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1180
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1181
|
-
}, z.core.$strip>;
|
|
1182
|
-
}, z.core.$strip>]>, z.ZodArray<z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
1183
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1184
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1185
|
-
box: z.ZodObject<{
|
|
1186
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1187
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1188
|
-
}, z.core.$strip>;
|
|
1189
|
-
}, z.core.$strip>]>, z.ZodObject<{
|
|
1190
|
-
view: z.ZodOptional<z.ZodEnum<{
|
|
1191
|
-
top: "top";
|
|
1192
|
-
front: "front";
|
|
1193
|
-
right: "right";
|
|
1194
|
-
iso: "iso";
|
|
1195
|
-
}>>;
|
|
1196
|
-
}, z.core.$strip>>>]>>;
|
|
1197
560
|
}, z.core.$strip>]>>;
|
|
1198
561
|
}, z.core.$strip>;
|
|
1199
562
|
export type PluginDesignFamilyPrepareArgs = z.infer<typeof PluginDesignFamilyPrepareArgs>;
|
|
@@ -1202,11 +565,11 @@ export type PluginDesignFamilyPrepareArgs = z.infer<typeof PluginDesignFamilyPre
|
|
|
1202
565
|
*
|
|
1203
566
|
* | Property | Type | Description |
|
|
1204
567
|
* |---|---|---|
|
|
1205
|
-
* | `values` | `Record<string, number \| string>` |
|
|
568
|
+
* | `values` | `Record<string, number \| string>` | Parameter values to change (partial) |
|
|
1206
569
|
* | `snapshot` | {@linkcode PluginFamilySnapshotOption} | Also return a picture of the flexed family |
|
|
1207
570
|
*/
|
|
1208
571
|
export declare const PluginDesignFamilyFlexArgs: z.ZodObject<{
|
|
1209
|
-
values: z.
|
|
572
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
1210
573
|
snapshot: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1211
574
|
views: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1212
575
|
top: "top";
|
|
@@ -1215,110 +578,9 @@ export declare const PluginDesignFamilyFlexArgs: z.ZodObject<{
|
|
|
1215
578
|
iso: "iso";
|
|
1216
579
|
}>>>;
|
|
1217
580
|
tileSize: z.ZodOptional<z.ZodNumber>;
|
|
1218
|
-
focus: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
1219
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1220
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1221
|
-
box: z.ZodObject<{
|
|
1222
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1223
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1224
|
-
}, z.core.$strip>;
|
|
1225
|
-
}, z.core.$strip>]>, z.ZodArray<z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
1226
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1227
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1228
|
-
box: z.ZodObject<{
|
|
1229
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1230
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1231
|
-
}, z.core.$strip>;
|
|
1232
|
-
}, z.core.$strip>]>, z.ZodObject<{
|
|
1233
|
-
view: z.ZodOptional<z.ZodEnum<{
|
|
1234
|
-
top: "top";
|
|
1235
|
-
front: "front";
|
|
1236
|
-
right: "right";
|
|
1237
|
-
iso: "iso";
|
|
1238
|
-
}>>;
|
|
1239
|
-
}, z.core.$strip>>>]>>;
|
|
1240
581
|
}, z.core.$strip>]>>;
|
|
1241
582
|
}, z.core.$strip>;
|
|
1242
583
|
export type PluginDesignFamilyFlexArgs = z.infer<typeof PluginDesignFamilyFlexArgs>;
|
|
1243
|
-
/**
|
|
1244
|
-
* Arguments for {@linkcode PluginDesignFamilyApi.get}. All optional — no
|
|
1245
|
-
* arguments returns the prepared draft.
|
|
1246
|
-
*
|
|
1247
|
-
* | Property | Type | Description |
|
|
1248
|
-
* |---|---|---|
|
|
1249
|
-
* | `id` | `string` | A saved family to open for editing, from {@linkcode PluginDesignFamilyApi.list} |
|
|
1250
|
-
* | `version` | `number` | Exact version to open; defaults to the newest |
|
|
1251
|
-
* | `component` | {@linkcode ComponentHandle} | Open the family of this placed copy, at its version |
|
|
1252
|
-
*/
|
|
1253
|
-
export declare const PluginDesignFamilyGetArgs: z.ZodObject<{
|
|
1254
|
-
id: z.ZodOptional<z.ZodString>;
|
|
1255
|
-
version: z.ZodOptional<z.ZodNumber>;
|
|
1256
|
-
component: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
1257
|
-
}, z.core.$strip>;
|
|
1258
|
-
export type PluginDesignFamilyGetArgs = z.infer<typeof PluginDesignFamilyGetArgs>;
|
|
1259
|
-
/**
|
|
1260
|
-
* Arguments for {@linkcode PluginDesignFamilyApi.getExamples}.
|
|
1261
|
-
*
|
|
1262
|
-
* | Property | Type | Description |
|
|
1263
|
-
* |---|---|---|
|
|
1264
|
-
* | `id` | `string` | One example's id — returns its bundle |
|
|
1265
|
-
* | `discipline` | `string` | List only this discipline: architecture, structure, mep, furniture |
|
|
1266
|
-
* | `tag` | `string` | List only examples teaching this pattern (e.g. "path", "union") |
|
|
1267
|
-
*/
|
|
1268
|
-
export declare const PluginDesignFamilyGetExamplesArgs: z.ZodObject<{
|
|
1269
|
-
id: z.ZodOptional<z.ZodString>;
|
|
1270
|
-
discipline: z.ZodOptional<z.ZodEnum<{
|
|
1271
|
-
architecture: "architecture";
|
|
1272
|
-
structure: "structure";
|
|
1273
|
-
mep: "mep";
|
|
1274
|
-
furniture: "furniture";
|
|
1275
|
-
}>>;
|
|
1276
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
1277
|
-
}, z.core.$strip>;
|
|
1278
|
-
export type PluginDesignFamilyGetExamplesArgs = z.infer<typeof PluginDesignFamilyGetExamplesArgs>;
|
|
1279
|
-
/**
|
|
1280
|
-
* Arguments for {@linkcode PluginDesignFamilyApi.getTemplate}.
|
|
1281
|
-
* `kind` selects the opening contract. `subType` is a nonempty type token;
|
|
1282
|
-
* omission selects singleDoor / fixedWindow. Unsupported tokens return the
|
|
1283
|
-
* default template with guidance rather than preventing custom subtype authoring.
|
|
1284
|
-
*/
|
|
1285
|
-
export declare const PluginDesignFamilyGetTemplateArgs: z.ZodObject<{
|
|
1286
|
-
kind: z.ZodEnum<{
|
|
1287
|
-
door: "door";
|
|
1288
|
-
window: "window";
|
|
1289
|
-
}>;
|
|
1290
|
-
subType: z.ZodOptional<z.ZodString>;
|
|
1291
|
-
}, z.core.$strip>;
|
|
1292
|
-
export type PluginDesignFamilyGetTemplateArgs = z.infer<typeof PluginDesignFamilyGetTemplateArgs>;
|
|
1293
|
-
/**
|
|
1294
|
-
* Maps opening dimensions to authored length parameter KEYS, not values.
|
|
1295
|
-
* Width and height describe the wall hole; sill measures from the wall base
|
|
1296
|
-
* to the hole bottom (windows). Wall thickness follows the host wall.
|
|
1297
|
-
* The recipe and family parameter APIs use Snaptrude units (1 SU = 254 mm).
|
|
1298
|
-
*/
|
|
1299
|
-
export interface PluginFamilyOpeningContract {
|
|
1300
|
-
kind: "door" | "window";
|
|
1301
|
-
width: string;
|
|
1302
|
-
height: string;
|
|
1303
|
-
sill?: string;
|
|
1304
|
-
wallThickness?: string;
|
|
1305
|
-
}
|
|
1306
|
-
/** Starter recipe metadata returned by `getTemplate`; instances are ParametricComponents. */
|
|
1307
|
-
export interface PluginFamilyTemplateResult {
|
|
1308
|
-
/** Validated recipe bundle: edit its style while preserving the contract. */
|
|
1309
|
-
bundle: PluginFamilyBundle;
|
|
1310
|
-
contract: PluginFamilyOpeningContract;
|
|
1311
|
-
/** Actual template subtype, including when an unsupported token used the default. */
|
|
1312
|
-
subType: string;
|
|
1313
|
-
/** Authoring rules and any note about an unsupported requested subtype. */
|
|
1314
|
-
guidance: string[];
|
|
1315
|
-
/** Available starter templates for the requested kind. */
|
|
1316
|
-
available: Array<{
|
|
1317
|
-
subType: string;
|
|
1318
|
-
label: string;
|
|
1319
|
-
teaches: string[];
|
|
1320
|
-
}>;
|
|
1321
|
-
}
|
|
1322
584
|
/**
|
|
1323
585
|
* Arguments for {@linkcode PluginDesignFamilyApi.create}.
|
|
1324
586
|
*
|
|
@@ -1352,7 +614,7 @@ export type PluginDesignFamilyDeleteArgs = z.infer<typeof PluginDesignFamilyDele
|
|
|
1352
614
|
* |---|---|---|
|
|
1353
615
|
* | `id` | `string` | Family to place, from {@linkcode PluginDesignFamilyApi.list}. Omit to place the prepared draft |
|
|
1354
616
|
* | `version` | `number` | Exact version; defaults to the newest known |
|
|
1355
|
-
* | `position` | `
|
|
617
|
+
* | `position` | `{ x, y, z }` | Place HERE, without user interaction. Omit to arm the cursor instead |
|
|
1356
618
|
* | `rotation` | `number` | Yaw in degrees about +Y. Only with `position` |
|
|
1357
619
|
* | `values` | `Record<string, number \| string>` | Parameter values for THIS instance |
|
|
1358
620
|
* | `storey` | `number` | Storey to place on; defaults to the active one |
|
|
@@ -1360,15 +622,14 @@ export type PluginDesignFamilyDeleteArgs = z.infer<typeof PluginDesignFamilyDele
|
|
|
1360
622
|
export declare const PluginDesignFamilyPlaceArgs: z.ZodObject<{
|
|
1361
623
|
id: z.ZodOptional<z.ZodString>;
|
|
1362
624
|
version: z.ZodOptional<z.ZodNumber>;
|
|
1363
|
-
position: z.ZodOptional<z.
|
|
625
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
1364
626
|
x: z.ZodNumber;
|
|
1365
627
|
y: z.ZodNumber;
|
|
1366
628
|
z: z.ZodNumber;
|
|
1367
|
-
}, z.core.$strip
|
|
629
|
+
}, z.core.$strip>>;
|
|
1368
630
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1369
631
|
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
1370
632
|
storey: z.ZodOptional<z.ZodNumber>;
|
|
1371
|
-
host: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
1372
633
|
}, z.core.$strip>;
|
|
1373
634
|
export type PluginDesignFamilyPlaceArgs = z.infer<typeof PluginDesignFamilyPlaceArgs>;
|
|
1374
635
|
/**
|
|
@@ -1388,28 +649,6 @@ export declare const PluginDesignFamilyGetParametersArgs: z.ZodObject<{
|
|
|
1388
649
|
iso: "iso";
|
|
1389
650
|
}>>>;
|
|
1390
651
|
tileSize: z.ZodOptional<z.ZodNumber>;
|
|
1391
|
-
focus: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
1392
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1393
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1394
|
-
box: z.ZodObject<{
|
|
1395
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1396
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1397
|
-
}, z.core.$strip>;
|
|
1398
|
-
}, z.core.$strip>]>, z.ZodArray<z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
1399
|
-
parts: z.ZodArray<z.ZodString>;
|
|
1400
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1401
|
-
box: z.ZodObject<{
|
|
1402
|
-
min: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1403
|
-
max: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
1404
|
-
}, z.core.$strip>;
|
|
1405
|
-
}, z.core.$strip>]>, z.ZodObject<{
|
|
1406
|
-
view: z.ZodOptional<z.ZodEnum<{
|
|
1407
|
-
top: "top";
|
|
1408
|
-
front: "front";
|
|
1409
|
-
right: "right";
|
|
1410
|
-
iso: "iso";
|
|
1411
|
-
}>>;
|
|
1412
|
-
}, z.core.$strip>>>]>>;
|
|
1413
652
|
}, z.core.$strip>]>>;
|
|
1414
653
|
}, z.core.$strip>;
|
|
1415
654
|
export type PluginDesignFamilyGetParametersArgs = z.infer<typeof PluginDesignFamilyGetParametersArgs>;
|
|
@@ -1423,16 +662,7 @@ export type PluginDesignFamilyGetParametersArgs = z.infer<typeof PluginDesignFam
|
|
|
1423
662
|
*/
|
|
1424
663
|
export declare const PluginDesignFamilySetParametersArgs: z.ZodObject<{
|
|
1425
664
|
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
1426
|
-
values: z.
|
|
1427
|
-
children: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>>;
|
|
1428
|
-
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
1429
|
-
from: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
1430
|
-
expr: z.ZodString;
|
|
1431
|
-
}, z.core.$strip>, z.ZodNull]>>>;
|
|
1432
|
-
relations: z.ZodOptional<z.ZodObject<{
|
|
1433
|
-
add: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1434
|
-
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1435
|
-
}, z.core.$strip>>;
|
|
665
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
1436
666
|
}, z.core.$strip>;
|
|
1437
667
|
export type PluginDesignFamilySetParametersArgs = z.infer<typeof PluginDesignFamilySetParametersArgs>;
|
|
1438
668
|
//# sourceMappingURL=family.d.ts.map
|