@snaptrude/plugin-core 0.0.0-dev-20260908074328 → 0.0.0-surfaces-20260921090636

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 (73) hide show
  1. package/CHANGELOG.md +0 -23
  2. package/api-manifest.json +151 -12
  3. package/dist/api/core/geom/create/index.d.ts +918 -93
  4. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  5. package/dist/api/core/geom/query/brep.d.ts +50 -0
  6. package/dist/api/core/geom/query/brep.d.ts.map +1 -1
  7. package/dist/api/core/geom/query/curve.d.ts +58 -35
  8. package/dist/api/core/geom/query/curve.d.ts.map +1 -1
  9. package/dist/api/core/geom/query/edge.d.ts +2 -2
  10. package/dist/api/core/geom/query/face.d.ts +105 -0
  11. package/dist/api/core/geom/query/face.d.ts.map +1 -1
  12. package/dist/api/core/geom/update/curve.d.ts +5 -5
  13. package/dist/api/core/geom/update/profile.d.ts +1 -1
  14. package/dist/api/design/create/index.d.ts +6 -29
  15. package/dist/api/design/create/index.d.ts.map +1 -1
  16. package/dist/api/design/delete/index.d.ts +2 -20
  17. package/dist/api/design/delete/index.d.ts.map +1 -1
  18. package/dist/api/design/query/geometry/index.d.ts +27 -1
  19. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  20. package/dist/api/design/query/index.d.ts +47 -2
  21. package/dist/api/design/query/index.d.ts.map +1 -1
  22. package/dist/api/design/query/spaces.d.ts +5 -66
  23. package/dist/api/design/query/spaces.d.ts.map +1 -1
  24. package/dist/api/design/update/index.d.ts +87 -0
  25. package/dist/api/design/update/index.d.ts.map +1 -1
  26. package/dist/api/entity/referenceLine.d.ts +2 -2
  27. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  28. package/dist/api/entity/space.d.ts +5 -7
  29. package/dist/api/entity/space.d.ts.map +1 -1
  30. package/dist/api/entity/story.d.ts +4 -4
  31. package/dist/api/presentation/placedViews.d.ts +1 -35
  32. package/dist/api/presentation/placedViews.d.ts.map +1 -1
  33. package/dist/api/presentation/sheets.d.ts +2 -20
  34. package/dist/api/presentation/sheets.d.ts.map +1 -1
  35. package/dist/api/program/site.d.ts +4 -4
  36. package/dist/api/program/spreadsheet.d.ts +4 -4
  37. package/dist/errors/codes.d.ts +3 -8
  38. package/dist/errors/codes.d.ts.map +1 -1
  39. package/dist/handles.d.ts +12 -3
  40. package/dist/handles.d.ts.map +1 -1
  41. package/dist/index.cjs +3188 -2769
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.ts +2 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +3141 -2764
  46. package/dist/index.js.map +1 -1
  47. package/dist/massParameters.d.ts +280 -0
  48. package/dist/massParameters.d.ts.map +1 -0
  49. package/dist/massParameters.ops.d.ts +135 -0
  50. package/dist/massParameters.ops.d.ts.map +1 -0
  51. package/package.json +1 -1
  52. package/src/api/core/geom/create/index.ts +1011 -94
  53. package/src/api/core/geom/query/brep.ts +51 -0
  54. package/src/api/core/geom/query/curve.ts +25 -2
  55. package/src/api/core/geom/query/edge.ts +2 -2
  56. package/src/api/core/geom/query/face.ts +109 -4
  57. package/src/api/design/create/index.ts +8 -34
  58. package/src/api/design/delete/index.ts +1 -20
  59. package/src/api/design/query/geometry/index.ts +29 -0
  60. package/src/api/design/query/index.ts +50 -2
  61. package/src/api/design/query/spaces.ts +0 -68
  62. package/src/api/design/update/index.ts +94 -0
  63. package/src/api/entity/space.ts +0 -2
  64. package/src/api/presentation/placedViews.ts +1 -29
  65. package/src/api/presentation/sheets.ts +3 -19
  66. package/src/errors/codes.ts +2 -30
  67. package/src/handles.ts +15 -3
  68. package/src/index.ts +2 -0
  69. package/src/massParameters.ops.ts +243 -0
  70. package/src/massParameters.ts +418 -0
  71. package/test/errors.test.mjs +0 -4
  72. package/test/massParameters.test.mjs +936 -0
  73. package/snaptrude-plugin-core-0.11.0.tgz +0 -0
@@ -1,14 +1,41 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../../../types";
3
- import { Vec3Handle, LineHandle, ArcHandle, CircleHandle, CurveHandle, ProfileHandle, ContourHandle, BrepHandle, FaceHandle, EdgeHandle, Vec3Components } from "../../../../handles";
3
+ import type { SweepAlongCurveRecordOptions } from "../../../../massParameters";
4
+ import { Vec3Handle, LineHandle, ArcHandle, SplineHandle, CircleHandle, CurveHandle, ProfileHandle, ContourHandle, BrepHandle, FaceHandle, EdgeHandle, Vec3Components } from "../../../../handles";
5
+ /** Maximum boundary items one patch may span. */
6
+ export declare const MAX_PATCH_BOUNDARY_CURVES = 16;
7
+ /** Maximum interior points one patch may be pulled through. */
8
+ export declare const MAX_PATCH_INTERIOR_POINTS = 64;
9
+ /**
10
+ * An edge named together with the solid it belongs to — an edge handle cannot
11
+ * name its own solid, and one patch may meet two solids. `face` is the adjacent
12
+ * face a tangent patch continues: REQUIRED under `continuity: "tangent"`
13
+ * (a solid edge has two faces — the wall or the top of a rim — and only the
14
+ * caller knows which), ignored otherwise. Owner LAST, like every read that
15
+ * takes `(face, brep)`.
16
+ */
17
+ export type OwnedEdge = {
18
+ edge: EdgeHandle;
19
+ brep: BrepHandle;
20
+ face?: FaceHandle;
21
+ };
22
+ /**
23
+ * The trailing bag of {@linkcode PluginGeomCreateApi.brepFromSweepAlongCurve}:
24
+ * the recorded switches plus `rail`, a live curve handle that never enters a
25
+ * record (a record is pure JSON, and a dead handle would not regenerate).
26
+ */
27
+ export type SweepAlongCurveOptions = SweepAlongCurveRecordOptions & {
28
+ rail?: CurveHandle;
29
+ };
4
30
  /**
5
31
  * Curve creation — construct new geometric curves from point handles (all-handle
6
32
  * model, §11).
7
33
  *
8
34
  * Each method takes point handles ({@linkcode Vec3Handle}) and returns an opaque
9
- * curve handle ({@linkcode LineHandle} or {@linkcode ArcHandle}) that you pass to
10
- * query, update, or entity-creation methods. Read geometry back as plain values
11
- * via the `snaptrude.core.geom.query.*` methods.
35
+ * curve handle ({@linkcode LineHandle}, {@linkcode ArcHandle}, or
36
+ * {@linkcode SplineHandle}) that you pass to query, update, or entity-creation
37
+ * methods. Read geometry back as plain values via the
38
+ * `snaptrude.core.geom.query.*` methods.
12
39
  *
13
40
  * Accessed via `snaptrude.core.geom.create`.
14
41
  */
