@snaptrude/plugin-core 0.0.0-dev-20260708130115 → 0.0.0-dev-20260827135706

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/CHANGELOG.md +152 -1
  2. package/api-manifest.json +3620 -276
  3. package/dist/api/analysis/daylight.d.ts +603 -0
  4. package/dist/api/analysis/daylight.d.ts.map +1 -0
  5. package/dist/api/analysis/heatmaps.d.ts +658 -0
  6. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  7. package/dist/api/analysis/illuminance.d.ts +145 -0
  8. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  9. package/dist/api/analysis/index.d.ts +59 -0
  10. package/dist/api/analysis/index.d.ts.map +1 -0
  11. package/dist/api/analysis/shadows.d.ts +165 -0
  12. package/dist/api/analysis/shadows.d.ts.map +1 -0
  13. package/dist/api/analysis/solar.d.ts +249 -0
  14. package/dist/api/analysis/solar.d.ts.map +1 -0
  15. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  16. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  17. package/dist/api/analysis/sunpath.d.ts +80 -0
  18. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  19. package/dist/api/analysis/weather.d.ts +193 -0
  20. package/dist/api/analysis/weather.d.ts.map +1 -0
  21. package/dist/api/core/camera/index.d.ts +261 -0
  22. package/dist/api/core/camera/index.d.ts.map +1 -0
  23. package/dist/api/core/comment/index.d.ts +105 -2
  24. package/dist/api/core/comment/index.d.ts.map +1 -1
  25. package/dist/api/core/geom/create/index.d.ts +840 -14
  26. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  27. package/dist/api/core/geom/delete/index.d.ts +8 -2
  28. package/dist/api/core/geom/delete/index.d.ts.map +1 -1
  29. package/dist/api/core/geom/query/arc.d.ts +5 -5
  30. package/dist/api/core/geom/query/brep.d.ts +130 -18
  31. package/dist/api/core/geom/query/brep.d.ts.map +1 -1
  32. package/dist/api/core/geom/query/circle.d.ts +18 -18
  33. package/dist/api/core/geom/query/contour.d.ts +20 -20
  34. package/dist/api/core/geom/query/curve.d.ts +49 -49
  35. package/dist/api/core/geom/query/edge.d.ts +5 -5
  36. package/dist/api/core/geom/query/face.d.ts +16 -16
  37. package/dist/api/core/geom/query/halfedge.d.ts +8 -8
  38. package/dist/api/core/geom/query/profile.d.ts +19 -19
  39. package/dist/api/core/geom/query/vertex.d.ts +8 -8
  40. package/dist/api/core/geom/update/contour.d.ts +14 -14
  41. package/dist/api/core/geom/update/curve.d.ts +7 -7
  42. package/dist/api/core/geom/update/profile.d.ts +16 -16
  43. package/dist/api/core/handles/index.d.ts +210 -0
  44. package/dist/api/core/handles/index.d.ts.map +1 -0
  45. package/dist/api/core/index.d.ts +34 -0
  46. package/dist/api/core/index.d.ts.map +1 -1
  47. package/dist/api/core/io/export/index.d.ts +134 -0
  48. package/dist/api/core/io/export/index.d.ts.map +1 -0
  49. package/dist/api/core/io/import/index.d.ts +453 -0
  50. package/dist/api/core/io/import/index.d.ts.map +1 -0
  51. package/dist/api/core/io/index.d.ts +40 -0
  52. package/dist/api/core/io/index.d.ts.map +1 -0
  53. package/dist/api/core/io/job/index.d.ts +139 -0
  54. package/dist/api/core/io/job/index.d.ts.map +1 -0
  55. package/dist/api/core/io/query/index.d.ts +74 -0
  56. package/dist/api/core/io/query/index.d.ts.map +1 -0
  57. package/dist/api/core/io/terrain/index.d.ts +341 -0
  58. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  59. package/dist/api/core/io/underlay/index.d.ts +805 -0
  60. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  61. package/dist/api/core/layers.d.ts +7 -7
  62. package/dist/api/core/mode/index.d.ts +99 -0
  63. package/dist/api/core/mode/index.d.ts.map +1 -0
  64. package/dist/api/core/project/index.d.ts +68 -1
  65. package/dist/api/core/project/index.d.ts.map +1 -1
  66. package/dist/api/core/proposals/index.d.ts +531 -0
  67. package/dist/api/core/proposals/index.d.ts.map +1 -0
  68. package/dist/api/core/storeys/index.d.ts +265 -0
  69. package/dist/api/core/storeys/index.d.ts.map +1 -0
  70. package/dist/api/core/tags.d.ts +24 -0
  71. package/dist/api/core/tags.d.ts.map +1 -1
  72. package/dist/api/core/user.d.ts +44 -0
  73. package/dist/api/core/user.d.ts.map +1 -0
  74. package/dist/api/core/zoom/index.d.ts +4 -0
  75. package/dist/api/core/zoom/index.d.ts.map +1 -1
  76. package/dist/api/design/boolean/index.d.ts +4 -4
  77. package/dist/api/design/create/index.d.ts +568 -45
  78. package/dist/api/design/create/index.d.ts.map +1 -1
  79. package/dist/api/design/delete/index.d.ts +3 -0
  80. package/dist/api/design/delete/index.d.ts.map +1 -1
  81. package/dist/api/design/doors/index.d.ts +195 -0
  82. package/dist/api/design/doors/index.d.ts.map +1 -1
  83. package/dist/api/design/edit/index.d.ts +1 -1
  84. package/dist/api/design/erase/index.d.ts +2 -2
  85. package/dist/api/design/family.d.ts +349 -0
  86. package/dist/api/design/family.d.ts.map +1 -0
  87. package/dist/api/design/furniture/index.d.ts +181 -8
  88. package/dist/api/design/furniture/index.d.ts.map +1 -1
  89. package/dist/api/design/index.d.ts +98 -0
  90. package/dist/api/design/index.d.ts.map +1 -1
  91. package/dist/api/design/lock.d.ts +26 -0
  92. package/dist/api/design/lock.d.ts.map +1 -1
  93. package/dist/api/design/materials/index.d.ts +270 -16
  94. package/dist/api/design/materials/index.d.ts.map +1 -1
  95. package/dist/api/design/query/geometry/index.d.ts +112 -0
  96. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  97. package/dist/api/design/query/index.d.ts +282 -11
  98. package/dist/api/design/query/index.d.ts.map +1 -1
  99. package/dist/api/design/query/referenceLines.d.ts +45 -0
  100. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  101. package/dist/api/design/query/spaces.d.ts +181 -8
  102. package/dist/api/design/query/spaces.d.ts.map +1 -1
  103. package/dist/api/design/selection/index.d.ts +144 -0
  104. package/dist/api/design/selection/index.d.ts.map +1 -1
  105. package/dist/api/design/transform/index.d.ts +172 -10
  106. package/dist/api/design/transform/index.d.ts.map +1 -1
  107. package/dist/api/design/types/index.d.ts +181 -0
  108. package/dist/api/design/types/index.d.ts.map +1 -0
  109. package/dist/api/design/update/index.d.ts +553 -2
  110. package/dist/api/design/update/index.d.ts.map +1 -1
  111. package/dist/api/design/visibility.d.ts +126 -0
  112. package/dist/api/design/visibility.d.ts.map +1 -0
  113. package/dist/api/design/windows/index.d.ts +113 -2
  114. package/dist/api/design/windows/index.d.ts.map +1 -1
  115. package/dist/api/entity/buildableEnvelope.d.ts +4 -0
  116. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  117. package/dist/api/entity/referenceLine.d.ts +10 -2
  118. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  119. package/dist/api/entity/space.d.ts +21 -21
  120. package/dist/api/entity/story.d.ts +242 -15
  121. package/dist/api/entity/story.d.ts.map +1 -1
  122. package/dist/api/index.d.ts +10 -0
  123. package/dist/api/index.d.ts.map +1 -1
  124. package/dist/api/presentation/aiInspiration.d.ts +25 -25
  125. package/dist/api/presentation/annotate.d.ts +467 -0
  126. package/dist/api/presentation/annotate.d.ts.map +1 -0
  127. package/dist/api/presentation/diagrams.d.ts +111 -8
  128. package/dist/api/presentation/diagrams.d.ts.map +1 -1
  129. package/dist/api/presentation/export.d.ts +108 -0
  130. package/dist/api/presentation/export.d.ts.map +1 -0
  131. package/dist/api/presentation/import.d.ts +55 -4
  132. package/dist/api/presentation/import.d.ts.map +1 -1
  133. package/dist/api/presentation/index.d.ts +58 -1
  134. package/dist/api/presentation/index.d.ts.map +1 -1
  135. package/dist/api/presentation/placedViews.d.ts +1139 -0
  136. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  137. package/dist/api/presentation/shapes.d.ts +481 -0
  138. package/dist/api/presentation/shapes.d.ts.map +1 -0
  139. package/dist/api/presentation/sheets.d.ts +452 -13
  140. package/dist/api/presentation/sheets.d.ts.map +1 -1
  141. package/dist/api/presentation/slideshow.d.ts +125 -0
  142. package/dist/api/presentation/slideshow.d.ts.map +1 -0
  143. package/dist/api/presentation/tables.d.ts +81 -0
  144. package/dist/api/presentation/tables.d.ts.map +1 -0
  145. package/dist/api/presentation/views.d.ts +367 -7
  146. package/dist/api/presentation/views.d.ts.map +1 -1
  147. package/dist/api/program/areas.d.ts +102 -12
  148. package/dist/api/program/areas.d.ts.map +1 -1
  149. package/dist/api/program/cores.d.ts +3 -99
  150. package/dist/api/program/cores.d.ts.map +1 -1
  151. package/dist/api/program/index.d.ts +7 -15
  152. package/dist/api/program/index.d.ts.map +1 -1
  153. package/dist/api/program/layout.d.ts +346 -11
  154. package/dist/api/program/layout.d.ts.map +1 -1
  155. package/dist/api/program/site.d.ts +469 -13
  156. package/dist/api/program/site.d.ts.map +1 -1
  157. package/dist/api/program/spreadsheet.d.ts +365 -41
  158. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  159. package/dist/api/workspace/index.d.ts +505 -0
  160. package/dist/api/workspace/index.d.ts.map +1 -0
  161. package/dist/errors/codes.d.ts +34 -0
  162. package/dist/errors/codes.d.ts.map +1 -0
  163. package/dist/errors/envelope.d.ts +56 -0
  164. package/dist/errors/envelope.d.ts.map +1 -0
  165. package/dist/errors/index.d.ts +6 -0
  166. package/dist/errors/index.d.ts.map +1 -0
  167. package/dist/errors/plugin-error.d.ts +69 -0
  168. package/dist/errors/plugin-error.d.ts.map +1 -0
  169. package/dist/handles.d.ts +97 -25
  170. package/dist/handles.d.ts.map +1 -1
  171. package/dist/host-utils.d.ts +4 -0
  172. package/dist/host-utils.d.ts.map +1 -1
  173. package/dist/index.cjs +4582 -1422
  174. package/dist/index.cjs.map +1 -1
  175. package/dist/index.d.ts +1 -0
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +4171 -1411
  178. package/dist/index.js.map +1 -1
  179. package/package.json +4 -2
  180. package/scripts/generate-manifest.mjs +45 -0
  181. package/scripts/generate-manifest.test.mjs +103 -4
  182. package/src/api/analysis/daylight.ts +470 -0
  183. package/src/api/analysis/heatmaps.ts +683 -0
  184. package/src/api/analysis/illuminance.ts +155 -0
  185. package/src/api/analysis/index.ts +61 -0
  186. package/src/api/analysis/shadows.ts +183 -0
  187. package/src/api/analysis/solar.ts +237 -0
  188. package/src/api/analysis/sunlightHours.ts +211 -0
  189. package/src/api/analysis/sunpath.ts +83 -0
  190. package/src/api/analysis/weather.ts +179 -0
  191. package/src/api/core/camera/index.ts +268 -0
  192. package/src/api/core/comment/index.ts +120 -2
  193. package/src/api/core/geom/create/index.ts +912 -1
  194. package/src/api/core/geom/delete/index.ts +6 -0
  195. package/src/api/core/geom/query/brep.ts +119 -0
  196. package/src/api/core/handles/index.ts +233 -0
  197. package/src/api/core/index.ts +34 -0
  198. package/src/api/core/io/export/index.ts +126 -0
  199. package/src/api/core/io/import/index.ts +496 -0
  200. package/src/api/core/io/index.ts +42 -0
  201. package/src/api/core/io/job/index.ts +140 -0
  202. package/src/api/core/io/query/index.ts +71 -0
  203. package/src/api/core/io/terrain/index.ts +360 -0
  204. package/src/api/core/io/underlay/index.ts +705 -0
  205. package/src/api/core/mode/index.ts +96 -0
  206. package/src/api/core/project/index.ts +62 -1
  207. package/src/api/core/proposals/index.ts +569 -0
  208. package/src/api/core/storeys/index.ts +294 -0
  209. package/src/api/core/tags.ts +27 -0
  210. package/src/api/core/user.ts +46 -0
  211. package/src/api/core/zoom/index.ts +4 -0
  212. package/src/api/design/create/index.ts +670 -30
  213. package/src/api/design/delete/index.ts +3 -0
  214. package/src/api/design/doors/index.ts +208 -0
  215. package/src/api/design/erase/index.ts +1 -1
  216. package/src/api/design/family.ts +388 -0
  217. package/src/api/design/furniture/index.ts +197 -8
  218. package/src/api/design/index.ts +102 -0
  219. package/src/api/design/lock.ts +27 -0
  220. package/src/api/design/materials/index.ts +334 -27
  221. package/src/api/design/query/geometry/index.ts +125 -3
  222. package/src/api/design/query/index.ts +217 -7
  223. package/src/api/design/query/referenceLines.ts +52 -0
  224. package/src/api/design/query/spaces.ts +143 -0
  225. package/src/api/design/selection/index.ts +129 -0
  226. package/src/api/design/transform/index.ts +170 -9
  227. package/src/api/design/types/index.ts +156 -0
  228. package/src/api/design/update/index.ts +631 -3
  229. package/src/api/design/visibility.ts +143 -0
  230. package/src/api/design/windows/index.ts +128 -2
  231. package/src/api/entity/buildableEnvelope.ts +4 -0
  232. package/src/api/entity/referenceLine.ts +8 -0
  233. package/src/api/entity/story.ts +259 -15
  234. package/src/api/index.ts +10 -0
  235. package/src/api/presentation/annotate.ts +385 -0
  236. package/src/api/presentation/diagrams.ts +118 -8
  237. package/src/api/presentation/export.ts +108 -0
  238. package/src/api/presentation/import.ts +51 -4
  239. package/src/api/presentation/index.ts +66 -1
  240. package/src/api/presentation/placedViews.ts +1120 -0
  241. package/src/api/presentation/shapes.ts +274 -0
  242. package/src/api/presentation/sheets.ts +400 -13
  243. package/src/api/presentation/slideshow.ts +134 -0
  244. package/src/api/presentation/tables.ts +84 -0
  245. package/src/api/presentation/views.ts +376 -8
  246. package/src/api/program/areas.ts +88 -15
  247. package/src/api/program/cores.ts +3 -91
  248. package/src/api/program/index.ts +7 -15
  249. package/src/api/program/layout.ts +365 -11
  250. package/src/api/program/site.ts +435 -13
  251. package/src/api/program/spreadsheet.ts +376 -35
  252. package/src/api/workspace/index.ts +563 -0
  253. package/src/errors/codes.ts +136 -0
  254. package/src/errors/envelope.ts +75 -0
  255. package/src/errors/index.ts +21 -0
  256. package/src/errors/plugin-error.ts +134 -0
  257. package/src/handles.ts +123 -13
  258. package/src/host-utils.ts +4 -0
  259. package/src/index.ts +1 -0
  260. package/test/errors.test.mjs +184 -0
  261. package/tsconfig.json +7 -2
