@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,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../../../types";
3
- import { Vec3Handle, LineHandle, ArcHandle, CircleHandle, CurveHandle, ProfileHandle, ContourHandle } from "../../../../handles";
3
+ import { Vec3Handle, LineHandle, ArcHandle, CircleHandle, CurveHandle, ProfileHandle, ContourHandle, BrepHandle, FaceHandle, EdgeHandle, Vec3Components } from "../../../../handles";
4
4
  /**
5
5
  * Curve creation — construct new geometric curves from point handles (all-handle
6
6
  * model, §11).
@@ -152,6 +152,607 @@ export declare abstract class PluginGeomCreateApi {
152
152
  * ```
153
153
  */
154
154
  abstract contourFromProfiles(outer: ProfileHandle, holes?: ProfileHandle[]): PluginApiReturn<ContourHandle>;
155
+ /**
156
+ * Create a closed solid **B-rep** from explicit face loops. Host API call —
157
+ * returns a {@linkcode BrepHandle}. Faces are plain arrays of `{x, y, z}`
158
+ * point components, NOT point handles (bulk-data precedent:
159
+ * `design.query.geometry.getTriangulatedMeshes`), in raw Babylon units.
160
+ *
161
+ * Each face is one planar loop of at least 3 points; at least 4 faces are
162
+ * required. Loops may be authored in any consistent winding — the host
163
+ * validates edge coherence (every edge shared by exactly two faces, in
164
+ * opposite directions) and fixes the global orientation so faces point
165
+ * outward. Faces must be planar and the solid must be closed; holes in faces
166
+ * are not supported (v1).
167
+ *
168
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
169
+ * with `design.create.massFromBrep`.
170
+ *
171
+ * @param faces Face loops — each an ordered array of `{x, y, z}` points (≥3 points per face, ≥4 faces)
172
+ * @returns The new solid as a {@linkcode BrepHandle}
173
+ * @throws if a face is degenerate or non-planar, an edge is not shared by
174
+ * exactly two faces (open shell, non-manifold, or inconsistent winding), or
175
+ * the faces do not form a valid closed solid
176
+ *
177
+ * @examplePrompt Create a brep from faces
178
+ * @examplePrompt Build a custom solid from a set of faces
179
+ * @examplePrompt Make a pyramid from triangular faces
180
+ *
181
+ * # Example
182
+ * ```ts
183
+ * // A pyramid: square base + 4 triangular sides
184
+ * const apex = { x: 0, y: 4, z: 0 }
185
+ * const a = { x: -2, y: 0, z: -2 }
186
+ * const b = { x: 2, y: 0, z: -2 }
187
+ * const c = { x: 2, y: 0, z: 2 }
188
+ * const d = { x: -2, y: 0, z: 2 }
189
+ * const brep = await snaptrude.core.geom.create.brepFromFaces([
190
+ * [a, d, c, b], // base
191
+ * [a, b, apex],
192
+ * [b, c, apex],
193
+ * [c, d, apex],
194
+ * [d, a, apex],
195
+ * ])
196
+ * const faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 5
197
+ * ```
198
+ */
199
+ abstract brepFromFaces(faces: Vec3Components[][]): PluginApiReturn<BrepHandle>;
200
+ /**
201
+ * Create a closed solid **B-rep** by extruding a contour along a direction.
202
+ * Host API call — returns a {@linkcode BrepHandle}. The direction is
203
+ * normalised by the host, so `amount` is the extrusion distance in raw
204
+ * Babylon units (negative extrudes the opposite way). The contour is copied —
205
+ * the input handle is never mutated. Holes and arc/circle profiles extrude
206
+ * natively (a circle profile yields a cylinder).
207
+ *
208
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
209
+ * with `design.create.massFromBrep`.
210
+ *
211
+ * @param contour The cross-section to extrude (outer profile + optional holes)
212
+ * @param direction Extrusion direction as plain `{x, y, z}` components (non-zero, normalised by the host)
213
+ * @param amount Extrusion distance (non-zero; negative extrudes opposite to `direction`)
214
+ * @returns The new solid as a {@linkcode BrepHandle}
215
+ * @throws if the extrusion is degenerate (zero amount, zero direction, or a
216
+ * direction lying in the contour plane) or the contour cannot be extruded
217
+ * into a valid solid
218
+ *
219
+ * @examplePrompt Extrude this profile 3 metres up
220
+ * @examplePrompt Make a solid by extruding this outline
221
+ * @examplePrompt Create a cylinder from a circle profile
222
+ *
223
+ * # Example
224
+ * ```ts
225
+ * const rect = await snaptrude.core.geom.create.profileRect(4, 3)
226
+ * const contour = await snaptrude.core.geom.create.contourFromProfile(rect)
227
+ * const brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)
228
+ * const faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6
229
+ * ```
230
+ */
231
+ abstract brepFromExtrusion(contour: ContourHandle, direction: Vec3Components, amount: number): PluginApiReturn<BrepHandle>;
232
+ /**
233
+ * Create a closed solid **B-rep** by lofting between a bottom and a top
234
+ * contour, optionally through intermediate cross-sections. Host API call —
235
+ * returns a {@linkcode BrepHandle}. Sections with different edge counts are
236
+ * auto-matched: vertices are deterministically inserted on the smaller
237
+ * sections at the larger section's perimeter positions, so the same input
238
+ * always yields the same solid. For straight-edge (all-line) sections the
239
+ * seam is auto-aligned too — winding and start-vertex correspondence are
240
+ * chosen to avoid a twist, so outlines authored from any starting corner
241
+ * loft cleanly; arc-bearing sections keep the authored correspondence
242
+ * unchanged. A pair whose side faces would be non-planar under every
243
+ * correspondence still builds for hole-free straight-edged pairs — planar
244
+ * side quads stay quads and warped ones split into planar triangles (the
245
+ * triangulated lane); arc-bearing or holed twisted pairs are rejected, as is
246
+ * auto-matching that would pair an arc with a straight edge. Matching hole
247
+ * counts are allowed in the two-section form. With intermediates the loft
248
+ * is a chain of ruled segments folded into one solid: sections must be
249
+ * planar and hole-free, ordered bottom → intermediates → top. The contours
250
+ * are copied — the input handles are never mutated.
251
+ *
252
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
253
+ * with `design.create.massFromBrep`.
254
+ *
255
+ * @param bottomContour The bottom cross-section
256
+ * @param topContour The top cross-section (edge count may differ from the
257
+ * bottom — sections are auto-matched)
258
+ * @param intermediateContours Optional in-between cross-sections, ordered
259
+ * bottom to top (hole-free; edge counts may differ — every section is
260
+ * normalized to the largest)
261
+ * @param options Optional behavior switches. `compatibility` — `"auto"`
262
+ * (default) inserts vertices to match differing edge counts; `"strict"`
263
+ * skips normalization and throws VALIDATION when outer edge counts (or,
264
+ * in the two-section form, hole-pair counts) differ. `seamAlignment` —
265
+ * `"auto"` (default) searches seam rotations on straight-edge sections to
266
+ * avoid a twist; `"authored"` keeps the authored start-vertex
267
+ * correspondence unchanged (a twisted correspondence then builds through
268
+ * the triangulated lane for hole-free straight-edged pairs).
269
+ * `{ compatibility: "strict", seamAlignment: "authored" }` reproduces
270
+ * pre-0.9.4 lofting exactly.
271
+ * @returns The new solid as a {@linkcode BrepHandle}
272
+ * @throws VALIDATION if the contours are coincident, their hole counts
273
+ * differ, any section has holes when intermediates are present
274
+ * (multi-section lofts take hole-free sections), a section is non-planar,
275
+ * sections are too dissimilar to auto-match, auto-matching would pair an
276
+ * arc with a straight edge, or — for arc-bearing or holed pairs only — no vertex correspondence avoids a twist (a
277
+ * side face between corresponding edges would be non-planar — the error
278
+ * names the offending sections); with `compatibility: "strict"`, if
279
+ * section edge counts (or hole-pair counts) differ — the error names the
280
+ * sections and counts and points at `compatibility: "auto"`
281
+ * @throws OPERATION_FAILED if the lofted segments cannot be joined into a
282
+ * valid solid
283
+ *
284
+ * @examplePrompt Make a tapered tower from these two outlines
285
+ * @examplePrompt Loft between a large base and a smaller top
286
+ * @examplePrompt Create a frustum from two squares
287
+ * @examplePrompt Loft the tower through these three floor outlines
288
+ * @examplePrompt Loft a four-sided base to a five-sided top
289
+ * @examplePrompt Loft these outlines even though their corners don't line up
290
+ * @examplePrompt Loft these outlines exactly as authored, corner to corner
291
+ * @examplePrompt Fail the loft if my sections don't have matching edge counts
292
+ *
293
+ * # Example
294
+ * ```ts
295
+ * // A square frustum: 4m base lofted to a 2m top, 3m up
296
+ * const base = await snaptrude.core.geom.create.profileRect(4, 4)
297
+ * const top = await snaptrude.core.geom.create.profileRect(2, 2, await snaptrude.core.math.vec3.new(0, 3, 0))
298
+ * const brep = await snaptrude.core.geom.create.brepFromLoft(
299
+ * await snaptrude.core.geom.create.contourFromProfile(base),
300
+ * await snaptrude.core.geom.create.contourFromProfile(top),
301
+ * )
302
+ * const faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6
303
+ * ```
304
+ */
305
+ abstract brepFromLoft(bottomContour: ContourHandle, topContour: ContourHandle, intermediateContours?: ContourHandle[], options?: {
306
+ compatibility?: "strict" | "auto";
307
+ seamAlignment?: "authored" | "auto";
308
+ }): PluginApiReturn<BrepHandle>;
309
+ /**
310
+ * Create a closed solid **B-rep** from indexed mesh data: a vertex position
311
+ * array plus face loops of indices into it. Host API call — returns a
312
+ * {@linkcode BrepHandle}. The indexed form of
313
+ * {@linkcode PluginGeomCreateApi.brepFromFaces} — same validation (planar
314
+ * faces, closed manifold solid, every edge shared by exactly two faces) after
315
+ * the indices are expanded to point loops.
316
+ *
317
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
318
+ * with `design.create.massFromBrep`.
319
+ *
320
+ * @param positions Vertex positions as plain `{x, y, z}` components (≥4)
321
+ * @param faces Face loops — each an ordered array of indices into `positions` (≥3 indices per face, ≥4 faces)
322
+ * @returns The new solid as a {@linkcode BrepHandle}
323
+ * @throws if an index is not an integer within `positions` bounds, a face is
324
+ * degenerate or non-planar, or the faces do not form a valid closed solid
325
+ *
326
+ * @examplePrompt Create a brep from mesh vertices and indices
327
+ * @examplePrompt Turn this indexed mesh into a solid
328
+ * @examplePrompt Build a solid from vertex positions and face indices
329
+ *
330
+ * # Example
331
+ * ```ts
332
+ * // A tetrahedron from 4 vertices and 4 triangular faces
333
+ * const positions = [
334
+ * { x: 0, y: 0, z: 0 },
335
+ * { x: 4, y: 0, z: 0 },
336
+ * { x: 2, y: 0, z: 4 },
337
+ * { x: 2, y: 3, z: 1.5 },
338
+ * ]
339
+ * const brep = await snaptrude.core.geom.create.brepFromMesh(positions, [
340
+ * [0, 2, 1], // base
341
+ * [0, 1, 3],
342
+ * [1, 2, 3],
343
+ * [2, 0, 3],
344
+ * ])
345
+ * const vertexCount = await snaptrude.core.geom.query.brep.getVertexCount(brep) // 4
346
+ * ```
347
+ */
348
+ abstract brepFromMesh(positions: Vec3Components[], faces: number[][]): PluginApiReturn<BrepHandle>;
349
+ /**
350
+ * Create a closed solid **B-rep** as the boolean **union** of two breps
351
+ * (`a ∪ b`). Host API call — returns a new {@linkcode BrepHandle}. Inputs are
352
+ * read-only and may be authored breps (any `core.geom.create` brep
353
+ * constructor) or scene-derived breps from `design.query.geometry.getBrep`;
354
+ * coordinates are combined as-is, so both inputs must share a frame. The
355
+ * result must be a single solid — disjoint inputs are rejected.
356
+ *
357
+ * The first boolean call loads the OpenCascade geometry kernel (a wasm of
358
+ * tens of MB — expect a pause of seconds); subsequent calls are fast.
359
+ *
360
+ * @param a First solid
361
+ * @param b Second solid
362
+ * @returns The union as a new {@linkcode BrepHandle}
363
+ * @throws if the inputs do not overlap or touch (the union would be disjoint
364
+ * solids) or the result cannot be built as a valid single solid
365
+ *
366
+ * @examplePrompt Union these two solids
367
+ * @examplePrompt Merge these breps into one mass
368
+ * @examplePrompt Combine the tower and the podium into a single solid
369
+ *
370
+ * # Example
371
+ * ```ts
372
+ * const a = await snaptrude.core.geom.create.brepFromExtrusion(baseContour, { x: 0, y: 1, z: 0 }, 3)
373
+ * const b = await snaptrude.core.geom.create.brepFromExtrusion(overlappingContour, { x: 0, y: 1, z: 0 }, 5)
374
+ * const merged = await snaptrude.core.geom.create.brepFromUnion(a, b)
375
+ * ```
376
+ */
377
+ abstract brepFromUnion(a: BrepHandle, b: BrepHandle): PluginApiReturn<BrepHandle>;
378
+ /**
379
+ * Create a closed solid **B-rep** as the boolean **subtraction** of two
380
+ * breps: **`a` minus `b`** — `b` is cut away from `a`. Host API call —
381
+ * returns a new {@linkcode BrepHandle}. Argument order matters:
382
+ * `brepFromSubtraction(a, b)` removes `b`'s volume from `a`. Inputs are
383
+ * read-only and may be authored or scene-derived breps (see
384
+ * {@linkcode PluginGeomCreateApi.brepFromUnion}); coordinates are combined
385
+ * as-is.
386
+ *
387
+ * The first boolean call loads the OpenCascade geometry kernel (a wasm of
388
+ * tens of MB — expect a pause of seconds); subsequent calls are fast.
389
+ *
390
+ * @param a The solid to subtract from
391
+ * @param b The solid to remove from `a`
392
+ * @returns `a` minus `b` as a new {@linkcode BrepHandle}
393
+ * @throws if `b` consumes `a` entirely (empty result), the result splits into
394
+ * disjoint solids, or it cannot be built as a valid single solid
395
+ *
396
+ * @examplePrompt Subtract the courtyard from the building mass
397
+ * @examplePrompt Cut this solid out of that one
398
+ * @examplePrompt Punch a hole through the slab with this box
399
+ *
400
+ * # Example
401
+ * ```ts
402
+ * // buildingBrep minus courtyardBrep — order matters
403
+ * const carved = await snaptrude.core.geom.create.brepFromSubtraction(buildingBrep, courtyardBrep)
404
+ * ```
405
+ */
406
+ abstract brepFromSubtraction(a: BrepHandle, b: BrepHandle): PluginApiReturn<BrepHandle>;
407
+ /**
408
+ * Create a closed solid **B-rep** as the boolean **intersection** of two
409
+ * breps (`a ∩ b` — the shared volume only). Host API call — returns a new
410
+ * {@linkcode BrepHandle}. Inputs are read-only and may be authored or
411
+ * scene-derived breps (see {@linkcode PluginGeomCreateApi.brepFromUnion});
412
+ * coordinates are combined as-is.
413
+ *
414
+ * The first boolean call loads the OpenCascade geometry kernel (a wasm of
415
+ * tens of MB — expect a pause of seconds); subsequent calls are fast.
416
+ *
417
+ * @param a First solid
418
+ * @param b Second solid
419
+ * @returns The shared volume as a new {@linkcode BrepHandle}
420
+ * @throws if the inputs do not overlap (empty intersection), the result
421
+ * splits into disjoint solids, or it cannot be built as a valid single
422
+ * solid
423
+ *
424
+ * @examplePrompt Keep only the overlap of these two solids
425
+ * @examplePrompt Intersect these two masses
426
+ * @examplePrompt Clip the tower to the zoning envelope
427
+ *
428
+ * # Example
429
+ * ```ts
430
+ * const overlap = await snaptrude.core.geom.create.brepFromIntersection(towerBrep, envelopeBrep)
431
+ * ```
432
+ */
433
+ abstract brepFromIntersection(a: BrepHandle, b: BrepHandle): PluginApiReturn<BrepHandle>;
434
+ /**
435
+ * Rounds the given straight edges of a solid with a constant radius. Host
436
+ * API call — returns a new {@linkcode BrepHandle}; the input brep is
437
+ * read-only.
438
+ *
439
+ * v1 fillets straight edges only, and no two filleted edges may share a
440
+ * vertex — corner blends produce spherical patches Snaptrude cannot
441
+ * represent. Runs on the OpenCascade kernel (the first kernel call loads a
442
+ * wasm of tens of MB — expect a pause of seconds).
443
+ *
444
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
445
+ * with `design.create.massFromBrep`.
446
+ *
447
+ * @param brep The solid whose edges to round
448
+ * @param edges The straight edges to fillet (≥1, all on `brep`, no two sharing a vertex)
449
+ * @param radius Fillet radius (positive, finite)
450
+ * @returns The filleted solid as a new {@linkcode BrepHandle}
451
+ * @throws VALIDATION if `edges` is empty, `radius` is not a positive finite
452
+ * number, an edge is not on `brep`, an edge is an arc (v1 fillets straight
453
+ * edges only), or two edges share a vertex (fillet non-adjacent edges)
454
+ * @throws OPERATION_FAILED if the kernel cannot build the fillet (the radius
455
+ * likely exceeds the adjacent face size — reduce it) or the result
456
+ * contains curved surfaces Snaptrude cannot represent
457
+ *
458
+ * @examplePrompt Round the edges of this mass
459
+ * @examplePrompt Fillet the corners of the podium with a 0.5m radius
460
+ * @examplePrompt Soften the vertical edges of this tower
461
+ *
462
+ * # Example
463
+ * ```ts
464
+ * const brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)
465
+ * const edges = await snaptrude.core.geom.query.brep.listEdges(brep)
466
+ * const rounded = await snaptrude.core.geom.create.brepFromFillet(brep, [edges[0]], 0.3)
467
+ * ```
468
+ */
469
+ abstract brepFromFillet(brep: BrepHandle, edges: EdgeHandle[], radius: number): PluginApiReturn<BrepHandle>;
470
+ /**
471
+ * Grows or shrinks a solid by offsetting every face — positive distance
472
+ * moves faces outward, negative moves them inward. Host API call — returns
473
+ * a new {@linkcode BrepHandle}; the input brep is read-only.
474
+ *
475
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of
476
+ * tens of MB — expect a pause of seconds).
477
+ *
478
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
479
+ * with `design.create.massFromBrep`.
480
+ *
481
+ * @param brep The solid to offset
482
+ * @param distance Offset distance (finite, non-zero; positive grows, negative shrinks)
483
+ * @returns The offset solid as a new {@linkcode BrepHandle}
484
+ * @throws VALIDATION if `distance` is not finite, is too small to offset
485
+ * anything, or an inward distance consumes the solid entirely
486
+ * @throws OPERATION_FAILED if the kernel cannot build the offset or the
487
+ * result contains curved surfaces Snaptrude cannot represent
488
+ *
489
+ * @examplePrompt Grow this solid by 0.5m in every direction
490
+ * @examplePrompt Shrink this mass by 200mm
491
+ * @examplePrompt Offset the building envelope outward by 1m
492
+ *
493
+ * # Example
494
+ * ```ts
495
+ * const brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)
496
+ * const grown = await snaptrude.core.geom.create.brepFromOffset(brep, 0.5)
497
+ * ```
498
+ */
499
+ abstract brepFromOffset(brep: BrepHandle, distance: number): PluginApiReturn<BrepHandle>;
500
+ /**
501
+ * Hollows a solid into constant-thickness walls, removing the given faces
502
+ * as openings. Host API call — returns a new {@linkcode BrepHandle}; the
503
+ * input brep is read-only. The outer surface is kept and the walls grow
504
+ * inward.
505
+ *
506
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of
507
+ * tens of MB — expect a pause of seconds).
508
+ *
509
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
510
+ * with `design.create.massFromBrep`.
511
+ *
512
+ * @param brep The solid to hollow
513
+ * @param openFaces The faces to remove as openings (≥1, all on `brep`)
514
+ * @param thickness Wall thickness (positive, finite, smaller than half the solid's smallest span)
515
+ * @returns The hollowed solid as a new {@linkcode BrepHandle}
516
+ * @throws VALIDATION if `openFaces` is empty, a face is not on `brep`,
517
+ * `thickness` is not a positive finite number, or the thickness is too
518
+ * large (it must be smaller than half the solid's smallest span)
519
+ * @throws OPERATION_FAILED if the kernel cannot build the shell or the
520
+ * result contains curved surfaces Snaptrude cannot represent
521
+ *
522
+ * @examplePrompt Hollow this mass into 200mm walls
523
+ * @examplePrompt Shell this form with the top face open
524
+ * @examplePrompt Turn this solid tower into a tube open at both ends
525
+ *
526
+ * # Example
527
+ * ```ts
528
+ * const brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)
529
+ * const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
530
+ * const hollow = await snaptrude.core.geom.create.brepFromShell(brep, [faces[0]], 0.2)
531
+ * ```
532
+ */
533
+ abstract brepFromShell(brep: BrepHandle, openFaces: FaceHandle[], thickness: number): PluginApiReturn<BrepHandle>;
534
+ /**
535
+ * Cuts a solid by an infinite plane and returns one brep per resulting
536
+ * piece — a single piece if the plane misses the solid. Host API call —
537
+ * returns new {@linkcode BrepHandle}s; the input brep is read-only. The
538
+ * plane is defined by a point on it and its normal direction.
539
+ *
540
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of
541
+ * tens of MB — expect a pause of seconds).
542
+ *
543
+ * Inspect each result via `core.geom.query.brep.*`, or commit them to the
544
+ * scene with `design.create.massFromBrep`.
545
+ *
546
+ * @param brep The solid to split
547
+ * @param planeOrigin A point on the cutting plane as plain `{x, y, z}` components
548
+ * @param planeNormal The plane normal as plain `{x, y, z}` components (non-zero)
549
+ * @returns The resulting pieces as {@linkcode BrepHandle}`[]` (one per solid)
550
+ * @throws VALIDATION if `planeNormal` is zero-length or the origin/normal
551
+ * components are not finite
552
+ * @throws OPERATION_FAILED if the kernel cannot split the solid
553
+ *
554
+ * @examplePrompt Cut this building at 12m height
555
+ * @examplePrompt Split the tower from the podium with a horizontal plane
556
+ * @examplePrompt Slice this mass along a vertical plane
557
+ *
558
+ * # Example
559
+ * ```ts
560
+ * const pieces = await snaptrude.core.geom.create.brepsFromSplit(
561
+ * towerBrep,
562
+ * { x: 0, y: 12, z: 0 },
563
+ * { x: 0, y: 1, z: 0 },
564
+ * )
565
+ * console.log("pieces:", pieces.length)
566
+ * ```
567
+ */
568
+ abstract brepsFromSplit(brep: BrepHandle, planeOrigin: Vec3Components, planeNormal: Vec3Components): PluginApiReturn<BrepHandle[]>;
569
+ /**
570
+ * Bevels the given straight edges of a solid with a symmetric planar cut.
571
+ * Host API call — returns a new {@linkcode BrepHandle}; the input brep is
572
+ * read-only.
573
+ *
574
+ * v1 chamfers straight edges only, and no two chamfered edges may share a
575
+ * vertex. Runs on the OpenCascade kernel (the first kernel call loads a
576
+ * wasm of tens of MB — expect a pause of seconds).
577
+ *
578
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
579
+ * with `design.create.massFromBrep`.
580
+ *
581
+ * @param brep The solid whose edges to bevel
582
+ * @param edges The straight edges to chamfer (≥1, all on `brep`, no two sharing a vertex)
583
+ * @param distance Chamfer distance from the edge on each adjacent face (positive, finite)
584
+ * @returns The chamfered solid as a new {@linkcode BrepHandle}
585
+ * @throws VALIDATION if `edges` is empty, `distance` is not a positive
586
+ * finite number, an edge is not on `brep`, an edge is an arc (v1 chamfers
587
+ * straight edges only), or two edges share a vertex (chamfer non-adjacent
588
+ * edges)
589
+ * @throws OPERATION_FAILED if the kernel cannot build the chamfer (the
590
+ * distance likely exceeds the adjacent face size — reduce it)
591
+ *
592
+ * @examplePrompt Bevel these edges by 100mm
593
+ * @examplePrompt Chamfer the top edges of the plinth
594
+ * @examplePrompt Cut a 45-degree flat along the corners of this mass
595
+ *
596
+ * # Example
597
+ * ```ts
598
+ * const brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)
599
+ * const edges = await snaptrude.core.geom.query.brep.listEdges(brep)
600
+ * const beveled = await snaptrude.core.geom.create.brepFromChamfer(brep, [edges[0]], 0.1)
601
+ * ```
602
+ */
603
+ abstract brepFromChamfer(brep: BrepHandle, edges: EdgeHandle[], distance: number): PluginApiReturn<BrepHandle>;
604
+ /**
605
+ * Sweeps a planar profile along a polyline path, with mitred corners at
606
+ * each bend. Host API call — returns a new {@linkcode BrepHandle}; the
607
+ * input contour is read-only. The profile must be hole-free and must not
608
+ * lie in a plane containing the first path segment's direction. Repeating
609
+ * the first point as the last closes the path into a ring solid (a picture
610
+ * frame): closed paths must be flat and straight-segmented and take a
611
+ * straight-edged (arc-free) profile — the ring's cross-section is the
612
+ * authored profile projected along the first leg onto the first mitre
613
+ * plane, so a profile not perpendicular to the first leg appears sheared.
614
+ * An optional scale law tapers the sweep: `startScale`/`endScale`
615
+ * interpolate linearly by arc length, or `scales` gives one factor per path
616
+ * point (scaling is about the profile centroid). A uniform scale (all
617
+ * factors equal) works on any path today's sweep accepts; a varying scale
618
+ * takes straight (collinear) open paths with straight-edged profiles —
619
+ * tapering across a bend or along an arc edge would create faces Snaptrude
620
+ * cannot represent and throws (sweep each straight run separately and union
621
+ * the results instead). An optional `transition` picks the corner
622
+ * treatment: `"miter"` (default) is today's sharp mitred bend;
623
+ * `{ bevel: b }` chamfers each turning corner by cutting `b` back along
624
+ * both adjacent legs (works on open and closed paths — each leg must be
625
+ * long enough for its cuts). On a corner-less path `transition` has no effect, and the
626
+ * varying-scale lane takes straight paths, so it never sees a corner.
627
+ *
628
+ * Open paths run on the OpenCascade kernel (the first kernel call loads a
629
+ * wasm of tens of MB — expect a pause of seconds); closed paths are
630
+ * computed host-side and never load the kernel.
631
+ *
632
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
633
+ * with `design.create.massFromBrep`.
634
+ *
635
+ * @param profile The cross-section to sweep (hole-free contour)
636
+ * @param path The polyline path as plain `{x, y, z}` points (≥2; repeat the
637
+ * first point as the last to close the path into a ring)
638
+ * @param options Optional scale law and corner transition. Scale law:
639
+ * `startScale`/`endScale` (linear taper by arc length) or `scales` (one
640
+ * factor per path point; mutually exclusive with
641
+ * `startScale`/`endScale`); every factor must be finite and within
642
+ * 1e-3..1e3. `transition`: `"miter"` (default, sharp corners) or
643
+ * `{ bevel: b }` (chamfered corners, `b` finite within 1e-3..1e3; open
644
+ * and closed paths)
645
+ * @returns The swept solid as a new {@linkcode BrepHandle}
646
+ * @throws VALIDATION if the profile has holes, the path has fewer than 2
647
+ * points, consecutive path points coincide, a coordinate is not finite,
648
+ * or the profile plane contains the first path segment's direction
649
+ * (degenerate sweep); for closed paths, if the ring has fewer than 3
650
+ * distinct corners, the path is non-planar, a corner doubles back, the
651
+ * profile has an arc edge, or the profile is too large for a mitred
652
+ * corner; for scale options, if a factor is outside 1e-3..1e3, `scales`
653
+ * is combined with `startScale`/`endScale`, `scales` does not match the
654
+ * path length, or a varying scale is used on a bent or closed path or
655
+ * with an arc-edged profile; for `{ bevel }`, if a leg is too short for
656
+ * the cuts its beveled corners take from it or a corner nearly doubles
657
+ * back so its chamfer collapses (the errors name the corner)
658
+ * @throws OPERATION_FAILED if the kernel cannot sweep the profile into a
659
+ * valid solid or a transition patch is a curved surface Snaptrude cannot
660
+ * represent
661
+ *
662
+ * @examplePrompt Sweep this profile along the corridor path
663
+ * @examplePrompt Extrude the railing section along this route
664
+ * @examplePrompt Run a duct profile through these points
665
+ * @examplePrompt Sweep a frame profile around a closed rectangular loop
666
+ * @examplePrompt Taper this duct from 1x1 to 2x2 along its run
667
+ * @examplePrompt Sweep a column section that narrows toward the top
668
+ * @examplePrompt Chamfer the corners of this swept frame by 200mm
669
+ *
670
+ * # Example
671
+ * ```ts
672
+ * const rect = await snaptrude.core.geom.create.profileRect(0.4, 0.4)
673
+ * const profile = await snaptrude.core.geom.create.contourFromProfile(rect)
674
+ * // profileRect lies in the XZ plane, so the path must START out of that
675
+ * // plane (here: straight up), then it can run horizontally.
676
+ * const duct = await snaptrude.core.geom.create.brepFromSweep(profile, [
677
+ * { x: 0, y: 0, z: 0 },
678
+ * { x: 0, y: 2.8, z: 0 },
679
+ * { x: 10, y: 2.8, z: 0 },
680
+ * ])
681
+ * // A closed ring (picture frame): repeat the first point as the last
682
+ * const frame = await snaptrude.core.geom.create.brepFromSweep(profile, [
683
+ * { x: 0, y: 0, z: 0 },
684
+ * { x: 0, y: 3, z: 0 },
685
+ * { x: 4, y: 3, z: 0 },
686
+ * { x: 4, y: 0, z: 0 },
687
+ * { x: 0, y: 0, z: 0 },
688
+ * ])
689
+ * // A tapered straight run: 0.4x0.4 at the start, 0.8x0.8 at the end
690
+ * const flue = await snaptrude.core.geom.create.brepFromSweep(
691
+ * profile,
692
+ * [
693
+ * { x: 0, y: 0, z: 0 },
694
+ * { x: 0, y: 10, z: 0 },
695
+ * ],
696
+ * { startScale: 1, endScale: 2 },
697
+ * )
698
+ * ```
699
+ */
700
+ abstract brepFromSweep(profile: ContourHandle, path: Vec3Components[], options?: {
701
+ startScale?: number;
702
+ endScale?: number;
703
+ scales?: number[];
704
+ transition?: "miter" | {
705
+ bevel: number;
706
+ };
707
+ }): PluginApiReturn<BrepHandle>;
708
+ /**
709
+ * Revolves a planar profile about an axis to make a solid of revolution — a
710
+ * full turn by default. Host API call — returns a new
711
+ * {@linkcode BrepHandle}; the input contour is read-only. Holes in the
712
+ * profile are allowed. Profile segments must stay parallel or perpendicular
713
+ * to the axis — inclined or arc segments would revolve into surfaces
714
+ * Snaptrude cannot represent.
715
+ *
716
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of
717
+ * tens of MB — expect a pause of seconds).
718
+ *
719
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
720
+ * with `design.create.massFromBrep`.
721
+ *
722
+ * @param profile The cross-section to revolve (planar contour, holes allowed)
723
+ * @param axisOrigin A point on the revolution axis as plain `{x, y, z}` components
724
+ * @param axisDirection The axis direction as plain `{x, y, z}` components (non-zero)
725
+ * @param angleInDegrees Optional revolution angle in degrees (0 < angle ≤ 360; default 360)
726
+ * @returns The revolved solid as a new {@linkcode BrepHandle}
727
+ * @throws VALIDATION if `axisDirection` is zero-length, `angleInDegrees` is
728
+ * not in (0, 360], the axis passes through the profile interior, or a
729
+ * coordinate is not finite
730
+ * @throws OPERATION_FAILED if the kernel cannot revolve the profile or the
731
+ * result contains curved surfaces Snaptrude cannot represent (keep
732
+ * profile segments parallel or perpendicular to the axis)
733
+ *
734
+ * @examplePrompt Create a dome from this section
735
+ * @examplePrompt Revolve this profile 360 degrees around the vertical axis
736
+ * @examplePrompt Build a rotunda by revolving this wall section
737
+ *
738
+ * # Example
739
+ * ```ts
740
+ * // A cylinder: revolve a 2m-wide, 3m-tall rectangle about the Y axis at its edge
741
+ * const rect = await snaptrude.core.geom.create.profileFromLinePoints([
742
+ * await snaptrude.core.math.vec3.new(0, 0, 0),
743
+ * await snaptrude.core.math.vec3.new(2, 0, 0),
744
+ * await snaptrude.core.math.vec3.new(2, 3, 0),
745
+ * await snaptrude.core.math.vec3.new(0, 3, 0),
746
+ * ])
747
+ * const profile = await snaptrude.core.geom.create.contourFromProfile(rect)
748
+ * const cylinder = await snaptrude.core.geom.create.brepFromRevolution(
749
+ * profile,
750
+ * { x: 0, y: 0, z: 0 },
751
+ * { x: 0, y: 1, z: 0 },
752
+ * )
753
+ * ```
754
+ */
755
+ abstract brepFromRevolution(profile: ContourHandle, axisOrigin: Vec3Components, axisDirection: Vec3Components, angleInDegrees?: number): PluginApiReturn<BrepHandle>;
155
756
  }