@@ -69,6 +96,94 @@ export declare abstract class PluginGeomCreateApi {
69
96
  * ```
70
97
  */
71
98
  abstract circle(centrePoint: Vec3Handle, axis: Vec3Handle, radius: number): PluginApiReturn<CircleHandle>;
99
+ /**
100
+ * Create an open NURBS curve passing exactly THROUGH each point, in order
101
+ * (centripetal Catmull-Rom fit → clamped cubic B-spline; C1-smooth, no cusps
102
+ * on uneven spacing). Host API call — returns a handle. The points are
103
+ * interpolated, NOT control points. For a CLOSED smooth loop use
104
+ * {@linkcode PluginGeomCreateApi.profileFromSplinePoints} — closed splines
105
+ * exist only as profiles, never as a single curve handle.
106
+ *
107
+ * Pure host-side math — the geometry kernel is not loaded. The result is a
108
+ * {@linkcode CurveHandle}: pass it to `profileFromCurves` alongside lines and
109
+ * arcs, or read it back via `core.geom.query.curve.*`.
110
+ *
111
+ * @param points 3..256 ordered through-points; consecutive points must be distinct
112
+ * @returns The new open curve as a {@linkcode SplineHandle}
113
+ * @throws VALIDATION if fewer than 3 points (2 points are a straight line —
114
+ * use {@linkcode PluginGeomCreateApi.line}), more than 256 points, or two
115
+ * consecutive points coincide
116
+ *
117
+ * @examplePrompt Draw a smooth curve through these points
118
+ * @examplePrompt Make a wavy edge that passes through A, B, C and D
119
+ * @examplePrompt Freeform curved wall path through these clicks
120
+ *
121
+ * # Example
122
+ * ```ts
123
+ * const spline = await snaptrude.core.geom.create.splineFromPoints([p0, p1, p2, p3])
124
+ * // Mixed profile: smooth top, straight closing base
125
+ * const base = await snaptrude.core.geom.create.line(p3, p0)
126
+ * const profile = await snaptrude.core.geom.create.profileFromCurves([spline, base])
127
+ * ```
128
+ */
129
+ abstract splineFromPoints(points: Vec3Handle[]): PluginApiReturn<SplineHandle>;
130
+ /**
131
+ * Create an open NURBS curve DEFINED BY control points — the curve is pulled
132
+ * TOWARD the interior points, not through them; it starts at the first point
133
+ * and ends at the last. Knots are computed for you (clamped, uniform) —
134
+ * there is no knot-vector argument. For a curve that must pass THROUGH given
135
+ * points use {@linkcode PluginGeomCreateApi.splineFromPoints}.
136
+ *
137
+ * A curve made here records as `splinePoles` in a mass recipe and is
138
+ * re-minted verbatim on edit — so an agent that read a `splinePoles` curve
139
+ * back off a mass can move its poles and rebuild the mass with
140
+ * `design.update.parameters`. Pure host-side math — the geometry kernel is
141
+ * not loaded, and nothing is created in the scene.
142
+ *
143
+ * @param controlPoints 3..512 control points ({@linkcode Vec3Handle}s), in order
144
+ * @param options.degree 2 or 3; default `min(3, controlPoints.length - 1)`
145
+ * @returns The new open curve as a {@linkcode SplineHandle}
146
+ * @throws VALIDATION when fewer than `degree + 1` points are given, two
147
+ * consecutive points coincide, or `degree` is not 2 or 3
148
+ *
149
+ * @examplePrompt Draw a smooth curve controlled by these four points
150
+ * @examplePrompt Rebuild this edge from its control polygon
151
+ *
152
+ * # Example
153
+ * ```ts
154
+ * const curve = await snaptrude.core.geom.create.splineFromControlPoints([p0, p1, p2, p3])
155
+ * // Quadratic instead of the default cubic
156
+ * const tighter = await snaptrude.core.geom.create.splineFromControlPoints(
157
+ * [p0, p1, p2, p3],
158
+ * { degree: 2 },
159
+ * )
160
+ * ```
161
+ */
162
+ abstract splineFromControlPoints(controlPoints: Vec3Handle[], options?: {
163
+ degree?: number;
164
+ }): PluginApiReturn<SplineHandle>;
165
+ /**
166
+ * Drops a curve onto a face along the face's normal and returns the curves it
167
+ * lands on — one per connected run, empty when the curve misses the face
168
+ * entirely. Host API call — returns new curve handles; the inputs are
169
+ * read-only. No lengths are involved: the result is a curve in the same
170
+ * internal length units as its inputs.
171
+ *
172
+ * **Not available on the shipped kernel build.** The member exists so the
173
+ * contract is stable, and every call throws VALIDATION until the projection
174
+ * primitives ship in a newer OpenCascade build.
175
+ *
176
+ * @param curve The curve to project
177
+ * @param face The face to project onto
178
+ * @param faceBrep The solid `face` belongs to — a face handle cannot name its
179
+ * own solid
180
+ * @returns The projected curves as {@linkcode CurveHandle}`[]`
181
+ * @throws VALIDATION always on this build (the message names the kernel
182
+ * version the member needs); once available, if `face` is not a face of
183
+ * `faceBrep`
184
+ * @throws OPERATION_FAILED if the kernel could not project the curve
185
+ */
186
+ abstract curvesFromProjection(curve: CurveHandle, face: FaceHandle, faceBrep: BrepHandle): PluginApiReturn<CurveHandle[]>;
72
187
  /**
73
188
  * Create a closed profile from an ordered list of point handles connected by
74
189
  * line segments (last auto-connected to first). Host API call — returns a handle.
@@ -100,6 +215,38 @@ export declare abstract class PluginGeomCreateApi {
100
215
  * ```
101
216
  */
102
217
  abstract profileFromCurves(curves: CurveHandle[]): PluginApiReturn<ProfileHandle>;
218
+ /**
219
+ * Create a CLOSED smooth profile passing through each point, in order, with
220
+ * the loop closed smoothly back from the last point to the first (do NOT
221
+ * repeat the first point). Host API call — returns a handle. This is the
222
+ * closed counterpart of {@linkcode PluginGeomCreateApi.splineFromPoints} and
223
+ * the one-call route from points to an extrudable outline: wrap in
224
+ * `contourFromProfile` and extrude/loft/sweep as usual.
225
+ *
226
+ * The whole loop is smooth — v1 takes no mixed straight/spline input. For a
227
+ * profile that is part curve and part straight, build the pieces with
228
+ * `splineFromPoints` + `line` and join them with
229
+ * {@linkcode PluginGeomCreateApi.profileFromCurves}.
230
+ *
231
+ * @param points 3..256 ordered through-points of the loop (first point NOT repeated)
232
+ * @returns The new closed profile as a {@linkcode ProfileHandle}
233
+ * @throws VALIDATION if fewer than 3 points, more than 256 points,
234
+ * consecutive points coincide (including last→first), or the loop
235
+ * self-intersects
236
+ *
237
+ * @examplePrompt Make a blob-shaped floor plate through these points
238
+ * @examplePrompt Organic curved outline through these corners
239
+ * @examplePrompt Freeform podium profile
240
+ *
241
+ * # Example
242
+ * ```ts
243
+ * const profile = await snaptrude.core.geom.create.profileFromSplinePoints([p0, p1, p2, p3, p4])
244
+ * const contour = await snaptrude.core.geom.create.contourFromProfile(profile)
245
+ * const brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)
246
+ * const podium = await snaptrude.design.create.massFromBrep(brep, "Podium")
247
+ * ```
248
+ */
249
+ abstract profileFromSplinePoints(points: Vec3Handle[]): PluginApiReturn<ProfileHandle>;
103
250
  /**
104
251
  * Create an axis-aligned **rectangle** profile (XZ plane) of `width` × `depth`,
105
252
  * centred at `center` (defaults to the origin). Host API call — returns a handle.
@@ -210,15 +357,27 @@ export declare abstract class PluginGeomCreateApi {
210
357
  *
211
358
  * @param contour The cross-section to extrude (outer profile + optional holes)
212
359
  * @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`)
360
+ * @param amount Extrusion distance in internal length units (non-zero; negative extrudes opposite to `direction`)
361
+ * @param options Optional twist and taper, both about `direction` through the
362
+ * base contour's centroid. `twistInDegrees` — total rotation base → top in
363
+ * DEGREES (an angle: never scaled by the project's length unit);
364
+ * `topScale` — the top outline's scale, a ratio (1 = no taper); `levels` —
365
+ * how many sections to build through, a count (2..64). Leave `levels` out
366
+ * and the host resolves one and writes it into the record, so the mass
367
+ * regenerates identically ever after. Omit the bag and this is the straight
368
+ * extrusion it has always been, byte for byte.
214
369
  * @returns The new solid as a {@linkcode BrepHandle}
215
370
  * @throws if the extrusion is degenerate (zero amount, zero direction, or a
216
371
  * direction lying in the contour plane) or the contour cannot be extruded
217
372
  * into a valid solid
373
+ * @throws VALIDATION if `twistInDegrees` is not finite, `topScale` is not a
374
+ * positive finite ratio, or `levels` is outside 2..64
218
375
  *
219
376
  * @examplePrompt Extrude this profile 3 metres up
220
377
  * @examplePrompt Make a solid by extruding this outline
221
378
  * @examplePrompt Create a cylinder from a circle profile
379
+ * @examplePrompt Extrude this floor plate 40m up with a 90 degree twist
380
+ * @examplePrompt Taper this tower to 60 percent of its footprint at the top
222
381
  *
223
382
  * # Example
224
383
  * ```ts
@@ -228,7 +387,80 @@ export declare abstract class PluginGeomCreateApi {
228
387
  * const faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6
229
388
  * ```
230
389
  */
231
- abstract brepFromExtrusion(contour: ContourHandle, direction: Vec3Components, amount: number): PluginApiReturn<BrepHandle>;
390
+ abstract brepFromExtrusion(contour: ContourHandle, direction: Vec3Components, amount: number, options?: {
391
+ twistInDegrees?: number;
392
+ topScale?: number;
393
+ levels?: number;
394
+ }): PluginApiReturn<BrepHandle>;
395
+ /**
396
+ * Stretches a surface across a closed loop of boundary curves and thickens it
397
+ * into a SOLID in one call — a roof over four curves, a canopy between two
398
+ * rails, a blend across a gap. `thickness` is in internal length units and is
399
+ * required: only solids reach the canvas, and there is no separate surface
400
+ * object to keep. Pass edges as `{ edge, brep, face }` with
401
+ * `continuity: "tangent"` to leave the named face smoothly. The result carries
402
+ * NO recipe (`design.query.getParameters` returns `null`) — label it when you
403
+ * commit it, because the label is all the provenance there is.
404
+ *
405
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
406
+ * of MB — expect a pause of seconds).
407
+ *
408
+ * @param boundary 3..16 items forming ONE closed loop (ends meeting within
409
+ * tolerance): a curve, or an edge named WITH the solid it belongs to
410
+ * ({@linkcode OwnedEdge}) — an edge handle cannot name its own solid, and
411
+ * one patch may meet two solids. Read scene breps with
412
+ * `design.query.geometry.getBrep(x, { frame: "world" })` so every item is in
413
+ * one frame.
414
+ * @param thickness Solid thickness in internal length units (> 0)
415
+ * @param options `interiorPoints` pull the surface through them (≤ 64, plain
416
+ * `{x, y, z}` in the same frame as the boundary). `continuity` —
417
+ * `"position"` (default) or `"tangent"`: every boundary item must then be an
418
+ * edge item that also names the `face` to continue (a solid edge has two
419
+ * faces — the wall or the top of a rim). `side` — `"below"` (default) or
420
+ * `"above"`: which side of the boundary the solid grows to.
421
+ * @returns The thickened patch as a new {@linkcode BrepHandle}
422
+ * @throws VALIDATION if the boundary is not one closed loop (the message names
423
+ * the gap and its size), a count cap is exceeded, `thickness` is not
424
+ * positive, `continuity: "tangent"` is used with a curve item or with an
425
+ * edge item that names no `face` (the message names the edge's two candidate
426
+ * faces), or a `face` is not adjacent to its `edge`
427
+ * @throws OPERATION_FAILED if the kernel could not fill the boundary, the
428
+ * filled surface misses its own boundary by more than 0.254 mm (the message
429
+ * carries the measured gap), or the thicken produced no solid
430
+ *
431
+ * @examplePrompt Patch a roof over these four boundary curves, 250 mm thick
432
+ * @examplePrompt Span a canopy between these two curved rails, 300 mm thick
433
+ *
434
+ * # Example
435
+ * ```ts
436
+ * // A roof over four curves
437
+ * const roof = await snaptrude.core.geom.create.brepFromPatch(
438
+ * [curveA, curveB, curveC, curveD],
439
+ * 0.25,
440
+ * )
441
+ * const mass = await snaptrude.design.create.massFromBrep(roof, "Roof patch")
442
+ * ```
443
+ *
444
+ * ```ts
445
+ * // A canopy between two towers' rims, leaving every wall it meets smoothly:
446
+ * // with `continuity: "tangent"` EVERY item is an edge naming its face.
447
+ * const canopy = await snaptrude.core.geom.create.brepFromPatch(
448
+ * [
449
+ * { edge: rimA, brep: towerA, face: wallA },
450
+ * { edge: sideA, brep: towerA, face: endA },
451
+ * { edge: rimB, brep: towerB, face: wallB },
452
+ * { edge: sideB, brep: towerB, face: endB },
453
+ * ],
454
+ * 0.3,
455
+ * { continuity: "tangent" },
456
+ * )
457
+ * ```
458
+ */
459
+ abstract brepFromPatch(boundary: (CurveHandle | OwnedEdge)[], thickness: number, options?: {
460
+ interiorPoints?: Vec3Components[];
461
+ continuity?: "position" | "tangent";
462
+ side?: "below" | "above";
463
+ }): PluginApiReturn<BrepHandle>;
232
464
  /**
233
465
  * Create a closed solid **B-rep** by lofting between a bottom and a top
234
466
  * contour, optionally through intermediate cross-sections. Host API call —
@@ -257,7 +489,9 @@ export declare abstract class PluginGeomCreateApi {
257
489
  * bottom — sections are auto-matched)
258
490
  * @param intermediateContours Optional in-between cross-sections, ordered
259
491
  * bottom to top (hole-free; edge counts may differ — every section is
260
- * normalized to the largest)
492
+ * normalized to the largest). Any count is accepted; a loft of more
493
+ * than 32 sections counting the bottom and the top still builds but
494
+ * carries no parameter record (records are capped, calls are not)
261
495
  * @param options Optional behavior switches. `compatibility` — `"auto"`
262
496
  * (default) inserts vertices to match differing edge counts; `"strict"`
263
497
  * skips normalization and throws VALIDATION when outer edge counts (or,
@@ -267,7 +501,11 @@ export declare abstract class PluginGeomCreateApi {
267
501
  * correspondence unchanged (a twisted correspondence then builds through
268
502
  * the triangulated lane for hole-free straight-edged pairs).
269
503
  * `{ compatibility: "strict", seamAlignment: "authored" }` reproduces
270
- * pre-0.9.4 lofting exactly.
504
+ * pre-0.9.4 lofting exactly. `smoothing` — `"ruled"` (default) keeps the
505
+ * straight-sided lane above unchanged; `"smooth"` lofts every section in
506
+ * ONE kernel pass, so the sides curve continuously through the
507
+ * intermediates instead of creasing at each one (a vase, a curved tower —
508
+ * the sections must still be planar and hole-free).
271
509
  * @returns The new solid as a {@linkcode BrepHandle}
272
510
  * @throws VALIDATION if the contours are coincident, their hole counts
273
511
  * differ, any section has holes when intermediates are present
@@ -289,6 +527,7 @@ export declare abstract class PluginGeomCreateApi {
289
527
  * @examplePrompt Loft these outlines even though their corners don't line up
290
528
  * @examplePrompt Loft these outlines exactly as authored, corner to corner
291
529
  * @examplePrompt Fail the loft if my sections don't have matching edge counts
530
+ * @examplePrompt Loft these three outlines with smoothly curving sides
292
531
  *
293
532
  * # Example
294
533
  * ```ts
@@ -305,6 +544,7 @@ export declare abstract class PluginGeomCreateApi {
305
544
  abstract brepFromLoft(bottomContour: ContourHandle, topContour: ContourHandle, intermediateContours?: ContourHandle[], options?: {
306
545
  compatibility?: "strict" | "auto";
307
546
  seamAlignment?: "authored" | "auto";
547
+ smoothing?: "ruled" | "smooth";
308
548
  }): PluginApiReturn<BrepHandle>;
309
549
  /**
310
550
  * Create a closed solid **B-rep** from indexed mesh data: a vertex position
@@ -432,46 +672,107 @@ export declare abstract class PluginGeomCreateApi {
432
672
  */
433
673
  abstract brepFromIntersection(a: BrepHandle, b: BrepHandle): PluginApiReturn<BrepHandle>;
434
674
  /**
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).
675
+ * Rounds the given edges of a solid with a constant radius. Host API call —
676
+ * returns a new {@linkcode BrepHandle}; the input brep is read-only.
677
+ *
678
+ * Works on curved solids: edges may be straight, circular or spline, and
679
+ * adjacent edges (corner blends) are allowed. To pick a **rim** — the circle
680
+ * where a cylinder meets a flat cap — walk the edges and keep the ones whose
681
+ * two faces are a `cylinder` and a `plane`:
682
+ * `core.geom.query.brep.listEdges(brep)` → per edge
683
+ * `core.geom.query.edge.listFaces(edge)` → `core.geom.query.face.getSurfaceKind`
684
+ * on both faces. (`core.geom.query.brep.listEdgesBetween` takes two VERTEX
685
+ * indices — it is NOT a face-pair lookup.) For one cap's rim only,
686
+ * `core.geom.query.face.listEdges(capFace)` after a `getSurfaceKind` census of
687
+ * `brep.listFaces` is the shorter walk.
688
+ *
689
+ * When the input brep carries a creation recipe, the result carries it too,
690
+ * with this operation appended to `operations`; `design.create.massFromBrep`
691
+ * then keeps the mass editable through `design.update.parameters`.
692
+ *
693
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
694
+ * of MB — expect a pause of seconds).
443
695
  *
444
696
  * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
445
697
  * with `design.create.massFromBrep`.
446
698
  *
447
699
  * @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)
700
+ * @param edges The edges to fillet (one or more, all on `brep`, no
701
+ * duplicates; more than 64 still fillets but the result carries no
702
+ * parameter record)
703
+ * @param radius Fillet radius in internal length units (positive, finite) —
704
+ * the radius at the START of the blend when a variable form is used
705
+ * @param options Optional VARIABLE blend, in one of two forms, each naming
706
+ * exactly ONE edge: the law belongs to the whole tangent chain that edge
707
+ * lies on, and it is measured from that edge's start. `endRadius` —
708
+ * the radius at the far end, in internal length units, interpolated
709
+ * linearly along the chain; needs an OPEN chain with two distinct ends, and
710
+ * is refused on a closed rim (where the kernel silently builds a constant
711
+ * radius) — use `radii` there. `radii` — a sampled law instead:
712
+ * `position` is normalised ARC LENGTH along the chain (a ratio 0..1, never
713
+ * converted), `radius` is internal length units; 2..32 rows with strictly
714
+ * increasing `position`. On a closed rim 0 and 1 are the same point, so give
715
+ * them the same radius and put the variation in the interior rows. The two
716
+ * forms are mutually exclusive; omitted, the fillet is the constant-radius
717
+ * one it has always been.
450
718
  * @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
719
+ * @throws VALIDATION if `edges` is empty or holds a duplicate, `radius` is
720
+ * not a positive finite number, an edge is not on `brep`, or an edge has no
721
+ * crease to round — it is a seam of a closed face, or it lies between two
722
+ * patches of one smooth surface; for a variable blend, if `endRadius` and
723
+ * `radii` are both given, more than one edge is passed, a `radii` table is
724
+ * outside 2..32 rows or its positions do not strictly increase within
725
+ * 0..1, or `endRadius` names a closed rim (the message points at `radii`)
726
+ * @throws PRECONDITION_FAILED if an edge could not be located on the kernel
727
+ * solid after healing (select a different edge, or fillet before the
728
+ * operation that curved the solid), or the kernel could not blend the edge
729
+ * named in the message (reduce the radius or drop that edge)
730
+ * @throws OPERATION_FAILED if the kernel or the translation fails, or the
731
+ * result is non-manifold, splits into several solids, or contains a surface
732
+ * Snaptrude cannot represent
733
+ *
734
+ * @examplePrompt Round the rim of the column with 200 mm
735
+ * @examplePrompt Soften where the dome meets the wall
459
736
  * @examplePrompt Fillet the corners of the podium with a 0.5m radius
460
737
  * @examplePrompt Soften the vertical edges of this tower
738
+ * @examplePrompt Blend this edge from 200mm at one end to 600mm at the other
739
+ * @examplePrompt Round this rim wider at the back than at the front
461
740
  *
462
741
  * # Example
463
742
  * ```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)
743
+ * // Rim = every edge between the cylinder side and a plane cap
744
+ * const edges = await snaptrude.core.geom.query.brep.listEdges(column)
745
+ * const rim = []
746
+ * for (const edge of edges) {
747
+ * const faces = await snaptrude.core.geom.query.edge.listFaces(edge)
748
+ * const kinds = await Promise.all(
749
+ * faces.map((f) => snaptrude.core.geom.query.face.getSurfaceKind(f)),
750
+ * )
751
+ * if (kinds.includes("cylinder") && kinds.includes("plane")) rim.push(edge)
752
+ * }
753
+ * const rounded = await snaptrude.core.geom.create.brepFromFillet(column, rim, 0.787) // 200 mm
467
754
  * ```
468
755
  */
469
- abstract brepFromFillet(brep: BrepHandle, edges: EdgeHandle[], radius: number): PluginApiReturn<BrepHandle>;
756
+ abstract brepFromFillet(brep: BrepHandle, edges: EdgeHandle[], radius: number, options?: {
757
+ endRadius?: number;
758
+ radii?: {
759
+ position: number;
760
+ radius: number;
761
+ }[];
762
+ }): PluginApiReturn<BrepHandle>;
470
763
  /**
471
764
  * Grows or shrinks a solid by offsetting every face — positive distance
472
765
  * moves faces outward, negative moves them inward. Host API call — returns
473
766
  * a new {@linkcode BrepHandle}; the input brep is read-only.
474
767
  *
768
+ * Works on curved solids: a sphere offsets to a sphere, a torus to a torus,
769
+ * a cylinder to a cylinder. There is nothing to select — the whole solid is
770
+ * offset.
771
+ *
772
+ * When the input brep carries a creation recipe, the result carries it too,
773
+ * with this operation appended to `operations`; `design.create.massFromBrep`
774
+ * then keeps the mass editable through `design.update.parameters`.
775
+ *
475
776
  * Runs on the OpenCascade kernel (the first kernel call loads a wasm of
476
777
  * tens of MB — expect a pause of seconds).
477
778
  *
@@ -483,9 +784,15 @@ export declare abstract class PluginGeomCreateApi {
483
784
  * @returns The offset solid as a new {@linkcode BrepHandle}
484
785
  * @throws VALIDATION if `distance` is not finite, is too small to offset
485
786
  * 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
- *
787
+ * @throws OPERATION_FAILED if the kernel or the translation fails, or the
788
+ * result is non-manifold, splits into several solids, or contains a surface
789
+ * Snaptrude cannot represent (an offset free-form NURBS surface may have no
790
+ * exact representation — the model is left unchanged). A distance the
791
+ * solid cannot carry surfaces here, with a hint asking for a smaller one;
792
+ * there is no per-face refusal — the kernel's per-face history verdict
793
+ * ("this face was not offset") is logged, never raised (P4-D57)
794
+ *
795
+ * @examplePrompt Thicken the torus ring by 100 mm
489
796
  * @examplePrompt Grow this solid by 0.5m in every direction
490
797
  * @examplePrompt Shrink this mass by 200mm
491
798
  * @examplePrompt Offset the building envelope outward by 1m
@@ -503,6 +810,17 @@ export declare abstract class PluginGeomCreateApi {
503
810
  * input brep is read-only. The outer surface is kept and the walls grow
504
811
  * inward.
505
812
  *
813
+ * Works on curved solids: the open faces may be spherical, cylindrical,
814
+ * conical, toroidal or free-form patches, not only flat ones. To open the
815
+ * flat base of a dome, census the faces first — `core.geom.query.brep.listFaces`
816
+ * then `core.geom.query.face.getSurfaceKind` on each — and keep the `"plane"`
817
+ * one. A closed curved surface is stored as several patches (a sphere as
818
+ * lunes), so opening "the sphere" may mean passing several faces.
819
+ *
820
+ * When the input brep carries a creation recipe, the result carries it too,
821
+ * with this operation appended to `operations`; `design.create.massFromBrep`
822
+ * then keeps the mass editable through `design.update.parameters`.
823
+ *
506
824
  * Runs on the OpenCascade kernel (the first kernel call loads a wasm of
507
825
  * tens of MB — expect a pause of seconds).
508
826
  *
@@ -510,24 +828,36 @@ export declare abstract class PluginGeomCreateApi {
510
828
  * with `design.create.massFromBrep`.
511
829
  *
512
830
  * @param brep The solid to hollow
513
- * @param openFaces The faces to remove as openings (≥1, all on `brep`)
831
+ * @param openFaces The faces to remove as openings (one or more, all on
832
+ * `brep`, no duplicates; more than 32 still shells but the result carries
833
+ * no parameter record)
514
834
  * @param thickness Wall thickness (positive, finite, smaller than half the solid's smallest span)
515
835
  * @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
- *
836
+ * @throws VALIDATION if `openFaces` is empty or holds a duplicate, a face is
837
+ * not on `brep`, `thickness` is not a positive finite number, or the
838
+ * thickness is too large (it must be smaller than half the solid's smallest
839
+ * span)
840
+ * @throws OPERATION_FAILED if the kernel or the translation fails, or the
841
+ * result is non-manifold, splits into several solids, or contains a surface
842
+ * Snaptrude cannot represent. A thickness the solid cannot carry surfaces
843
+ * here, with a hint asking for one below half the smallest span; there is
844
+ * no per-face refusal — the kernel's per-face history verdict ("this kept
845
+ * face was not thickened") is logged, never raised (P4-D57)
846
+ *
847
+ * @examplePrompt Hollow the dome into a 300 mm shell, open at the base
522
848
  * @examplePrompt Hollow this mass into 200mm walls
523
849
  * @examplePrompt Shell this form with the top face open
524
850
  * @examplePrompt Turn this solid tower into a tube open at both ends
525
851
  *
526
852
  * # Example
527
853
  * ```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)
854
+ * // Open the dome at its flat base: the one face whose surface is a plane
855
+ * const faces = await snaptrude.core.geom.query.brep.listFaces(dome)
856
+ * const base = []
857
+ * for (const face of faces) {
858
+ * if ((await snaptrude.core.geom.query.face.getSurfaceKind(face)) === "plane") base.push(face)
859
+ * }
860
+ * const hollow = await snaptrude.core.geom.create.brepFromShell(dome, base, 1.181) // 300 mm
531
861
  * ```
532
862
  */
533
863
  abstract brepFromShell(brep: BrepHandle, openFaces: FaceHandle[], thickness: number): PluginApiReturn<BrepHandle>;
@@ -567,28 +897,84 @@ export declare abstract class PluginGeomCreateApi {
567
897
  */
568
898
  abstract brepsFromSplit(brep: BrepHandle, planeOrigin: Vec3Components, planeNormal: Vec3Components): PluginApiReturn<BrepHandle[]>;
569
899
  /**
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.
900
+ * Cuts a solid with a FACE of another solid — the curved twin of
901
+ * {@linkcode PluginGeomCreateApi.brepsFromSplit}, which cuts with a plane.
902
+ * Host API call — returns new {@linkcode BrepHandle}s; both inputs are
903
+ * read-only. BOTH breps must be in the same frame: read scene masses with
904
+ * `design.query.geometry.getBrep(x, { frame: "world" })` (the default is each
905
+ * mass's own local frame, and two masses have two). The pieces come back in
906
+ * DESCENDING volume order; pick the one you want with
907
+ * `core.geom.query.brep.getCentroid` or `getVolume` and commit it. A piece
908
+ * carries no recipe — label it.
909
+ *
910
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
911
+ * of MB — expect a pause of seconds).
912
+ *
913
+ * @param brep The solid to cut
914
+ * @param toolFace The cutting face, read-only
915
+ * @param toolBrep The solid `toolFace` belongs to — a face handle cannot name
916
+ * its own solid
917
+ * @returns The resulting pieces as {@linkcode BrepHandle}`[]`, largest first
918
+ * @throws VALIDATION if `toolFace` is not a face of `toolBrep`, `toolBrep` IS
919
+ * `brep`, or the cut produced a single part — the surface does not pass all
920
+ * the way through (extend it past the mass on every side, and check both
921
+ * breps were read in the same frame)
922
+ * @throws OPERATION_FAILED if the kernel could not split the solid
923
+ *
924
+ * @examplePrompt Cut this mass with the curved roof surface and keep the lower part
925
+ *
926
+ * # Example
927
+ * ```ts
928
+ * const target = await snaptrude.design.query.geometry.getBrep(tower, { frame: "world" })
929
+ * const tool = await snaptrude.design.query.geometry.getBrep(roof, { frame: "world" })
930
+ * const [toolFace] = await snaptrude.core.geom.query.brep.listFaces(tool)
931
+ * const pieces = await snaptrude.core.geom.create.brepsFromSplitByFace(target, toolFace, tool)
932
+ * ```
933
+ */
934
+ abstract brepsFromSplitByFace(brep: BrepHandle, toolFace: FaceHandle, toolBrep: BrepHandle): PluginApiReturn<BrepHandle[]>;
935
+ /**
936
+ * Bevels the given edges of a solid with a symmetric planar cut. Host API
937
+ * call — returns a new {@linkcode BrepHandle}; the input brep is read-only.
938
+ *
939
+ * Works on curved solids: edges may be straight, circular or spline, and
940
+ * adjacent edges are allowed. Pick edges the same way as for
941
+ * {@linkcode PluginGeomCreateApi.brepFromFillet} — `brep.listEdges`, then
942
+ * `core.geom.query.edge.listFaces` and `core.geom.query.face.getSurfaceKind`
943
+ * on both faces of each edge. (`core.geom.query.brep.listEdgesBetween` takes
944
+ * two VERTEX indices — it is NOT a face-pair lookup.) Chamfering a cylinder's
945
+ * rim yields a cone patch where a fillet would yield a torus patch.
573
946
  *
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).
947
+ * When the input brep carries a creation recipe, the result carries it too,
948
+ * with this operation appended to `operations`; `design.create.massFromBrep`
949
+ * then keeps the mass editable through `design.update.parameters`.
950
+ *
951
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
952
+ * of MB — expect a pause of seconds).
577
953
  *
578
954
  * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
579
955
  * with `design.create.massFromBrep`.
580
956
  *
581
957
  * @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)
958
+ * @param edges The edges to chamfer (one or more, all on `brep`, no
959
+ * duplicates; more than 64 still chamfers but the result carries no
960
+ * parameter record)
583
961
  * @param distance Chamfer distance from the edge on each adjacent face (positive, finite)
584
962
  * @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
- *
963
+ * @throws VALIDATION if `edges` is empty or holds a duplicate, `distance` is
964
+ * not a positive finite number, an edge is not on `brep`, or an edge has no
965
+ * crease to cut — it is a seam of a closed face, or it lies between two
966
+ * patches of one smooth surface
967
+ * @throws PRECONDITION_FAILED if an edge could not be located on the kernel
968
+ * solid after healing (select a different edge, or chamfer before the
969
+ * operation that curved the solid)
970
+ * @throws OPERATION_FAILED if the kernel or the translation fails, or the
971
+ * result is non-manifold, splits into several solids, or contains a surface
972
+ * Snaptrude cannot represent. A distance larger than an adjacent face
973
+ * surfaces here, with a hint asking for a smaller one: unlike
974
+ * {@linkcode PluginGeomCreateApi.brepFromFillet}, a chamfer has no
975
+ * per-edge kernel verdict, so the failure names no edge (P4-D59)
976
+ *
977
+ * @examplePrompt Chamfer the top edge of the cylinder
592
978
  * @examplePrompt Bevel these edges by 100mm
593
979
  * @examplePrompt Chamfer the top edges of the plinth
594
980
  * @examplePrompt Cut a 45-degree flat along the corners of this mass
@@ -619,11 +1005,15 @@ export declare abstract class PluginGeomCreateApi {
619
1005
  * tapering across a bend or along an arc edge would create faces Snaptrude
620
1006
  * cannot represent and throws (sweep each straight run separately and union
621
1007
  * the results instead). An optional `transition` picks the corner
622
- * treatment: `"miter"` (default) is today's sharp mitred bend;
1008
+ * treatment: `"miter"` (default) is today's sharp mitred bend; `"round"`
1009
+ * carries the section around each turning corner on a tangent circular arc,
1010
+ * so the corner patch is a real curved (cylindrical) surface rather than a
1011
+ * flat cut (open paths only — `"round"` on a closed ring path is refused);
623
1012
  * `{ bevel: b }` chamfers each turning corner by cutting `b` back along
624
1013
  * 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.
1014
+ * long enough for its cuts). On a corner-less path `transition` has no
1015
+ * effect, and the varying-scale lane takes straight paths, so it never sees
1016
+ * a corner.
627
1017
  *
628
1018
  * Open paths run on the OpenCascade kernel (the first kernel call loads a
629
1019
  * wasm of tens of MB — expect a pause of seconds); closed paths are
@@ -633,19 +1023,22 @@ export declare abstract class PluginGeomCreateApi {
633
1023
  * with `design.create.massFromBrep`.
634
1024
  *
635
1025
  * @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)
1026
+ * @param path The polyline path as plain `{x, y, z}` points (2 or more;
1027
+ * repeat the first point as the last to close the path into a ring; more
1028
+ * than 512 points still sweeps but the result carries no parameter record)
638
1029
  * @param options Optional scale law and corner transition. Scale law:
639
1030
  * `startScale`/`endScale` (linear taper by arc length) or `scales` (one
640
1031
  * factor per path point; mutually exclusive with
641
1032
  * `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)
1033
+ * 1e-3..1e3. `transition`: `"miter"` (default, sharp corners),
1034
+ * `"round"` (arc-carried corners — curved corner patches; open paths
1035
+ * only) or `{ bevel: b }` (chamfered corners, `b` finite within
1036
+ * 1e-3..1e3; open and closed paths)
645
1037
  * @returns The swept solid as a new {@linkcode BrepHandle}
646
1038
  * @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
1039
+ * points, consecutive path points coincide, a
1040
+ * coordinate is not finite, or the profile plane contains the first
1041
+ * path segment's direction
649
1042
  * (degenerate sweep); for closed paths, if the ring has fewer than 3
650
1043
  * distinct corners, the path is non-planar, a corner doubles back, the
651
1044
  * profile has an arc edge, or the profile is too large for a mitred
@@ -653,11 +1046,14 @@ export declare abstract class PluginGeomCreateApi {
653
1046
  * is combined with `startScale`/`endScale`, `scales` does not match the
654
1047
  * path length, or a varying scale is used on a bent or closed path or
655
1048
  * 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)
1049
+ * the cuts its bevelled corners take from it or a corner nearly doubles
1050
+ * back so its bevel collapses (the errors name the corner)
1051
+ * @throws PRECONDITION_FAILED if `transition` is `"round"` and the path is
1052
+ * closed — round corners are an open-path lane; use `"miter"` or
1053
+ * `{ bevel }` on a ring
658
1054
  * @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
1055
+ * valid solid — including a `"round"` corner whose arc does not fit its
1056
+ * legs, which is not pre-checked and so is not named per corner
661
1057
  *
662
1058
  * @examplePrompt Sweep this profile along the corridor path
663
1059
  * @examplePrompt Extrude the railing section along this route
@@ -666,6 +1062,7 @@ export declare abstract class PluginGeomCreateApi {
666
1062
  * @examplePrompt Taper this duct from 1x1 to 2x2 along its run
667
1063
  * @examplePrompt Sweep a column section that narrows toward the top
668
1064
  * @examplePrompt Chamfer the corners of this swept frame by 200mm
1065
+ * @examplePrompt Sweep this handrail with rounded corners at the bends
669
1066
  *
670
1067
  * # Example
671
1068
  * ```ts
@@ -701,17 +1098,70 @@ export declare abstract class PluginGeomCreateApi {
701
1098
  startScale?: number;
702
1099
  endScale?: number;
703
1100
  scales?: number[];
704
- transition?: "miter" | {
1101
+ transition?: "miter" | "round" | {
705
1102
  bevel: number;
706
1103
  };
707
1104
  }): PluginApiReturn<BrepHandle>;
1105
+ /**
1106
+ * Sweeps a cross-section along a SMOOTH path — splines, arcs and lines chained
1107
+ * end to end — with control of how the profile turns.
1108
+ * {@linkcode PluginGeomCreateApi.brepFromSweep} takes a polyline path; this
1109
+ * takes curves. Host API call — returns a new {@linkcode BrepHandle}; the
1110
+ * inputs are read-only. Records as `sweepAlongCurve`, so the orientation stays
1111
+ * editable through `design.update.parameters` (agent-editable; the panel shows
1112
+ * it read-only — a string is not a scalar row).
1113
+ *
1114
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
1115
+ * of MB — expect a pause of seconds).
1116
+ *
1117
+ * @param profile Hole-free cross-section contour; placed at the first curve's start
1118
+ * @param path 1..64 curves, ordered, meeting end to end within tolerance
1119
+ * @param options `orientation` — `"upright"` (default) keeps the profile's up
1120
+ * aligned with world up (ducts, handrails, ribbons that must not roll);
1121
+ * `"frenet"` lets it roll with the path's curvature; `"fixed"` carries the
1122
+ * authored frame along unchanged, which is a pure translation — use it to
1123
+ * bend a footprint along an arc. `rail` is a second guide curve and needs a
1124
+ * newer kernel build than the one shipped here.
1125
+ * @returns The swept solid as a new {@linkcode BrepHandle}
1126
+ * @throws VALIDATION if the path curves are not connected, the path is closed,
1127
+ * the profile has holes, the first tangent lies in the profile plane, the
1128
+ * path runs vertically under `"upright"` (that frame is undefined there —
1129
+ * the message names the run and points at `"frenet"`), the path turns
1130
+ * parallel to the profile under `"fixed"`, or `rail` is passed on a kernel
1131
+ * build that cannot carry it
1132
+ * @throws OPERATION_FAILED if the kernel could not sweep the profile — a
1133
+ * self-intersection on a tight bend
1134
+ *
1135
+ * @examplePrompt Sweep a 600x400 duct along this curved route and keep it upright
1136
+ * @examplePrompt Run this handrail along the curved stair edge
1137
+ * @examplePrompt Bend this footprint along the arc
1138
+ *
1139
+ * # Example
1140
+ * ```ts
1141
+ * const route = await snaptrude.core.geom.create.splineFromPoints(points)
1142
+ * const duct = await snaptrude.core.geom.create.brepFromSweepAlongCurve(profile, [route], {
1143
+ * orientation: "upright",
1144
+ * })
1145
+ * ```
1146
+ */
1147
+ abstract brepFromSweepAlongCurve(profile: ContourHandle, path: CurveHandle[], options?: SweepAlongCurveOptions): PluginApiReturn<BrepHandle>;
708
1148
  /**
709
1149
  * Revolves a planar profile about an axis to make a solid of revolution — a
710
1150
  * full turn by default. Host API call — returns a new
711
1151
  * {@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.
1152
+ * profile are allowed, and segments may run at any angle to the axis: an
1153
+ * inclined segment revolves into a cone, an arc into a sphere or torus
1154
+ * section. This is the general route to domes, vases, columns and rotundas.
1155
+ *
1156
+ * Two rules bind the axis to the profile. First, the axis line must lie IN
1157
+ * the profile's plane — a revolution turns a planar section about a line
1158
+ * drawn in that same plane. An axis that misses the plane (skew to it, or
1159
+ * parallel but offset out of it) is refused: move the axis into the
1160
+ * profile's plane, or move the profile onto the axis's plane. Second,
1161
+ * within that plane the whole profile stays on ONE side of the axis.
1162
+ * Vertices and whole segments may lie ON the axis — that is how a dome's
1163
+ * pole and a cylinder's inner edge are authored — but no part of the profile
1164
+ * may cross to the other side, which would sweep a self-intersecting solid.
715
1165
  *
716
1166
  * Runs on the OpenCascade kernel (the first kernel call loads a wasm of
717
1167
  * tens of MB — expect a pause of seconds).
@@ -725,19 +1175,25 @@ export declare abstract class PluginGeomCreateApi {
725
1175
  * @param angleInDegrees Optional revolution angle in degrees (0 < angle ≤ 360; default 360)
726
1176
  * @returns The revolved solid as a new {@linkcode BrepHandle}
727
1177
  * @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)
1178
+ * not in (0, 360], a coordinate is not finite, or the profile crosses the
1179
+ * axis (the message names the offending segment — keep the whole profile
1180
+ * on one side; points may touch the axis but not cross it)
1181
+ * @throws PRECONDITION_FAILED if the axis does not lie in the profile's
1182
+ * plane — skew to it, or parallel but offset out of it (the message asks
1183
+ * you to move the axis into that plane)
1184
+ * @throws OPERATION_FAILED if the kernel cannot revolve the profile into a
1185
+ * valid solid
733
1186
  *
734
1187
  * @examplePrompt Create a dome from this section
735
1188
  * @examplePrompt Revolve this profile 360 degrees around the vertical axis
736
1189
  * @examplePrompt Build a rotunda by revolving this wall section
1190
+ * @examplePrompt Make a dome by revolving a quarter-circle about the vertical axis
1191
+ * @examplePrompt Turn this curved outline into a vase
737
1192
  *
738
1193
  * # Example
739
1194
  * ```ts
740
- * // A cylinder: revolve a 2m-wide, 3m-tall rectangle about the Y axis at its edge
1195
+ * // A cylinder: revolve a 2m-wide, 3m-tall rectangle about the Y axis at
1196
+ * // its edge — the left edge sits ON the axis, which is legal.
741
1197
  * const rect = await snaptrude.core.geom.create.profileFromLinePoints([
742
1198
  * await snaptrude.core.math.vec3.new(0, 0, 0),
743
1199
  * await snaptrude.core.math.vec3.new(2, 0, 0),
@@ -753,6 +1209,135 @@ export declare abstract class PluginGeomCreateApi {
753
1209
  * ```
754
1210
  */
755
1211
  abstract brepFromRevolution(profile: ContourHandle, axisOrigin: Vec3Components, axisDirection: Vec3Components, angleInDegrees?: number): PluginApiReturn<BrepHandle>;
1212
+ /**
1213
+ * Create a solid **sphere** B-rep from a centre and radius. Host API call —
1214
+ * returns a {@linkcode BrepHandle}; commit it to the scene with
1215
+ * `design.create.massFromBrep`. The result carries an exact spherical
1216
+ * surface (not a faceted approximation) and a creation recipe — read the
1217
+ * committed mass's parameters back with `design.query.getParameters` and edit
1218
+ * them with `design.update.parameters`.
1219
+ *
1220
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
1221
+ * of MB — expect a pause of seconds).
1222
+ *
1223
+ * @param centre Sphere centre as plain `{x, y, z}` components (raw Babylon units)
1224
+ * @param radius Sphere radius (> 0, raw Babylon units)
1225
+ * @returns The new solid as a {@linkcode BrepHandle}
1226
+ * @throws VALIDATION if `radius` is not a positive finite number or a
1227
+ * coordinate is not finite
1228
+ *
1229
+ * @examplePrompt Create a sphere of radius 5 at the origin
1230
+ * @examplePrompt Add a 3m ball on top of the tower
1231
+ *
1232
+ * # Example
1233
+ * ```ts
1234
+ * const brep = await snaptrude.core.geom.create.brepFromSphere({ x: 0, y: 5, z: 0 }, 5)
1235
+ * const mass = await snaptrude.design.create.massFromBrep(brep, "Sphere")
1236
+ * ```
1237
+ */
1238
+ abstract brepFromSphere(centre: Vec3Components, radius: number): PluginApiReturn<BrepHandle>;
1239
+ /**
1240
+ * Create a solid **cylinder** B-rep from its bottom-cap centre, axis
1241
+ * direction, radius and height. Host API call — returns a
1242
+ * {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. The
1243
+ * bottom cap sits AT `base` and the solid extends `height` along `axis` —
1244
+ * place `base` on the floor and use axis `{x: 0, y: 1, z: 0}` for an upright
1245
+ * column. Carries a creation recipe (radius, height), editable through
1246
+ * `design.update.parameters`.
1247
+ *
1248
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
1249
+ * of MB — expect a pause of seconds).
1250
+ *
1251
+ * @param base Centre of the bottom cap as plain `{x, y, z}` components
1252
+ * @param axis Axis direction as plain `{x, y, z}` components (non-zero, normalised by the host)
1253
+ * @param radius Cylinder radius (> 0)
1254
+ * @param height Cylinder height along `axis` (> 0)
1255
+ * @returns The new solid as a {@linkcode BrepHandle}
1256
+ * @throws VALIDATION if `radius`/`height` are not positive finite numbers or
1257
+ * `axis` is zero-length
1258
+ *
1259
+ * @examplePrompt Create a cylinder 2m across and 4m tall
1260
+ * @examplePrompt Add a circular column here
1261
+ *
1262
+ * # Example
1263
+ * ```ts
1264
+ * const brep = await snaptrude.core.geom.create.brepFromCylinder(
1265
+ * { x: 0, y: 0, z: 0 },
1266
+ * { x: 0, y: 1, z: 0 },
1267
+ * 1,
1268
+ * 4,
1269
+ * )
1270
+ * const column = await snaptrude.design.create.massFromBrep(brep, "Column")
1271
+ * ```
1272
+ */
1273
+ abstract brepFromCylinder(base: Vec3Components, axis: Vec3Components, radius: number, height: number): PluginApiReturn<BrepHandle>;
1274
+ /**
1275
+ * Create a solid **cone or frustum** B-rep: bottom-cap centre, axis, base
1276
+ * radius, height, and an optional top radius (default 0 — a full cone to a
1277
+ * point; > 0 — a frustum / tapered column). Host API call — returns a
1278
+ * {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. Carries
1279
+ * a creation recipe (radii + height), editable through `design.update.parameters`.
1280
+ *
1281
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
1282
+ * of MB — expect a pause of seconds).
1283
+ *
1284
+ * @param base Centre of the bottom cap as plain `{x, y, z}` components
1285
+ * @param axis Axis direction as plain `{x, y, z}` components (non-zero, normalised by the host)
1286
+ * @param baseRadius Radius at the base (> 0)
1287
+ * @param height Height along `axis` (> 0)
1288
+ * @param topRadius Optional radius at the top (≥ 0, ≠ `baseRadius`; default 0 = apex)
1289
+ * @returns The new solid as a {@linkcode BrepHandle}
1290
+ * @throws VALIDATION if radii/height are invalid, `topRadius === baseRadius`
1291
+ * (that is a cylinder — use {@linkcode PluginGeomCreateApi.brepFromCylinder}),
1292
+ * or `axis` is zero-length
1293
+ *
1294
+ * @examplePrompt Create a cone roof 4m wide and 3m tall
1295
+ * @examplePrompt Make a tapered column narrowing from 1m to 0.6m
1296
+ *
1297
+ * # Example
1298
+ * ```ts
1299
+ * const roof = await snaptrude.core.geom.create.brepFromCone(
1300
+ * { x: 0, y: 9, z: 0 },
1301
+ * { x: 0, y: 1, z: 0 },
1302
+ * 2,
1303
+ * 3,
1304
+ * )
1305
+ * ```
1306
+ */
1307
+ abstract brepFromCone(base: Vec3Components, axis: Vec3Components, baseRadius: number, height: number, topRadius?: number): PluginApiReturn<BrepHandle>;
1308
+ /**
1309
+ * Create a solid **torus** (ring / donut) B-rep from its centre, plane
1310
+ * normal, ring radius and tube radius. Host API call — returns a
1311
+ * {@linkcode BrepHandle}; commit with `design.create.massFromBrep`.
1312
+ * `majorRadius` is centre-to-tube-centre; `minorRadius` is the tube's own
1313
+ * radius and must be strictly smaller. Carries a creation recipe, editable
1314
+ * through `design.update.parameters`.
1315
+ *
1316
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
1317
+ * of MB — expect a pause of seconds).
1318
+ *
1319
+ * @param centre Torus centre as plain `{x, y, z}` components
1320
+ * @param axis Plane normal of the ring as plain `{x, y, z}` components (non-zero)
1321
+ * @param majorRadius Ring radius, centre to tube centre (> 0)
1322
+ * @param minorRadius Tube radius (> 0 and < `majorRadius` — a self-intersecting torus is rejected)
1323
+ * @returns The new solid as a {@linkcode BrepHandle}
1324
+ * @throws VALIDATION if a radius is invalid, `minorRadius >= majorRadius`,
1325
+ * or `axis` is zero-length
1326
+ *
1327
+ * @examplePrompt Create a donut-shaped ring 10m across with a 1m tube
1328
+ * @examplePrompt Add a torus canopy around the tower
1329
+ *
1330
+ * # Example
1331
+ * ```ts
1332
+ * const ring = await snaptrude.core.geom.create.brepFromTorus(
1333
+ * { x: 0, y: 6, z: 0 },
1334
+ * { x: 0, y: 1, z: 0 },
1335
+ * 5,
1336
+ * 1,
1337
+ * )
1338
+ * ```
1339
+ */
1340
+ abstract brepFromTorus(centre: Vec3Components, axis: Vec3Components, majorRadius: number, minorRadius: number): PluginApiReturn<BrepHandle>;
756
1341
  }
757
1342
  /**
758
1343
  * Arguments for {@linkcode PluginGeomCreateApi.line}.
@@ -799,6 +1384,32 @@ export declare const PluginGeomCreateCircleArgs: z.ZodObject<{
799
1384
  radius: z.ZodNumber;
800
1385
  }, z.core.$strip>;
801
1386
  export type PluginGeomCreateCircleArgs = z.infer<typeof PluginGeomCreateCircleArgs>;
1387
+ /**
1388
+ * Arguments for {@linkcode PluginGeomCreateApi.splineFromPoints}.
1389
+ *
1390
+ * | Property | Type | Description |
1391
+ * |---|---|---|
1392
+ * | `points` | {@linkcode Vec3Handle}`[]` | 3..256 ordered through-points of the curve |
1393
+ */
1394
+ export declare const PluginGeomCreateSplineFromPointsArgs: z.ZodObject<{
1395
+ points: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
1396
+ }, z.core.$strip>;
1397
+ export type PluginGeomCreateSplineFromPointsArgs = z.infer<typeof PluginGeomCreateSplineFromPointsArgs>;
1398
+ /**
1399
+ * Arguments for {@linkcode PluginGeomCreateApi.splineFromControlPoints}.
1400
+ *
1401
+ * | Property | Type | Description |
1402
+ * |---|---|---|
1403
+ * | `controlPoints` | {@linkcode Vec3Handle}`[]` | 3..512 control points of the curve, in order |
1404
+ * | `options` | `object`? | `degree`: 2 or 3 (default `min(3, controlPoints.length - 1)`) |
1405
+ */
1406
+ export declare const PluginGeomCreateSplineFromControlPointsArgs: z.ZodObject<{
1407
+ controlPoints: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
1408
+ options: z.ZodOptional<z.ZodObject<{
1409
+ degree: z.ZodOptional<z.ZodNumber>;
1410
+ }, z.core.$strip>>;
1411
+ }, z.core.$strip>;
1412
+ export type PluginGeomCreateSplineFromControlPointsArgs = z.infer<typeof PluginGeomCreateSplineFromControlPointsArgs>;
802
1413
  /**
803
1414
  * Arguments for {@linkcode PluginGeomCreateApi.profileFromLinePoints}.
804
1415
  *
@@ -818,9 +1429,20 @@ export type PluginGeomCreateProfileFromLinePointsArgs = z.infer<typeof PluginGeo
818
1429
  * | `curves` | {@linkcode CurveHandle}`[]` | Ordered curve handles forming a closed loop |
819
1430
  */
820
1431
  export declare const PluginGeomCreateProfileFromCurvesArgs: z.ZodObject<{
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>>]>>;
1432
+ curves: z.ZodArray<z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>>;
822
1433
  }, z.core.$strip>;