@@ -1,7 +1,8 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../../types";
3
- import { ComponentHandle, ContourHandle, ProfileHandle, Vec3Handle } from "../../../handles";
3
+ import { BrepHandle, ComponentHandle, ContourHandle, ProfileHandle, Vec3Handle } from "../../../handles";
4
4
  import { PluginSpaceType, PluginMassType, PluginDepartmentId } from "../../entity/space";
5
+ import { PluginBuildableEnvelopePolygonVertex, PluginBuildableEnvelopeSetbackTier, PluginBuildableEnvelopeVerticalCap, PluginBuildableEnvelopeCreateResult } from "../../entity/buildableEnvelope";
5
6
  /**
6
7
  * `design.create.*` — author new scene-committed BIM entities.
7
8
  *
@@ -14,6 +15,13 @@ import { PluginSpaceType, PluginMassType, PluginDepartmentId } from "../../entit
14
15
  * Footprint objects take a {@linkcode ContourHandle} (outer profile + holes);
15
16
  * build one with `snaptrude.core.geom.create.contourFromProfile(s)`.
16
17
  *
18
+ * `door`/`window` place a catalog item into a host wall (the world point is
19
+ * projected onto the wall face to locate the opening; the wall is re-cut in one
20
+ * undo entry) and throw if the point projects outside the wall. `smartLayout` is
21
+ * the one creator returning a grouped {@linkcode PluginSmartLayoutResult} rather
22
+ * than a handle — it clones an in-scene template into one or more target spaces,
23
+ * merging every target into a single undo batch (see its JSDoc).
24
+ *
17
25
  * Accessed via `snaptrude.design.create`.
18
26
  */
