@snaptrude/plugin-core 0.9.13 → 0.9.15

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 (101) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/api-manifest.full.json +8930 -0
  3. package/api-manifest.json +1002 -55
  4. package/dist/api/core/geom/create/index.d.ts +935 -100
  5. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  6. package/dist/api/core/geom/query/brep.d.ts +59 -2
  7. package/dist/api/core/geom/query/brep.d.ts.map +1 -1
  8. package/dist/api/core/geom/query/curve.d.ts +59 -35
  9. package/dist/api/core/geom/query/curve.d.ts.map +1 -1
  10. package/dist/api/core/geom/query/edge.d.ts +2 -2
  11. package/dist/api/core/geom/query/face.d.ts +105 -0
  12. package/dist/api/core/geom/query/face.d.ts.map +1 -1
  13. package/dist/api/core/geom/update/contour.d.ts +2 -0
  14. package/dist/api/core/geom/update/contour.d.ts.map +1 -1
  15. package/dist/api/core/geom/update/curve.d.ts +5 -5
  16. package/dist/api/core/geom/update/profile.d.ts +3 -1
  17. package/dist/api/core/geom/update/profile.d.ts.map +1 -1
  18. package/dist/api/core/handles/index.d.ts +4 -2
  19. package/dist/api/core/handles/index.d.ts.map +1 -1
  20. package/dist/api/core/index.d.ts +4 -4
  21. package/dist/api/core/index.d.ts.map +1 -1
  22. package/dist/api/core/layers.d.ts +377 -255
  23. package/dist/api/core/layers.d.ts.map +1 -1
  24. package/dist/api/core/proposals/index.d.ts +4 -3
  25. package/dist/api/core/proposals/index.d.ts.map +1 -1
  26. package/dist/api/core/storeys/index.d.ts +12 -0
  27. package/dist/api/core/storeys/index.d.ts.map +1 -1
  28. package/dist/api/core/storeys/layers.d.ts +408 -0
  29. package/dist/api/core/storeys/layers.d.ts.map +1 -0
  30. package/dist/api/core/tags.d.ts +3 -3
  31. package/dist/api/design/create/bulk-items.d.ts +44 -0
  32. package/dist/api/design/create/bulk-items.d.ts.map +1 -1
  33. package/dist/api/design/create/grids.d.ts +1 -1
  34. package/dist/api/design/create/index.d.ts +31 -3
  35. package/dist/api/design/create/index.d.ts.map +1 -1
  36. package/dist/api/design/family.d.ts +67 -10
  37. package/dist/api/design/family.d.ts.map +1 -1
  38. package/dist/api/design/query/geometry/index.d.ts +33 -5
  39. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  40. package/dist/api/design/query/grids.d.ts +3 -3
  41. package/dist/api/design/query/index.d.ts +47 -0
  42. package/dist/api/design/query/index.d.ts.map +1 -1
  43. package/dist/api/design/query/spaces.d.ts +5 -5
  44. package/dist/api/design/selection/index.d.ts +2 -2
  45. package/dist/api/design/update/index.d.ts +172 -0
  46. package/dist/api/design/update/index.d.ts.map +1 -1
  47. package/dist/api/entity/referenceLine.d.ts +1 -1
  48. package/dist/api/entity/space.d.ts +4 -4
  49. package/dist/api/entity/story.d.ts +4 -4
  50. package/dist/api/presentation/aiInspiration.d.ts +13 -13
  51. package/dist/api/presentation/camera.d.ts +265 -0
  52. package/dist/api/presentation/camera.d.ts.map +1 -0
  53. package/dist/api/presentation/index.d.ts +5 -0
  54. package/dist/api/presentation/index.d.ts.map +1 -1
  55. package/dist/api/presentation/placedViews.d.ts +1 -1
  56. package/dist/api/presentation/views.d.ts +3 -1
  57. package/dist/api/presentation/views.d.ts.map +1 -1
  58. package/dist/api/program/site.d.ts +4 -4
  59. package/dist/api/program/spreadsheet.d.ts +4 -4
  60. package/dist/handles.d.ts +13 -3
  61. package/dist/handles.d.ts.map +1 -1
  62. package/dist/index.cjs +3638 -2958
  63. package/dist/index.cjs.map +1 -1
  64. package/dist/index.d.ts +2 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +3558 -2955
  67. package/dist/index.js.map +1 -1
  68. package/dist/massParameters.d.ts +287 -0
  69. package/dist/massParameters.d.ts.map +1 -0
  70. package/dist/massParameters.ops.d.ts +138 -0
  71. package/dist/massParameters.ops.d.ts.map +1 -0
  72. package/package.json +2 -1
  73. package/scripts/check-dist-fresh.mjs +22 -0
  74. package/scripts/generate-manifest.test.mjs +14 -3
  75. package/src/api/core/geom/create/index.ts +1030 -101
  76. package/src/api/core/geom/query/brep.ts +60 -2
  77. package/src/api/core/geom/query/curve.ts +26 -2
  78. package/src/api/core/geom/query/edge.ts +2 -2
  79. package/src/api/core/geom/query/face.ts +109 -4
  80. package/src/api/core/geom/update/contour.ts +2 -0
  81. package/src/api/core/geom/update/profile.ts +2 -0
  82. package/src/api/core/handles/index.ts +3 -2
  83. package/src/api/core/index.ts +4 -4
  84. package/src/api/core/layers.ts +380 -173
  85. package/src/api/core/proposals/index.ts +4 -3
  86. package/src/api/core/storeys/index.ts +14 -0
  87. package/src/api/core/storeys/layers.ts +339 -0
  88. package/src/api/design/create/bulk-items.ts +68 -0
  89. package/src/api/design/create/index.ts +30 -4
  90. package/src/api/design/family.ts +68 -10
  91. package/src/api/design/query/geometry/index.ts +35 -4
  92. package/src/api/design/query/index.ts +50 -0
  93. package/src/api/design/update/index.ts +186 -1
  94. package/src/api/presentation/camera.ts +289 -0
  95. package/src/api/presentation/index.ts +5 -0
  96. package/src/api/presentation/views.ts +3 -1
  97. package/src/handles.ts +18 -3
  98. package/src/index.ts +2 -0
  99. package/src/massParameters.ops.ts +246 -0
  100. package/src/massParameters.ts +427 -0
  101. package/test/massParameters.test.mjs +952 -0