823
1434
  export type PluginGeomCreateProfileFromCurvesArgs = z.infer<typeof PluginGeomCreateProfileFromCurvesArgs>;
1435
+ /**
1436
+ * Arguments for {@linkcode PluginGeomCreateApi.profileFromSplinePoints}.
1437
+ *
1438
+ * | Property | Type | Description |
1439
+ * |---|---|---|
1440
+ * | `points` | {@linkcode Vec3Handle}`[]` | 3..256 ordered through-points of the closed loop (first point NOT repeated) |
1441
+ */
1442
+ export declare const PluginGeomCreateProfileFromSplinePointsArgs: z.ZodObject<{
1443
+ points: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
1444
+ }, z.core.$strip>;
1445
+ export type PluginGeomCreateProfileFromSplinePointsArgs = z.infer<typeof PluginGeomCreateProfileFromSplinePointsArgs>;
824
1446
  /**
825
1447
  * Arguments for {@linkcode PluginGeomCreateApi.contourFromProfile}.
826
1448
  *
@@ -868,6 +1490,7 @@ export type PluginGeomCreateBrepFromFacesArgs = z.infer<typeof PluginGeomCreateB
868
1490
  * | `contour` | {@linkcode ContourHandle} | The cross-section to extrude |
869
1491
  * | `direction` | {@linkcode Vec3Components} | Extrusion direction (non-zero, finite components) |
870
1492
  * | `amount` | `number` | Extrusion distance (finite, non-zero) |
1493
+ * | `options` | `object`? | Optional twist and taper: `twistInDegrees` (an angle, finite), `topScale` (a ratio, finite and positive) and `levels` (a count, 2..64) |
871
1494
  */