156
757
  /**
157
758
  * Arguments for {@linkcode PluginGeomCreateApi.line}.
@@ -162,8 +763,8 @@ export declare abstract class PluginGeomCreateApi {
162
763
  * | `endPoint` | {@linkcode Vec3Handle} | End point of the line segment |
163
764
  */
164
765
  export declare const PluginGeomCreateLineArgs: z.ZodObject<{
165
- startPoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
166
- endPoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
766
+ startPoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
767
+ endPoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
167
768
  }, z.core.$strip>;
168
769
  export type PluginGeomCreateLineArgs = z.infer<typeof PluginGeomCreateLineArgs>;
169
770
  /**
@@ -177,10 +778,10 @@ export type PluginGeomCreateLineArgs = z.infer<typeof PluginGeomCreateLineArgs>;
177
778
  * | `axis` | {@linkcode Vec3Handle} | Axis direction of the arc |
178
779
  */
179
780
  export declare const PluginGeomCreateArcArgs: z.ZodObject<{
180
- startPoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
181
- endPoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
182
- centrePoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
183
- axis: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
781
+ startPoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
782
+ endPoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
783
+ centrePoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
784
+ axis: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
184
785
  }, z.core.$strip>;
185
786
  export type PluginGeomCreateArcArgs = z.infer<typeof PluginGeomCreateArcArgs>;