@@ -174,16 +174,26 @@ export abstract class PluginGeomQueryBrepApi {
174
174
  * | `"line"` | `startPoint`, `endPoint`, `length` |
175
175
  * | `"arc"` | `startPoint`, `endPoint`, `centre`, `axis`, `radius`, `length` |
176
176
  * | `"circle"` | `centre`, `axis`, `radius`, `length` — a full-circle edge (e.g. a cylinder cap rim) |
177
+ * | `"spline"` | `startPoint`, `endPoint`, `degree`, `controlPoints`, `knots`, `length` — a free-form NURBS edge |
178
+ *
179
+ * For a `"spline"` edge, `knots` is the **expanded** knot vector — each knot
180
+ * repeated by its multiplicity, the textbook NURBS form — so
181
+ * `knots.length === controlPoints.length + degree + 1`.
177
182
  *
178
183
  * @param brep The brep the edge belongs to
179
184
  * @param edge The edge whose curve to read
180
185
  * @returns The curve data as a discriminated union on `type` (see table above)
181
186
  * @throws VALIDATION if the edge is not on `brep`
187
+ * @throws PRECONDITION_FAILED if the edge is a RATIONAL (weighted) spline —
188
+ * e.g. a NURBS-converted elliptical intersection edge. The wire form
189
+ * carries no weights, so such an edge is refused rather than reported as a
190
+ * different curve; sample it instead.
182
191
  *
183
192
  * @examplePrompt Read the radius of this curved edge
184
193
  * @examplePrompt Is this edge straight or an arc?
185
194
  * @examplePrompt Get the exact start and end points of this edge
186
195
  * @examplePrompt Measure the length of each edge of this mass
196
+ * @examplePrompt Read the control points of this curved edge
187
197
  *
188
198
  * # Example
189
199
  * ```ts
@@ -219,6 +229,16 @@ export abstract class PluginGeomQueryBrepApi {
219
229
  radius: number
220
230
  length: number
221
231
  }
232
+ | {
233
+ type: "spline"
234
+ startPoint: Vec3Components
235
+ endPoint: Vec3Components
236
+ degree: number
237
+ controlPoints: Vec3Components[]
238
+ /** Expanded by multiplicity: `controlPoints.length + degree + 1` entries. */
239
+ knots: number[]
240
+ length: number
241
+ }
222
242
  >
223
243
 
224
244
  /**
@@ -263,7 +283,10 @@ export abstract class PluginGeomQueryBrepApi {
263
283
  public abstract listVertexPositions(brep: BrepHandle): PluginApiReturn<Vec3Components[]>
264
284
 
265
285
  /**
266
- * Get the centroid (mean of all vertex positions) of a brep.
286
+ * Get the centroid of a brep: the mean of its vertex positions for planar
287
+ * and cylinder-sided solids; for a solid with sphere, cone, torus or spline
288
+ * geometry, its exact centre of mass (integrated over the surfaces; the
289
+ * vertex mean again if the kernel cannot integrate it, e.g. an open brep).
267
290
  * @param brep The brep to query
268
291
  * @returns The centroid as {@linkcode Vec3Components}
269
292
  *
@@ -366,6 +389,37 @@ export abstract class PluginGeomQueryBrepApi {
366
389
  */
367
390
  public abstract getBoundingBox(brep: BrepHandle): PluginApiReturn<BBoxComponents>
368
391
 
392
+ /**
393
+ * Get the enclosed **volume** of a closed solid, integrated from its exact
394
+ * surfaces. Curved faces are measured analytically, not from their
395
+ * tessellation — a real sphere of radius 5 reports 523.6, whatever its
396
+ * triangle count. That makes this the reliable way to confirm a solid is the
397
+ * shape you intended (a torus should measure 2·π²·R·r²).
398
+ *
399
+ * Runs on the OpenCascade kernel (the first kernel call loads a wasm of tens
400
+ * of MB — expect a pause of seconds).
401
+ *
402
+ * @param brep The solid to measure
403
+ * @returns The enclosed volume in cubic internal length units
404
+ * @throws OPERATION_FAILED if the kernel cannot compute the volume (the brep
405
+ * is not a closed solid)
406
+ *
407
+ * @examplePrompt What is the volume of this mass?
408
+ * @examplePrompt How much concrete is in this shape?
409
+ * @examplePrompt Check the volume of the dome I just made
410
+ *
411
+ * # Example
412
+ * ```ts
413
+ * const [mass] = await snaptrude.design.query.listMasses()
414
+ * const brep = await snaptrude.design.query.geometry.getBrep(mass)
415
+ * if (brep) {
416
+ * const volume = await snaptrude.core.geom.query.brep.getVolume(brep)
417
+ * console.log("volume:", volume)
418
+ * }
419
+ * ```
420
+ */
421
+ public abstract getVolume(brep: BrepHandle): PluginApiReturn<number>
422
+
369
423
  /**
370
424
  * Test whether two breps are geometrically equal.
371
425
  * @param brepA First brep
@@ -388,7 +442,7 @@ export abstract class PluginGeomQueryBrepApi {
388
442
  public abstract isEqual(brepA: BrepHandle, brepB: BrepHandle): PluginApiReturn<boolean>
389
443
 
390
444
  /**
391
- * Measures the minimum distance between two solids, with the closest witness
445
+ * Measures the minimum distance between two solids, with the closest
392
446
  * point on each. Touching or overlapping solids report a distance of 0 with
393
447
  * contact points.
394
448
  *
@@ -534,6 +588,10 @@ export type PluginGeomQueryBrepGetBoundingBoxArgs = z.infer<
534
588
  typeof PluginGeomQueryBrepGetBoundingBoxArgs
535
589
  >
536
590
 
591
+ /** Arguments for {@linkcode PluginGeomQueryBrepApi.getVolume}. `{ brep: BrepHandle }` */
592
+ export const PluginGeomQueryBrepGetVolumeArgs = brepArg
593
+ export type PluginGeomQueryBrepGetVolumeArgs = z.infer<typeof PluginGeomQueryBrepGetVolumeArgs>
594
+
537
595
  /**
538
596
  * Arguments for {@linkcode PluginGeomQueryBrepApi.isEqual}.
539
597
  *
@@ -3,8 +3,8 @@ import { PluginApiReturn } from "../../../../types"
3
3
  import { Vec3Handle, CurveHandle, LineHandle, Vec3Components } from "../../../../handles"
4
4
 
5
5
  /**
6
- * Curve queries — read-only geometric questions about curves (lines and arcs)
7
- * and the relationships between two curves (all-handle model, §11).
6
+ * Curve queries — read-only geometric questions about curves (lines, arcs and
7
+ * splines) and the relationships between two curves.
8
8
  *
9
9
  * Every method takes opaque curve handles ({@linkcode CurveHandle}/{@linkcode LineHandle})
10
10
  * and point handles ({@linkcode Vec3Handle}) and returns plain values — points as
@@ -13,6 +13,30 @@ import { Vec3Handle, CurveHandle, LineHandle, Vec3Components } from "../../../..
13
13
  * {@linkcode CurveHandle} (or `null` when there is no result). No query mutates its
14
14
  * inputs.
15
15
  *
16
+ * ## Splines
17
+ *
18
+ * A {@linkcode CurveHandle} is a line, an arc, or a NURBS spline (minted by
19
+ * `core.geom.create.splineFromPoints` / `splineFromControlPoints`, and returned by
20
+ * `edge.getCurve`, `profile.listCurves` and `update.curve.reverse` for a spline run). Every method here accepts a spline at
21
+ * compile time, but only the reads backed by the engine's spline math answer
22
+ * for one today. The rest throw `PRECONDITION_FAILED` ("not supported for
23
+ * splines yet") — a typed refusal, never a quietly wrong answer.
24
+ *
25
+ * | Splines | Members |
26
+ * |---|---|
27
+ * | **supported** | {@linkcode PluginGeomQueryCurveApi.getStartPoint}, {@linkcode PluginGeomQueryCurveApi.getEndPoint}, {@linkcode PluginGeomQueryCurveApi.getLength}, {@linkcode PluginGeomQueryCurveApi.getTangent}, {@linkcode PluginGeomQueryCurveApi.listPoints}, {@linkcode PluginGeomQueryCurveApi.getNearestPoint} |
28
+ * | **not yet** | `getMidPoint`, `getChordLength`, `getNormal`, `getProjection`, `getPointAtDistance`, `getParameterAtPoint`, `getCurvature`, `getDistanceToPoint`, `getDistanceAlong`, `listSubdivisions`, `isLinear`, `isOnCurve`, `hasPoint`, `isEqual`, `isOverlapping`, `getCommonPart`, `listIntersections`, `getMergedCurve`, `isContinuous`, `isParallel`, `getShortestGap`, `getDistanceBetween` |
29
+ *
30
+ * {@linkcode PluginGeomQueryCurveApi.isOverlapping} is deliberately in the
31
+ * second row: its line/arc path falls back to structural equality, which would
32
+ * answer a spline pair wrongly rather than not at all.
33
+ *
34
+ * To work around the second row, sample the curve —
35
+ * {@linkcode PluginGeomQueryCurveApi.listPoints} then the ordinary
36
+ * `core.math.vec3` operations — or read a spline brep edge exactly with
37
+ * `core.geom.query.brep.getEdgeCurve`, which returns its degree, control points
38
+ * and knots.
39
+ *
16
40
  * Accessed via `snaptrude.core.geom.query.curve`.
17
41
  */
18
42
  export abstract class PluginGeomQueryCurveApi {
@@ -69,9 +69,9 @@ export abstract class PluginGeomQueryEdgeApi {
69
69
  public abstract listVertices(edge: EdgeHandle): PluginApiReturn<VertexHandle[]>
70
70
 
71
71
  /**
72
- * Get the underlying curve geometry of an edge (a line or arc).
72
+ * Get the underlying curve geometry of an edge (a line, arc or spline).
73
73
  * @param edge The edge to query
74
- * @returns The curve as a {@linkcode CurveHandle}, or `null` if it is a circle or unset
74
+ * @returns The curve as a {@linkcode CurveHandle} (`line_`, `arc_` or `spline_`), or `null` if it is a circle or unset
75
75
  *
76
76
  * # Example
77
77
  * ```ts
@@ -59,6 +59,49 @@ export abstract class PluginGeomQueryFaceApi {
59
59
  */
60
60
  public abstract getMaterialIndex(face: FaceHandle): PluginApiReturn<number>
61
61
 
62
+ /**
63
+ * Read what KIND of surface a face lies on. This is the one read that tells a
64
+ * genuinely curved face from a faceted approximation of one: every face of a
65
+ * 200-triangle "dome" answers `"plane"`, while a real dome has faces
66
+ * answering `"sphere"`. Use it to confirm a curved solid actually came out
67
+ * curved.
68
+ *
69
+ * | Value | Surface |
70
+ * |---|---|
71
+ * | `"plane"` | Flat face |
72
+ * | `"cylinder"` | Cylindrical face — constant radius about an axis |
73
+ * | `"cone"` | Conical face — a tapered ring (a cone or frustum side) |
74
+ * | `"sphere"` | Spherical face |
75
+ * | `"torus"` | Toroidal face — the ring surface of a donut |
76
+ * | `"spline"` | Free-form NURBS face |
77
+ *
78
+ * Pure read: no geometry kernel is loaded.
79
+ *
80
+ * @param face The face to query
81
+ * @returns The surface kind (see the table), or `null` when the face carries
82
+ * no surface classification
83
+ *
84
+ * @examplePrompt Is this face flat or curved?
85
+ * @examplePrompt Check that this dome is a real sphere, not a faceted approximation
86
+ * @examplePrompt What kind of surface is this face?
87
+ * @examplePrompt How many curved faces does this mass have?
88
+ *
89
+ * # Example
90
+ * ```ts
91
+ * const [mass] = await snaptrude.design.query.listMasses()
92
+ * const brep = await snaptrude.design.query.geometry.getBrep(mass)
93
+ * if (brep) {
94
+ * const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
95
+ * const kinds = []
96
+ * for (const face of faces) kinds.push(await snaptrude.core.geom.query.face.getSurfaceKind(face))
97
+ * console.log("spherical faces:", kinds.filter((k) => k === "sphere").length)
98
+ * }
99
+ * ```
100
+ */
101
+ public abstract getSurfaceKind(
102
+ face: FaceHandle,
103
+ ): PluginApiReturn<"plane" | "cylinder" | "cone" | "sphere" | "torus" | "spline" | null>
104
+
62
105
  /**
63
106
  * Get a seed half-edge of a face's outer loop.
64
107
  * @param face The face to query
@@ -257,6 +300,56 @@ export abstract class PluginGeomQueryFaceApi {
257
300
  brep: BrepHandle,
258
301
  ): PluginApiReturn<Vec3Components[]>
259
302
 
303
+ /**
304
+ * Exact surface area of one face of `brep`, in internal length units SQUARED —
305
+ * integrated off the face's own surface, not its facets, so a curved patch
306
+ * reads exactly rather than as its triangles. Needs the parent brep: a face
307
+ * handle cannot name its own solid.
308
+ * @param face The face to measure
309
+ * @param brep The parent brep (owner last, as in
310
+ * {@linkcode PluginGeomQueryFaceApi.listVertexPositions})
311
+ * @returns The area as a `number`
312
+ * @throws VALIDATION if `face` is not a face of `brep`
313
+ * @throws OPERATION_FAILED if the kernel could not measure the face
314
+ *
315
+ * @examplePrompt How big is this roof patch?
316
+ * @examplePrompt Which face of this mass has the largest area?
317
+ *
318
+ * # Example
319
+ * ```ts
320
+ * const [mass] = await snaptrude.design.query.listMasses()
321
+ * const brep = await snaptrude.design.query.geometry.getBrep(mass)
322
+ * if (brep) {
323
+ * const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
324
+ * const areas = await Promise.all(
325
+ * faces.map((f) => snaptrude.core.geom.query.face.getArea(f, brep)),
326
+ * )
327
+ * }
328
+ * ```
329
+ */
330
+ public abstract getArea(face: FaceHandle, brep: BrepHandle): PluginApiReturn<number>
331
+
332
+ /**
333
+ * Centre of area of one face of `brep`, as a point in that brep's frame
334
+ * (internal length units). On a solid whose every face reads `"spline"` this
335
+ * is the read that tells two patches apart — the top of a thickened patch from
336
+ * its bottom, one quarter of a closed surface from the next.
337
+ * @param face The face to measure
338
+ * @param brep The parent brep (owner last)
339
+ * @returns The centroid as {@linkcode Vec3Components}
340
+ * @throws VALIDATION if `face` is not a face of `brep`
341
+ * @throws OPERATION_FAILED if the kernel could not measure the face
342
+ *
343
+ * @examplePrompt Where is the middle of this face?
344
+ * @examplePrompt Pick the topmost face of this curved mass
345
+ *
346
+ * # Example
347
+ * ```ts
348
+ * const centre = await snaptrude.core.geom.query.face.getCentroid(face, brep)
349
+ * ```
350
+ */
351
+ public abstract getCentroid(face: FaceHandle, brep: BrepHandle): PluginApiReturn<Vec3Components>
352
+
260
353
  /**
261
354
  * List the tessellated boundary points of a face's outer loop (arcs sampled,
262
355
  * sense-corrected). Not cardinality-equal to {@linkcode PluginGeomQueryFaceApi.listVertexPositions}.
@@ -301,6 +394,7 @@ export abstract class PluginGeomQueryFaceApi {
301
394
  }
302
395
 
303
396
  const faceArg = z.object({ face: FaceHandle })
397
+ const faceWithBrepArg = z.object({ face: FaceHandle, brep: BrepHandle })
304
398
 
305
399
  /** Arguments for {@linkcode PluginGeomQueryFaceApi.getIndex}. `{ face: FaceHandle }` */
306
400
  export const PluginGeomQueryFaceGetIndexArgs = faceArg
@@ -312,6 +406,12 @@ export type PluginGeomQueryFaceGetMaterialIndexArgs = z.infer<
312
406
  typeof PluginGeomQueryFaceGetMaterialIndexArgs
313
407
  >
314
408
 
409
+ /** Arguments for {@linkcode PluginGeomQueryFaceApi.getSurfaceKind}. `{ face: FaceHandle }` */
410
+ export const PluginGeomQueryFaceGetSurfaceKindArgs = faceArg
411
+ export type PluginGeomQueryFaceGetSurfaceKindArgs = z.infer<
412
+ typeof PluginGeomQueryFaceGetSurfaceKindArgs
413
+ >
414
+
315
415
  /** Arguments for {@linkcode PluginGeomQueryFaceApi.getHalfEdge}. `{ face: FaceHandle }` */
316
416
  export const PluginGeomQueryFaceGetHalfEdgeArgs = faceArg
317
417
  export type PluginGeomQueryFaceGetHalfEdgeArgs = z.infer<typeof PluginGeomQueryFaceGetHalfEdgeArgs>
@@ -382,14 +482,19 @@ export type PluginGeomQueryFaceGetHoleContainingHalfEdgeArgs = z.infer<
382
482
  * | `face` | {@linkcode FaceHandle} | The face to query |
383
483
  * | `brep` | {@linkcode BrepHandle} | The parent brep (source of vertex coordinates) |
384
484
  */
385
- export const PluginGeomQueryFaceListVertexPositionsArgs = z.object({
386
- face: FaceHandle,
387
- brep: BrepHandle,
388
- })
485
+ export const PluginGeomQueryFaceListVertexPositionsArgs = faceWithBrepArg
389
486
  export type PluginGeomQueryFaceListVertexPositionsArgs = z.infer<
390
487
  typeof PluginGeomQueryFaceListVertexPositionsArgs
391
488
  >
392
489
 
490
+ /** Arguments for {@linkcode PluginGeomQueryFaceApi.getArea}. `{ face: FaceHandle, brep: BrepHandle }` */
491
+ export const PluginGeomQueryFaceGetAreaArgs = faceWithBrepArg
492
+ export type PluginGeomQueryFaceGetAreaArgs = z.infer<typeof PluginGeomQueryFaceGetAreaArgs>
493
+
494
+ /** Arguments for {@linkcode PluginGeomQueryFaceApi.getCentroid}. `{ face: FaceHandle, brep: BrepHandle }` */
495
+ export const PluginGeomQueryFaceGetCentroidArgs = faceWithBrepArg
496
+ export type PluginGeomQueryFaceGetCentroidArgs = z.infer<typeof PluginGeomQueryFaceGetCentroidArgs>
497
+
393
498
  /** Arguments for {@linkcode PluginGeomQueryFaceApi.listVertexPositionsWithCurves}. `{ face: FaceHandle }` */
394
499
  export const PluginGeomQueryFaceListVertexPositionsWithCurvesArgs = faceArg
395
500
  export type PluginGeomQueryFaceListVertexPositionsWithCurvesArgs = z.infer<
@@ -29,6 +29,8 @@ export abstract class PluginGeomUpdateContourApi {
29
29
  * @param contour The contour to offset
30
30
  * @param distance Signed offset distance (outward when positive, inward when negative)
31
31
  * @returns The offset contour as a NEW {@linkcode ContourHandle}
32
+ * @throws PRECONDITION_FAILED if the outline or a hole has a spline run
33
+ * (splines cannot be offset yet)
32
34
  *
33
35
  * @examplePrompt Offset this boundary 500mm inward
34
36
  * @examplePrompt Shrink this floor outline by half a metre all around
@@ -28,6 +28,8 @@ export abstract class PluginGeomUpdateProfileApi {
28
28
  * @param profile The closed profile to offset
29
29
  * @param distance Signed offset distance (outward when positive, inward when negative)
30
30
  * @returns The offset profile as a NEW {@linkcode ProfileHandle}
31
+ * @throws PRECONDITION_FAILED if the profile has a spline run (splines cannot
32
+ * be offset yet)
31
33
  *
32
34
  * @examplePrompt Offset this outline 300mm inward
33
35
  * @examplePrompt Inset this boundary by a foot all around
@@ -6,7 +6,7 @@ import type { AnyArenaHandle } from "../../../handles"
6
6
  import { Handle } from "../../../handles"
7
7
 
8
8
  /**
9
- * The 12 registry-arena handle kinds — the releasable families. Entity-style
9
+ * The 13 registry-arena handle kinds — the releasable families. Entity-style
10
10
  * handles (component / material / underlay / terrain / importJob / comment) are
11
11
  * raw engine ids with no arena entry and therefore no lifecycle: passing one to
12
12
  * `release` is a silent no-op like any other unknown id.
@@ -16,6 +16,7 @@ export const ArenaKind = z.enum([
16
16
  "quat",
17
17
  "line",
18
18
  "arc",
19
+ "spline",
19
20
  "circle",
20
21
  "profile",
21
22
  "contour",
@@ -216,7 +217,7 @@ export type PluginHandlesEndScopeArgs = z.infer<typeof PluginHandlesEndScopeArgs
216
217
  * | Property | Type | Description |
217
218
  * |---|---|---|
218
219
  * | `resources` | `number` | Live resource-arena entries (profile/contour) |
219
- * | `values` | `number` | Live value-arena entries (vec3/quat/line/arc/circle) |
220
+ * | `values` | `number` | Live value-arena entries (vec3/quat/line/arc/spline/circle) |
220
221
  * | `topology` | `number` | Live topology-arena entries (brep/face/edge/halfedge/vertex) |
221
222
  * | `scopes` | `number` | Currently open handle scopes |
222
223
  * | `hostHeapUsedBytes` | `number \| null` | Host page `usedJSHeapSize` (null where unsupported) |
@@ -31,8 +31,8 @@ import { PluginUserApi } from "./user"
31
31
  * - {@linkcode PluginCoreApi.comment} — Comments: create, edit, resolve, tag, list
32
32
  * - {@linkcode PluginCoreApi.groups} — Read & edit the group hierarchy
33
33
  * - {@linkcode PluginCoreApi.buildings} — Read & edit buildings and their storeys
34
- * - {@linkcode PluginCoreApi.storeys} — Create, read & edit storeys (floors)
35
- * - {@linkcode PluginCoreApi.layers} — Read & toggle storey drawing/reference layers
34
+ * - {@linkcode PluginCoreApi.storeys} — Create, read & edit storeys (floors); `storeys.layers` reads & toggles each storey's sketch surfaces and underlays
35
+ * - {@linkcode PluginCoreApi.layers} — The Layers panel in the left sidebar: list, create, rename, lock, hide, activate, delete, move objects between layers
36
36
  * - {@linkcode PluginCoreApi.tags} — Tag catalog + assignment
37
37
  * - {@linkcode PluginCoreApi.io} — Import files (image/pdf/cad/model/terrain), poll jobs, manage underlays
38
38
  * - {@linkcode PluginCoreApi.handles} — Handle lifecycle: release, releaseAll, scopes
@@ -61,11 +61,11 @@ export abstract class PluginCoreApi {
61
61
  public abstract groups: PluginCoreGroupsApi
62
62
  /** Buildings — read & edit buildings and their storeys. See {@linkcode PluginCoreBuildingsApi}. */
63
63
  public abstract buildings: PluginCoreBuildingsApi
64
- /** Storeys — create, read & edit storeys (floors). See {@linkcode PluginCoreStoreysApi}. */
64
+ /** Storeys — create, read & edit storeys (floors), plus each storey's sketch surfaces and underlays (`storeys.layers`). See {@linkcode PluginCoreStoreysApi}. */
65
65
  public abstract storeys: PluginCoreStoreysApi
66
66
  /** Application mode — read & switch the editor's top-bar mode. See {@linkcode PluginCoreModeApi}. */
67
67
  public abstract mode: PluginCoreModeApi
68
- /** Layers — read & toggle storey drawing/reference layers. See {@linkcode PluginCoreLayersApi}. */
68
+ /** Layers — the Layers panel's layers: list, create, rename, lock, hide, activate, delete, assign objects. See {@linkcode PluginCoreLayersApi}. */
69
69
  public abstract layers: PluginCoreLayersApi
70
70
  /** Tags — tag catalog + assignment. See {@linkcode PluginCoreTagsApi}. */
71
71
  public abstract tags: PluginCoreTagsApi