872
1495
  export declare const PluginGeomCreateBrepFromExtrusionArgs: z.ZodObject<{
873
1496
  contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
@@ -877,6 +1500,11 @@ export declare const PluginGeomCreateBrepFromExtrusionArgs: z.ZodObject<{
877
1500
  z: z.ZodNumber;
878
1501
  }, z.core.$strip>;
879
1502
  amount: z.ZodNumber;
1503
+ options: z.ZodOptional<z.ZodObject<{
1504
+ twistInDegrees: z.ZodOptional<z.ZodNumber>;
1505
+ topScale: z.ZodOptional<z.ZodNumber>;
1506
+ levels: z.ZodOptional<z.ZodNumber>;
1507
+ }, z.core.$strip>>;
880
1508
  }, z.core.$strip>;
881
1509
  export type PluginGeomCreateBrepFromExtrusionArgs = z.infer<typeof PluginGeomCreateBrepFromExtrusionArgs>;
882
1510
  /**
@@ -886,8 +1514,8 @@ export type PluginGeomCreateBrepFromExtrusionArgs = z.infer<typeof PluginGeomCre
886
1514
  * |---|---|---|
887
1515
  * | `bottomContour` | {@linkcode ContourHandle} | The bottom cross-section |
888
1516
  * | `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"`) |
1517
+ * | `intermediateContours` | {@linkcode ContourHandle}`[]`? | Optional in-between cross-sections, ordered bottom to top (any count; more than 32 sections in all builds but carries no parameter record) |
1518
+ * | `options` | `object`? | Optional behavior switches: `compatibility` (`"strict"` throws on mismatched edge counts instead of auto-matching; default `"auto"`), `seamAlignment` (`"authored"` keeps the authored correspondence instead of searching seam rotations; default `"auto"`) and `smoothing` (`"smooth"` lofts every section in one pass, so the sides curve through the intermediates; default `"ruled"`) |
891
1519
  */