186
787
  /**
@@ -193,8 +794,8 @@ export type PluginGeomCreateArcArgs = z.infer<typeof PluginGeomCreateArcArgs>;
193
794
  * | `radius` | `number` | Radius of the circle |
194
795
  */
195
796
  export declare const PluginGeomCreateCircleArgs: z.ZodObject<{
196
- centrePoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
197
- axis: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
797
+ centrePoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
798
+ axis: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
198
799
  radius: z.ZodNumber;
199
800
  }, z.core.$strip>;
200
801
  export type PluginGeomCreateCircleArgs = z.infer<typeof PluginGeomCreateCircleArgs>;
@@ -206,7 +807,7 @@ export type PluginGeomCreateCircleArgs = z.infer<typeof PluginGeomCreateCircleAr
206
807
  * | `points` | {@linkcode Vec3Handle}`[]` | Ordered vertex handles of the profile |
207
808
  */
208
809
  export declare const PluginGeomCreateProfileFromLinePointsArgs: z.ZodObject<{
209
- points: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
810
+ points: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
210
811
  }, z.core.$strip>;
211
812
  export type PluginGeomCreateProfileFromLinePointsArgs = z.infer<typeof PluginGeomCreateProfileFromLinePointsArgs>;
212
813
  /**
@@ -217,7 +818,7 @@ export type PluginGeomCreateProfileFromLinePointsArgs = z.infer<typeof PluginGeo
217
818
  * | `curves` | {@linkcode CurveHandle}`[]` | Ordered curve handles forming a closed loop |
218
819
  */
