@snaptrude/plugin-core 0.10.0 → 1.0.0
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/AGENTS.md +4 -0
- package/CHANGELOG.md +187 -3
- package/api-manifest.json +929 -25
- 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 +463 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +942 -101
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +59 -2
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +59 -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 +105 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +10 -2
- package/dist/api/core/geom/update/contour.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 +3 -1
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/handles/index.d.ts +4 -2
- package/dist/api/core/handles/index.d.ts.map +1 -1
- package/dist/api/core/index.d.ts +4 -4
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +3 -1
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +377 -255
- package/dist/api/core/layers.d.ts.map +1 -1
- package/dist/api/core/mode/index.d.ts +19 -7
- package/dist/api/core/mode/index.d.ts.map +1 -1
- package/dist/api/core/project/index.d.ts +68 -1
- package/dist/api/core/project/index.d.ts.map +1 -1
- package/dist/api/core/proposals/index.d.ts +4 -3
- package/dist/api/core/proposals/index.d.ts.map +1 -1
- package/dist/api/core/storeys/index.d.ts +31 -2
- package/dist/api/core/storeys/index.d.ts.map +1 -1
- package/dist/api/core/storeys/layers.d.ts +408 -0
- package/dist/api/core/storeys/layers.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +84 -3
- package/dist/api/core/tags.d.ts.map +1 -1
- package/dist/api/core/zoom/index.d.ts +13 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/bim.d.ts +299 -0
- package/dist/api/design/bim.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +2 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/catalog.d.ts +320 -0
- package/dist/api/design/catalog.d.ts.map +1 -0
- package/dist/api/design/create/bulk-items.d.ts +269 -0
- package/dist/api/design/create/bulk-items.d.ts.map +1 -0
- package/dist/api/design/create/grids.d.ts +132 -0
- package/dist/api/design/create/grids.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +752 -78
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +38 -0
- package/dist/api/design/create/opening-fields.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +5 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +427 -0
- package/dist/api/design/dimensions.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +24 -23
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +1446 -0
- package/dist/api/design/family.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +33 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/grids.d.ts +237 -0
- package/dist/api/design/grids.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +30 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/networks.d.ts +1703 -0
- package/dist/api/design/networks.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +33 -5
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/grids.d.ts +287 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +143 -34
- 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/selection/index.d.ts +12 -12
- package/dist/api/design/types/index.d.ts +40 -24
- package/dist/api/design/types/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +412 -8
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/visibility.d.ts +28 -0
- package/dist/api/design/visibility.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/entity/buildableEnvelope.d.ts +84 -2
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +13 -1
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +12 -12
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/api/presentation/aiInspiration.d.ts +24 -24
- package/dist/api/presentation/annotate.d.ts +38 -22
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- package/dist/api/presentation/camera.d.ts +265 -0
- package/dist/api/presentation/camera.d.ts.map +1 -0
- package/dist/api/presentation/drawingContract.d.ts +32 -0
- package/dist/api/presentation/drawingContract.d.ts.map +1 -0
- package/dist/api/presentation/drawings.d.ts +3523 -0
- package/dist/api/presentation/drawings.d.ts.map +1 -0
- package/dist/api/presentation/export.d.ts +23 -5
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/graphics.d.ts +419 -0
- package/dist/api/presentation/graphics.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +66 -12
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +116 -16
- 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 +175 -19
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/standards.d.ts +590 -0
- package/dist/api/presentation/standards.d.ts.map +1 -0
- package/dist/api/presentation/viewPresets.d.ts +222 -0
- package/dist/api/presentation/viewPresets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +144 -9
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +1350 -0
- package/dist/api/presentation/walkthroughs.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +58 -2
- package/dist/api/program/departments.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +16 -6
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/labels.d.ts +355 -0
- package/dist/api/program/labels.d.ts.map +1 -0
- package/dist/api/program/metadata.d.ts +328 -0
- package/dist/api/program/metadata.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +4 -4
- package/dist/api/program/spreadsheet.d.ts +267 -4
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +49 -2
- package/dist/api/workspace/index.d.ts.map +1 -1
- package/dist/errors/codes.d.ts +3 -1
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/handles.d.ts +32 -3
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +6539 -2804
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6121 -2801
- package/dist/index.js.map +1 -1
- package/dist/massParameters.d.ts +287 -0
- package/dist/massParameters.d.ts.map +1 -0
- package/dist/massParameters.ops.d.ts +138 -0
- package/dist/massParameters.ops.d.ts.map +1 -0
- package/package.json +14 -13
- package/scripts/check-dist-fresh.mjs +22 -0
- package/scripts/generate-manifest.mjs +5 -0
- package/scripts/generate-manifest.test.mjs +14 -3
- package/src/api/core/camera/index.ts +446 -1
- package/src/api/core/geom/create/index.ts +1037 -102
- package/src/api/core/geom/query/brep.ts +60 -2
- package/src/api/core/geom/query/curve.ts +26 -2
- package/src/api/core/geom/query/edge.ts +2 -2
- package/src/api/core/geom/query/face.ts +109 -4
- package/src/api/core/geom/update/contour.ts +10 -2
- package/src/api/core/geom/update/profile.ts +2 -0
- package/src/api/core/handles/index.ts +3 -2
- package/src/api/core/index.ts +4 -4
- package/src/api/core/io/import/index.ts +11 -3
- package/src/api/core/layers.ts +380 -173
- package/src/api/core/mode/index.ts +19 -7
- package/src/api/core/project/index.ts +62 -1
- package/src/api/core/proposals/index.ts +4 -3
- package/src/api/core/storeys/index.ts +34 -2
- package/src/api/core/storeys/layers.ts +339 -0
- package/src/api/core/tags.ts +76 -0
- package/src/api/core/zoom/index.ts +13 -0
- package/src/api/design/bim.ts +210 -0
- package/src/api/design/boolean/index.ts +2 -0
- package/src/api/design/catalog.ts +203 -0
- package/src/api/design/create/bulk-items.ts +294 -0
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +823 -114
- package/src/api/design/create/opening-fields.ts +40 -0
- package/src/api/design/delete/index.ts +5 -0
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/doors/index.ts +64 -41
- package/src/api/design/family.ts +1342 -0
- package/src/api/design/furniture/index.ts +34 -0
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +49 -4
- package/src/api/design/networks.ts +607 -0
- package/src/api/design/query/geometry/index.ts +35 -4
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +105 -3
- package/src/api/design/types/index.ts +31 -24
- package/src/api/design/update/index.ts +398 -4
- package/src/api/design/visibility.ts +34 -0
- package/src/api/design/windows/index.ts +40 -22
- package/src/api/entity/buildableEnvelope.ts +77 -2
- package/src/api/entity/referenceLine.ts +25 -12
- package/src/api/presentation/annotate.ts +90 -58
- package/src/api/presentation/camera.ts +289 -0
- package/src/api/presentation/drawingContract.ts +70 -0
- package/src/api/presentation/drawings.ts +1179 -0
- package/src/api/presentation/export.ts +32 -6
- package/src/api/presentation/graphics.ts +324 -0
- package/src/api/presentation/index.ts +73 -14
- package/src/api/presentation/placedViews.ts +119 -28
- package/src/api/presentation/sections.ts +420 -0
- package/src/api/presentation/sheets.ts +181 -20
- package/src/api/presentation/standards.ts +445 -0
- package/src/api/presentation/viewPresets.ts +241 -0
- package/src/api/presentation/views.ts +81 -10
- package/src/api/presentation/walkthroughs.ts +1201 -0
- package/src/api/program/departments.ts +54 -2
- package/src/api/program/index.ts +16 -6
- package/src/api/program/labels.ts +332 -0
- package/src/api/program/metadata.ts +364 -0
- package/src/api/program/spreadsheet.ts +282 -0
- package/src/api/workspace/index.ts +51 -2
- package/src/errors/codes.ts +7 -0
- package/src/handles.ts +42 -3
- package/src/index.ts +2 -0
- package/src/massParameters.ops.ts +246 -0
- package/src/massParameters.ts +427 -0
- package/test/drawingContract.test.mjs +288 -0
- package/test/errors.test.mjs +1 -0
- package/test/massParameters.test.mjs +952 -0
- package/test/paperPensContract.test.mjs +75 -0
- package/test/presentationViewSettings.test.mjs +85 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,6GAA6G;AAC7G,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,kFAAkF;AAClF,eAAO,MAAM,cA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AM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
|
@@ -3,7 +3,51 @@ import { PluginApiReturn } from "../../../types";
|
|
|
3
3
|
import { ComponentHandle } from "../../../handles";
|
|
4
4
|
import { PluginSpaceUpdateResult } from "../../entity/space";
|
|
5
5
|
import { PluginDesignChangeResult } from "../lock";
|
|
6
|
-
import {
|
|
6
|
+
import { MassParametersPatch, type MassParametersRecord } from "../../../massParameters";
|
|
7
|
+
import { PluginBuildableEnvelopePolygonVertex, PluginBuildableEnvelopeSetbackTier, PluginBuildableEnvelopeVerticalCap, PluginBuildableEnvelopeUpdateResult, PluginSiteEdgePatch, PluginDesignUpdateSiteEdgeResult } from "../../entity/buildableEnvelope";
|
|
8
|
+
import { type PluginFamilyUpdates } from "../catalog";
|
|
9
|
+
/** A project style; its pen/pattern and native legacy mirror change together. */
|
|
10
|
+
export declare const PluginReferenceLineStylePatch: z.ZodObject<{
|
|
11
|
+
styleId: z.ZodEnum<{
|
|
12
|
+
hidden: "hidden";
|
|
13
|
+
thin: "thin";
|
|
14
|
+
medium: "medium";
|
|
15
|
+
wide: "wide";
|
|
16
|
+
overhead: "overhead";
|
|
17
|
+
demolished: "demolished";
|
|
18
|
+
centerline: "centerline";
|
|
19
|
+
}>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export type PluginReferenceLineStylePatch = z.infer<typeof PluginReferenceLineStylePatch>;
|
|
22
|
+
/** Arguments for design.update.referenceLine. */
|
|
23
|
+
export declare const PluginDesignUpdateReferenceLineArgs: z.ZodObject<{
|
|
24
|
+
referenceLineId: z.ZodString;
|
|
25
|
+
patch: z.ZodObject<{
|
|
26
|
+
styleId: z.ZodEnum<{
|
|
27
|
+
hidden: "hidden";
|
|
28
|
+
thin: "thin";
|
|
29
|
+
medium: "medium";
|
|
30
|
+
wide: "wide";
|
|
31
|
+
overhead: "overhead";
|
|
32
|
+
demolished: "demolished";
|
|
33
|
+
centerline: "centerline";
|
|
34
|
+
}>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
/** Styled line id and the applied project style. */
|
|
38
|
+
export declare const PluginDesignUpdateReferenceLineResult: z.ZodObject<{
|
|
39
|
+
referenceLineId: z.ZodString;
|
|
40
|
+
styleId: z.ZodEnum<{
|
|
41
|
+
hidden: "hidden";
|
|
42
|
+
thin: "thin";
|
|
43
|
+
medium: "medium";
|
|
44
|
+
wide: "wide";
|
|
45
|
+
overhead: "overhead";
|
|
46
|
+
demolished: "demolished";
|
|
47
|
+
centerline: "centerline";
|
|
48
|
+
}>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type PluginDesignUpdateReferenceLineResult = z.infer<typeof PluginDesignUpdateReferenceLineResult>;
|
|
7
51
|
/**
|
|
8
52
|
* Sparse property updates for a space. Only provided fields change.
|
|
9
53
|
*
|
|
@@ -18,11 +62,11 @@ import { PluginBuildableEnvelopePolygonVertex, PluginBuildableEnvelopeSetbackTie
|
|
|
18
62
|
export declare const PluginSpacePropertyUpdates: z.ZodObject<{
|
|
19
63
|
room_type: z.ZodOptional<z.ZodString>;
|
|
20
64
|
massType: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
Furniture: "Furniture";
|
|
21
66
|
Room: "Room";
|
|
22
67
|
Plinth: "Plinth";
|
|
23
68
|
Void: "Void";
|
|
24
69
|
Pergola: "Pergola";
|
|
25
|
-
Furniture: "Furniture";
|
|
26
70
|
"Facade element": "Facade element";
|
|
27
71
|
"Generic mass": "Generic mass";
|
|
28
72
|
Department: "Department";
|
|
@@ -68,11 +112,11 @@ export declare const PluginUpdateSpaceItem: z.ZodObject<{
|
|
|
68
112
|
properties: z.ZodOptional<z.ZodObject<{
|
|
69
113
|
room_type: z.ZodOptional<z.ZodString>;
|
|
70
114
|
massType: z.ZodOptional<z.ZodEnum<{
|
|
115
|
+
Furniture: "Furniture";
|
|
71
116
|
Room: "Room";
|
|
72
117
|
Plinth: "Plinth";
|
|
73
118
|
Void: "Void";
|
|
74
119
|
Pergola: "Pergola";
|
|
75
|
-
Furniture: "Furniture";
|
|
76
120
|
"Facade element": "Facade element";
|
|
77
121
|
"Generic mass": "Generic mass";
|
|
78
122
|
Department: "Department";
|
|
@@ -194,6 +238,19 @@ export declare const PluginDesignUpdateStaircaseArgs: z.ZodObject<{
|
|
|
194
238
|
}, z.core.$strip>;
|
|
195
239
|
}, z.core.$strip>;
|
|
196
240
|
export type PluginDesignUpdateStaircaseArgs = z.infer<typeof PluginDesignUpdateStaircaseArgs>;
|
|
241
|
+
/**
|
|
242
|
+
* Arguments for {@linkcode PluginDesignUpdateApi.parameters}.
|
|
243
|
+
*
|
|
244
|
+
* | Property | Type | Description |
|
|
245
|
+
* |---|---|---|
|
|
246
|
+
* | `component` | {@linkcode ComponentHandle} | The parametric mass to edit |
|
|
247
|
+
* | `patch` | {@linkcode MassParametersPatch} | Partial `values` (+ optional `operations`), or the full edited record |
|
|
248
|
+
*/
|
|
249
|
+
export declare const PluginDesignUpdateParametersArgs: z.ZodObject<{
|
|
250
|
+
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
251
|
+
patch: z.ZodType<MassParametersPatch, MassParametersPatch, z.core.$ZodTypeInternals<MassParametersPatch, MassParametersPatch>>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
export type PluginDesignUpdateParametersArgs = z.infer<typeof PluginDesignUpdateParametersArgs>;
|
|
197
254
|
/**
|
|
198
255
|
* Sparse edits for a wall (all optional; at least one required). Only the
|
|
199
256
|
* fields you provide change. Dimensions are in **engine units** (the same
|
|
@@ -204,12 +261,16 @@ export type PluginDesignUpdateStaircaseArgs = z.infer<typeof PluginDesignUpdateS
|
|
|
204
261
|
* |---|---|---|
|
|
205
262
|
* | `thickness` | `number`? | Wall thickness, engine units (> 0) |
|
|
206
263
|
* | `height` | `number`? | Wall height, engine units (> 0) |
|
|
207
|
-
* | `type` |
|
|
264
|
+
* | `type` | {@linkcode PluginWallType}? | Legacy name/id or exact authorized native `{ id, version }` pin from `design.types.list("wall")` |
|
|
208
265
|
*/
|
|
209
266
|
export declare const PluginWallUpdates: z.ZodObject<{
|
|
210
267
|
thickness: z.ZodOptional<z.ZodNumber>;
|
|
211
268
|
height: z.ZodOptional<z.ZodNumber>;
|
|
212
|
-
type: z.ZodOptional<z.ZodString
|
|
269
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
270
|
+
id: z.ZodString;
|
|
271
|
+
version: z.ZodNumber;
|
|
272
|
+
}, z.core.$strip>]>>;
|
|
273
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean]>>>;
|
|
213
274
|
}, z.core.$strip>;
|
|
214
275
|
export type PluginWallUpdates = z.infer<typeof PluginWallUpdates>;
|
|
215
276
|
/**
|
|
@@ -229,6 +290,11 @@ export type PluginWallUpdates = z.infer<typeof PluginWallUpdates>;
|
|
|
229
290
|
export declare const PluginSlabUpdates: z.ZodObject<{
|
|
230
291
|
thickness: z.ZodOptional<z.ZodNumber>;
|
|
231
292
|
overhang: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
version: z.ZodNumber;
|
|
296
|
+
}, z.core.$strict>, z.ZodString]>>;
|
|
297
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean]>>>;
|
|
232
298
|
}, z.core.$strip>;
|
|
233
299
|
export type PluginSlabUpdates = z.infer<typeof PluginSlabUpdates>;
|
|
234
300
|
/** Arguments for {@linkcode PluginDesignUpdateApi.wall}. */
|
|
@@ -237,7 +303,11 @@ export declare const PluginDesignUpdateWallArgs: z.ZodObject<{
|
|
|
237
303
|
updates: z.ZodObject<{
|
|
238
304
|
thickness: z.ZodOptional<z.ZodNumber>;
|
|
239
305
|
height: z.ZodOptional<z.ZodNumber>;
|
|
240
|
-
type: z.ZodOptional<z.ZodString
|
|
306
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
307
|
+
id: z.ZodString;
|
|
308
|
+
version: z.ZodNumber;
|
|
309
|
+
}, z.core.$strip>]>>;
|
|
310
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean]>>>;
|
|
241
311
|
}, z.core.$strip>;
|
|
242
312
|
}, z.core.$strip>;
|
|
243
313
|
export type PluginDesignUpdateWallArgs = z.infer<typeof PluginDesignUpdateWallArgs>;
|
|
@@ -250,6 +320,11 @@ export declare const PluginDesignUpdateSlabArgs: z.ZodObject<{
|
|
|
250
320
|
updates: z.ZodObject<{
|
|
251
321
|
thickness: z.ZodOptional<z.ZodNumber>;
|
|
252
322
|
overhang: z.ZodOptional<z.ZodNumber>;
|
|
323
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
324
|
+
id: z.ZodString;
|
|
325
|
+
version: z.ZodNumber;
|
|
326
|
+
}, z.core.$strict>, z.ZodString]>>;
|
|
327
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean]>>>;
|
|
253
328
|
}, z.core.$strip>;
|
|
254
329
|
}, z.core.$strip>;
|
|
255
330
|
export type PluginDesignUpdateSlabArgs = z.infer<typeof PluginDesignUpdateSlabArgs>;
|
|
@@ -278,14 +353,106 @@ export declare const PluginDesignSetStoreyArgs: z.ZodObject<{
|
|
|
278
353
|
storey: z.ZodNumber;
|
|
279
354
|
}, z.core.$strip>;
|
|
280
355
|
export type PluginDesignSetStoreyArgs = z.infer<typeof PluginDesignSetStoreyArgs>;
|
|
356
|
+
/**
|
|
357
|
+
* Object types {@linkcode PluginDesignUpdateApi.setObjectType} can turn a mass
|
|
358
|
+
* into — the `design.query` `type` vocabulary.
|
|
359
|
+
*/
|
|
360
|
+
export declare const PluginObjectType: z.ZodEnum<{
|
|
361
|
+
floor: "floor";
|
|
362
|
+
wall: "wall";
|
|
363
|
+
slab: "slab";
|
|
364
|
+
roof: "roof";
|
|
365
|
+
}>;
|
|
366
|
+
export type PluginObjectType = z.infer<typeof PluginObjectType>;
|
|
367
|
+
/**
|
|
368
|
+
* Arguments for {@linkcode PluginDesignUpdateApi.setObjectType}.
|
|
369
|
+
*
|
|
370
|
+
* | Property | Type | Description |
|
|
371
|
+
* |---|---|---|
|
|
372
|
+
* | `components` | {@linkcode ComponentHandle}`[]` | The masses to convert (>= 1) |
|
|
373
|
+
* | `objectType` | {@linkcode PluginObjectType} | Target object type (`"wall"`, `"roof"`, `"slab"`, `"floor"`) |
|
|
374
|
+
*/
|
|
375
|
+
export declare const PluginDesignSetObjectTypeArgs: z.ZodObject<{
|
|
376
|
+
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
377
|
+
objectType: z.ZodEnum<{
|
|
378
|
+
floor: "floor";
|
|
379
|
+
wall: "wall";
|
|
380
|
+
slab: "slab";
|
|
381
|
+
roof: "roof";
|
|
382
|
+
}>;
|
|
383
|
+
}, z.core.$strip>;
|
|
384
|
+
export type PluginDesignSetObjectTypeArgs = z.infer<typeof PluginDesignSetObjectTypeArgs>;
|
|
385
|
+
/**
|
|
386
|
+
* The sparse GROUP-LEVEL patch accepted by {@linkcode PluginDesignUpdateApi.grid}.
|
|
387
|
+
* Only provided fields change. Wing- and line-level updates live on the grids
|
|
388
|
+
* entity family: `design.grids.updateWings` / `design.grids.updateLines`.
|
|
389
|
+
*/
|
|
390
|
+
export declare const PluginGridPatch: z.ZodObject<{
|
|
391
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
props: z.ZodOptional<z.ZodObject<{
|
|
393
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
394
|
+
SOLID: "SOLID";
|
|
395
|
+
DASHED: "DASHED";
|
|
396
|
+
DOT_DASH: "DOT_DASH";
|
|
397
|
+
}>>;
|
|
398
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
399
|
+
color: z.ZodOptional<z.ZodString>;
|
|
400
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
401
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
402
|
+
}, z.core.$strip>>;
|
|
403
|
+
storeyVisibility: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
404
|
+
storey: z.ZodNumber;
|
|
405
|
+
visible: z.ZodBoolean;
|
|
406
|
+
}, z.core.$strip>>>;
|
|
407
|
+
}, z.core.$strip>;
|
|
408
|
+
export type PluginGridPatch = z.infer<typeof PluginGridPatch>;
|
|
409
|
+
/** Arguments for {@linkcode PluginDesignUpdateApi.grid}. */
|
|
410
|
+
export declare const PluginDesignUpdateGridArgs: z.ZodObject<{
|
|
411
|
+
grid: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
412
|
+
patch: z.ZodObject<{
|
|
413
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
414
|
+
props: z.ZodOptional<z.ZodObject<{
|
|
415
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
416
|
+
SOLID: "SOLID";
|
|
417
|
+
DASHED: "DASHED";
|
|
418
|
+
DOT_DASH: "DOT_DASH";
|
|
419
|
+
}>>;
|
|
420
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
421
|
+
color: z.ZodOptional<z.ZodString>;
|
|
422
|
+
showStart: z.ZodOptional<z.ZodBoolean>;
|
|
423
|
+
showEnd: z.ZodOptional<z.ZodBoolean>;
|
|
424
|
+
}, z.core.$strip>>;
|
|
425
|
+
storeyVisibility: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
426
|
+
storey: z.ZodNumber;
|
|
427
|
+
visible: z.ZodBoolean;
|
|
428
|
+
}, z.core.$strip>>>;
|
|
429
|
+
}, z.core.$strip>;
|
|
430
|
+
}, z.core.$strip>;
|
|
431
|
+
export type PluginDesignUpdateGridArgs = z.infer<typeof PluginDesignUpdateGridArgs>;
|
|
281
432
|
/**
|
|
282
433
|
* `snaptrude.design.update` — edit existing scene entities (properties + geometry).
|
|
283
434
|
*
|
|
284
435
|
* Migrated from the removed `entity.space.{update, updateGeometryFromProfile, bulkUpdate}`.
|
|
285
436
|
* Only provided fields change; each call is undoable. Failures throw (RPC rejects).
|
|
437
|
+
*
|
|
438
|
+
* Native family edits accept `type` and/or sparse `values` from `design.catalog`.
|
|
439
|
+
* Length overrides use mm; dimensional arguments use SU. Contours and axes stay unchanged.
|
|
440
|
+
* Shared/type overrides are refused. A thickness argument must agree with the layer values.
|
|
441
|
+
* Family roof overhang is unsupported; use the native slab path for family overhang edits.
|
|
286
442
|
*/
|
|
287
443
|
export declare abstract class PluginDesignUpdateApi {
|
|
288
444
|
constructor();
|
|
445
|
+
/**
|
|
446
|
+
* Apply a project style through the native reference-line property command.
|
|
447
|
+
* One saved undo step; no selection or tool preference changes. Saves the
|
|
448
|
+
* legacy thickness/mode mirror too. Requires Paper Pens and an editable line
|
|
449
|
+
* in the current proposal. A no-op creates no history entry.
|
|
450
|
+
* @param referenceLineId - Existing reference line id.
|
|
451
|
+
* @param patch - styleId from the project line-style catalog.
|
|
452
|
+
* @returns The line id and applied style id.
|
|
453
|
+
* @example await snaptrude.design.update.referenceLine(id, { styleId: "wide" })
|
|
454
|
+
*/
|
|
455
|
+
abstract referenceLine(referenceLineId: string, patch: PluginReferenceLineStylePatch): PluginApiReturn<PluginDesignUpdateReferenceLineResult>;
|
|
289
456
|
/**
|
|
290
457
|
* Set a component's **Label** — the same editable Label field the properties
|
|
291
458
|
* panel shows (doors, windows, furniture, spaces, and every other labelled
|
|
@@ -325,6 +492,33 @@ export declare abstract class PluginDesignUpdateApi {
|
|
|
325
492
|
* ```
|
|
326
493
|
*/
|
|
327
494
|
abstract setLabel(component: ComponentHandle, label: string): PluginApiReturn<boolean>;
|
|
495
|
+
/**
|
|
496
|
+
* Update a structural grid's **group-level** fields with a sparse patch —
|
|
497
|
+
* default line styling, absolute angle, and per-storey 2D visibility. Only
|
|
498
|
+
* provided fields change. Wing- and line-level updates live on the grids
|
|
499
|
+
* entity family: {@linkcode PluginDesignGridsApi.updateWings} /
|
|
500
|
+
* {@linkcode PluginDesignGridsApi.updateLines}.
|
|
501
|
+
*
|
|
502
|
+
* Every change routes through the exact setters the native panel uses —
|
|
503
|
+
* each changed field commits its own undoable command, identical to editing
|
|
504
|
+
* that field in the panel. `angle` is an absolute target in degrees (CCW
|
|
505
|
+
* about +Y).
|
|
506
|
+
*
|
|
507
|
+
* @param grid - The grid group to update
|
|
508
|
+
* @param patch - The sparse {@linkcode PluginGridPatch}
|
|
509
|
+
* @returns `true` once applied
|
|
510
|
+
*
|
|
511
|
+
* @examplePrompt Rotate the grid to 45 degrees
|
|
512
|
+
* @examplePrompt Make this grid's lines dashed and grey
|
|
513
|
+
* @examplePrompt Hide this grid on storey 3's plan
|
|
514
|
+
*
|
|
515
|
+
* # Example
|
|
516
|
+
* ```ts
|
|
517
|
+
* const [grid] = await snaptrude.design.query.listGrids()
|
|
518
|
+
* await snaptrude.design.update.grid(grid, { angle: 45, props: { style: "DASHED" } })
|
|
519
|
+
* ```
|
|
520
|
+
*/
|
|
521
|
+
abstract grid(grid: ComponentHandle, patch: PluginGridPatch): PluginApiReturn<boolean>;
|
|
328
522
|
/**
|
|
329
523
|
* Update a single space (room) — change its properties (room label, space
|
|
330
524
|
* type, mass type, area class, department) and/or replace its geometry by
|
|
@@ -334,6 +528,8 @@ export declare abstract class PluginDesignUpdateApi {
|
|
|
334
528
|
* @param space - The space to update
|
|
335
529
|
* @param options - `properties` (sparse) and/or `geometry` ({ profile, extrudeHeight })
|
|
336
530
|
* @returns the updated space's echoed {@linkcode PluginSpaceUpdateResult}
|
|
531
|
+
* @throws PRECONDITION_FAILED for a void (a hole cut with `design.create.void`): delete it and
|
|
532
|
+
* cut a new one
|
|
337
533
|
*
|
|
338
534
|
* @examplePrompt Rename this room to Office
|
|
339
535
|
* @examplePrompt Change this space's room type to Meeting Room
|
|
@@ -363,6 +559,7 @@ export declare abstract class PluginDesignUpdateApi {
|
|
|
363
559
|
*
|
|
364
560
|
* @param items - One {@linkcode PluginUpdateSpaceItem} per space
|
|
365
561
|
* @returns one {@linkcode PluginSpaceUpdateResult} per item, in input order
|
|
562
|
+
* @throws PRECONDITION_FAILED for a void, like {@linkcode space}
|
|
366
563
|
*
|
|
367
564
|
* @examplePrompt Label all the selected rooms as Bedrooms
|
|
368
565
|
* @examplePrompt Change the room type of these five spaces at once
|
|
@@ -433,6 +630,94 @@ export declare abstract class PluginDesignUpdateApi {
|
|
|
433
630
|
* ```
|
|
434
631
|
*/
|
|
435
632
|
abstract staircase(staircases: ComponentHandle[], params: PluginStaircaseParamUpdates): PluginApiReturn<PluginDesignChangeResult>;
|
|
633
|
+
/**
|
|
634
|
+
* Edit a parametric mass by patching its creation recipe and rebuilding the
|
|
635
|
+
* solid in place — the mass keeps its id, storey, materials, position and
|
|
636
|
+
* linked copies; only the geometry changes. Read the current record with
|
|
637
|
+
* `design.query.getParameters` first.
|
|
638
|
+
*
|
|
639
|
+
* `patch` is a partial of `record.values` — or the whole record you read
|
|
640
|
+
* back, edited. A key you leave out is unchanged (that includes
|
|
641
|
+
* `operations`). Each key you send replaces that value whole — a scalar, a
|
|
642
|
+
* point, a list or a record (`contour`, `profile`, `sections`, `path`,
|
|
643
|
+
* `options`, `operations`) alike — so send the complete value you read,
|
|
644
|
+
* edited (a partial `options` drops the switches it leaves out);
|
|
645
|
+
* `{ operations: [] }` drops every operation. An optional key
|
|
646
|
+
* the record does not carry yet may be patched in when the kind allows it:
|
|
647
|
+
* a straight extrusion acquires `twistInDegrees` or `topScale`, an
|
|
648
|
+
* options-less loft or sweep acquires `options` (`levels` is not one — send
|
|
649
|
+
* the angle, not the section count). A patch that changes nothing
|
|
650
|
+
* returns the current record and records no edit (no undo step). `kind` and
|
|
651
|
+
* `version` are immutable: to change the kind, build a new mass. Keys are the
|
|
652
|
+
* record's `values` keys for its `kind` (sphere: `centre`, `radius`;
|
|
653
|
+
* cylinder: `base`, `axis`, `radius`, `height`; torus: `centre`, `axis`,
|
|
654
|
+
* `majorRadius`, `minorRadius`; …) plus `operations`. To change a fillet
|
|
655
|
+
* radius, edit `operations[i].radius` in the record you read and send
|
|
656
|
+
* `{ operations }` back. Points and axes are WORLD coordinates in internal
|
|
657
|
+
* units, exactly as `getParameters` reports them.
|
|
658
|
+
*
|
|
659
|
+
* Rebuilds in memory first, then swaps onto the SAME component; every linked
|
|
660
|
+
* copy regenerates together. One undo step; saves and syncs to collaborators
|
|
661
|
+
* like any geometry edit. Kernel kinds (revolution, sweep, loft, primitives,
|
|
662
|
+
* any `operations`) run on OpenCascade — expect a short pause.
|
|
663
|
+
*
|
|
664
|
+
* @param component - a mass whose `getParameters` is non-null
|
|
665
|
+
* @param patch - partial `values` (+ optional `operations`), or the full edited record
|
|
666
|
+
* @returns the complete post-edit record, world coordinates (what
|
|
667
|
+
* `getParameters` now returns)
|
|
668
|
+
* @throws PRECONDITION_FAILED when the component is not a mass (a family
|
|
669
|
+
* instance: use `design.family.setParameters`).
|
|
670
|
+
* Also PRECONDITION_FAILED when the mass carries no live recipe — built
|
|
671
|
+
* from a boolean, split, `brepFromFaces`/`brepFromMesh` or drawn; edited
|
|
672
|
+
* free-form since (push/pull, move face, boolean); or scaled with the
|
|
673
|
+
* transform tool. `getParameters` returns `null` for exactly these.
|
|
674
|
+
* Do not retry — rebuild it with a recipe constructor and say so.
|
|
675
|
+
* A scaled mass is the exception: undo the scale and call again.
|
|
676
|
+
* Also PRECONDITION_FAILED when the mass (or a linked copy) is **locked**
|
|
677
|
+
* (the message says so). Locking is invisible to `getParameters` — a
|
|
678
|
+
* locked parametric mass still reads back a full record. Unlock it (and
|
|
679
|
+
* every linked copy) and call again; never rebuild it, the recipe is intact.
|
|
680
|
+
* Also PRECONDITION_FAILED when an `operations` entry's edge/face selectors
|
|
681
|
+
* no longer resolve on the rebuilt base (the message names the operation
|
|
682
|
+
* and edge): re-select the edges on the new shape and re-apply that
|
|
683
|
+
* operation.
|
|
684
|
+
* Also PRECONDITION_FAILED when the edit is the first twist or taper — or
|
|
685
|
+
* the straightening — of an extrusion that carries a shell, fillet or
|
|
686
|
+
* chamfer (the kernel numbers its faces differently): send the twist/taper
|
|
687
|
+
* keys with `operations: []` first (the message names them), re-select on
|
|
688
|
+
* the new shape, then send `{ operations }` back.
|
|
689
|
+
* Graph-bound spaces accept amount-only extrusion edits. Footprint, twist,
|
|
690
|
+
* taper and operation edits require the owning boundary tools, so generated
|
|
691
|
+
* walls, junctions and hosted openings remain synchronized.
|
|
692
|
+
* @throws VALIDATION for a key the kind does not have (the message lists the
|
|
693
|
+
* kind's keys), `kind` or `version` in a partial patch, or a value outside
|
|
694
|
+
* the constructor's own rules (torus tube ≥ ring, revolution angle ∉
|
|
695
|
+
* (0, 360], a profile crossing its axis, a spline with fewer than
|
|
696
|
+
* degree + 1 poles).
|
|
697
|
+
* @throws OPERATION_FAILED when the kernel cannot build the edited recipe;
|
|
698
|
+
* the model is left unchanged.
|
|
699
|
+
*
|
|
700
|
+
* @examplePrompt Make the dome's radius 8 metres
|
|
701
|
+
* @examplePrompt Raise the podium to 5 m
|
|
702
|
+
* @examplePrompt Widen the vase — move its profile points 20 cm outward
|
|
703
|
+
* @examplePrompt Change the fillet on the rounded column to 300 mm
|
|
704
|
+
*
|
|
705
|
+
* # Example
|
|
706
|
+
* ```ts
|
|
707
|
+
* // { kind: "sphere", values: { centre, radius: 19.685 }, … }
|
|
708
|
+
* const before = await snaptrude.design.query.getParameters(dome)
|
|
709
|
+
* const after = await snaptrude.design.update.parameters(dome, { radius: 31.496 }) // 8 m in internal units
|
|
710
|
+
*
|
|
711
|
+
* // Fillet radius on a recorded result: read → edit → send the array back
|
|
712
|
+
* const rec = await snaptrude.design.query.getParameters(column)
|
|
713
|
+
* const operations = rec?.operations ?? []
|
|
714
|
+
* if (operations[0]?.op === "fillet") {
|
|
715
|
+
* operations[0].radius = 1.181
|
|
716
|
+
* await snaptrude.design.update.parameters(column, { operations })
|
|
717
|
+
* }
|
|
718
|
+
* ```
|
|
719
|
+
*/
|
|
720
|
+
abstract parameters(component: ComponentHandle, patch: MassParametersPatch): PluginApiReturn<MassParametersRecord>;
|
|
436
721
|
/**
|
|
437
722
|
* Edit a **wall** — its thickness and/or height (the same command the
|
|
438
723
|
* properties panel's Thickness/Height fields drive) and/or its **wall type**
|
|
@@ -587,6 +872,16 @@ export declare abstract class PluginDesignUpdateApi {
|
|
|
587
872
|
* ```
|
|
588
873
|
*/
|
|
589
874
|
abstract ceiling(component: ComponentHandle, updates: PluginSlabUpdates): PluginApiReturn<PluginDesignChangeResult>;
|
|
875
|
+
/** Replace a native beam family while preserving its authored axis. Values use mm/degrees.
|
|
876
|
+
* @param component Native beam. @param updates Saved family reference and optional instance values.
|
|
877
|
+
* @returns Affected component IDs. One undoable operation; unsupported geometry fails before mutation.
|
|
878
|
+
*/
|
|
879
|
+
abstract beam(component: ComponentHandle, updates: PluginFamilyUpdates): PluginApiReturn<PluginDesignChangeResult>;
|
|
880
|
+
/** Replace a native column family while preserving its authored axis. Values use mm/degrees.
|
|
881
|
+
* @param component Native column. @param updates Saved family reference and optional instance values.
|
|
882
|
+
* @returns Affected component IDs. One undoable operation; unsupported geometry fails before mutation.
|
|
883
|
+
*/
|
|
884
|
+
abstract column(component: ComponentHandle, updates: PluginFamilyUpdates): PluginApiReturn<PluginDesignChangeResult>;
|
|
590
885
|
/**
|
|
591
886
|
* Set a component's **absolute world elevation** — moves it vertically so its
|
|
592
887
|
* base (the bounding-box bottom, world Y) lands at `elevation`. Composed over
|
|
@@ -682,12 +977,61 @@ export declare abstract class PluginDesignUpdateApi {
|
|
|
682
977
|
* ```
|
|
683
978
|
*/
|
|
684
979
|
abstract setStorey(components: ComponentHandle[], storey: number): PluginApiReturn<PluginDesignChangeResult>;
|
|
980
|
+
/**
|
|
981
|
+
* Change the **object type** of one or more masses — turn a mass into a real
|
|
982
|
+
* wall, roof, slab or floor: the properties panel's Object Type dropdown,
|
|
983
|
+
* headless. The geometry is kept exactly as it is (a wedge stays a wedge;
|
|
984
|
+
* nothing is flattened to a default thickness), so a sloped mass built with
|
|
985
|
+
* `design.create.massFromBrep` becomes a sloped roof or a raked wall. The
|
|
986
|
+
* component keeps its handle, label and storey; it gains the target type's
|
|
987
|
+
* construction layers and properties, and the type's default material when
|
|
988
|
+
* the mass still wore the default. One undoable operation for the whole
|
|
989
|
+
* list; undo turns them back into masses.
|
|
990
|
+
*
|
|
991
|
+
* Instances convert as a family: passing one instance (or the source) of an
|
|
992
|
+
* instanced mass converts its source and every sibling; `affected` echoes
|
|
993
|
+
* every visible member (the hidden instancing template converts too but is
|
|
994
|
+
* not listed). A converted component cannot be converted again (same rule
|
|
995
|
+
* as the panel). A converted wall has no parametric centerline: it hosts
|
|
996
|
+
* doors and windows and exports, but neighbours do not re-mitre against it.
|
|
997
|
+
*
|
|
998
|
+
* Throws before anything changes (all-or-nothing) when a component is not a
|
|
999
|
+
* mass, is a plinth, is locked or in a locked bucket, already had its type
|
|
1000
|
+
* changed, or when a handle is gone/forged.
|
|
1001
|
+
*
|
|
1002
|
+
* @param components - The masses to convert
|
|
1003
|
+
* @param objectType - Target type: `"wall"`, `"roof"`, `"slab"` or `"floor"`
|
|
1004
|
+
* (the `design.query.getEntityType` vocabulary)
|
|
1005
|
+
* @returns the visible components converted — the same handles, plus any
|
|
1006
|
+
* instance siblings pulled in by family expansion
|
|
1007
|
+
*
|
|
1008
|
+
* @examplePrompt Convert this mass into a wall
|
|
1009
|
+
* @examplePrompt Turn the sloped mass into a roof
|
|
1010
|
+
* @examplePrompt Make these masses real slabs
|
|
1011
|
+
* @examplePrompt Change the object type of the selection to wall
|
|
1012
|
+
* @examplePrompt Convert the wedge I built into a raked wall
|
|
1013
|
+
* @examplePrompt Turn this mass into a floor
|
|
1014
|
+
*
|
|
1015
|
+
* # Example
|
|
1016
|
+
* ```ts
|
|
1017
|
+
* const brep = await snaptrude.core.geom.create.brepFromFaces(wedgeFaces)
|
|
1018
|
+
* const wedge = await snaptrude.design.create.massFromBrep(brep, "Gable end")
|
|
1019
|
+
* const { affected } = await snaptrude.design.update.setObjectType([wedge], "wall")
|
|
1020
|
+
* console.log(await snaptrude.design.query.getEntityType(affected[0])) // "wall"
|
|
1021
|
+
* ```
|
|
1022
|
+
*/
|
|
1023
|
+
abstract setObjectType(components: ComponentHandle[], objectType: PluginObjectType): PluginApiReturn<PluginDesignChangeResult>;
|
|
685
1024
|
/**
|
|
686
1025
|
* Update an existing parametric buildable envelope — regenerate the zoning
|
|
687
1026
|
* volume from a revised site polygon, setbacks, vertical cap, or FAR and
|
|
688
1027
|
* lot-coverage limits, keeping the same envelope id. Canonical home of the
|
|
689
1028
|
* update formerly at `entity.buildableEnvelope.update` (now deprecated).
|
|
690
1029
|
*
|
|
1030
|
+
* Edge state is preserved, like the right panel: every edge's type
|
|
1031
|
+
* (front/side/rear) is kept. For each type whose value changed (by more than
|
|
1032
|
+
* 2 mm), the per-edge custom distances on edges of that type are cleared;
|
|
1033
|
+
* custom distances on types whose value did not change are kept.
|
|
1034
|
+
*
|
|
691
1035
|
* @param buildableEnvelopeId - Existing envelope ID to update; non-empty and
|
|
692
1036
|
* must match an existing envelope on the canvas.
|
|
693
1037
|
* @param sitePolygon - Site polygon vertices in `lengthUnit`; minimum 3 vertices.
|
|
@@ -698,9 +1042,15 @@ export declare abstract class PluginDesignUpdateApi {
|
|
|
698
1042
|
* @param farRatio - Optional FAR value, positive when provided.
|
|
699
1043
|
* @param lotCoverageMaxPct - Optional lot coverage cap, `0..100`.
|
|
700
1044
|
* @returns A {@linkcode PluginBuildableEnvelopeUpdateResult} with the
|
|
701
|
-
* `buildableEnvelopeId` of the updated envelope
|
|
1045
|
+
* `buildableEnvelopeId` of the updated envelope and `clearedEdgeSetbacks`,
|
|
1046
|
+
* the `edgeIndex` of each edge that lost its custom distance (empty when
|
|
1047
|
+
* none). Tell the user about any cleared edges.
|
|
702
1048
|
* @throws If validation fails, the envelope does not exist, or generation
|
|
703
|
-
* produces no renderable geometry.
|
|
1049
|
+
* produces no renderable geometry. Also throws `PRECONDITION_FAILED`
|
|
1050
|
+
* (`details.reason: "STALE_EDGE_SETTINGS"`, nothing changes) when the site
|
|
1051
|
+
* outline changed since the edge settings were made. Tell the user;
|
|
1052
|
+
* editing any edge on the canvas setback pills resets the edge settings
|
|
1053
|
+
* to the new outline (dropping the old ones), after which you can retry.
|
|
704
1054
|
*
|
|
705
1055
|
* @examplePrompt Change the envelope's height limit to 175 feet
|
|
706
1056
|
* @examplePrompt Update the setbacks on the buildable envelope
|
|
@@ -725,5 +1075,59 @@ export declare abstract class PluginDesignUpdateApi {
|
|
|
725
1075
|
* ```
|
|
726
1076
|
*/
|
|
727
1077
|
abstract buildableEnvelope(buildableEnvelopeId: string, sitePolygon: PluginBuildableEnvelopePolygonVertex[], lengthUnit: "ft" | "m", setbacks: PluginBuildableEnvelopeSetbackTier[], verticalCap: PluginBuildableEnvelopeVerticalCap, floorToFloor: number, farRatio?: number, lotCoverageMaxPct?: number): PluginApiReturn<PluginBuildableEnvelopeUpdateResult>;
|
|
1078
|
+
/**
|
|
1079
|
+
* Change one site edge's type (front / side / rear) and/or give that edge
|
|
1080
|
+
* its own setback distance, the same as editing a setback pill on the
|
|
1081
|
+
* canvas. One undo step; the pills and Site Analysis sheet refresh.
|
|
1082
|
+
*
|
|
1083
|
+
* Address the edge with `siteId` and `edgeIndex` from
|
|
1084
|
+
* `program.site.listEdges()`. Setting `role` clears that edge's own
|
|
1085
|
+
* distance. `setback: null` clears the edge's own distance and puts it back
|
|
1086
|
+
* on its type's distance. When `role` and a numeric `setback` are both
|
|
1087
|
+
* given, the role is applied first and then the setback, so the new distance
|
|
1088
|
+
* wins. On the only edge of its type, a numeric setback becomes that type's
|
|
1089
|
+
* value (like the canvas pills), so `null` afterwards has nothing to
|
|
1090
|
+
* clear; set the type's value instead. Only call this when the user asks to
|
|
1091
|
+
* change an edge.
|
|
1092
|
+
*
|
|
1093
|
+
* @param siteId - Site component id, from `program.site.listEdges()`.
|
|
1094
|
+
* @param edgeIndex - Edge index from `program.site.listEdges()`; nonnegative
|
|
1095
|
+
* integer, upper bound checked by the host.
|
|
1096
|
+
* @param patch - A {@linkcode PluginSiteEdgePatch}: `role`, `setback` (a
|
|
1097
|
+
* number in `lengthUnit`, or `null` to clear), and `lengthUnit` (required
|
|
1098
|
+
* with a numeric `setback`). Provide `role` and/or `setback`.
|
|
1099
|
+
* @returns The refreshed {@linkcode PluginDesignUpdateSiteEdgeResult} for the
|
|
1100
|
+
* site, as `program.site.listEdges()` returns it.
|
|
1101
|
+
* @throws
|
|
1102
|
+
* - `HANDLE_INVALID`: unknown `siteId` (invalid site handle).
|
|
1103
|
+
* - `VALIDATION`: `edgeIndex` is out of range or not a nonnegative
|
|
1104
|
+
* integer; when the index is out of range, `details` include `edgeCount`.
|
|
1105
|
+
* - `PRECONDITION_FAILED`, with `details.reason` one of:
|
|
1106
|
+
* - `NO_BUILDABLE_ENVELOPE`: the site has no envelope to store edge
|
|
1107
|
+
* settings on. Ask the user whether to create a default envelope with
|
|
1108
|
+
* `design.create.buildableEnvelopeFromSite(siteId)` or to create one
|
|
1109
|
+
* themselves; do not create one unasked.
|
|
1110
|
+
* - `MASSING_ENVELOPE`: the site's envelope is a massing envelope. Tell
|
|
1111
|
+
* the user; change nothing.
|
|
1112
|
+
* - `ENVELOPE_TRANSFORMED`: the envelope has been rotated or scaled, so
|
|
1113
|
+
* edge editing is unavailable. Tell the user.
|
|
1114
|
+
* - `STALE_EDGE_SETTINGS`: the site outline changed since the edge
|
|
1115
|
+
* settings were made. Tell the user; editing any edge on the canvas
|
|
1116
|
+
* setback pills resets the edge settings to the new outline (dropping
|
|
1117
|
+
* the old ones), after which you can retry.
|
|
1118
|
+
*
|
|
1119
|
+
* @examplePrompt Make edge 2 the front
|
|
1120
|
+
* @examplePrompt Set just the north edge setback to 8 m
|
|
1121
|
+
* @examplePrompt Remove the custom setback on edge 3
|
|
1122
|
+
*
|
|
1123
|
+
* # Example
|
|
1124
|
+
* ```ts
|
|
1125
|
+
* const [{ siteId }] = (await snaptrude.program.site.listEdges()).sites
|
|
1126
|
+
* await snaptrude.design.update.siteEdge(siteId, 2, { role: "front" })
|
|
1127
|
+
* await snaptrude.design.update.siteEdge(siteId, 3, { setback: 8, lengthUnit: "m" })
|
|
1128
|
+
* await snaptrude.design.update.siteEdge(siteId, 3, { setback: null })
|
|
1129
|
+
* ```
|
|
1130
|
+
*/
|
|
1131
|
+
abstract siteEdge(siteId: string, edgeIndex: number, patch: PluginSiteEdgePatch): PluginApiReturn<PluginDesignUpdateSiteEdgeResult>;
|
|
728
1132
|
}
|
|
729
1133
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/update/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAiB,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAKL,uBAAuB,EACxB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EACL,oCAAoC,EACpC,kCAAkC,EAClC,kCAAkC,EAClC,mCAAmC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/update/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAi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EAAE,eAAe,EAAE,EAC7B,UAAU,EAAE,gBAAgB,GAC3B,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDG;aACa,iBAAiB,CAC/B,mBAAmB,EAAE,MAAM,EAC3B,WAAW,EAAE,oCAAoC,EAAE,EACnD,UAAU,EAAE,IAAI,GAAG,GAAG,EACtB,QAAQ,EAAE,kCAAkC,EAAE,EAC9C,WAAW,EAAE,kCAAkC,EAC/C,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,iBAAiB,CAAC,EAAE,MAAM,GACzB,eAAe,CAAC,mCAAmC,CAAC;IAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDG;aACa,QAAQ,CACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,mBAAmB,GACzB,eAAe,CAAC,gCAAgC,CAAC;CACrD"}
|
|
@@ -34,6 +34,23 @@ export declare abstract class PluginDesignVisibilityApi {
|
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
abstract hide(components: ComponentHandle[]): PluginApiReturn<PluginDesignChangeResult>;
|
|
37
|
+
/**
|
|
38
|
+
* Reveal specific hidden components — the inverse of
|
|
39
|
+
* {@linkcode PluginDesignVisibilityApi.hide}. Use
|
|
40
|
+
* {@linkcode PluginDesignVisibilityApi.showAll} to reveal everything.
|
|
41
|
+
*
|
|
42
|
+
* @param components - The components to reveal.
|
|
43
|
+
* @returns A {@linkcode PluginDesignChangeResult} echoing the components shown.
|
|
44
|
+
*
|
|
45
|
+
* @examplePrompt Show these walls again
|
|
46
|
+
* @examplePrompt Unhide the selected furniture
|
|
47
|
+
*
|
|
48
|
+
* # Example
|
|
49
|
+
* ```ts
|
|
50
|
+
* await snaptrude.design.visibility.show([wall])
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
abstract show(components: ComponentHandle[]): PluginApiReturn<PluginDesignChangeResult>;
|
|
37
54
|
/**
|
|
38
55
|
* Isolate entities — hide everything else so only the given entities remain
|
|
39
56
|
* visible (the "Isolate" / solo action). Undoable. Reverse it with
|
|
@@ -84,6 +101,17 @@ export declare const PluginDesignVisibilityHideArgs: z.ZodObject<{
|
|
|
84
101
|
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
85
102
|
}, z.core.$strip>;
|
|
86
103
|
export type PluginDesignVisibilityHideArgs = z.infer<typeof PluginDesignVisibilityHideArgs>;
|
|
104
|
+
/**
|
|
105
|
+
* Arguments for {@linkcode PluginDesignVisibilityApi.show}.
|
|
106
|
+
*
|
|
107
|
+
* | Property | Type | Description |
|
|
108
|
+
* |---|---|---|
|
|
109
|
+
* | `components` | {@linkcode ComponentHandle}`[]` | Entities to reveal |
|
|
110
|
+
*/
|
|
111
|
+
export declare const PluginDesignVisibilityShowArgs: z.ZodObject<{
|
|
112
|
+
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
export type PluginDesignVisibilityShowArgs = z.infer<typeof PluginDesignVisibilityShowArgs>;
|
|
87
115
|
/**
|
|
88
116
|
* Arguments for {@linkcode PluginDesignVisibilityApi.isolate}.
|
|
89
117
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../src/api/design/visibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAA;AAEjD;;;;;;;;;GASG;AACH,8BAAsB,yBAAyB;;IAG7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