892
1520
  export declare const PluginGeomCreateBrepFromLoftArgs: z.ZodObject<{
893
1521
  bottomContour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
@@ -902,6 +1530,10 @@ export declare const PluginGeomCreateBrepFromLoftArgs: z.ZodObject<{
902
1530
  auto: "auto";
903
1531
  authored: "authored";
904
1532
  }>>;
1533
+ smoothing: z.ZodOptional<z.ZodEnum<{
1534
+ ruled: "ruled";
1535
+ smooth: "smooth";
1536
+ }>>;
905
1537
  }, z.core.$strip>>;
906
1538
  }, z.core.$strip>;
907
1539
  export type PluginGeomCreateBrepFromLoftArgs = z.infer<typeof PluginGeomCreateBrepFromLoftArgs>;
@@ -944,15 +1576,62 @@ export type PluginGeomCreateBrepBooleanArgs = z.infer<typeof PluginGeomCreateBre
944
1576
  * | Property | Type | Description |
945
1577
  * |---|---|---|
946
1578
  * | `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) |
1579
+ * | `edges` | {@linkcode EdgeHandle}`[]` | The edges to fillet (one or more; more than 64 builds but carries no parameter record) |
1580
+ * | `radius` | `number` | Fillet radius (positive, finite); the start radius of a variable blend |
1581
+ * | `options` | `object`? | Optional variable blend: `endRadius` (positive, finite) or `radii` (2..32 rows of `{ position, radius }`, `position` a ratio 0..1 strictly increasing). Mutually exclusive, and either one takes exactly ONE edge |
949
1582
  */
950
1583
  export declare const PluginGeomCreateBrepFromFilletArgs: z.ZodObject<{
951
1584
  brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
952
1585
  edges: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"edge">, string>>>;
953
1586
  radius: z.ZodNumber;
1587
+ options: z.ZodOptional<z.ZodObject<{
1588
+ endRadius: z.ZodOptional<z.ZodNumber>;
1589
+ radii: z.ZodOptional<z.ZodArray<z.ZodObject<{
1590
+ position: z.ZodNumber;
1591
+ radius: z.ZodNumber;
1592
+ }, z.core.$strip>>>;
1593
+ }, z.core.$strip>>;
954
1594
  }, z.core.$strip>;
955
1595
  export type PluginGeomCreateBrepFromFilletArgs = z.infer<typeof PluginGeomCreateBrepFromFilletArgs>;
1596
+ /** An edge with the solid it belongs to. See {@linkcode OwnedEdge}. */
1597
+ export declare const OwnedEdge: z.ZodObject<{
1598
+ edge: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"edge">, string>>;
1599
+ brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
1600
+ face: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>>;
1601
+ }, z.core.$strip>;
1602
+ /**
1603
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromPatch}.
1604
+ *
1605
+ * | Property | Type | Description |
1606
+ * |---|---|---|
1607
+ * | `boundary` | ({@linkcode CurveHandle} \| {@linkcode OwnedEdge})`[]` | 3..16 items forming one closed loop |
1608
+ * | `thickness` | `number` | Solid thickness in internal length units (positive, finite) |
1609
+ * | `options` | `object`? | `interiorPoints` (≤ 64 plain `{x, y, z}` the surface is pulled through), `continuity` (`"position"` default, or `"tangent"` — every item must then be an edge item naming its `face`), `side` (`"below"` default, or `"above"`) |
1610
+ */
1611
+ export declare const PluginGeomCreateBrepFromPatchArgs: z.ZodObject<{
1612
+ boundary: z.ZodArray<z.ZodUnion<readonly [z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>, z.ZodObject<{
1613
+ edge: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"edge">, string>>;
1614
+ brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
1615
+ face: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>>;
1616
+ }, z.core.$strip>]>>;
1617
+ thickness: z.ZodNumber;
1618
+ options: z.ZodOptional<z.ZodObject<{
1619
+ interiorPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
1620
+ x: z.ZodNumber;
1621
+ y: z.ZodNumber;
1622
+ z: z.ZodNumber;
1623
+ }, z.core.$strip>>>;
1624
+ continuity: z.ZodOptional<z.ZodEnum<{
1625
+ position: "position";
1626
+ tangent: "tangent";
1627
+ }>>;
1628
+ side: z.ZodOptional<z.ZodEnum<{
1629
+ below: "below";
1630
+ above: "above";
1631
+ }>>;
1632
+ }, z.core.$strip>>;
1633
+ }, z.core.$strip>;
1634
+ export type PluginGeomCreateBrepFromPatchArgs = z.infer<typeof PluginGeomCreateBrepFromPatchArgs>;
956
1635
  /**
957
1636
  * Arguments for {@linkcode PluginGeomCreateApi.brepFromOffset}.
958
1637
  *
@@ -972,7 +1651,7 @@ export type PluginGeomCreateBrepFromOffsetArgs = z.infer<typeof PluginGeomCreate
972
1651
  * | Property | Type | Description |
973
1652
  * |---|---|---|
974
1653
  * | `brep` | {@linkcode BrepHandle} | The solid to hollow |
975
- * | `openFaces` | {@linkcode FaceHandle}`[]` | The faces to remove as openings (≥1) |
1654
+ * | `openFaces` | {@linkcode FaceHandle}`[]` | The faces to remove as openings (one or more; more than 32 builds but carries no parameter record) |
976
1655
  * | `thickness` | `number` | Wall thickness (positive, finite) |
977
1656
  */
978
1657
  export declare const PluginGeomCreateBrepFromShellArgs: z.ZodObject<{
@@ -1004,13 +1683,43 @@ export declare const PluginGeomCreateBrepsFromSplitArgs: z.ZodObject<{
1004
1683
  }, z.core.$strip>;
1005
1684
  }, z.core.$strip>;
1006
1685
  export type PluginGeomCreateBrepsFromSplitArgs = z.infer<typeof PluginGeomCreateBrepsFromSplitArgs>;
1686
+ /**
1687
+ * Arguments for {@linkcode PluginGeomCreateApi.brepsFromSplitByFace}.
1688
+ *
1689
+ * | Property | Type | Description |
1690
+ * |---|---|---|
1691
+ * | `brep` | {@linkcode BrepHandle} | The solid to cut |
1692
+ * | `toolFace` | {@linkcode FaceHandle} | The cutting face (read-only) |
1693
+ * | `toolBrep` | {@linkcode BrepHandle} | The solid `toolFace` belongs to (owner last) |
1694
+ */
1695
+ export declare const PluginGeomCreateBrepsFromSplitByFaceArgs: z.ZodObject<{
1696
+ brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
1697
+ toolFace: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
1698
+ toolBrep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
1699
+ }, z.core.$strip>;
1700
+ export type PluginGeomCreateBrepsFromSplitByFaceArgs = z.infer<typeof PluginGeomCreateBrepsFromSplitByFaceArgs>;
1701
+ /**
1702
+ * Arguments for {@linkcode PluginGeomCreateApi.curvesFromProjection}.
1703
+ *
1704
+ * | Property | Type | Description |
1705
+ * |---|---|---|
1706
+ * | `curve` | {@linkcode CurveHandle} | The curve to project |
1707
+ * | `face` | {@linkcode FaceHandle} | The face to project onto |
1708
+ * | `faceBrep` | {@linkcode BrepHandle} | The solid `face` belongs to (owner last) |
1709
+ */
1710
+ export declare const PluginGeomCreateCurvesFromProjectionArgs: z.ZodObject<{
1711
+ curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
1712
+ face: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
1713
+ faceBrep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
1714
+ }, z.core.$strip>;
1715
+ export type PluginGeomCreateCurvesFromProjectionArgs = z.infer<typeof PluginGeomCreateCurvesFromProjectionArgs>;
1007
1716
  /**
1008
1717
  * Arguments for {@linkcode PluginGeomCreateApi.brepFromChamfer}.
1009
1718
  *
1010
1719
  * | Property | Type | Description |
1011
1720
  * |---|---|---|
1012
1721
  * | `brep` | {@linkcode BrepHandle} | The solid whose edges to bevel |
1013
- * | `edges` | {@linkcode EdgeHandle}`[]` | The straight edges to chamfer (≥1) |
1722
+ * | `edges` | {@linkcode EdgeHandle}`[]` | The edges to chamfer (one or more; more than 64 builds but carries no parameter record) |
1014
1723
  * | `distance` | `number` | Chamfer distance from the edge on each adjacent face (positive, finite) |
1015
1724
  */
1016
1725
  export declare const PluginGeomCreateBrepFromChamferArgs: z.ZodObject<{
@@ -1025,8 +1734,8 @@ export type PluginGeomCreateBrepFromChamferArgs = z.infer<typeof PluginGeomCreat
1025
1734
  * | Property | Type | Description |
1026
1735
  * |---|---|---|
1027
1736
  * | `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) |