219
820
  export declare const PluginGeomCreateProfileFromCurvesArgs: z.ZodObject<{
220
- curves: z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>>;
821
+ curves: z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>>;
221
822
  }, z.core.$strip>;
222
823
  export type PluginGeomCreateProfileFromCurvesArgs = z.infer<typeof PluginGeomCreateProfileFromCurvesArgs>;
223
824
  /**
@@ -228,7 +829,7 @@ export type PluginGeomCreateProfileFromCurvesArgs = z.infer<typeof PluginGeomCre
228
829
  * | `outer` | {@linkcode ProfileHandle} | The outer boundary loop |
229
830
  */
230
831
  export declare const PluginGeomCreateContourFromProfileArgs: z.ZodObject<{
231
- outer: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
832
+ outer: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
232
833
  }, z.core.$strip>;
233
834
  export type PluginGeomCreateContourFromProfileArgs = z.infer<typeof PluginGeomCreateContourFromProfileArgs>;
234
835
  /**
@@ -240,8 +841,233 @@ export type PluginGeomCreateContourFromProfileArgs = z.infer<typeof PluginGeomCr
240
841
  * | `holes` | {@linkcode ProfileHandle}`[]` | Optional inner hole loops |
241
842
  */
242
843
  export declare const PluginGeomCreateContourFromProfilesArgs: z.ZodObject<{
243
- outer: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
244
- holes: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>>>;
844
+ outer: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
845
+ holes: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>>>;
245
846
  }, z.core.$strip>;