19
27
  export declare abstract class PluginDesignCreateApi {
@@ -32,14 +40,25 @@ export declare abstract class PluginDesignCreateApi {
32
40
  * @param spaceType - Space-type classification (default `Room`)
33
41
  * @param massType - Mass-type classification (default `Room`)
34
42
  * @param departmentId - Department assignment (default department)
43
+ * @param storey - Target storey number to place the space on — the same integer
44
+ * `entity.story` uses (`1` ground, `2` first floor, `-1` basement). Default:
45
+ * the active storey. Folds a `core.storeys.setActive` call into the create,
46
+ * placing the space at that storey's floor elevation (any `position` offset is
47
+ * applied on top). Throws if no storey has that value.
35
48
  * @returns the {@linkcode ComponentHandle} of the created space
36
- * @throws if the contour is invalid or the height is not positive
49
+ * @throws if the contour is invalid, the height is not positive, or the target
50
+ * storey does not exist
37
51
  *
38
52
  * @examplePrompt Create a room called Living Room that's 3m tall from this outline
39
53
  * @examplePrompt Add a new space on the current storey using this footprint
40
54
  * @examplePrompt Make a bedroom here and assign it to the Residential department
41
55
  * @examplePrompt Extrude this closed outline into a 10 foot high room
42
56
  * @examplePrompt Can you create a Kitchen space from the sketch I just drew?
57
+ * @examplePrompt Create a bedroom on the second floor from this outline
58
+ *
59
+ * @performance For MORE THAN ONE space, call `design.create.spaces(items[])` — the whole
60
+ * batch is one host round-trip. Looping this single-space creator is N round-trips (slow,
61
+ * and a large loop can trip the plugin rate limit).
43
62
  *
44
63
  * # Example
45
64
  * ```ts
@@ -52,9 +71,13 @@ export declare abstract class PluginDesignCreateApi {
52
71
  * ])
53
72
  * const contour = await snaptrude.core.geom.create.contourFromProfile(outer)
54
73
  * const space = await snaptrude.design.create.space(contour, 3, "Living")
74
+ * // …place one directly on the second floor (no setActive dance):
75
+ * const upstairs = await snaptrude.design.create.space(
76
+ * contour, 3, "Bedroom", undefined, undefined, undefined, undefined, 2,
77
+ * )
55
78
  * ```
56
79
  */
57
- abstract space(contour: ContourHandle, height: number, label?: string, position?: Vec3Handle, spaceType?: PluginSpaceType, massType?: PluginMassType, departmentId?: PluginDepartmentId): PluginApiReturn<ComponentHandle>;
80
+ abstract space(contour: ContourHandle, height: number, label?: string, position?: Vec3Handle, spaceType?: PluginSpaceType, massType?: PluginMassType, departmentId?: PluginDepartmentId, storey?: number): PluginApiReturn<ComponentHandle>;
58
81
  /**
59
82
  * Create a **mass** — a generic extruded prism (default `massType` "Generic mass").
60
83
  * Same footprint-extrude path as {@linkcode PluginDesignCreateApi.space}.
@@ -80,6 +103,47 @@ export declare abstract class PluginDesignCreateApi {
80
103
  * ```
81
104
  */
82
105
  abstract mass(contour: ContourHandle, height: number, label?: string, position?: Vec3Handle, massType?: PluginMassType): PluginApiReturn<ComponentHandle>;
106
+ /**
107
+ * Create a **mass** from a custom solid built with a `core.geom.create` brep
108
+ * constructor (`brepFromFaces`, `brepFromExtrusion`, `brepFromLoft`,
109
+ * `brepFromMesh`, or a brep boolean) — the free-form counterpart of
110
+ * {@linkcode PluginDesignCreateApi.mass}, for solids that are not simple
111
+ * footprint extrusions (pyramids, wedges, faceted volumes).
112
+ *
113
+ * Only accepts breps **minted by a `core.geom.create` brep constructor** —
114
+ * scene-derived breps from `design.query.geometry.getBrep` are read-only and
115
+ * throw. The mass is created as a generic mass (`massType` "Generic mass") at
116
+ * the exact coordinates the solid was authored in, committed as a single
117
+ * undo step, and synced to collaborators like any other creator.
118
+ *
119
+ * @param brep - A solid from a `core.geom.create` brep constructor
120
+ * @param label - Label (maps to `room_type`)
121
+ * @returns the {@linkcode ComponentHandle} of the created mass
122
+ * @throws if the brep handle is invalid, or the brep was not created by a
123
+ * `core.geom.create` brep constructor
124
+ *
125
+ * @examplePrompt Create a mass from these faces
126
+ * @examplePrompt Turn this custom brep into a scene mass
127
+ * @examplePrompt Add a pyramid-shaped mass to the model
128
+ *
129
+ * # Example
130
+ * ```ts
131
+ * const apex = { x: 0, y: 4, z: 0 }
132
+ * const a = { x: -2, y: 0, z: -2 }
133
+ * const b = { x: 2, y: 0, z: -2 }
134
+ * const c = { x: 2, y: 0, z: 2 }
135
+ * const d = { x: -2, y: 0, z: 2 }
136
+ * const brep = await snaptrude.core.geom.create.brepFromFaces([
137
+ * [a, d, c, b],
138
+ * [a, b, apex],
139
+ * [b, c, apex],
140
+ * [c, d, apex],
141
+ * [d, a, apex],
142
+ * ])
143
+ * const pyramid = await snaptrude.design.create.massFromBrep(brep, "Pavilion")
144
+ * ```
145
+ */
146
+ abstract massFromBrep(brep: BrepHandle, label?: string): PluginApiReturn<ComponentHandle>;
83
147
  /**
84
148
  * Create a **slab** by extruding a footprint contour by `thickness`
85
149
  * (default direction: down).
@@ -175,14 +239,17 @@ export declare abstract class PluginDesignCreateApi {
175
239
  abstract ceiling(contour: ContourHandle, thickness: number, heightFromFloor?: number): PluginApiReturn<ComponentHandle>;
176
240
  /**
177
241
  * Create a **column** by extruding a cross-section contour upward by `height`
178
- * from a base `position`.
242
+ * from a base `position`. The column is built to EXACTLY `height` — unlike
243
+ * the interactive draw tool, no slab-thickness deduction is applied.
179
244
  *
180
245
  * @param position - Base point
181
246
  * @param crossSection - Column cross-section footprint
182
- * @param height - Column height (> 0)
183
- * @param directionUp - Up axis (default world up)
247
+ * @param height - Column height (> 0), built exactly
248
+ * @param directionUp - Up axis (default world up); normalized by the host, so
249
+ * magnitude does not scale the height
184
250
  * @returns the {@linkcode ComponentHandle} of the created column
185
- * @throws if the cross-section is invalid or the height is not positive
251
+ * @throws if the cross-section is invalid, the height is not positive, or the
252
+ * direction is zero / lies in the cross-section plane (degenerate extrusion)
186
253
  *
187
254
  * @examplePrompt Add a 3m tall column at this point
188
255
  * @examplePrompt Place a column at the grid intersection
@@ -200,13 +267,30 @@ export declare abstract class PluginDesignCreateApi {
200
267
  abstract column(position: Vec3Handle, crossSection: ContourHandle, height: number, directionUp?: Vec3Handle): PluginApiReturn<ComponentHandle>;
201
268
  /**
202
269
  * Create a **beam** by extruding a cross-section contour along `direction` by
203
- * `length`.
270
+ * `length`. Matches the Snaptrude beam tool's semantics: the beam body hangs
271
+ * BELOW the plane the section is authored on.
272
+ *
273
+ * For a **horizontal** `direction` (the common spanning beam), author the
274
+ * section as an axis-aligned plan rectangle: its X extent is the beam's
275
+ * width, its Z extent is the beam's depth (the vertical drop). The beam runs
276
+ * `length` along `direction` starting at the section's centre, hanging below
277
+ * the authoring plane by its depth — exactly like an interactively drawn
278
+ * beam. Only axis-aligned rectangular sections are supported horizontally.
279
+ *
280
+ * For a **vertical** `direction` (the default), the section itself is
281
+ * extruded by `length`, again hanging below the authoring plane. Diagonal
282
+ * directions are rejected.
204
283
  *
205
- * @param section - Beam cross-section footprint
206
- * @param length - Beam length along `direction` (> 0)
207
- * @param direction - Extrusion axis (default world up)
284
+ * @param section - Beam cross-section, an axis-aligned rectangle in plan
285
+ * (X extent = width, Z extent = depth)
286
+ * @param length - Beam length along `direction` (> 0); direction is
287
+ * normalized by the host, so magnitude does not scale the length
288
+ * @param direction - Beam axis: horizontal for a spanning beam, or vertical
289
+ * (default world up). Diagonal directions throw.
208
290
  * @returns the {@linkcode ComponentHandle} of the created beam
209
- * @throws if the section is invalid or the length is not positive
291
+ * @throws if the section is invalid (horizontal beams: not an axis-aligned
292
+ * plan rectangle), the length is not positive, or the direction is zero or
293
+ * diagonal
210
294
  *
211
295
  * @examplePrompt Add a beam spanning 6 metres between the columns
212
296
  * @examplePrompt Create a horizontal beam along the X axis
@@ -228,15 +312,31 @@ export declare abstract class PluginDesignCreateApi {
228
312
  *
229
313
  * @param profile - Ordered curve chain (wall centerlines)
230
314
  * @param height - Wall height (default engine default)
231
- * @param thickness - Wall thickness (default engine default)
315
+ * @param thickness - Wall thickness (default: the `wallType`'s total layer
316
+ * thickness when `wallType` is given, else the engine default)
317
+ * @param wallType - Wall type to build with — the same searchable list the
318
+ * Draw tab's Wall Type dropdown offers. Pass a name from
319
+ * `design.types.list("wall")` (the summary's `label`, or its `"wall:…"` id).
320
+ * Drives the wall's construction layers and default material, and — when
321
+ * `thickness` is omitted — its total layer thickness. Default: the engine's
322
+ * generic wall.
323
+ * @param storey - Target storey (integer: `1` ground, `2` first floor, `-1`
324
+ * basement — same convention as `design.create.space`). The walls are
325
+ * assigned to it and lifted to its base elevation, all inside the same
326
+ * single undo entry. The storey must already exist
327
+ * (`core.storeys.create` first). Default: geometry-derived — a profile
328
+ * drawn at y = 0 lands on storey 1; the ACTIVE storey is NOT consulted.
232
329
  * @returns a {@linkcode ComponentHandle}`[]` (one per wall), in profile order
233
- * @throws if the profile is empty or wall creation fails
330
+ * @throws if the profile is empty, `wallType` names no wall type in the
331
+ * project, `storey` does not exist, or wall creation fails
234
332
  *
235
333
  * @examplePrompt Draw walls along this centerline
236
334
  * @examplePrompt Create 3m high, 200mm thick walls from these points
237
335
  * @examplePrompt Build a wall run around the room outline
238
336
  * @examplePrompt Turn this polyline sketch into walls
239
337
  * @examplePrompt Add walls with mitred corners along the path
338
+ * @examplePrompt Draw brick walls with plaster along this outline
339
+ * @examplePrompt Build the perimeter in exposed concrete walls
240
340
  *
241
341
  * # Example
242
342
  * ```ts
@@ -247,20 +347,30 @@ export declare abstract class PluginDesignCreateApi {
247
347
  * await v.new(8, 0, 6),
248
348
  * ])
249
349
  * const walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)
350
+ * // …built as a specific wall type (layers/material/thickness from the type):
351
+ * const [brick] = await snaptrude.design.types.list("wall")
352
+ * const brickWalls = await snaptrude.design.create.walls(
353
+ * centerlines, 3, undefined, brick.label,
354
+ * )
250
355
  * ```
251
356
  */
252
- abstract walls(profile: ProfileHandle, height?: number, thickness?: number): PluginApiReturn<ComponentHandle[]>;
357
+ abstract walls(profile: ProfileHandle, height?: number, thickness?: number, wallType?: string, storey?: number): PluginApiReturn<ComponentHandle[]>;
253
358
  /**
254
359
  * Create a **staircase** from a parametric preset, placed at a point.
255
360
  *
256
361
  * Geometry is procedurally generated from the chosen `preset`; there is no
257
362
  * footprint input. Placed on the active structure/story unless overridden.
363
+ * The promise resolves only after the staircase's asynchronous geometry union
364
+ * and creation-command capture settle; a union failure rejects the call.
258
365
  *
259
366
  * @param preset - The parametric preset to generate
260
367
  * @param position - Placement point
261
368
  * @param label - Optional label
262
369
  * @param structureId - Target structure (default active)
263
370
  * @param level - Target level name (default active/`"01"`)
371
+ * @param dimensions - Optional positive dimension overrides in Snaptrude engine
372
+ * units, plus a placement angle in 90-degree increments. Overrides are
373
+ * applied to the staircase parameters before the creation command runs.
264
374
  * @returns the {@linkcode ComponentHandle} of the created staircase
265
375
  * @throws if the preset is unknown or placement fails
266
376
  *
@@ -278,7 +388,7 @@ export declare abstract class PluginDesignCreateApi {
278
388
  * )
279
389
  * ```
280
390
  */
281
- abstract staircase(preset: PluginStaircasePreset, position: Vec3Handle, label?: string, structureId?: string, level?: string): PluginApiReturn<ComponentHandle>;
391
+ abstract staircase(preset: PluginStaircasePreset, position: Vec3Handle, label?: string, structureId?: string, level?: string, dimensions?: PluginStaircaseDimensions): PluginApiReturn<ComponentHandle>;
282
392
  /**
283
393
  * Create **reference lines** from a profile — one reference line per curve in
284
394
  * the profile's ordered chain. Returns a handle per created line.
@@ -324,14 +434,23 @@ export declare abstract class PluginDesignCreateApi {
324
434
  * with {@linkcode PluginDesignFurnitureApi.listCatalog}. Placement is asynchronous
325
435
  * (the source mesh is fetched if not cached) and creates one undo entry.
326
436
  *
327
- * Placed at the item's default rotation; rotate afterward via `design.transform.rotate`
328
- * on the returned handle (planned namespace).
437
+ * Placed at the item's default rotation unless `angleInDegrees` is given, which
438
+ * rotates it about the vertical axis at creation time (baked into the same undo
439
+ * entry). To rotate an existing instance instead, use `design.transform.rotate`.
329
440
  *
330
441
  * @param catalogId - Library id: team `_id` or general `fullName`
331
- * @param position - Absolute world placement point
442
+ * @param position - Absolute world placement point. `position.y` is the REST
443
+ * elevation: the item is grounded so its bounding-box base sits exactly at
444
+ * `position.y` (the same surface-flush contract as interactive drag-drop) —
445
+ * pass the floor/storey elevation to stand furniture on it; never add half
446
+ * the item's height yourself.
332
447
  * @param options - Optional placement options: `label` — instance name
333
448
  * (default auto `${name}Ins${n}`); `createNewSourceMesh` — emit a
334
449
  * source-mesh creation command (default `true`)
450
+ * @param angleInDegrees - Optional signed rotation about the vertical axis, in
451
+ * degrees (same convention as {@linkcode PluginDesignTransformApi.rotate}).
452
+ * Applied at creation time so it is part of the placement's single undo entry.
453
+ * Default: the item's own (unrotated) orientation.
335
454
  * @returns the {@linkcode ComponentHandle} of the placed furniture instance
336
455
  * @throws if the catalog id is unknown, the source mesh fails to load, or placement fails
337
456
  *
@@ -340,6 +459,7 @@ export declare abstract class PluginDesignCreateApi {
340
459
  * @examplePrompt Drop a desk into the scene at 3, 0, 5
341
460
  * @examplePrompt Insert the uploaded bed model in the bedroom
342
461
  * @examplePrompt Put a table from my project library here and name it Table-01
462
+ * @examplePrompt Place a chair here rotated 90 degrees
343
463
  *
344
464
  * # Example
345
465
  * ```ts
@@ -348,22 +468,216 @@ export declare abstract class PluginDesignCreateApi {
348
468
  * await snaptrude.core.math.vec3.new(3, 0, 5),
349
469
  * { label: "Chair-01" },
350
470
  * )
471
+ * // …placed already turned 90° about the vertical axis:
472
+ * const turned = await snaptrude.design.create.furniture(
473
+ * "6620f1a…",
474
+ * await snaptrude.core.math.vec3.new(3, 0, 5),
475
+ * undefined,
476
+ * 90,
477
+ * )
351
478
  * ```
352
479
  */
353
480
  abstract furniture(catalogId: string, position: Vec3Handle, options?: {
354
481
  label?: string;
355
482
  createNewSourceMesh?: boolean;
356
- }): PluginApiReturn<ComponentHandle>;
483
+ }, angleInDegrees?: number): PluginApiReturn<ComponentHandle>;
484
+ /**
485
+ * Place a **door** from the catalog into a host wall.
486
+ *
487
+ * Identified by a **catalog (library) id** — the team object's stable `_id`
488
+ * or the general library's `fullName`. Discover ids with
489
+ * {@linkcode PluginDesignDoorsApi.listCatalog}. The world `position` is
490
+ * projected onto the host wall's face to locate the opening; the wall is
491
+ * re-cut and the door hosted in a single undo entry. Placement is
492
+ * asynchronous (the source mesh is fetched if not cached).
493
+ *
494
+ * @param catalogId - Library id: team `_id` or general `fullName`
495
+ * @param hostWall - The wall to host the door
496
+ * @param position - World point projected onto the wall to locate the opening
497
+ * @param options - Optional placement options: `label` — instance name
498
+ * @param facing - World point selecting which side of the wall the door faces
499
+ * (the room it opens into) — the same convention as approaching the wall
500
+ * from that side with the cursor in the interactive tool. Any point clearly
501
+ * on that side works (e.g. the room's center). Default: the engine picks a
502
+ * side (nondeterministic when `position` sits on the wall centerline).
503
+ * @returns the {@linkcode ComponentHandle} of the placed door
504
+ * @throws if the catalog id is unknown, the host is not a wall, the source
505
+ * mesh fails to load, or the projected point falls **outside** the host wall
506
+ *
507
+ * @examplePrompt Add a door to this wall here
508
+ * @examplePrompt Place a sliding door on the selected wall
509
+ * @examplePrompt Put a door from the catalog at this point on the wall
510
+ * @examplePrompt Insert the entrance door into this wall
511
+ * @examplePrompt Add a door to the wall and call it Entry-01
512
+ * @examplePrompt Add a door that opens into the living room
513
+ *
514
+ * # Example
515
+ * ```ts
516
+ * const [wall] = await snaptrude.design.query.listWalls({ isSelected: true })
517
+ * const [entry] = await snaptrude.design.doors.listCatalog()
518
+ * const door = await snaptrude.design.create.door(
519
+ * entry.id,
520
+ * wall,
521
+ * await snaptrude.core.math.vec3.new(3, 0, 5),
522
+ * { label: "Entry-01" },
523
+ * )
524
+ * // …facing a specific side of the wall (pass a point inside that room):
525
+ * const intoKitchen = await snaptrude.design.create.door(
526
+ * entry.id,
527
+ * wall,
528
+ * await snaptrude.core.math.vec3.new(3, 0, 5),
529
+ * undefined,
530
+ * await snaptrude.core.math.vec3.new(3, 0, 9),
531
+ * )
532
+ * ```
533
+ */
534
+ abstract door(catalogId: string, hostWall: ComponentHandle, position: Vec3Handle, options?: {
535
+ label?: string;
536
+ }, facing?: Vec3Handle): PluginApiReturn<ComponentHandle>;
537
+ /**
538
+ * Place a **window** from the catalog into a host wall.
539
+ *
540
+ * Identified by a **catalog (library) id** — the team object's stable `_id`
541
+ * or the general library's `fullName`. Discover ids with
542
+ * {@linkcode PluginDesignWindowsApi.listCatalog}. The world `position` is
543
+ * projected onto the host wall's face to locate the opening; the wall is
544
+ * re-cut and the window hosted in a single undo entry. Placement is
545
+ * asynchronous (the source mesh is fetched if not cached).
546
+ *
547
+ * @param catalogId - Library id: team `_id` or general `fullName`
548
+ * @param hostWall - The wall to host the window
549
+ * @param position - World point projected onto the wall to locate the opening
550
+ * @param options - Optional placement options: `label` — instance name
551
+ * @param facing - World point selecting which side of the wall the window
552
+ * faces (matters for asymmetric windows, e.g. casement swing) — same
553
+ * convention as {@linkcode PluginDesignCreateApi.door}. Default: the engine
554
+ * picks a side (nondeterministic when `position` sits on the centerline).
555
+ * @returns the {@linkcode ComponentHandle} of the placed window
556
+ * @throws if the catalog id is unknown, the host is not a wall, the source
557
+ * mesh fails to load, or the projected point falls **outside** the host wall
558
+ *
559
+ * @examplePrompt Add a window to this wall here
560
+ * @examplePrompt Place a casement window on the selected wall
561
+ * @examplePrompt Put a window from the catalog at this point on the wall
562
+ * @examplePrompt Insert a window into the living room wall
563
+ * @examplePrompt Add a window to the wall and name it Win-01
564
+ * @examplePrompt Add a casement window opening toward the garden side
565
+ *
566
+ * # Example
567
+ * ```ts
568
+ * const [wall] = await snaptrude.design.query.listWalls({ isSelected: true })
569
+ * const [entry] = await snaptrude.design.windows.listCatalog()
570
+ * const window = await snaptrude.design.create.window(
571
+ * entry.id,
572
+ * wall,
573
+ * await snaptrude.core.math.vec3.new(3, 0, 5),
574
+ * { label: "Win-01" },
575
+ * )
576
+ * ```
577
+ */
578
+ abstract window(catalogId: string, hostWall: ComponentHandle, position: Vec3Handle, options?: {
579
+ label?: string;
580
+ }, facing?: Vec3Handle): PluginApiReturn<ComponentHandle>;
581
+ /**
582
+ * Place a catalog **door or window** into a host wall with optional size overrides.
583
+ *
584
+ * The world `position` is projected onto the host wall to locate the opening.
585
+ * All supplied dimensions use Snaptrude engine units. Window `sillHeight` is
586
+ * measured from the host wall base to the bottom of the window, not to
587
+ * its center. Placement is asynchronous and committed as one undoable creation.
588
+ *
589
+ * @param options - Opening kind, catalog and host references, placement, and
590
+ * optional facing, label, and dimensions
591
+ * @returns the {@linkcode ComponentHandle} of the placed door or window
592
+ * @throws if the options are invalid, the catalog id is unknown, the host is
593
+ * not a wall, loading fails, or the opening cannot be placed on the host
594
+ *
595
+ * @examplePrompt Add a 1m wide door to this wall here
596
+ * @examplePrompt Place a window with a 0.9m sill height on the selected wall
597
+ *
598
+ * @performance Single-opening creator — use it for one hosted opening. A plural
599
+ * API is intentionally unavailable until host placement can be atomic.
600
+ *
601
+ * # Example
602
+ * ```ts
603
+ * const opening = await snaptrude.design.create.opening({
604
+ * kind: "window",
605
+ * catalogId: windowType.id,
606
+ * hostWall: wall,
607
+ * position: await snaptrude.core.math.vec3.new(3, 0, 5),
608
+ * width: 1.2,
609
+ * height: 1.5,
610
+ * sillHeight: 0.9,
611
+ * })
612
+ * ```
613
+ */
614
+ abstract opening(options: PluginDesignCreateOpeningOptions): PluginApiReturn<ComponentHandle>;
615
+ /**
616
+ * Place a **smart layout** — clone an in-scene template cluster (walls,
617
+ * furniture, doors, windows, floors) into one or more target ROOM/DEPARTMENT
618
+ * spaces, adapting orientation and fit to each target.
619
+ *
620
+ * Supply the template as **exactly one** of `templateGroup` (a group **id**
621
+ * from `snaptrude.core.groups.list` — groups are string-id entities, not
622
+ * component handles) or
623
+ * `templateComponents` (an explicit component set); every target in `targets`
624
+ * (≥1) receives its own placement. By default the target spaces are hidden
625
+ * after placement (`hideTargets`, mirroring the product) — pass `false` to keep
626
+ * them visible.
627
+ *
628
+ * The whole operation — every wall/opening/furniture/floor across every target,
629
+ * plus the target-hide — is committed as a **single undo step**. Because all
630
+ * targets merge into one creation batch, the created entities are returned
631
+ * **flat, grouped by kind** ({@linkcode PluginSmartLayoutResult}), NOT attributed
632
+ * per target (per-target attribution would break the single-undo guarantee).
633
+ * `skippedWalls` is the interior-optimizer's best-candidate count of walls it
634
+ * could not place. Synchronous and heavy — many targets can jank the main thread.
635
+ *
636
+ * @param options - {@linkcode PluginSmartLayoutArgs}: template source, targets, and `hideTargets`
637
+ * @returns a {@linkcode PluginSmartLayoutResult} — created entities grouped by kind + `skippedWalls`
638
+ * @throws if smart layout is not enabled, the template group is invalid, there
639
+ * is no template / no targets / no valid mappings, or component creation fails
640
+ *
641
+ * @examplePrompt Copy this room's layout into the selected rooms
642
+ * @examplePrompt Apply this furniture arrangement to the other offices
643
+ * @examplePrompt Replicate this template into these two spaces
644
+ * @examplePrompt Place this desk cluster into every meeting room
645
+ * @examplePrompt Use this room as a template for the rooms I selected but keep them visible
646
+ *
647
+ * # Example
648
+ * ```ts
649
+ * const [templateRoom, ...targets] = await snaptrude.design.query.listSpaces({ isSelected: true })
650
+ * const result = await snaptrude.design.create.smartLayout({
651
+ * templateComponents: [templateRoom],
652
+ * targets,
653
+ * })
654
+ * console.log("placed walls:", result.created.walls.length, "skipped:", result.skippedWalls)
655
+ *
656
+ * // …or clone a saved group by its id (from core.groups.list)
657
+ * const { groups } = await snaptrude.core.groups.list()
658
+ * await snaptrude.design.create.smartLayout({ templateGroup: groups[0].id, targets })
659
+ * ```
660
+ */
661
+ abstract smartLayout(options: PluginSmartLayoutArgs): PluginApiReturn<PluginSmartLayoutResult>;
357
662
  /**
358
663
  * **Copy** existing entities, offsetting each copy by `displacement * i` (i = 1…count),
359
664
  * source positions preserved. Migrated from the removed `tools.copy`. In `"instance"`
360
665
  * mode copies stay in the source's instance family where possible; `"unique"` makes
361
666
  * independent geometry. The created copies become the active selection. Undoable.
362
667
  *
668
+ * Runs on the engine's array-copy tool, so its semantics carry over: an
669
+ * `"instance"` copy of a source that is not yet an instance **replaces that
670
+ * source** with a fresh instance component — the handle you passed in stops
671
+ * resolving after the call. Re-query (e.g. `design.query.listSpaces`) to pick
672
+ * up the replacement before operating on that entity again; copying the stale
673
+ * handle throws. `"unique"` mode never replaces sources.
674
+ *
363
675
  * @param components - Entities to copy (≥1)
364
676
  * @param displacement - Per-copy offset as a {@linkcode Vec3Handle} (copy `i` at `displacement * i`)
365
677
  * @param options - `count` (copies per component, default 1), `mode` (`"instance"` | `"unique"`, default `"instance"`)
366
678
  * @returns the created copies as {@linkcode ComponentHandle}`[]`
679
+ * @throws if a component handle is unknown or stale (replaced by an earlier
680
+ * `"instance"` copy), `count` is not a positive integer, or the engine fails
367
681
  *
368
682
  * @examplePrompt Copy this room 3 times spaced 6m apart
369
683
  * @examplePrompt Duplicate the selected furniture along the X axis
@@ -371,6 +685,11 @@ export declare abstract class PluginDesignCreateApi {
371
685
  * @examplePrompt Array these walls with a 3m offset
372
686
  * @examplePrompt Clone the desk as a unique copy, not an instance
373
687
  *
688
+ * @performance To place N repeats of the same geometry, bulk-create the seed(s) once then
689
+ * call this ONCE with `{ count: N - 1 }` — one host round-trip for all copies. Never
690
+ * reproduce geometry by looping `design.create.*` N times. Copy only after the create
691
+ * that mints the seed ids.
692
+ *
374
693
  * # Example
375
694
  * ```ts
376
695
  * const { vec3 } = snaptrude.core.math
@@ -386,15 +705,24 @@ export declare abstract class PluginDesignCreateApi {
386
705
  * Migrated from the removed `entity.space.bulkCreate`. Each item extrudes a contour
387
706
  * footprint up `height`. Validate-all-or-throw; one command. For a rectangular
388
707
  * (box) space, build the footprint with `core.geom.create.profileRect` →
389
- * `contourFromProfile`, then pass it as an item.
708
+ * `contourFromProfile`, then pass it as an item. Each item may carry its own
709
+ * `storey` (see {@linkcode PluginCreateSpaceItem}) so a single call can populate
710
+ * several floors at once.
390
711
  *
391
712
  * @param items - One {@linkcode PluginCreateSpaceItem} per space to create (≥1)
392
713
  * @returns the created spaces as {@linkcode ComponentHandle}`[]`, in input order
714
+ * @throws if any item's contour is invalid, its height is not positive, or its
715
+ * target `storey` does not exist (all-or-nothing — nothing is created)
393
716
  *
394
717
  * @examplePrompt Create several rooms at once from these footprints
395
718
  * @examplePrompt Generate all the bedrooms in one operation
396
719
  * @examplePrompt Bulk create the spaces for this floor plan
397
720
  * @examplePrompt Add three rooms with different heights in a single undo step
721
+ * @examplePrompt Create one room on the ground floor and one on the first floor
722
+ *
723
+ * @performance Bulk creator — the whole batch is ONE host round-trip. Always prefer this
724
+ * over calling `design.create.space` in a loop: build the full `items[]` array first
725
+ * (all per-item math and geometry up front), then make one call.
398
726
  *
399
727
  * # Example
400
728
  * ```ts
@@ -407,6 +735,49 @@ export declare abstract class PluginDesignCreateApi {
407
735
  * ```
408
736
  */
