@snaptrude/plugin-core 0.9.17 → 0.9.18-voids-20261017.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/analysis/daylight.d.ts +5 -5
- package/dist/api/analysis/solar.d.ts +2 -2
- package/dist/api/core/camera/index.d.ts +29 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +7 -1
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +8 -2
- package/dist/api/core/geom/update/contour.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 +65 -25
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +272 -99
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +13 -12
- package/dist/api/design/create/opening-fields.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +1 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +18 -24
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +801 -28
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +16 -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/index.d.ts +42 -32
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/selection/index.d.ts +10 -10
- 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 +43 -3
- 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 +38 -22
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- 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/index.d.ts +32 -12
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +106 -6
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- 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/viewPresets.d.ts +222 -0
- package/dist/api/presentation/viewPresets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +103 -5
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +6 -6
- package/dist/errors/codes.d.ts +3 -1
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/index.cjs +3741 -2383
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3618 -2383
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/generate-manifest.mjs +5 -0
- package/src/api/core/camera/index.ts +29 -0
- package/src/api/core/geom/create/index.ts +7 -1
- package/src/api/core/geom/update/contour.ts +8 -2
- 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 +57 -17
- package/src/api/design/create/index.ts +288 -120
- package/src/api/design/create/opening-fields.ts +15 -12
- package/src/api/design/delete/index.ts +1 -0
- package/src/api/design/doors/index.ts +58 -42
- package/src/api/design/family.ts +666 -33
- package/src/api/design/index.ts +34 -4
- package/src/api/design/networks.ts +607 -0
- package/src/api/design/query/index.ts +12 -2
- package/src/api/design/types/index.ts +31 -24
- package/src/api/design/update/index.ts +44 -3
- package/src/api/design/windows/index.ts +40 -22
- package/src/api/presentation/annotate.ts +90 -58
- 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/index.ts +39 -14
- package/src/api/presentation/placedViews.ts +119 -28
- package/src/api/presentation/sheets.ts +181 -20
- package/src/api/presentation/viewPresets.ts +241 -0
- package/src/api/presentation/views.ts +46 -6
- package/src/errors/codes.ts +7 -0
- package/test/drawingContract.test.mjs +288 -0
- package/test/errors.test.mjs +1 -0
- package/api-manifest.json +0 -9711
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as z from "zod"
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ComponentHandle,
|
|
4
|
+
ContourHandle,
|
|
5
|
+
ProfileHandle,
|
|
6
|
+
Vec3Handle,
|
|
7
|
+
} from "../../../handles"
|
|
3
8
|
import { PluginOpeningBaseOptions } from "./opening-fields"
|
|
9
|
+
import { PluginWallType } from "../types"
|
|
10
|
+
import { PluginFamilyValues } from "../catalog"
|
|
4
11
|
|
|
5
12
|
/**
|
|
6
13
|
* Maximum items per bulk `design.create.*` call. A bounded request keeps
|
|
@@ -88,7 +95,7 @@ export type PluginWallTopProfile = z.infer<typeof PluginWallTopProfile>
|
|
|
88
95
|
* | `profile` | {@linkcode ProfileHandle} | Ordered curve chain (wall centerlines) |
|
|
89
96
|
* | `height` | `number`? | Wall height (Snaptrude units, > 0; default engine default) |
|
|
90
97
|
* | `thickness` | `number`? | Wall thickness (Snaptrude units, > 0; default: `wallType`'s total layer thickness when given, else engine default) |
|
|
91
|
-
* | `wallType` |
|
|
98
|
+
* | `wallType` | {@linkcode PluginWallType}? | Legacy name/id or exact native `{ id, version }` pin from `design.types.list("wall")` (default generic) |
|
|
92
99
|
* | `storey` | `number`? (int) | Target storey (must exist) — the run's walls are assigned + lifted to its base in the same undo entry (default: geometry-derived) |
|
|
93
100
|
* | `topProfiles` | ({@linkcode PluginWallTopProfile} \| `null`)[]? | Top edge per curve of `profile`, same order; a `null` or missing entry keeps that wall flat at `height`. Raked / gabled walls (straight curves only) |
|
|
94
101
|
*/
|
|
@@ -96,9 +103,11 @@ export const PluginCreateWallRunItem = z.object({
|
|
|
96
103
|
profile: ProfileHandle,
|
|
97
104
|
height: z.number().optional(),
|
|
98
105
|
thickness: z.number().optional(),
|
|
99
|
-
wallType:
|
|
106
|
+
wallType: PluginWallType.optional(),
|
|
100
107
|
storey: z.number().int().optional(),
|
|
101
108
|
topProfiles: z.array(PluginWallTopProfile.nullable()).optional(),
|
|
109
|
+
/** Optional family overrides in mm/degrees. Host length/height stay geometry inputs. */
|
|
110
|
+
values: PluginFamilyValues.optional(),
|
|
102
111
|
})
|
|
103
112
|
export type PluginCreateWallRunItem = z.infer<typeof PluginCreateWallRunItem>
|
|
104
113
|
|
|
@@ -143,22 +152,23 @@ export type PluginCreateFloorItems = z.infer<typeof PluginCreateFloorItems>
|
|
|
143
152
|
|
|
144
153
|
/**
|
|
145
154
|
* One door to place via {@linkcode PluginDesignCreateApi.doors} — the same
|
|
146
|
-
* fields as a `"door"` {@linkcode PluginDesignCreateOpeningOptions}
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* jamb it is hinged on. Rejects unknown fields.
|
|
155
|
+
* fields as a `"door"` {@linkcode PluginDesignCreateOpeningOptions}.
|
|
156
|
+
* Values are evaluated before cutting. Numeric lengths use SU; unit strings
|
|
157
|
+
* are accepted in values. `facing` selects local +Z; `hinge` sets the declared
|
|
158
|
+
* hand enum (left = local -X, right = +X). Both are world points.
|
|
151
159
|
*
|
|
152
160
|
* | Property | Type | Description |
|
|
153
161
|
* |---|---|---|
|
|
154
|
-
* | `
|
|
162
|
+
* | `familyId` | `string` | Hosted door family definition ID |
|
|
163
|
+
* | `version` | `number`? | Exact version; newest known by default |
|
|
164
|
+
* | `values` | `Record<string, number \| string>`? | Authored parameter overrides |
|
|
155
165
|
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the door |
|
|
156
166
|
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
157
167
|
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the door swings open to (default engine-chosen) |
|
|
158
|
-
* | `hinge` | {@linkcode Vec3Handle}? | World point near the
|
|
168
|
+
* | `hinge` | {@linkcode Vec3Handle}? | World point near the hinged jamb; requires hand control |
|
|
159
169
|
* | `label` | `string`? | Instance name (optional) |
|
|
160
|
-
* | `width` | `number`? |
|
|
161
|
-
* | `height` | `number`? |
|
|
170
|
+
* | `width` | `number`? | Declared width parameter (SU, > 0), not evaluated hole width |
|
|
171
|
+
* | `height` | `number`? | Declared height parameter (SU, > 0) |
|
|
162
172
|
*/
|
|
163
173
|
export const PluginCreateDoorItem = z
|
|
164
174
|
.object({ ...PluginOpeningBaseOptions })
|
|
@@ -183,15 +193,17 @@ export type PluginCreateDoorItems = z.infer<typeof PluginCreateDoorItems>
|
|
|
183
193
|
*
|
|
184
194
|
* | Property | Type | Description |
|
|
185
195
|
* |---|---|---|
|
|
186
|
-
* | `
|
|
196
|
+
* | `familyId` | `string` | Hosted window family definition ID |
|
|
197
|
+
* | `version` | `number`? | Exact version; newest known by default |
|
|
198
|
+
* | `values` | `Record<string, number \| string>`? | Authored parameter overrides; numeric lengths use SU |
|
|
187
199
|
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the window |
|
|
188
200
|
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
189
201
|
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the window opens to (default engine-chosen) |
|
|
190
|
-
* | `hinge` | {@linkcode Vec3Handle}? | World point near the
|
|
202
|
+
* | `hinge` | {@linkcode Vec3Handle}? | World point near the hinged jamb; requires hand control |
|
|
191
203
|
* | `label` | `string`? | Instance name (optional) |
|
|
192
|
-
* | `width` | `number`? |
|
|
193
|
-
* | `height` | `number`? |
|
|
194
|
-
* | `sillHeight` | `number`? |
|
|
204
|
+
* | `width` | `number`? | Declared width parameter (SU, > 0), not evaluated hole width |
|
|
205
|
+
* | `height` | `number`? | Declared height parameter (SU, > 0) |
|
|
206
|
+
* | `sillHeight` | `number`? | Declared sill parameter (SU, ≥ 0); position Y is ignored |
|
|
195
207
|
*/
|
|
196
208
|
export const PluginCreateWindowItem = z
|
|
197
209
|
.object({
|
|
@@ -252,3 +264,31 @@ export const PluginCreateFurnitureItems = z
|
|
|
252
264
|
export type PluginCreateFurnitureItems = z.infer<
|
|
253
265
|
typeof PluginCreateFurnitureItems
|
|
254
266
|
>
|
|
267
|
+
|
|
268
|
+
// ---------------------------------------------------------------------------
|
|
269
|
+
// voids
|
|
270
|
+
// ---------------------------------------------------------------------------
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* One void to cut via {@linkcode PluginDesignCreateApi.voids} — the same fields as
|
|
274
|
+
* {@linkcode PluginDesignCreateApi.void}. Rejects unknown fields.
|
|
275
|
+
*
|
|
276
|
+
* | Property | Type | Description |
|
|
277
|
+
* | --- | --- | --- |
|
|
278
|
+
* | `host` | {@linkcode ComponentHandle} | The slab, floor, roof or ceiling to cut through. Not a wall. |
|
|
279
|
+
* | `outline` | {@linkcode ProfileHandle} | Closed, flat plan outline in world SU (all points at one height). That height is ignored: it is dropped straight onto the host's top face. |
|
|
280
|
+
*/
|
|
281
|
+
export const PluginCreateVoidItem = z
|
|
282
|
+
.object({
|
|
283
|
+
host: ComponentHandle,
|
|
284
|
+
outline: ProfileHandle,
|
|
285
|
+
})
|
|
286
|
+
.strict()
|
|
287
|
+
export type PluginCreateVoidItem = z.infer<typeof PluginCreateVoidItem>
|
|
288
|
+
|
|
289
|
+
/** The `items` array of {@linkcode PluginDesignCreateApi.voids} (1…1000; the host takes at most 200, 50 per host). */
|
|
290
|
+
export const PluginCreateVoidItems = z
|
|
291
|
+
.array(PluginCreateVoidItem)
|
|
292
|
+
.min(1)
|
|
293
|
+
.max(PLUGIN_CREATE_BATCH_LIMIT)
|
|
294
|
+
export type PluginCreateVoidItems = z.infer<typeof PluginCreateVoidItems>
|