1737
+ * | `path` | {@linkcode Vec3Components}`[]` | The polyline path (2 or more points, finite components — more than 512 builds but carries no parameter record; 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) |
1738
+ * | `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), `"round"` (arc-carried corners) or `{ bevel }` (chamfered corners; finite, 1e-3..1e3) |
1030
1739
  */
1031
1740
  export declare const PluginGeomCreateBrepFromSweepArgs: z.ZodObject<{
1032
1741
  profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
@@ -1039,20 +1748,42 @@ export declare const PluginGeomCreateBrepFromSweepArgs: z.ZodObject<{
1039
1748
  startScale: z.ZodOptional<z.ZodNumber>;
1040
1749
  endScale: z.ZodOptional<z.ZodNumber>;
1041
1750
  scales: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1042
- transition: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"miter">, z.ZodObject<{
1751
+ transition: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"miter">, z.ZodLiteral<"round">, z.ZodObject<{
1043
1752
  bevel: z.ZodNumber;
1044
1753
  }, z.core.$strip>]>>;
1045
1754
  }, z.core.$strip>>;
1046
1755
  }, z.core.$strip>;
1047
1756
  export type PluginGeomCreateBrepFromSweepArgs = z.infer<typeof PluginGeomCreateBrepFromSweepArgs>;
1757
+ /**
1758
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromSweepAlongCurve}.
1759
+ *
1760
+ * | Property | Type | Description |
1761
+ * |---|---|---|
1762
+ * | `profile` | {@linkcode ContourHandle} | The cross-section to sweep (hole-free) |
1763
+ * | `path` | {@linkcode CurveHandle}`[]` | 1..64 curves, ordered, meeting end to end |
1764
+ * | `options` | `object`? | `orientation` — `"upright"` (default), `"frenet"` or `"fixed"`; `rail` — a second guide {@linkcode CurveHandle} (needs a newer kernel build) |
1765
+ */
1766
+ export declare const PluginGeomCreateBrepFromSweepAlongCurveArgs: z.ZodObject<{
1767
+ profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
1768
+ path: z.ZodArray<z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>>;
1769
+ options: z.ZodOptional<z.ZodObject<{
1770
+ orientation: z.ZodOptional<z.ZodEnum<{
1771
+ fixed: "fixed";
1772
+ frenet: "frenet";
1773
+ upright: "upright";
1774
+ }>>;
1775
+ rail: z.ZodOptional<z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>>;
1776
+ }, z.core.$strip>>;
1777
+ }, z.core.$strip>;
1778
+ export type PluginGeomCreateBrepFromSweepAlongCurveArgs = z.infer<typeof PluginGeomCreateBrepFromSweepAlongCurveArgs>;
1048
1779
  /**
1049
1780
  * Arguments for {@linkcode PluginGeomCreateApi.brepFromRevolution}.
1050
1781
  *
1051
1782
  * | Property | Type | Description |
1052
1783
  * |---|---|---|
1053
1784
  * | `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) |