409
737
  abstract spaces(items: PluginCreateSpaceItem[]): PluginApiReturn<ComponentHandle[]>;
738
+ /**
739
+ * Create a new parametric buildable envelope — the zoning-regulated volume a
740
+ * building may occupy — generated from a site polygon, tiered setbacks, a
741
+ * height or floor-count cap, and optional FAR and lot-coverage limits. The host
742
+ * mints the envelope id and returns it. Canonical home of the create formerly
743
+ * at `entity.buildableEnvelope.create` (now deprecated).
744
+ *
745
+ * @param sitePolygon - Site polygon vertices in `lengthUnit`; minimum 3 vertices.
746
+ * @param lengthUnit - Unit used by all length fields (`"ft" | "m"`).
747
+ * @param setbacks - Setback profile, ground tier first; minimum 1 tier.
748
+ * @param verticalCap - Maximum height or floor count.
749
+ * @param floorToFloor - Required floor-to-floor height in `lengthUnit`.
750
+ * @param farRatio - Optional FAR value, positive when provided.
751
+ * @param lotCoverageMaxPct - Optional lot coverage cap, `0..100`.
752
+ * @returns A {@linkcode PluginBuildableEnvelopeCreateResult} with the
753
+ * `buildableEnvelopeId` of the created envelope.
754
+ * @throws If validation fails or generation produces no renderable geometry.
755
+ *
756
+ * @examplePrompt Create a buildable envelope for my site
757
+ * @examplePrompt Generate the zoning envelope with 10ft front setbacks
758
+ * @examplePrompt Show the maximum buildable volume with a 150ft height limit
759
+ * @examplePrompt Create a zoning envelope capped at 12 floors with FAR 3
760
+ *
761
+ * # Example
762
+ * ```ts
763
+ * const { buildableEnvelopeId } = await snaptrude.design.create.buildableEnvelope(
764
+ * [
765
+ * { x: 0, z: 0 },
766
+ * { x: 100, z: 0 },
767
+ * { x: 100, z: 80 },
768
+ * { x: 0, z: 80 },
769
+ * ],
770
+ * "ft",
771
+ * [
772
+ * { aboveHeight: 0, front: 10, side: 5, rear: 10 },
773
+ * { aboveHeight: 100, front: 20, side: 10, rear: 20 },
774
+ * ],
775
+ * { kind: "max_height", maxHeight: 150 },
776
+ * 12,
777
+ * )
778
+ * ```
779
+ */
780
+ abstract buildableEnvelope(sitePolygon: PluginBuildableEnvelopePolygonVertex[], lengthUnit: "ft" | "m", setbacks: PluginBuildableEnvelopeSetbackTier[], verticalCap: PluginBuildableEnvelopeVerticalCap, floorToFloor: number, farRatio?: number, lotCoverageMaxPct?: number): PluginApiReturn<PluginBuildableEnvelopeCreateResult>;
410
781
  }
