@snaptrude/plugin-core 0.0.0-dev-20260827135706 → 0.0.0-dev-20260907135026
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/api-manifest.json +177 -15
- package/dist/api/core/geom/create/index.d.ts +559 -86
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +50 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +58 -35
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/edge.d.ts +2 -2
- package/dist/api/core/geom/query/face.d.ts +45 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +5 -5
- package/dist/api/core/geom/update/profile.d.ts +1 -1
- package/dist/api/design/family.d.ts +152 -8
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +27 -1
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +54 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -5
- package/dist/api/design/update/index.d.ts +87 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +2 -2
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +5 -4
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/api/program/spreadsheet.d.ts +4 -4
- package/dist/handles.d.ts +12 -3
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +3044 -2707
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3007 -2707
- package/dist/index.js.map +1 -1
- package/dist/massParameters.d.ts +319 -0
- package/dist/massParameters.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/api/core/geom/create/index.ts +588 -84
- package/src/api/core/geom/query/brep.ts +51 -0
- package/src/api/core/geom/query/curve.ts +25 -2
- package/src/api/core/geom/query/edge.ts +2 -2
- package/src/api/core/geom/query/face.ts +49 -0
- package/src/api/design/family.ts +164 -8
- package/src/api/design/query/geometry/index.ts +29 -0
- package/src/api/design/query/index.ts +52 -0
- package/src/api/design/update/index.ts +94 -0
- package/src/handles.ts +15 -3
- package/src/index.ts +1 -0
- package/src/massParameters.ts +472 -0
- package/test/massParameters.test.mjs +500 -0
|
@@ -120,7 +120,7 @@ export declare abstract class PluginGeomUpdateCurveApi {
|
|
|
120
120
|
* | `fromStart` | `boolean` | Extend from the start end when `true`, otherwise from the end |
|
|
121
121
|
*/
|
|
122
122
|
export declare const PluginGeomUpdateCurveExtendArgs: z.ZodObject<{
|
|
123
|
-
curve: z.
|
|
123
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
124
124
|
distance: z.ZodNumber;
|
|
125
125
|
fromStart: z.ZodBoolean;
|
|
126
126
|
}, z.core.$strip>;
|
|
@@ -134,7 +134,7 @@ export type PluginGeomUpdateCurveExtendArgs = z.infer<typeof PluginGeomUpdateCur
|
|
|
134
134
|
* | `point` | {@linkcode Vec3Handle} | Point on the curve to split at |
|
|
135
135
|
*/
|
|
136
136
|
export declare const PluginGeomUpdateCurveSplitArgs: z.ZodObject<{
|
|
137
|
-
curve: z.
|
|
137
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
138
138
|
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
139
139
|
}, z.core.$strip>;
|
|
140
140
|
export type PluginGeomUpdateCurveSplitArgs = z.infer<typeof PluginGeomUpdateCurveSplitArgs>;
|
|
@@ -148,7 +148,7 @@ export type PluginGeomUpdateCurveSplitArgs = z.infer<typeof PluginGeomUpdateCurv
|
|
|
148
148
|
* | `endParam` | `number` | End parameter of the portion to keep |
|
|
149
149
|
*/
|
|
150
150
|
export declare const PluginGeomUpdateCurveTrimArgs: z.ZodObject<{
|
|
151
|
-
curve: z.
|
|
151
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
152
152
|
startParam: z.ZodNumber;
|
|
153
153
|
endParam: z.ZodNumber;
|
|
154
154
|
}, z.core.$strip>;
|
|
@@ -162,7 +162,7 @@ export type PluginGeomUpdateCurveTrimArgs = z.infer<typeof PluginGeomUpdateCurve
|
|
|
162
162
|
* | `vector` | {@linkcode Vec3Handle} | Translation vector to offset the curve by |
|
|
163
163
|
*/
|
|
164
164
|
export declare const PluginGeomUpdateCurveOffsetArgs: z.ZodObject<{
|
|
165
|
-
curve: z.
|
|
165
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
166
166
|
vector: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
167
167
|
}, z.core.$strip>;
|
|
168
168
|
export type PluginGeomUpdateCurveOffsetArgs = z.infer<typeof PluginGeomUpdateCurveOffsetArgs>;
|
|
@@ -174,7 +174,7 @@ export type PluginGeomUpdateCurveOffsetArgs = z.infer<typeof PluginGeomUpdateCur
|
|
|
174
174
|
* | `curve` | {@linkcode CurveHandle} | The curve to reverse |
|
|
175
175
|
*/
|
|
176
176
|
export declare const PluginGeomUpdateCurveReverseArgs: z.ZodObject<{
|
|
177
|
-
curve: z.
|
|
177
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
178
178
|
}, z.core.$strip>;
|
|
179
179
|
export type PluginGeomUpdateCurveReverseArgs = z.infer<typeof PluginGeomUpdateCurveReverseArgs>;
|
|
180
180
|
//# sourceMappingURL=curve.d.ts.map
|
|
@@ -281,7 +281,7 @@ export type PluginGeomUpdateProfileMirrorArgs = z.infer<typeof PluginGeomUpdateP
|
|
|
281
281
|
*/
|
|
282
282
|
export declare const PluginGeomUpdateProfileAddArgs: z.ZodObject<{
|
|
283
283
|
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
|
|
284
|
-
curve: z.
|
|
284
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
285
285
|
position: z.ZodOptional<z.ZodEnum<{
|
|
286
286
|
start: "start";
|
|
287
287
|
end: "end";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../types";
|
|
3
|
+
import { ComponentHandle } from "../../handles";
|
|
3
4
|
/**
|
|
4
5
|
* `snaptrude.design.family.*` — author NATIVE parametric families from a JSON spec.
|
|
5
6
|
*
|
|
@@ -131,23 +132,88 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
131
132
|
*/
|
|
132
133
|
abstract list(): PluginApiReturn<PluginFamilySummary[]>;
|
|
133
134
|
/**
|
|
134
|
-
*
|
|
135
|
+
* Put a family into the model — either the prepared draft or any family from
|
|
136
|
+
* {@linkcode PluginDesignFamilyApi.list}.
|
|
135
137
|
*
|
|
136
|
-
*
|
|
137
|
-
* with a ghost on the cursor; the user clicks in the canvas to drop it, the
|
|
138
|
-
* same as for any other family. Tell the user to click.
|
|
138
|
+
* Two modes, chosen by whether you pass `position`:
|
|
139
139
|
*
|
|
140
|
-
*
|
|
140
|
+
* **With `position`** the component is created there and then, undoably. Use
|
|
141
|
+
* this when you know where it goes — you were given coordinates, or you are
|
|
142
|
+
* copying an existing instance. The returned `component` handle works with
|
|
143
|
+
* `design.transform.move` / `.rotate` and with
|
|
144
|
+
* {@linkcode PluginDesignFamilyApi.setParameters}.
|
|
145
|
+
*
|
|
146
|
+
* **Without `position`** it arms placement mode with a ghost on the cursor
|
|
147
|
+
* and returns immediately — no geometry yet. The USER clicks to drop it, so
|
|
148
|
+
* tell them to. Prefer this when the location is a judgement call.
|
|
149
|
+
*
|
|
150
|
+
* To COPY a placed component, place its family again at the new position with
|
|
151
|
+
* the same `values` — there is no separate copy call.
|
|
152
|
+
*
|
|
153
|
+
* @param args Which family, where, and at what parameter values
|
|
154
|
+
* @returns What was placed; `component` is present only in positioned mode
|
|
141
155
|
*
|
|
142
156
|
* @examplePrompt Place it in the model
|
|
143
|
-
* @examplePrompt
|
|
157
|
+
* @examplePrompt Put a louvre screen at the origin
|
|
158
|
+
* @examplePrompt Copy that table two metres to the right
|
|
144
159
|
*
|
|
145
160
|
* # Example
|
|
146
161
|
* ```ts
|
|
162
|
+
* // positioned — geometry exists when this resolves
|
|
163
|
+
* const { component } = await snaptrude.design.family.place({
|
|
164
|
+
* id: "revit:gypsum-stud-partition~90ad72",
|
|
165
|
+
* position: { x: 0, y: 0, z: 0 },
|
|
166
|
+
* rotation: 90,
|
|
167
|
+
* })
|
|
168
|
+
* await snaptrude.design.transform.move([component], { x: 2, y: 0, z: 0 })
|
|
169
|
+
*
|
|
170
|
+
* // interactive — the user clicks
|
|
147
171
|
* await snaptrude.design.family.place()
|
|
148
172
|
* ```
|
|
149
173
|
*/
|
|
150
|
-
abstract place(): PluginApiReturn<PluginFamilyPlaceResult>;
|
|
174
|
+
abstract place(args?: PluginDesignFamilyPlaceArgs): PluginApiReturn<PluginFamilyPlaceResult>;
|
|
175
|
+
/**
|
|
176
|
+
* Read a placed component's current parameter values and its sheet.
|
|
177
|
+
*
|
|
178
|
+
* Use before {@linkcode PluginDesignFamilyApi.setParameters} so you change
|
|
179
|
+
* what is actually there: parameter KEYS are the family's own, not the
|
|
180
|
+
* label the user says, and a Revit-imported family carries parameters that
|
|
181
|
+
* do not drive geometry at all.
|
|
182
|
+
*
|
|
183
|
+
* @param args The component to read
|
|
184
|
+
* @returns Its definition, current values, and the parameter sheet
|
|
185
|
+
*
|
|
186
|
+
* @examplePrompt What size is that table?
|
|
187
|
+
* @examplePrompt Show me the parameters on this partition
|
|
188
|
+
*
|
|
189
|
+
* # Example
|
|
190
|
+
* ```ts
|
|
191
|
+
* const { values, parameters } = await snaptrude.design.family.getParameters({ component })
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
abstract getParameters(args: PluginDesignFamilyGetParametersArgs): PluginApiReturn<PluginFamilyInstanceParameters | null>;
|
|
195
|
+
/**
|
|
196
|
+
* Change a placed component's parameters and rebuild its geometry in place.
|
|
197
|
+
*
|
|
198
|
+
* Partial: pass only what changes. The component keeps its position,
|
|
199
|
+
* rotation and identity — this is an edit, not a replace, and it is undoable.
|
|
200
|
+
*
|
|
201
|
+
* Only parameters with `drivesGeometry` actually move the mesh. Setting one
|
|
202
|
+
* that does not is accepted and stored (it round-trips to Revit) but nothing
|
|
203
|
+
* visible happens — say so rather than claiming a change the user cannot see.
|
|
204
|
+
*
|
|
205
|
+
* @param args The component and the values to change
|
|
206
|
+
* @returns The values now in effect
|
|
207
|
+
*
|
|
208
|
+
* @examplePrompt Make that table seat 8
|
|
209
|
+
* @examplePrompt Change the stud spacing to 400
|
|
210
|
+
*
|
|
211
|
+
* # Example
|
|
212
|
+
* ```ts
|
|
213
|
+
* await snaptrude.design.family.setParameters({ component, values: { seats: 8 } })
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
216
|
+
abstract setParameters(args: PluginDesignFamilySetParametersArgs): PluginApiReturn<PluginFamilyInstanceParameters>;
|
|
151
217
|
/**
|
|
152
218
|
* Commit the prepared bundle to the project's parametric-definition library,
|
|
153
219
|
* so it survives the session and appears in the Families panel.
|
|
@@ -265,7 +331,7 @@ export interface PluginFamilyFlexResult {
|
|
|
265
331
|
takeoff?: Record<string, number | string>;
|
|
266
332
|
error?: string;
|
|
267
333
|
}
|
|
268
|
-
/** One
|
|
334
|
+
/** One family available to place — from the session registry or the catalog. */
|
|
269
335
|
export interface PluginFamilySummary {
|
|
270
336
|
id: string;
|
|
271
337
|
version: number;
|
|
@@ -273,14 +339,43 @@ export interface PluginFamilySummary {
|
|
|
273
339
|
category?: string;
|
|
274
340
|
/** Number of rows on the family's parameter sheet. */
|
|
275
341
|
parameters: number;
|
|
342
|
+
/**
|
|
343
|
+
* Where the family came from, which decides how far you can edit it.
|
|
344
|
+
*
|
|
345
|
+
* `"native"` — authored from a JSON spec through this API. Its recipe is
|
|
346
|
+
* data, so every parameter genuinely re-runs the geometry.
|
|
347
|
+
*
|
|
348
|
+
* `"revit"` — imported from a Revit family. Parameters exist and are
|
|
349
|
+
* editable, but only those the importer could bind to geometry actually
|
|
350
|
+
* change the mesh; the rest are carried for round-tripping. Check
|
|
351
|
+
* `drivesGeometry` on the parameter before promising the user a change.
|
|
352
|
+
*/
|
|
353
|
+
kind: "native" | "revit";
|
|
276
354
|
}
|
|
277
355
|
/** What `place` reports. */
|
|
278
356
|
export interface PluginFamilyPlaceResult {
|
|
279
357
|
ok: boolean;
|
|
280
358
|
familyId?: string;
|
|
281
359
|
version?: number;
|
|
360
|
+
/**
|
|
361
|
+
* The created component — present ONLY when `position` was given. In
|
|
362
|
+
* interactive mode nothing exists yet, so there is nothing to hand back;
|
|
363
|
+
* the user has not clicked.
|
|
364
|
+
*/
|
|
365
|
+
component?: ComponentHandle;
|
|
282
366
|
error?: string;
|
|
283
367
|
}
|
|
368
|
+
/** A placed component's parameter state, from `getParameters` / `setParameters`. */
|
|
369
|
+
export interface PluginFamilyInstanceParameters {
|
|
370
|
+
/** The definition this instance is pinned to. */
|
|
371
|
+
familyId: string;
|
|
372
|
+
version: number;
|
|
373
|
+
label: string;
|
|
374
|
+
/** Current values, keyed by parameter key. */
|
|
375
|
+
values: Record<string, number | string>;
|
|
376
|
+
/** The sheet: what each key means, its bounds, and whether it moves geometry. */
|
|
377
|
+
parameters: PluginFamilyParameter[];
|
|
378
|
+
}
|
|
284
379
|
/** What `create` reports. */
|
|
285
380
|
export interface PluginFamilyCreateResult {
|
|
286
381
|
ok: boolean;
|
|
@@ -346,4 +441,53 @@ export declare const PluginDesignFamilyCreateArgs: z.ZodObject<{
|
|
|
346
441
|
teamId: z.ZodOptional<z.ZodString>;
|
|
347
442
|
}, z.core.$strip>;
|
|
348
443
|
export type PluginDesignFamilyCreateArgs = z.infer<typeof PluginDesignFamilyCreateArgs>;
|
|
444
|
+
/**
|
|
445
|
+
* Arguments for {@linkcode PluginDesignFamilyApi.place}.
|
|
446
|
+
*
|
|
447
|
+
* | Property | Type | Description |
|
|
448
|
+
* |---|---|---|
|
|
449
|
+
* | `id` | `string` | Family to place, from {@linkcode PluginDesignFamilyApi.list}. Omit to place the prepared draft |
|
|
450
|
+
* | `version` | `number` | Exact version; defaults to the newest known |
|
|
451
|
+
* | `position` | `{ x, y, z }` | Place HERE, without user interaction. Omit to arm the cursor instead |
|
|
452
|
+
* | `rotation` | `number` | Yaw in degrees about +Y. Only with `position` |
|
|
453
|
+
* | `values` | `Record<string, number \| string>` | Parameter values for THIS instance |
|
|
454
|
+
* | `storey` | `number` | Storey to place on; defaults to the active one |
|
|
455
|
+
*/
|
|
456
|
+
export declare const PluginDesignFamilyPlaceArgs: z.ZodObject<{
|
|
457
|
+
id: z.ZodOptional<z.ZodString>;
|
|
458
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
460
|
+
x: z.ZodNumber;
|
|
461
|
+
y: z.ZodNumber;
|
|
462
|
+
z: z.ZodNumber;
|
|
463
|
+
}, z.core.$strip>>;
|
|
464
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
465
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>>;
|
|
466
|
+
storey: z.ZodOptional<z.ZodNumber>;
|
|
467
|
+
}, z.core.$strip>;
|
|
468
|
+
export type PluginDesignFamilyPlaceArgs = z.infer<typeof PluginDesignFamilyPlaceArgs>;
|
|
469
|
+
/**
|
|
470
|
+
* Arguments for {@linkcode PluginDesignFamilyApi.getParameters}.
|
|
471
|
+
*
|
|
472
|
+
* | Property | Type | Description |
|
|
473
|
+
* |---|---|---|
|
|
474
|
+
* | `component` | {@linkcode ComponentHandle} | A placed parametric component |
|
|
475
|
+
*/
|
|
476
|
+
export declare const PluginDesignFamilyGetParametersArgs: z.ZodObject<{
|
|
477
|
+
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
478
|
+
}, z.core.$strip>;
|
|
479
|
+
export type PluginDesignFamilyGetParametersArgs = z.infer<typeof PluginDesignFamilyGetParametersArgs>;
|
|
480
|
+
/**
|
|
481
|
+
* Arguments for {@linkcode PluginDesignFamilyApi.setParameters}.
|
|
482
|
+
*
|
|
483
|
+
* | Property | Type | Description |
|
|
484
|
+
* |---|---|---|
|
|
485
|
+
* | `component` | {@linkcode ComponentHandle} | A placed parametric component |
|
|
486
|
+
* | `values` | `Record<string, number \| string>` | Values to change (partial) |
|
|
487
|
+
*/
|
|
488
|
+
export declare const PluginDesignFamilySetParametersArgs: z.ZodObject<{
|
|
489
|
+
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
490
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
491
|
+
}, z.core.$strip>;
|
|
492
|
+
export type PluginDesignFamilySetParametersArgs = z.infer<typeof PluginDesignFamilySetParametersArgs>;
|
|
349
493
|
//# sourceMappingURL=family.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family.d.ts","sourceRoot":"","sources":["../../../src/api/design/family.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"family.d.ts","sourceRoot":"","sources":["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;;;;;;;iBAGxC,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEzF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;iBAErC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEvF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;iBAOtC,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC;;iBAE9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC;;;iBAG9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA"}
|
|
@@ -27,10 +27,25 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
27
27
|
* scene entity, as a reusable {@linkcode BrepHandle} for the
|
|
28
28
|
* `core.geom.query.brep.*` reads.
|
|
29
29
|
*
|
|
30
|
+
* **Frame.** By default the brep comes back in the component's own LOCAL frame
|
|
31
|
+
* (its vertices are relative to the mesh origin, exactly as stored) — the
|
|
32
|
+
* behaviour every 0.9.x caller relies on. Pass `{ frame: "world" }` to get the
|
|
33
|
+
* same solid placed where it sits in the scene (world coordinates, like
|
|
34
|
+
* `getBottomContour` / `getTriangulatedMeshes` and every `design.query.measure`
|
|
35
|
+
* read). Use `"world"` whenever the handle will be COMBINED with other scene
|
|
36
|
+
* geometry or committed back beside its source: booleans between two scene
|
|
37
|
+
* masses, `brepFromFillet` / `brepFromShell` / `brepFromOffset` /
|
|
38
|
+
* `brepFromChamfer` on a scene mass followed by `massFromBrep`, or comparing
|
|
39
|
+
* its vertices with a bounding box. A world-frame handle from a parametrically
|
|
40
|
+
* live mass also carries that mass's recipe, so an operation result keeps an
|
|
41
|
+
* editable record.
|
|
42
|
+
*
|
|
30
43
|
* @param component - The scene component to read
|
|
44
|
+
* @param options - `frame`: `"local"` (default, mesh-local coordinates) or `"world"` (scene coordinates)
|
|
31
45
|
* @returns The brep as a {@linkcode BrepHandle}, or `null` if the component has no brep geometry
|
|
32
46
|
*
|
|
33
47
|
* @examplePrompt Get the 3D solid geometry of the selected wall
|
|
48
|
+
* @examplePrompt Round the top rim of this column and put it back where it is
|
|
34
49
|
* @examplePrompt How many faces does this mass have?
|
|
35
50
|
* @examplePrompt Inspect the mesh of this slab so I can look at its faces and edges
|
|
36
51
|
* @examplePrompt Read the vertices of the selected column's geometry
|
|
@@ -41,9 +56,14 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
41
56
|
* if (brep) {
|
|
42
57
|
* const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
|
|
43
58
|
* }
|
|
59
|
+
*
|
|
60
|
+
* // Operate on a scene mass and commit the result where the mass sits:
|
|
61
|
+
* const placed = await snaptrude.design.query.geometry.getBrep(mass, { frame: "world" })
|
|
62
|
+
* const rounded = await snaptrude.core.geom.create.brepFromFillet(placed, edges, 0.2)
|
|
63
|
+
* await snaptrude.design.create.massFromBrep(rounded, "Rounded")
|
|
44
64
|
* ```
|
|
45
65
|
*/
|
|
46
|
-
abstract getBrep(component: ComponentHandle): PluginApiReturn<BrepHandle | null>;
|
|
66
|
+
abstract getBrep(component: ComponentHandle, options?: PluginDesignQueryGeometryGetBrepOptions): PluginApiReturn<BrepHandle | null>;
|
|
47
67
|
/**
|
|
48
68
|
* Get the **bottom-face contour** of a component — the footprint outline (outer
|
|
49
69
|
* profile + holes) of its lowest horizontal face, as a reusable
|
|
@@ -169,8 +189,14 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
169
189
|
* |---|---|---|
|
|
170
190
|
* | `component` | {@linkcode ComponentHandle} | The scene component to read |
|
|
171
191
|
*/
|
|
192
|
+
/** Options for {@linkcode PluginDesignQueryGeometryApi.getBrep}: `frame` defaults to `"local"`. */
|
|
193
|
+
export type PluginDesignQueryGeometryGetBrepOptions = {
|
|
194
|
+
frame?: "local" | "world";
|
|
195
|
+
};
|
|
196
|
+
export declare const PluginDesignQueryGeometryGetBrepOptions: z.ZodType<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions>;
|
|
172
197
|
export declare const PluginDesignQueryGeometryGetBrepArgs: z.ZodObject<{
|
|
173
198
|
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
199
|
+
options: z.ZodOptional<z.ZodType<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions, z.core.$ZodTypeInternals<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions>>>;
|
|
174
200
|
}, z.core.$strip>;
|
|
175
201
|
export type PluginDesignQueryGeometryGetBrepArgs = z.infer<typeof PluginDesignQueryGeometryGetBrepArgs>;
|
|
176
202
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/design/query/geometry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,4BAA4B;;IAGhD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AM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,oCAAoC,CAC5C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,6CAA6C;;iBAExD,CAAA;AAEF,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CACjE,OAAO,6CAA6C,CACrD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C;;iBAErD,CAAA;AAEF,MAAM,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAC9D,OAAO,0CAA0C,CAClD,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;;;;iBAMjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,kDAAkD;;;;;;iBAQ7D,CAAA;AAEF,MAAM,MAAM,kDAAkD,GAAG,CAAC,CAAC,KAAK,CACtE,OAAO,kDAAkD,CAC1D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oDAAoD;;;;;;;;iBAE/D,CAAA;AAEF,MAAM,MAAM,oDAAoD,GAAG,CAAC,CAAC,KAAK,CACxE,OAAO,oDAAoD,CAC5D,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../types";
|
|
3
3
|
import { ComponentHandle, BBoxComponents } from "../../../handles";
|
|
4
|
+
import type { MassParametersRecord } from "../../../massParameters";
|
|
4
5
|
import { PluginDesignQueryGeometryApi } from "./geometry";
|
|
5
6
|
import { PluginDesignQuerySpacesApi } from "./spaces";
|
|
6
7
|
import { PluginDesignQueryReferenceLinesApi } from "./referenceLines";
|
|
@@ -29,6 +30,7 @@ import { PluginDesignQueryReferenceLinesApi } from "./referenceLines";
|
|
|
29
30
|
* | `"curtainWall"` | Parametric curtain wall |
|
|
30
31
|
* | `"mullion"` | Curtain-wall mullion |
|
|
31
32
|
* | `"panel"` | Curtain-wall panel |
|
|
33
|
+
* | `"parametricComponent"` | A placed parametric family instance (native or Revit-imported). Its geometry is rebuilt from `design.family` parameters, so read and drive it through `design.family.getParameters` / `setParameters` rather than editing its meshes. |
|
|
32
34
|
*/
|
|
33
35
|
export declare const PluginEntityType: z.ZodEnum<{
|
|
34
36
|
mass: "mass";
|
|
@@ -48,6 +50,7 @@ export declare const PluginEntityType: z.ZodEnum<{
|
|
|
48
50
|
curtainWall: "curtainWall";
|
|
49
51
|
mullion: "mullion";
|
|
50
52
|
panel: "panel";
|
|
53
|
+
parametricComponent: "parametricComponent";
|
|
51
54
|
}>;
|
|
52
55
|
export type PluginEntityType = z.infer<typeof PluginEntityType>;
|
|
53
56
|
/**
|
|
@@ -94,6 +97,7 @@ export declare const PluginEntityFilter: z.ZodObject<{
|
|
|
94
97
|
curtainWall: "curtainWall";
|
|
95
98
|
mullion: "mullion";
|
|
96
99
|
panel: "panel";
|
|
100
|
+
parametricComponent: "parametricComponent";
|
|
97
101
|
}>>>;
|
|
98
102
|
storeys: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
99
103
|
buildingIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -173,6 +177,7 @@ export declare const PluginDesignQueryListByTypeArgs: z.ZodObject<{
|
|
|
173
177
|
curtainWall: "curtainWall";
|
|
174
178
|
mullion: "mullion";
|
|
175
179
|
panel: "panel";
|
|
180
|
+
parametricComponent: "parametricComponent";
|
|
176
181
|
}>>>;
|
|
177
182
|
storeys: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
178
183
|
buildingIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -245,6 +250,7 @@ export declare const PluginDesignQueryListByTypeArgs: z.ZodObject<{
|
|
|
245
250
|
curtainWall: "curtainWall";
|
|
246
251
|
mullion: "mullion";
|
|
247
252
|
panel: "panel";
|
|
253
|
+
parametricComponent: "parametricComponent";
|
|
248
254
|
}>;
|
|
249
255
|
}, z.core.$strip>;
|
|
250
256
|
export type PluginDesignQueryListByTypeArgs = z.infer<typeof PluginDesignQueryListByTypeArgs>;
|
|
@@ -308,6 +314,7 @@ export declare const PluginEntityProperties: z.ZodObject<{
|
|
|
308
314
|
curtainWall: "curtainWall";
|
|
309
315
|
mullion: "mullion";
|
|
310
316
|
panel: "panel";
|
|
317
|
+
parametricComponent: "parametricComponent";
|
|
311
318
|
}>>;
|
|
312
319
|
label: z.ZodOptional<z.ZodString>;
|
|
313
320
|
storey: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1121,6 +1128,52 @@ export declare abstract class PluginDesignQueryApi {
|
|
|
1121
1128
|
* ```
|
|
1122
1129
|
*/
|
|
1123
1130
|
abstract getStaircaseParams(staircase: ComponentHandle): PluginApiReturn<PluginStaircaseParams | null>;
|
|
1131
|
+
/**
|
|
1132
|
+
* Read a mass's creation-parameter record — the recipe it was built from
|
|
1133
|
+
* (`kind` plus the values that constructor was called with). Present on
|
|
1134
|
+
* masses committed from a `core.geom.create` brep constructor that carries a
|
|
1135
|
+
* recipe: {@linkcode MassParametersRecord} covers the four primitives
|
|
1136
|
+
* (sphere, cylinder, cone, torus), extrusions, revolutions, lofts and sweeps.
|
|
1137
|
+
*
|
|
1138
|
+
* A fillet, chamfer, shell or offset of a recorded solid keeps the record
|
|
1139
|
+
* too: `kind` stays the base constructor and the operation is appended to the
|
|
1140
|
+
* record's `operations` list. Edit any of it with `design.update.parameters`.
|
|
1141
|
+
*
|
|
1142
|
+
* `null` for everything else — drawn masses, imported geometry, booleans,
|
|
1143
|
+
* split parts, `brepFromFaces` / `brepFromMesh`, and results built on a
|
|
1144
|
+
* source that carried no record — and for a mass whose record no longer
|
|
1145
|
+
* matches what is on
|
|
1146
|
+
* screen (a later free-form edit dropped the recipe, or the mass carries a
|
|
1147
|
+
* baked scale). `null` too when the recipe was not recordable: the record
|
|
1148
|
+
* schema has its own caps (a sweep path of at most 512 points, a loft of at
|
|
1149
|
+
* most 32 sections, at most 8 chained `operations`, at most 256 curves in one
|
|
1150
|
+
* profile loop and 64 holes in one contour), and a mass built past one of
|
|
1151
|
+
* them — through a route that does not enforce the matching creator cap —
|
|
1152
|
+
* commits as ordinary geometry carrying no record. The `operations` cap is
|
|
1153
|
+
* the one an agent can walk into by accident: a 9th chained
|
|
1154
|
+
* fillet/chamfer/shell/offset drops the record silently, so the result
|
|
1155
|
+
* commits as ordinary geometry and reads back `null` here. A record is never
|
|
1156
|
+
* reported unless it is still the truth.
|
|
1157
|
+
*
|
|
1158
|
+
* Points and axes come back in **world** coordinates. Pure read — nothing is
|
|
1159
|
+
* created or modified.
|
|
1160
|
+
*
|
|
1161
|
+
* @param component - the mass's {@linkcode ComponentHandle}
|
|
1162
|
+
* @returns the {@linkcode MassParametersRecord}, or `null`
|
|
1163
|
+
*
|
|
1164
|
+
* @examplePrompt What radius is this sphere?
|
|
1165
|
+
* @examplePrompt Is this mass parametric?
|
|
1166
|
+
* @examplePrompt Read back the dome's creation parameters
|
|
1167
|
+
* @examplePrompt How tall was this cylinder made?
|
|
1168
|
+
*
|
|
1169
|
+
* # Example
|
|
1170
|
+
* ```ts
|
|
1171
|
+
* const [mass] = await snaptrude.design.query.listMasses({ isSelected: true })
|
|
1172
|
+
* const params = await snaptrude.design.query.getParameters(mass)
|
|
1173
|
+
* if (params?.kind === "sphere") console.log("radius:", params.values.radius)
|
|
1174
|
+
* ```
|
|
1175
|
+
*/
|
|
1176
|
+
abstract getParameters(component: ComponentHandle): PluginApiReturn<MassParametersRecord | null>;
|
|
1124
1177
|
/**
|
|
1125
1178
|
* Get the **union** axis-aligned bounding box enclosing a set of entities.
|
|
1126
1179
|
*
|
|
@@ -1226,6 +1279,7 @@ export declare const PluginStoreyOutlineOptions: z.ZodObject<{
|
|
|
1226
1279
|
curtainWall: "curtainWall";
|
|
1227
1280
|
mullion: "mullion";
|
|
1228
1281
|
panel: "panel";
|
|
1282
|
+
parametricComponent: "parametricComponent";
|
|
1229
1283
|
}>>>;
|
|
1230
1284
|
minArea: z.ZodDefault<z.ZodNumber>;
|
|
1231
1285
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAQnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EAAE,kCAAkC,EAAE,MAAM,kBAAkB,CAAA;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;EAmB3B,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAM/D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe7B,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,O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AAE,eAAe,EAAE,GAC5B,eAAe,CAAC,cAAc,GAAG,IAAI,CAAC;IAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;aACa,aAAa,CAC3B,OAAO,CAAC,EAAE,0BAA0B,GACnC,eAAe,CAAC,yBAAyB,CAAC;CAC9C;AAGD,mFAAmF;AACnF,eAAO,MAAM,sBAAsB;;;iBAA6C,CAAA;AAChF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;iBAIrC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBAUhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,4DAA4D;AAC5D,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;iBAKpC,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAA;AAED,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA"}
|
|
@@ -134,10 +134,10 @@ export declare const PluginDesignQuerySpacesGetProperty: z.ZodEnum<{
|
|
|
134
134
|
profile: "profile";
|
|
135
135
|
type: "type";
|
|
136
136
|
id: "id";
|
|
137
|
+
height: "height";
|
|
137
138
|
position: "position";
|
|
138
139
|
name: "name";
|
|
139
140
|
storey: "storey";
|
|
140
|
-
height: "height";
|
|
141
141
|
depth: "depth";
|
|
142
142
|
innerProfiles: "innerProfiles";
|
|
143
143
|
room_type: "room_type";
|
|
@@ -170,10 +170,10 @@ export declare const PluginDesignQuerySpacesGetArgs: z.ZodObject<{
|
|
|
170
170
|
profile: "profile";
|
|
171
171
|
type: "type";
|
|
172
172
|
id: "id";
|
|
173
|
+
height: "height";
|
|
173
174
|
position: "position";
|
|
174
175
|
name: "name";
|
|
175
176
|
storey: "storey";
|
|
176
|
-
height: "height";
|
|
177
177
|
depth: "depth";
|
|
178
178
|
innerProfiles: "innerProfiles";
|
|
179
179
|
room_type: "room_type";
|
|
@@ -199,9 +199,10 @@ export type PluginDesignQuerySpacesGetArgs = z.infer<typeof PluginDesignQuerySpa
|
|
|
199
199
|
* requested properties are present.
|
|
200
200
|
*/
|
|
201
201
|
export declare const PluginDesignQuerySpacesGetResult: z.ZodObject<{
|
|
202
|
-
profile: z.ZodOptional<z.ZodArray<z.
|
|
202
|
+
profile: z.ZodOptional<z.ZodArray<z.ZodType<import("../../..").CurveHandle, unknown, z.core.$ZodTypeInternals<import("../../..").CurveHandle, unknown>>>>;
|
|
203
203
|
type: z.ZodOptional<z.ZodString>;
|
|
204
204
|
id: z.ZodOptional<z.ZodString>;
|
|
205
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
205
206
|
position: z.ZodOptional<z.ZodObject<{
|
|
206
207
|
x: z.ZodNumber;
|
|
207
208
|
y: z.ZodNumber;
|
|
@@ -209,9 +210,8 @@ export declare const PluginDesignQuerySpacesGetResult: z.ZodObject<{
|
|
|
209
210
|
}, z.core.$strip>>;
|
|
210
211
|
name: z.ZodOptional<z.ZodString>;
|
|
211
212
|
storey: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
212
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
213
213
|
depth: z.ZodOptional<z.ZodNumber>;
|
|
214
|
-
innerProfiles: z.ZodOptional<z.ZodArray<z.ZodArray<z.
|
|
214
|
+
innerProfiles: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodType<import("../../..").CurveHandle, unknown, z.core.$ZodTypeInternals<import("../../..").CurveHandle, unknown>>>>>;
|
|
215
215
|
room_type: z.ZodOptional<z.ZodString>;
|
|
216
216
|
area: z.ZodOptional<z.ZodNumber>;
|
|
217
217
|
breadth: z.ZodOptional<z.ZodNumber>;
|