1785
+ * | `axisOrigin` | {@linkcode Vec3Components} | A point on the revolution axis (finite components; the axis must lie in the profile's plane) |
1786
+ * | `axisDirection` | {@linkcode Vec3Components} | The axis direction (non-zero, finite components; the axis must lie in the profile's plane) |
1056
1787
  * | `angleInDegrees` | `number`? | Revolution angle in degrees (0 < angle ≤ 360; default 360) |
1057
1788
  */
1058
1789
  export declare const PluginGeomCreateBrepFromRevolutionArgs: z.ZodObject<{
@@ -1070,4 +1801,98 @@ export declare const PluginGeomCreateBrepFromRevolutionArgs: z.ZodObject<{
1070
1801
  angleInDegrees: z.ZodOptional<z.ZodNumber>;
1071
1802
  }, z.core.$strip>;
1072
1803
  export type PluginGeomCreateBrepFromRevolutionArgs = z.infer<typeof PluginGeomCreateBrepFromRevolutionArgs>;
1804
+ /**
1805
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromSphere}.
1806
+ *
1807
+ * | Property | Type | Description |
1808
+ * |---|---|---|
1809
+ * | `centre` | {@linkcode Vec3Components} | Sphere centre (finite components) |
1810
+ * | `radius` | `number` | Sphere radius (finite; positivity is checked host-side so the error names the parameter) |
1811
+ */
1812
+ export declare const PluginGeomCreateBrepFromSphereArgs: z.ZodObject<{
1813
+ centre: z.ZodObject<{
1814
+ x: z.ZodNumber;
1815
+ y: z.ZodNumber;
1816
+ z: z.ZodNumber;
1817
+ }, z.core.$strip>;
1818
+ radius: z.ZodNumber;
1819
+ }, z.core.$strip>;
1820
+ export type PluginGeomCreateBrepFromSphereArgs = z.infer<typeof PluginGeomCreateBrepFromSphereArgs>;
1821
+ /**
1822
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromCylinder}.
1823
+ *
1824
+ * | Property | Type | Description |
1825
+ * |---|---|---|
1826
+ * | `base` | {@linkcode Vec3Components} | Centre of the bottom cap (finite components) |
1827
+ * | `axis` | {@linkcode Vec3Components} | Axis direction (non-zero, finite components) |
1828
+ * | `radius` | `number` | Cylinder radius (finite, positive) |
1829
+ * | `height` | `number` | Height along `axis` (finite, positive) |
1830
+ */
1831
+ export declare const PluginGeomCreateBrepFromCylinderArgs: z.ZodObject<{
1832
+ base: z.ZodObject<{
1833
+ x: z.ZodNumber;
1834
+ y: z.ZodNumber;
1835
+ z: z.ZodNumber;
1836
+ }, z.core.$strip>;
1837
+ axis: z.ZodObject<{
1838
+ x: z.ZodNumber;
1839
+ y: z.ZodNumber;
1840
+ z: z.ZodNumber;
1841
+ }, z.core.$strip>;
1842
+ radius: z.ZodNumber;
1843
+ height: z.ZodNumber;
1844
+ }, z.core.$strip>;
1845
+ export type PluginGeomCreateBrepFromCylinderArgs = z.infer<typeof PluginGeomCreateBrepFromCylinderArgs>;
1846
+ /**
1847
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromCone}.
1848
+ *
1849
+ * | Property | Type | Description |
1850
+ * |---|---|---|
1851
+ * | `base` | {@linkcode Vec3Components} | Centre of the bottom cap (finite components) |
1852
+ * | `axis` | {@linkcode Vec3Components} | Axis direction (non-zero, finite components) |
1853
+ * | `baseRadius` | `number` | Radius at the base (finite, positive) |
1854
+ * | `height` | `number` | Height along `axis` (finite, positive) |
1855
+ * | `topRadius` | `number`? | Radius at the top (finite, ≥ 0, ≠ `baseRadius`; default 0 = apex) |
1856
+ */
1857
+ export declare const PluginGeomCreateBrepFromConeArgs: z.ZodObject<{
1858
+ base: z.ZodObject<{
1859
+ x: z.ZodNumber;
1860
+ y: z.ZodNumber;
1861
+ z: z.ZodNumber;
1862
+ }, z.core.$strip>;
1863
+ axis: z.ZodObject<{
1864
+ x: z.ZodNumber;
1865
+ y: z.ZodNumber;
1866
+ z: z.ZodNumber;
1867
+ }, z.core.$strip>;
1868
+ baseRadius: z.ZodNumber;
1869
+ height: z.ZodNumber;
1870
+ topRadius: z.ZodOptional<z.ZodNumber>;
1871
+ }, z.core.$strip>;
1872
+ export type PluginGeomCreateBrepFromConeArgs = z.infer<typeof PluginGeomCreateBrepFromConeArgs>;
1873
+ /**
1874
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromTorus}.
1875
+ *
1876
+ * | Property | Type | Description |
1877
+ * |---|---|---|
1878
+ * | `centre` | {@linkcode Vec3Components} | Torus centre (finite components) |
1879
+ * | `axis` | {@linkcode Vec3Components} | Plane normal of the ring (non-zero, finite components) |
1880
+ * | `majorRadius` | `number` | Ring radius, centre to tube centre (finite, positive) |
1881
+ * | `minorRadius` | `number` | Tube radius (finite, positive, strictly less than `majorRadius`) |
1882
+ */
1883
+ export declare const PluginGeomCreateBrepFromTorusArgs: z.ZodObject<{
1884
+ centre: z.ZodObject<{
1885
+ x: z.ZodNumber;
1886
+ y: z.ZodNumber;
1887
+ z: z.ZodNumber;
1888
+ }, z.core.$strip>;
1889
+ axis: z.ZodObject<{
1890
+ x: z.ZodNumber;
1891
+ y: z.ZodNumber;
1892
+ z: z.ZodNumber;
1893
+ }, z.core.$strip>;
1894
+ majorRadius: z.ZodNumber;
1895
+ minorRadius: z.ZodNumber;
1896
+ }, z.core.$strip>;
1897
+ export type PluginGeomCreateBrepFromTorusArgs = z.infer<typeof PluginGeomCreateBrepFromTorusArgs>;
1073
1898
  //# sourceMappingURL=index.d.ts.map