411
782
  /**
412
783
  * Line style of a reference line (mirrors the engine `ReferenceLineMode` verbatim).
@@ -464,6 +835,19 @@ export declare const PluginStaircasePreset: z.ZodEnum<{
464
835
  mezzanineFloorLShaped: "mezzanineFloorLShaped";
465
836
  }>;
466
837
  export type PluginStaircasePreset = z.infer<typeof PluginStaircasePreset>;
838
+ /**
839
+ * Optional staircase dimension overrides. Lengths use Snaptrude engine units
840
+ * and must be positive. `angleInDegrees` controls placement about the vertical
841
+ * axis and must be a multiple of 90 degrees.
842
+ */
843
+ export declare const PluginStaircaseDimensions: z.ZodObject<{
844
+ width: z.ZodOptional<z.ZodNumber>;
845
+ tread: z.ZodOptional<z.ZodNumber>;
846
+ riser: z.ZodOptional<z.ZodNumber>;
847
+ landingWidth: z.ZodOptional<z.ZodNumber>;
848
+ angleInDegrees: z.ZodOptional<z.ZodNumber>;
849
+ }, z.core.$strict>;
850
+ export type PluginStaircaseDimensions = z.infer<typeof PluginStaircaseDimensions>;
467
851
  /**
468
852
  * Arguments for {@linkcode PluginDesignCreateApi.space}.
469
853
  *
@@ -476,12 +860,13 @@ export type PluginStaircasePreset = z.infer<typeof PluginStaircasePreset>;
476
860
  * | `spaceType` | {@linkcode PluginSpaceType}? | Space-type classification (default `Room`) |
477
861
  * | `massType` | {@linkcode PluginMassType}? | Mass-type classification (default `Room`) |
478
862
  * | `departmentId` | {@linkcode PluginDepartmentId}? | Department assignment (default department) |
863
+ * | `storey` | `number`? (int) | Target storey number (default active storey) |
479
864
  */