246
847
  export type PluginGeomCreateContourFromProfilesArgs = z.infer<typeof PluginGeomCreateContourFromProfilesArgs>;
848
+ /**
849
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromFaces}.
850
+ *
851
+ * | Property | Type | Description |
852
+ * |---|---|---|
853
+ * | `faces` | {@linkcode Vec3Components}`[][]` | Face loops — each an ordered array of `{x, y, z}` points (≥3 points per face, ≥4 faces) |
854
+ */
855
+ export declare const PluginGeomCreateBrepFromFacesArgs: z.ZodObject<{
856
+ faces: z.ZodArray<z.ZodArray<z.ZodObject<{
857
+ x: z.ZodNumber;
858
+ y: z.ZodNumber;
859
+ z: z.ZodNumber;
860
+ }, z.core.$strip>>>;
861
+ }, z.core.$strip>;
862
+ export type PluginGeomCreateBrepFromFacesArgs = z.infer<typeof PluginGeomCreateBrepFromFacesArgs>;
863
+ /**
864
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromExtrusion}.
865
+ *
866
+ * | Property | Type | Description |
867
+ * |---|---|---|
868
+ * | `contour` | {@linkcode ContourHandle} | The cross-section to extrude |
869
+ * | `direction` | {@linkcode Vec3Components} | Extrusion direction (non-zero, finite components) |
870
+ * | `amount` | `number` | Extrusion distance (finite, non-zero) |
871
+ */
872
+ export declare const PluginGeomCreateBrepFromExtrusionArgs: z.ZodObject<{
873
+ contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
874
+ direction: z.ZodObject<{
875
+ x: z.ZodNumber;
876
+ y: z.ZodNumber;
877
+ z: z.ZodNumber;
878
+ }, z.core.$strip>;
879
+ amount: z.ZodNumber;
880
+ }, z.core.$strip>;
881
+ export type PluginGeomCreateBrepFromExtrusionArgs = z.infer<typeof PluginGeomCreateBrepFromExtrusionArgs>;
882
+ /**
883
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromLoft}.
884
+ *
885
+ * | Property | Type | Description |
886
+ * |---|---|---|
887
+ * | `bottomContour` | {@linkcode ContourHandle} | The bottom cross-section |
888
+ * | `topContour` | {@linkcode ContourHandle} | The top cross-section |
889
+ * | `intermediateContours` | {@linkcode ContourHandle}`[]`? | Optional in-between cross-sections, ordered bottom to top |
890
+ * | `options` | `object`? | Optional behavior switches: `compatibility` (`"strict"` throws on mismatched edge counts instead of auto-matching; default `"auto"`) and `seamAlignment` (`"authored"` keeps the authored correspondence instead of searching seam rotations; default `"auto"`) |
891
+ */
892
+ export declare const PluginGeomCreateBrepFromLoftArgs: z.ZodObject<{
893
+ bottomContour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
894
+ topContour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
895
+ intermediateContours: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>>>;
896
+ options: z.ZodOptional<z.ZodObject<{
897
+ compatibility: z.ZodOptional<z.ZodEnum<{
898
+ strict: "strict";
899
+ auto: "auto";
900
+ }>>;
901
+ seamAlignment: z.ZodOptional<z.ZodEnum<{
902
+ auto: "auto";
903
+ authored: "authored";
904
+ }>>;
905
+ }, z.core.$strip>>;
906
+ }, z.core.$strip>;
907
+ export type PluginGeomCreateBrepFromLoftArgs = z.infer<typeof PluginGeomCreateBrepFromLoftArgs>;
908
+ /**
909
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromMesh}.
910
+ *
911
+ * | Property | Type | Description |
912
+ * |---|---|---|
913
+ * | `positions` | {@linkcode Vec3Components}`[]` | Vertex positions (≥4) |
914
+ * | `faces` | `number[][]` | Face loops of indices into `positions` (≥3 indices per face, ≥4 faces) |
915
+ */
916
+ export declare const PluginGeomCreateBrepFromMeshArgs: z.ZodObject<{
917
+ positions: z.ZodArray<z.ZodObject<{
918
+ x: z.ZodNumber;
919
+ y: z.ZodNumber;
920
+ z: z.ZodNumber;
921
+ }, z.core.$strip>>;
922
+ faces: z.ZodArray<z.ZodArray<z.ZodNumber>>;
923
+ }, z.core.$strip>;
924
+ export type PluginGeomCreateBrepFromMeshArgs = z.infer<typeof PluginGeomCreateBrepFromMeshArgs>;
925
+ /**
926
+ * Arguments for the brep boolean constructors —
927
+ * {@linkcode PluginGeomCreateApi.brepFromUnion},
928
+ * {@linkcode PluginGeomCreateApi.brepFromSubtraction} (`a` minus `b`), and
929
+ * {@linkcode PluginGeomCreateApi.brepFromIntersection}.
930
+ *
931
+ * | Property | Type | Description |
932
+ * |---|---|---|
933
+ * | `a` | {@linkcode BrepHandle} | First solid (the subtraction target) |
934
+ * | `b` | {@linkcode BrepHandle} | Second solid (the subtraction tool) |
935
+ */
936
+ export declare const PluginGeomCreateBrepBooleanArgs: z.ZodObject<{
937
+ a: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
938
+ b: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
939
+ }, z.core.$strip>;
940
+ export type PluginGeomCreateBrepBooleanArgs = z.infer<typeof PluginGeomCreateBrepBooleanArgs>;
941
+ /**
942
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromFillet}.
943
+ *
944
+ * | Property | Type | Description |
945
+ * |---|---|---|
946
+ * | `brep` | {@linkcode BrepHandle} | The solid whose edges to round |
947
+ * | `edges` | {@linkcode EdgeHandle}`[]` | The straight edges to fillet (≥1) |
948
+ * | `radius` | `number` | Fillet radius (positive, finite) |
949
+ */
950
+ export declare const PluginGeomCreateBrepFromFilletArgs: z.ZodObject<{
951
+ brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
952
+ edges: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"edge">, string>>>;
953
+ radius: z.ZodNumber;
954
+ }, z.core.$strip>;
955
+ export type PluginGeomCreateBrepFromFilletArgs = z.infer<typeof PluginGeomCreateBrepFromFilletArgs>;
956
+ /**
957
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromOffset}.
958
+ *
959
+ * | Property | Type | Description |
960
+ * |---|---|---|
961
+ * | `brep` | {@linkcode BrepHandle} | The solid to offset |
962
+ * | `distance` | `number` | Offset distance (finite, non-zero; positive grows, negative shrinks) |
963
+ */
964
+ export declare const PluginGeomCreateBrepFromOffsetArgs: z.ZodObject<{
965
+ brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
966
+ distance: z.ZodNumber;
967
+ }, z.core.$strip>;
968
+ export type PluginGeomCreateBrepFromOffsetArgs = z.infer<typeof PluginGeomCreateBrepFromOffsetArgs>;
969
+ /**
970
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromShell}.
971
+ *
972
+ * | Property | Type | Description |
973
+ * |---|---|---|
974
+ * | `brep` | {@linkcode BrepHandle} | The solid to hollow |
975
+ * | `openFaces` | {@linkcode FaceHandle}`[]` | The faces to remove as openings (≥1) |
976
+ * | `thickness` | `number` | Wall thickness (positive, finite) |
977
+ */
978
+ export declare const PluginGeomCreateBrepFromShellArgs: z.ZodObject<{
979
+ brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
980
+ openFaces: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>>;
981
+ thickness: z.ZodNumber;
982
+ }, z.core.$strip>;
983
+ export type PluginGeomCreateBrepFromShellArgs = z.infer<typeof PluginGeomCreateBrepFromShellArgs>;
984
+ /**
985
+ * Arguments for {@linkcode PluginGeomCreateApi.brepsFromSplit}.
986
+ *
987
+ * | Property | Type | Description |
988
+ * |---|---|---|
989
+ * | `brep` | {@linkcode BrepHandle} | The solid to split |
990
+ * | `planeOrigin` | {@linkcode Vec3Components} | A point on the cutting plane (finite components) |
991
+ * | `planeNormal` | {@linkcode Vec3Components} | The plane normal (non-zero, finite components) |
992
+ */
993
+ export declare const PluginGeomCreateBrepsFromSplitArgs: z.ZodObject<{
994
+ brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
995
+ planeOrigin: z.ZodObject<{
996
+ x: z.ZodNumber;
997
+ y: z.ZodNumber;
998
+ z: z.ZodNumber;
999
+ }, z.core.$strip>;
1000
+ planeNormal: z.ZodObject<{
1001
+ x: z.ZodNumber;
1002
+ y: z.ZodNumber;
1003
+ z: z.ZodNumber;
1004
+ }, z.core.$strip>;
1005
+ }, z.core.$strip>;
1006
+ export type PluginGeomCreateBrepsFromSplitArgs = z.infer<typeof PluginGeomCreateBrepsFromSplitArgs>;
1007
+ /**
1008
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromChamfer}.
1009
+ *
1010
+ * | Property | Type | Description |
1011
+ * |---|---|---|
1012
+ * | `brep` | {@linkcode BrepHandle} | The solid whose edges to bevel |
1013
+ * | `edges` | {@linkcode EdgeHandle}`[]` | The straight edges to chamfer (≥1) |
1014
+ * | `distance` | `number` | Chamfer distance from the edge on each adjacent face (positive, finite) |
1015
+ */
1016
+ export declare const PluginGeomCreateBrepFromChamferArgs: z.ZodObject<{
1017
+ brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
1018
+ edges: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"edge">, string>>>;
1019
+ distance: z.ZodNumber;
1020
+ }, z.core.$strip>;
1021
+ export type PluginGeomCreateBrepFromChamferArgs = z.infer<typeof PluginGeomCreateBrepFromChamferArgs>;
1022
+ /**
1023
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromSweep}.
1024
+ *
1025
+ * | Property | Type | Description |
1026
+ * |---|---|---|
1027
+ * | `profile` | {@linkcode ContourHandle} | The cross-section to sweep (hole-free) |
1028
+ * | `path` | {@linkcode Vec3Components}`[]` | The polyline path (≥2 points, finite components; repeating the first point as the last closes it into a ring — closed paths must be flat and straight-segmented and take a straight-edged profile) |
1029
+ * | `options` | `object`? | Optional scale law: `startScale`/`endScale` (linear taper by arc length) or per-point `scales` (mutually exclusive; factors finite, 1e-3..1e3; `scales.length` must equal `path.length`). Optional corner `transition`: `"miter"` (default) or `{ bevel }` (chamfered corners; finite, 1e-3..1e3) |
1030
+ */
1031
+ export declare const PluginGeomCreateBrepFromSweepArgs: z.ZodObject<{
1032
+ profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
1033
+ path: z.ZodArray<z.ZodObject<{
1034
+ x: z.ZodNumber;
1035
+ y: z.ZodNumber;
1036
+ z: z.ZodNumber;
1037
+ }, z.core.$strip>>;
1038
+ options: z.ZodOptional<z.ZodObject<{
1039
+ startScale: z.ZodOptional<z.ZodNumber>;
1040
+ endScale: z.ZodOptional<z.ZodNumber>;
1041
+ scales: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1042
+ transition: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"miter">, z.ZodObject<{
1043
+ bevel: z.ZodNumber;
1044
+ }, z.core.$strip>]>>;
1045
+ }, z.core.$strip>>;
1046
+ }, z.core.$strip>;
1047
+ export type PluginGeomCreateBrepFromSweepArgs = z.infer<typeof PluginGeomCreateBrepFromSweepArgs>;
1048
+ /**
1049
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromRevolution}.
1050
+ *
1051
+ * | Property | Type | Description |
1052
+ * |---|---|---|
1053
+ * | `profile` | {@linkcode ContourHandle} | The cross-section to revolve (holes allowed) |
1054
+ * | `axisOrigin` | {@linkcode Vec3Components} | A point on the revolution axis (finite components) |
1055
+ * | `axisDirection` | {@linkcode Vec3Components} | The axis direction (non-zero, finite components) |
1056
+ * | `angleInDegrees` | `number`? | Revolution angle in degrees (0 < angle ≤ 360; default 360) |
1057
+ */
1058
+ export declare const PluginGeomCreateBrepFromRevolutionArgs: z.ZodObject<{
1059
+ profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
1060
+ axisOrigin: z.ZodObject<{
1061
+ x: z.ZodNumber;
1062
+ y: z.ZodNumber;
1063
+ z: z.ZodNumber;
1064
+ }, z.core.$strip>;
1065
+ axisDirection: z.ZodObject<{
1066
+ x: z.ZodNumber;
1067
+ y: z.ZodNumber;
1068
+ z: z.ZodNumber;
1069
+ }, z.core.$strip>;
1070
+ angleInDegrees: z.ZodOptional<z.ZodNumber>;
1071
+ }, z.core.$strip>;
1072
+ export type PluginGeomCreateBrepFromRevolutionArgs = z.infer<typeof PluginGeomCreateBrepFromRevolutionArgs>;
247
1073
  //# sourceMappingURL=index.d.ts.map