480
865
  export declare const PluginDesignCreateSpaceArgs: z.ZodObject<{
481
- contour: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
866
+ contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
482
867
  height: z.ZodNumber;
483
868
  label: z.ZodOptional<z.ZodString>;
484
- position: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
869
+ position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
485
870
  spaceType: z.ZodOptional<z.ZodEnum<{
486
871
  Room: "Room";
487
872
  "Program Block": "Program Block";
@@ -514,6 +899,7 @@ export declare const PluginDesignCreateSpaceArgs: z.ZodObject<{
514
899
  ENVELOPE: "ENVELOPE";
515
900
  CORE: "CORE";
516
901
  }>, z.ZodUUID]>>;
902
+ storey: z.ZodOptional<z.ZodNumber>;
517
903
  }, z.core.$strip>;
518
904
  export type PluginDesignCreateSpaceArgs = z.infer<typeof PluginDesignCreateSpaceArgs>;
519
905
  /**
@@ -528,10 +914,10 @@ export type PluginDesignCreateSpaceArgs = z.infer<typeof PluginDesignCreateSpace
528
914
  * | `massType` | {@linkcode PluginMassType}? | Mass type (default `Generic mass`) |
529
915
  */
530
916
  export declare const PluginDesignCreateMassArgs: z.ZodObject<{
531
- contour: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
917
+ contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
532
918
  height: z.ZodNumber;
533
919
  label: z.ZodOptional<z.ZodString>;
534
- position: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
920
+ position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
535
921
  massType: z.ZodOptional<z.ZodEnum<{
536
922
  Room: "Room";
537
923
  Plinth: "Plinth";
@@ -548,6 +934,19 @@ export declare const PluginDesignCreateMassArgs: z.ZodObject<{
548
934
  }>>;
549
935
  }, z.core.$strip>;
550
936
  export type PluginDesignCreateMassArgs = z.infer<typeof PluginDesignCreateMassArgs>;
937
+ /**
938
+ * Arguments for {@linkcode PluginDesignCreateApi.massFromBrep}.
939
+ *
940
+ * | Property | Type | Description |
941
+ * |---|---|---|
942
+ * | `brep` | {@linkcode BrepHandle} | A solid from a `core.geom.create` brep constructor |
943
+ * | `label` | `string`? | Label (maps to `room_type`) |
944
+ */
945
+ export declare const PluginDesignCreateMassFromBrepArgs: z.ZodObject<{
946
+ brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"brep">, string>>;
947
+ label: z.ZodOptional<z.ZodString>;
948
+ }, z.core.$strip>;
949
+ export type PluginDesignCreateMassFromBrepArgs = z.infer<typeof PluginDesignCreateMassFromBrepArgs>;
551
950
  /**
552
951
  * Arguments for {@linkcode PluginDesignCreateApi.slab}.
553
952
  *
@@ -559,7 +958,7 @@ export type PluginDesignCreateMassArgs = z.infer<typeof PluginDesignCreateMassAr
559
958
  * | `slabType` | {@linkcode PluginSlabType}? | Slab-type classification |
560
959
  */
561
960
  export declare const PluginDesignCreateSlabArgs: z.ZodObject<{
562
- contour: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
961
+ contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
563
962
  thickness: z.ZodNumber;
564
963
  direction: z.ZodOptional<z.ZodEnum<{
565
964
  up: "up";
@@ -583,9 +982,9 @@ export type PluginDesignCreateSlabArgs = z.infer<typeof PluginDesignCreateSlabAr
583
982
  * | `position` | {@linkcode Vec3Handle}? | Offset from origin |
584
983
  */
585
984
  export declare const PluginDesignCreateFloorArgs: z.ZodObject<{
586
- contour: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
985
+ contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
587
986
  thickness: z.ZodNumber;
588
- position: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
987
+ position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
589
988
  }, z.core.$strip>;
590
989
  export type PluginDesignCreateFloorArgs = z.infer<typeof PluginDesignCreateFloorArgs>;
591
990
  /**
@@ -597,7 +996,7 @@ export type PluginDesignCreateFloorArgs = z.infer<typeof PluginDesignCreateFloor
597
996
  * | `thickness` | `number` | Roof-slab thickness (> 0) |
598
997
  */
599
998
  export declare const PluginDesignCreateRoofArgs: z.ZodObject<{
600
- contour: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
999
+ contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
601
1000
  thickness: z.ZodNumber;
602
1001
  }, z.core.$strip>;
603
1002
  export type PluginDesignCreateRoofArgs = z.infer<typeof PluginDesignCreateRoofArgs>;
@@ -611,7 +1010,7 @@ export type PluginDesignCreateRoofArgs = z.infer<typeof PluginDesignCreateRoofAr
611
1010
  * | `heightFromFloor` | `number`? | Lift above the floor (default 0) |
612
1011
  */
613
1012
  export declare const PluginDesignCreateCeilingArgs: z.ZodObject<{
614
- contour: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
1013
+ contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
615
1014
  thickness: z.ZodNumber;
616
1015
  heightFromFloor: z.ZodOptional<z.ZodNumber>;
617
1016
  }, z.core.$strip>;
@@ -627,10 +1026,10 @@ export type PluginDesignCreateCeilingArgs = z.infer<typeof PluginDesignCreateCei
627
1026
  * | `directionUp` | {@linkcode Vec3Handle}? | Up axis (default world up) |
628
1027
  */
629
1028
  export declare const PluginDesignCreateColumnArgs: z.ZodObject<{
630
- position: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
631
- crossSection: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
1029
+ position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
1030
+ crossSection: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
632
1031
  height: z.ZodNumber;
633
- directionUp: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
1032
+ directionUp: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
634
1033
  }, z.core.$strip>;
635
1034
  export type PluginDesignCreateColumnArgs = z.infer<typeof PluginDesignCreateColumnArgs>;
636
1035
  /**
@@ -643,9 +1042,9 @@ export type PluginDesignCreateColumnArgs = z.infer<typeof PluginDesignCreateColu
643
1042
  * | `direction` | {@linkcode Vec3Handle}? | Extrusion axis (default world up) |
644
1043
  */
645
1044
  export declare const PluginDesignCreateBeamArgs: z.ZodObject<{
646
- section: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
1045
+ section: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
647
1046
  length: z.ZodNumber;
648
- direction: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
1047
+ direction: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
649
1048
  }, z.core.$strip>;
650
1049
  export type PluginDesignCreateBeamArgs = z.infer<typeof PluginDesignCreateBeamArgs>;
651
1050
  /**
@@ -655,12 +1054,16 @@ export type PluginDesignCreateBeamArgs = z.infer<typeof PluginDesignCreateBeamAr
655
1054
  * |---|---|---|
656
1055
  * | `profile` | {@linkcode ProfileHandle} | Ordered curve chain (wall centerlines) |
657
1056
  * | `height` | `number`? | Wall height (default engine default) |
658
- * | `thickness` | `number`? | Wall thickness (default engine default) |
1057
+ * | `thickness` | `number`? | Wall thickness (default: `wallType`'s total layer thickness when given, else engine default) |
1058
+ * | `wallType` | `string`? | Wall type name from `design.types.list("wall")` — layers/material/thickness defaults (default generic) |
1059
+ * | `storey` | `number`? | Target storey (integer, must exist) — walls assigned + lifted to its base in the same undo entry (default: geometry-derived) |
659
1060
  */
660
1061
  export declare const PluginDesignCreateWallsArgs: z.ZodObject<{
661
- profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
1062
+ profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
662
1063
  height: z.ZodOptional<z.ZodNumber>;
663
1064
  thickness: z.ZodOptional<z.ZodNumber>;
1065
+ wallType: z.ZodOptional<z.ZodString>;
1066
+ storey: z.ZodOptional<z.ZodNumber>;
664
1067
  }, z.core.$strip>;
665
1068
  export type PluginDesignCreateWallsArgs = z.infer<typeof PluginDesignCreateWallsArgs>;
666
1069
  /**
@@ -673,6 +1076,7 @@ export type PluginDesignCreateWallsArgs = z.infer<typeof PluginDesignCreateWalls
673
1076
  * | `label` | `string`? | Optional label |
674
1077
  * | `structureId` | `string`? | Target structure (default active) |
675
1078
  * | `level` | `string`? | Target level name (default active/`"01"`) |
1079
+ * | `dimensions` | {@linkcode PluginStaircaseDimensions}? | Positive dimension overrides in engine units, applied before creation |
676
1080
  */
677
1081
  export declare const PluginDesignCreateStaircaseArgs: z.ZodObject<{
678
1082
  preset: z.ZodEnum<{
@@ -693,10 +1097,17 @@ export declare const PluginDesignCreateStaircaseArgs: z.ZodObject<{
693
1097
  mezzanineFloorDogLegged: "mezzanineFloorDogLegged";
694
1098
  mezzanineFloorLShaped: "mezzanineFloorLShaped";
695
1099
  }>;
696
- position: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
1100
+ position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
697
1101
  label: z.ZodOptional<z.ZodString>;
698
1102
  structureId: z.ZodOptional<z.ZodString>;
699
1103
  level: z.ZodOptional<z.ZodString>;
1104
+ dimensions: z.ZodOptional<z.ZodObject<{
1105
+ width: z.ZodOptional<z.ZodNumber>;
1106
+ tread: z.ZodOptional<z.ZodNumber>;
1107
+ riser: z.ZodOptional<z.ZodNumber>;
1108
+ landingWidth: z.ZodOptional<z.ZodNumber>;
1109
+ angleInDegrees: z.ZodOptional<z.ZodNumber>;
1110
+ }, z.core.$strict>>;
700
1111
  }, z.core.$strip>;
701
1112
  export type PluginDesignCreateStaircaseArgs = z.infer<typeof PluginDesignCreateStaircaseArgs>;
702
1113
  /**
@@ -708,14 +1119,124 @@ export type PluginDesignCreateStaircaseArgs = z.infer<typeof PluginDesignCreateS
708
1119
  * | `position` | {@linkcode Vec3Handle} | Absolute world placement point |
709
1120
  * | `label` | `string`? | Instance name (default auto `${name}Ins${n}`) |
710
1121
  * | `createNewSourceMesh` | `boolean`? | Emit a source-mesh creation command (default `true`) |
1122
+ * | `angleInDegrees` | `number`? | Rotation about the vertical axis, in degrees (default unrotated) |
711
1123
  */
712
1124
  export declare const PluginDesignCreateFurnitureArgs: z.ZodObject<{
713
1125
  catalogId: z.ZodString;
714
- position: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
1126
+ position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
715
1127
  label: z.ZodOptional<z.ZodString>;
716
1128
  createNewSourceMesh: z.ZodOptional<z.ZodBoolean>;
1129
+ angleInDegrees: z.ZodOptional<z.ZodNumber>;
717
1130
  }, z.core.$strip>;
718
1131
  export type PluginDesignCreateFurnitureArgs = z.infer<typeof PluginDesignCreateFurnitureArgs>;
1132
+ /**
1133
+ * Arguments for {@linkcode PluginDesignCreateApi.door}.
1134
+ *
1135
+ * | Property | Type | Description |
1136
+ * |---|---|---|
1137
+ * | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
1138
+ * | `hostWall` | {@linkcode ComponentHandle} | The wall to host the door |
1139
+ * | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
1140
+ * | `label` | `string`? | Instance name (optional) |
1141
+ * | `facing` | {@linkcode Vec3Handle}? | World point on the side of the wall the door faces (default engine-chosen) |
1142
+ */
1143
+ export declare const PluginDesignCreateDoorArgs: z.ZodObject<{
1144
+ catalogId: z.ZodString;
1145
+ hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
1146
+ position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
1147
+ label: z.ZodOptional<z.ZodString>;
1148
+ facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
1149
+ }, z.core.$strip>;
1150
+ export type PluginDesignCreateDoorArgs = z.infer<typeof PluginDesignCreateDoorArgs>;
1151
+ /**
1152
+ * Arguments for {@linkcode PluginDesignCreateApi.window}.
1153
+ *
1154
+ * | Property | Type | Description |
1155
+ * |---|---|---|
1156
+ * | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
1157
+ * | `hostWall` | {@linkcode ComponentHandle} | The wall to host the window |
1158
+ * | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
1159
+ * | `label` | `string`? | Instance name (optional) |
1160
+ * | `facing` | {@linkcode Vec3Handle}? | World point on the side of the wall the window faces (default engine-chosen) |
1161
+ */
1162
+ export declare const PluginDesignCreateWindowArgs: z.ZodObject<{
1163
+ catalogId: z.ZodString;
1164
+ hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
1165
+ position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
1166
+ label: z.ZodOptional<z.ZodString>;
1167
+ facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
1168
+ }, z.core.$strip>;
1169
+ export type PluginDesignCreateWindowArgs = z.infer<typeof PluginDesignCreateWindowArgs>;
1170
+ /**
1171
+ * Options for {@linkcode PluginDesignCreateApi.opening}, discriminated by
1172
+ * `kind`. Width and height are positive Snaptrude engine-unit values.
1173
+ * `sillHeight` is available only for windows, is nonnegative, and is precisely
1174
+ * the distance from the host wall base to the bottom of the window.
1175
+ */
1176
+ export declare const PluginDesignCreateOpeningOptions: z.ZodDiscriminatedUnion<[z.ZodObject<{
1177
+ catalogId: z.ZodString;
1178
+ hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
1179
+ position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
1180
+ facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
1181
+ label: z.ZodOptional<z.ZodString>;
1182
+ width: z.ZodOptional<z.ZodNumber>;
1183
+ height: z.ZodOptional<z.ZodNumber>;
1184
+ kind: z.ZodLiteral<"door">;
1185
+ }, z.core.$strict>, z.ZodObject<{
1186
+ sillHeight: z.ZodOptional<z.ZodNumber>;
1187
+ catalogId: z.ZodString;
1188
+ hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
1189
+ position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
1190
+ facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
1191
+ label: z.ZodOptional<z.ZodString>;
1192
+ width: z.ZodOptional<z.ZodNumber>;
1193
+ height: z.ZodOptional<z.ZodNumber>;
1194
+ kind: z.ZodLiteral<"window">;
1195
+ }, z.core.$strict>], "kind">;
1196
+ export type PluginDesignCreateOpeningOptions = z.infer<typeof PluginDesignCreateOpeningOptions>;
1197
+ /**
1198
+ * Arguments for {@linkcode PluginDesignCreateApi.smartLayout}. Provide **exactly
1199
+ * one** template source: `templateGroup` or a non-empty `templateComponents`.
1200
+ *
1201
+ * | Property | Type | Description |
1202
+ * |---|---|---|
1203
+ * | `templateGroup` | `string`? | Id of the group to clone as the template (a group id from `snaptrude.core.groups.list`, NOT a component handle) |
1204
+ * | `templateComponents` | {@linkcode ComponentHandle}`[]`? | Explicit component set to clone as the template |
1205
+ * | `targets` | {@linkcode ComponentHandle}`[]` | ROOM/DEPARTMENT spaces to place into (≥1) |
1206
+ * | `hideTargets` | `boolean`? | Hide the target spaces after placement (default `true`) |
1207
+ */
1208
+ export declare const PluginSmartLayoutArgs: z.ZodObject<{
1209
+ templateGroup: z.ZodOptional<z.ZodString>;
1210
+ templateComponents: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>>;
1211
+ targets: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
1212
+ hideTargets: z.ZodOptional<z.ZodBoolean>;
1213
+ }, z.core.$strip>;
1214
+ export type PluginSmartLayoutArgs = z.infer<typeof PluginSmartLayoutArgs>;
1215
+ /**
1216
+ * Result of {@linkcode PluginDesignCreateApi.smartLayout} — the entities the run
1217
+ * created, grouped by kind (flat across all targets; see the method JSDoc for why
1218
+ * this is not attributed per target).
1219
+ *
1220
+ * | Property | Type | Description |
1221
+ * |---|---|---|
1222
+ * | `created.walls` | {@linkcode ComponentHandle}`[]` | Created walls |
1223
+ * | `created.furniture` | {@linkcode ComponentHandle}`[]` | Created furniture |
1224
+ * | `created.doors` | {@linkcode ComponentHandle}`[]` | Created doors |
1225
+ * | `created.windows` | {@linkcode ComponentHandle}`[]` | Created windows |
1226
+ * | `created.floors` | {@linkcode ComponentHandle}`[]` | Created floors |
1227
+ * | `skippedWalls` | `number` | Walls the interior optimizer could not place |
1228
+ */
1229
+ export declare const PluginSmartLayoutResult: z.ZodObject<{
1230
+ created: z.ZodObject<{
1231
+ walls: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
1232
+ furniture: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
1233
+ doors: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
1234
+ windows: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
1235
+ floors: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
1236
+ }, z.core.$strip>;
1237
+ skippedWalls: z.ZodNumber;
1238
+ }, z.core.$strip>;
1239
+ export type PluginSmartLayoutResult = z.infer<typeof PluginSmartLayoutResult>;
719
1240
  /**
720
1241
  * Arguments for {@linkcode PluginDesignCreateApi.referenceLines}.
721
1242
  *
@@ -728,7 +1249,7 @@ export type PluginDesignCreateFurnitureArgs = z.infer<typeof PluginDesignCreateF
728
1249
  * | `gridTag` | `string`? | Grid tag label (default `"A"`) |
729
1250
  */
730
1251
  export declare const PluginDesignCreateReferenceLinesArgs: z.ZodObject<{
731
- profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
1252
+ profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
732
1253
  color: z.ZodOptional<z.ZodString>;
733
1254
  thickness: z.ZodOptional<z.ZodNumber>;
734
1255
  style: z.ZodOptional<z.ZodEnum<{
@@ -748,8 +1269,8 @@ export type PluginDesignCreateReferenceLinesArgs = z.infer<typeof PluginDesignCr
748
1269
  * | `"unique"` | Independent geometry copies |
749
1270
  */
750
1271
  export declare const PluginCopyMode: z.ZodEnum<{
751
- instance: "instance";
752
1272
  unique: "unique";
1273
+ instance: "instance";
753
1274
  }>;
754
1275
  export type PluginCopyMode = z.infer<typeof PluginCopyMode>;
755
1276
  /**
@@ -764,11 +1285,11 @@ export type PluginCopyMode = z.infer<typeof PluginCopyMode>;
764
1285
  */
765
1286
  export declare const PluginDesignCreateCopyArgs: z.ZodObject<{
766
1287
  components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
767
- displacement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
1288
+ displacement: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
768
1289
  count: z.ZodOptional<z.ZodNumber>;
769
1290
  mode: z.ZodOptional<z.ZodEnum<{
770
- instance: "instance";
771
1291
  unique: "unique";
1292
+ instance: "instance";
772
1293
  }>>;
773
1294
  }, z.core.$strip>;
774
1295
  export type PluginDesignCreateCopyArgs = z.infer<typeof PluginDesignCreateCopyArgs>;
@@ -785,12 +1306,13 @@ export type PluginDesignCreateCopyArgs = z.infer<typeof PluginDesignCreateCopyAr
785
1306
  * | `spaceType` | `PluginSpaceType`? | Space type |
786
1307
  * | `massType` | `PluginMassType`? | Mass type |
787
1308
  * | `departmentId` | `PluginDepartmentId`? | Department |
1309
+ * | `storey` | `number`? (int) | Target storey number (default active storey) |
788
1310
  */
789
1311
  export declare const PluginCreateSpaceItem: z.ZodObject<{
790
- contour: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
1312
+ contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
791
1313
  height: z.ZodNumber;
792
1314
  label: z.ZodOptional<z.ZodString>;
793
- position: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
1315
+ position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
794
1316
  spaceType: z.ZodOptional<z.ZodEnum<{
795
1317
  Room: "Room";
796
1318
  "Program Block": "Program Block";
@@ -823,6 +1345,7 @@ export declare const PluginCreateSpaceItem: z.ZodObject<{
823
1345
  ENVELOPE: "ENVELOPE";
824
1346
  CORE: "CORE";
825
1347
  }>, z.ZodUUID]>>;
1348
+ storey: z.ZodOptional<z.ZodNumber>;
826
1349
  }, z.core.$strip>;
827
1350
  export type PluginCreateSpaceItem = z.infer<typeof PluginCreateSpaceItem>;
828
1351
  //# sourceMappingURL=index.d.ts.map