@snaptrude/plugin-core 0.9.13 → 0.9.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/api-manifest.json +778 -32
- package/dist/api/core/geom/create/index.d.ts +935 -100
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +59 -2
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +59 -35
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/edge.d.ts +2 -2
- package/dist/api/core/geom/query/face.d.ts +105 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +2 -0
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +5 -5
- package/dist/api/core/geom/update/profile.d.ts +3 -1
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/handles/index.d.ts +4 -2
- package/dist/api/core/handles/index.d.ts.map +1 -1
- package/dist/api/design/create/grids.d.ts +1 -1
- package/dist/api/design/family.d.ts +67 -10
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +33 -5
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/grids.d.ts +3 -3
- package/dist/api/design/query/index.d.ts +47 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -5
- package/dist/api/design/update/index.d.ts +99 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +1 -1
- package/dist/api/entity/space.d.ts +4 -4
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/api/program/site.d.ts +4 -4
- package/dist/api/program/spreadsheet.d.ts +4 -4
- package/dist/handles.d.ts +13 -3
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +3417 -2946
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3370 -2946
- package/dist/index.js.map +1 -1
- package/dist/massParameters.d.ts +287 -0
- package/dist/massParameters.d.ts.map +1 -0
- package/dist/massParameters.ops.d.ts +138 -0
- package/dist/massParameters.ops.d.ts.map +1 -0
- package/package.json +2 -1
- package/scripts/check-dist-fresh.mjs +22 -0
- package/src/api/core/geom/create/index.ts +1030 -101
- package/src/api/core/geom/query/brep.ts +60 -2
- package/src/api/core/geom/query/curve.ts +26 -2
- package/src/api/core/geom/query/edge.ts +2 -2
- package/src/api/core/geom/query/face.ts +109 -4
- package/src/api/core/geom/update/contour.ts +2 -0
- package/src/api/core/geom/update/profile.ts +2 -0
- package/src/api/core/handles/index.ts +3 -2
- package/src/api/design/family.ts +68 -10
- package/src/api/design/query/geometry/index.ts +35 -4
- package/src/api/design/query/index.ts +50 -0
- package/src/api/design/update/index.ts +106 -0
- package/src/handles.ts +18 -3
- package/src/index.ts +2 -0
- package/src/massParameters.ops.ts +246 -0
- package/src/massParameters.ts +427 -0
- package/test/massParameters.test.mjs +952 -0
|
@@ -48,6 +48,46 @@ export declare abstract class PluginGeomQueryFaceApi {
|
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
50
|
abstract getMaterialIndex(face: FaceHandle): PluginApiReturn<number>;
|
|
51
|
+
/**
|
|
52
|
+
* Read what KIND of surface a face lies on. This is the one read that tells a
|
|
53
|
+
* genuinely curved face from a faceted approximation of one: every face of a
|
|
54
|
+
* 200-triangle "dome" answers `"plane"`, while a real dome has faces
|
|
55
|
+
* answering `"sphere"`. Use it to confirm a curved solid actually came out
|
|
56
|
+
* curved.
|
|
57
|
+
*
|
|
58
|
+
* | Value | Surface |
|
|
59
|
+
* |---|---|
|
|
60
|
+
* | `"plane"` | Flat face |
|
|
61
|
+
* | `"cylinder"` | Cylindrical face — constant radius about an axis |
|
|
62
|
+
* | `"cone"` | Conical face — a tapered ring (a cone or frustum side) |
|
|
63
|
+
* | `"sphere"` | Spherical face |
|
|
64
|
+
* | `"torus"` | Toroidal face — the ring surface of a donut |
|
|
65
|
+
* | `"spline"` | Free-form NURBS face |
|
|
66
|
+
*
|
|
67
|
+
* Pure read: no geometry kernel is loaded.
|
|
68
|
+
*
|
|
69
|
+
* @param face The face to query
|
|
70
|
+
* @returns The surface kind (see the table), or `null` when the face carries
|
|
71
|
+
* no surface classification
|
|
72
|
+
*
|
|
73
|
+
* @examplePrompt Is this face flat or curved?
|
|
74
|
+
* @examplePrompt Check that this dome is a real sphere, not a faceted approximation
|
|
75
|
+
* @examplePrompt What kind of surface is this face?
|
|
76
|
+
* @examplePrompt How many curved faces does this mass have?
|
|
77
|
+
*
|
|
78
|
+
* # Example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const [mass] = await snaptrude.design.query.listMasses()
|
|
81
|
+
* const brep = await snaptrude.design.query.geometry.getBrep(mass)
|
|
82
|
+
* if (brep) {
|
|
83
|
+
* const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
|
|
84
|
+
* const kinds = []
|
|
85
|
+
* for (const face of faces) kinds.push(await snaptrude.core.geom.query.face.getSurfaceKind(face))
|
|
86
|
+
* console.log("spherical faces:", kinds.filter((k) => k === "sphere").length)
|
|
87
|
+
* }
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
abstract getSurfaceKind(face: FaceHandle): PluginApiReturn<"plane" | "cylinder" | "cone" | "sphere" | "torus" | "spline" | null>;
|
|
51
91
|
/**
|
|
52
92
|
* Get a seed half-edge of a face's outer loop.
|
|
53
93
|
* @param face The face to query
|
|
@@ -227,6 +267,54 @@ export declare abstract class PluginGeomQueryFaceApi {
|
|
|
227
267
|
* ```
|
|
228
268
|
*/
|
|
229
269
|
abstract listVertexPositions(face: FaceHandle, brep: BrepHandle): PluginApiReturn<Vec3Components[]>;
|
|
270
|
+
/**
|
|
271
|
+
* Exact surface area of one face of `brep`, in internal length units SQUARED —
|
|
272
|
+
* integrated off the face's own surface, not its facets, so a curved patch
|
|
273
|
+
* reads exactly rather than as its triangles. Needs the parent brep: a face
|
|
274
|
+
* handle cannot name its own solid.
|
|
275
|
+
* @param face The face to measure
|
|
276
|
+
* @param brep The parent brep (owner last, as in
|
|
277
|
+
* {@linkcode PluginGeomQueryFaceApi.listVertexPositions})
|
|
278
|
+
* @returns The area as a `number`
|
|
279
|
+
* @throws VALIDATION if `face` is not a face of `brep`
|
|
280
|
+
* @throws OPERATION_FAILED if the kernel could not measure the face
|
|
281
|
+
*
|
|
282
|
+
* @examplePrompt How big is this roof patch?
|
|
283
|
+
* @examplePrompt Which face of this mass has the largest area?
|
|
284
|
+
*
|
|
285
|
+
* # Example
|
|
286
|
+
* ```ts
|
|
287
|
+
* const [mass] = await snaptrude.design.query.listMasses()
|
|
288
|
+
* const brep = await snaptrude.design.query.geometry.getBrep(mass)
|
|
289
|
+
* if (brep) {
|
|
290
|
+
* const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
|
|
291
|
+
* const areas = await Promise.all(
|
|
292
|
+
* faces.map((f) => snaptrude.core.geom.query.face.getArea(f, brep)),
|
|
293
|
+
* )
|
|
294
|
+
* }
|
|
295
|
+
* ```
|
|
296
|
+
*/
|
|
297
|
+
abstract getArea(face: FaceHandle, brep: BrepHandle): PluginApiReturn<number>;
|
|
298
|
+
/**
|
|
299
|
+
* Centre of area of one face of `brep`, as a point in that brep's frame
|
|
300
|
+
* (internal length units). On a solid whose every face reads `"spline"` this
|
|
301
|
+
* is the read that tells two patches apart — the top of a thickened patch from
|
|
302
|
+
* its bottom, one quarter of a closed surface from the next.
|
|
303
|
+
* @param face The face to measure
|
|
304
|
+
* @param brep The parent brep (owner last)
|
|
305
|
+
* @returns The centroid as {@linkcode Vec3Components}
|
|
306
|
+
* @throws VALIDATION if `face` is not a face of `brep`
|
|
307
|
+
* @throws OPERATION_FAILED if the kernel could not measure the face
|
|
308
|
+
*
|
|
309
|
+
* @examplePrompt Where is the middle of this face?
|
|
310
|
+
* @examplePrompt Pick the topmost face of this curved mass
|
|
311
|
+
*
|
|
312
|
+
* # Example
|
|
313
|
+
* ```ts
|
|
314
|
+
* const centre = await snaptrude.core.geom.query.face.getCentroid(face, brep)
|
|
315
|
+
* ```
|
|
316
|
+
*/
|
|
317
|
+
abstract getCentroid(face: FaceHandle, brep: BrepHandle): PluginApiReturn<Vec3Components>;
|
|
230
318
|
/**
|
|
231
319
|
* List the tessellated boundary points of a face's outer loop (arcs sampled,
|
|
232
320
|
* sense-corrected). Not cardinality-equal to {@linkcode PluginGeomQueryFaceApi.listVertexPositions}.
|
|
@@ -276,6 +364,11 @@ export declare const PluginGeomQueryFaceGetMaterialIndexArgs: z.ZodObject<{
|
|
|
276
364
|
face: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
|
|
277
365
|
}, z.core.$strip>;
|
|
278
366
|
export type PluginGeomQueryFaceGetMaterialIndexArgs = z.infer<typeof PluginGeomQueryFaceGetMaterialIndexArgs>;
|
|
367
|
+
/** Arguments for {@linkcode PluginGeomQueryFaceApi.getSurfaceKind}. `{ face: FaceHandle }` */
|
|
368
|
+
export declare const PluginGeomQueryFaceGetSurfaceKindArgs: z.ZodObject<{
|
|
369
|
+
face: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
|
|
370
|
+
}, z.core.$strip>;
|
|
371
|
+
export type PluginGeomQueryFaceGetSurfaceKindArgs = z.infer<typeof PluginGeomQueryFaceGetSurfaceKindArgs>;
|
|
279
372
|
/** Arguments for {@linkcode PluginGeomQueryFaceApi.getHalfEdge}. `{ face: FaceHandle }` */
|
|
280
373
|
export declare const PluginGeomQueryFaceGetHalfEdgeArgs: z.ZodObject<{
|
|
281
374
|
face: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
|
|
@@ -350,6 +443,18 @@ export declare const PluginGeomQueryFaceListVertexPositionsArgs: z.ZodObject<{
|
|
|
350
443
|
brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
|
|
351
444
|
}, z.core.$strip>;
|
|
352
445
|
export type PluginGeomQueryFaceListVertexPositionsArgs = z.infer<typeof PluginGeomQueryFaceListVertexPositionsArgs>;
|
|
446
|
+
/** Arguments for {@linkcode PluginGeomQueryFaceApi.getArea}. `{ face: FaceHandle, brep: BrepHandle }` */
|
|
447
|
+
export declare const PluginGeomQueryFaceGetAreaArgs: z.ZodObject<{
|
|
448
|
+
face: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
|
|
449
|
+
brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
|
|
450
|
+
}, z.core.$strip>;
|
|
451
|
+
export type PluginGeomQueryFaceGetAreaArgs = z.infer<typeof PluginGeomQueryFaceGetAreaArgs>;
|
|
452
|
+
/** Arguments for {@linkcode PluginGeomQueryFaceApi.getCentroid}. `{ face: FaceHandle, brep: BrepHandle }` */
|
|
453
|
+
export declare const PluginGeomQueryFaceGetCentroidArgs: z.ZodObject<{
|
|
454
|
+
face: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
|
|
455
|
+
brep: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
|
|
456
|
+
}, z.core.$strip>;
|
|
457
|
+
export type PluginGeomQueryFaceGetCentroidArgs = z.infer<typeof PluginGeomQueryFaceGetCentroidArgs>;
|
|
353
458
|
/** Arguments for {@linkcode PluginGeomQueryFaceApi.listVertexPositionsWithCurves}. `{ face: FaceHandle }` */
|
|
354
459
|
export declare const PluginGeomQueryFaceListVertexPositionsWithCurvesArgs: z.ZodObject<{
|
|
355
460
|
face: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"face">, string>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"face.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/query/face.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,cAAc,EACf,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;GAYG;AACH,8BAAsB,sBAAsB;;IAG1C;;;;;;;;;;;;;;OAcG;aACa,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC,MAAM,CAAC;IAEnE;;;;;;;;;;;;;;OAcG;aACa,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC,MAAM,CAAC;IAE3E;;;;;;;;;;;;;;;;;OAiBG;aACa,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC,cAAc,GAAG,IAAI,CAAC;IAErF;;;;;;;;;;;;;;OAcG;aACa,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC,UAAU,EAAE,CAAC;IAE1E;;;;;;;;;;;;;;OAcG;aACa,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC,cAAc,EAAE,CAAC;IAElF;;;;;;;;;;;;;;OAcG;aACa,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,eAAe,CAAC,YAAY,EAAE,CAAC;IAE/E;;;;;;;;;;;;;;;OA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A0C;;;iBAAkB,CAAA;AACzE,MAAM,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAC9D,OAAO,0CAA0C,CAClD,CAAA;AAED,yGAAyG;AACzG,eAAO,MAAM,8BAA8B;;;iBAAkB,CAAA;AAC7D,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAE3F,6GAA6G;AAC7G,eAAO,MAAM,kCAAkC;;;iBAAkB,CAAA;AACjE,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEnG,6GAA6G;AAC7G,eAAO,MAAM,oDAAoD;;iBAAU,CAAA;AAC3E,MAAM,MAAM,oDAAoD,GAAG,CAAC,CAAC,KAAK,CACxE,OAAO,oDAAoD,CAC5D,CAAA;AAED,iGAAiG;AACjG,eAAO,MAAM,wCAAwC;;iBAAU,CAAA;AAC/D,MAAM,MAAM,wCAAwC,GAAG,CAAC,CAAC,KAAK,CAC5D,OAAO,wCAAwC,CAChD,CAAA"}
|
|
@@ -22,6 +22,8 @@ export declare abstract class PluginGeomUpdateContourApi {
|
|
|
22
22
|
* @param contour The contour to offset
|
|
23
23
|
* @param distance Signed offset distance (outward when positive, inward when negative)
|
|
24
24
|
* @returns The offset contour as a NEW {@linkcode ContourHandle}
|
|
25
|
+
* @throws PRECONDITION_FAILED if the outline or a hole has a spline run
|
|
26
|
+
* (splines cannot be offset yet)
|
|
25
27
|
*
|
|
26
28
|
* @examplePrompt Offset this boundary 500mm inward
|
|
27
29
|
* @examplePrompt Shrink this floor outline by half a metre all around
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contour.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/update/contour.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,cAAc,EACf,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;GAWG;AACH,8BAAsB,0BAA0B;;IAG9C
|
|
1
|
+
{"version":3,"file":"contour.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/update/contour.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,cAAc,EACf,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;GAWG;AACH,8BAAsB,0BAA0B;;IAG9C;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,MAAM,CACpB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,MAAM,GACf,eAAe,CAAC,aAAa,CAAC;IAEjC;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,CAClB,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,UAAU,GACtB,eAAe,CAAC,aAAa,CAAC;IAEjC;;;;;;;;;;;;;;;;;;;;;OAqBG;aACa,MAAM,CACpB,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,UAAU,GACjB,eAAe,CAAC,aAAa,CAAC;IAEjC;;;;;;;;;;;;;;;;;;;OAmBG;aACa,KAAK,CACnB,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,GAAG,cAAc,EAC/B,KAAK,CAAC,EAAE,UAAU,GACjB,eAAe,CAAC,aAAa,CAAC;IAEjC;;;;;;;;;;;;;;;;;;;OAmBG;aACa,MAAM,CACpB,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE;QAAE,KAAK,EAAE,UAAU,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAE,GAC/C,eAAe,CAAC,aAAa,CAAC;IAEjC;;;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CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAA"}
|
|
@@ -120,7 +120,7 @@ export declare abstract class PluginGeomUpdateCurveApi {
|
|
|
120
120
|
* | `fromStart` | `boolean` | Extend from the start end when `true`, otherwise from the end |
|
|
121
121
|
*/
|
|
122
122
|
export declare const PluginGeomUpdateCurveExtendArgs: z.ZodObject<{
|
|
123
|
-
curve: 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>>]>;
|
|
123
|
+
curve: 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>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>;
|
|
124
124
|
distance: z.ZodNumber;
|
|
125
125
|
fromStart: z.ZodBoolean;
|
|
126
126
|
}, z.core.$strip>;
|
|
@@ -134,7 +134,7 @@ export type PluginGeomUpdateCurveExtendArgs = z.infer<typeof PluginGeomUpdateCur
|
|
|
134
134
|
* | `point` | {@linkcode Vec3Handle} | Point on the curve to split at |
|
|
135
135
|
*/
|
|
136
136
|
export declare const PluginGeomUpdateCurveSplitArgs: z.ZodObject<{
|
|
137
|
-
curve: 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>>]>;
|
|
137
|
+
curve: 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>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>;
|
|
138
138
|
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
139
139
|
}, z.core.$strip>;
|
|
140
140
|
export type PluginGeomUpdateCurveSplitArgs = z.infer<typeof PluginGeomUpdateCurveSplitArgs>;
|
|
@@ -148,7 +148,7 @@ export type PluginGeomUpdateCurveSplitArgs = z.infer<typeof PluginGeomUpdateCurv
|
|
|
148
148
|
* | `endParam` | `number` | End parameter of the portion to keep |
|
|
149
149
|
*/
|
|
150
150
|
export declare const PluginGeomUpdateCurveTrimArgs: z.ZodObject<{
|
|
151
|
-
curve: 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>>]>;
|
|
151
|
+
curve: 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>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>;
|
|
152
152
|
startParam: z.ZodNumber;
|
|
153
153
|
endParam: z.ZodNumber;
|
|
154
154
|
}, z.core.$strip>;
|
|
@@ -162,7 +162,7 @@ export type PluginGeomUpdateCurveTrimArgs = z.infer<typeof PluginGeomUpdateCurve
|
|
|
162
162
|
* | `vector` | {@linkcode Vec3Handle} | Translation vector to offset the curve by |
|
|
163
163
|
*/
|
|
164
164
|
export declare const PluginGeomUpdateCurveOffsetArgs: z.ZodObject<{
|
|
165
|
-
curve: 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>>]>;
|
|
165
|
+
curve: 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>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>;
|
|
166
166
|
vector: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
167
167
|
}, z.core.$strip>;
|
|
168
168
|
export type PluginGeomUpdateCurveOffsetArgs = z.infer<typeof PluginGeomUpdateCurveOffsetArgs>;
|
|
@@ -174,7 +174,7 @@ export type PluginGeomUpdateCurveOffsetArgs = z.infer<typeof PluginGeomUpdateCur
|
|
|
174
174
|
* | `curve` | {@linkcode CurveHandle} | The curve to reverse |
|
|
175
175
|
*/
|
|
176
176
|
export declare const PluginGeomUpdateCurveReverseArgs: z.ZodObject<{
|
|
177
|
-
curve: 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>>]>;
|
|
177
|
+
curve: 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>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>;
|
|
178
178
|
}, z.core.$strip>;
|
|
179
179
|
export type PluginGeomUpdateCurveReverseArgs = z.infer<typeof PluginGeomUpdateCurveReverseArgs>;
|
|
180
180
|
//# sourceMappingURL=curve.d.ts.map
|
|
@@ -21,6 +21,8 @@ export declare abstract class PluginGeomUpdateProfileApi {
|
|
|
21
21
|
* @param profile The closed profile to offset
|
|
22
22
|
* @param distance Signed offset distance (outward when positive, inward when negative)
|
|
23
23
|
* @returns The offset profile as a NEW {@linkcode ProfileHandle}
|
|
24
|
+
* @throws PRECONDITION_FAILED if the profile has a spline run (splines cannot
|
|
25
|
+
* be offset yet)
|
|
24
26
|
*
|
|
25
27
|
* @examplePrompt Offset this outline 300mm inward
|
|
26
28
|
* @examplePrompt Inset this boundary by a foot all around
|
|
@@ -281,7 +283,7 @@ export type PluginGeomUpdateProfileMirrorArgs = z.infer<typeof PluginGeomUpdateP
|
|
|
281
283
|
*/
|
|
282
284
|
export declare const PluginGeomUpdateProfileAddArgs: z.ZodObject<{
|
|
283
285
|
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
|
|
284
|
-
curve: 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>>]>;
|
|
286
|
+
curve: 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>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"spline">, string>>]>;
|
|
285
287
|
position: z.ZodOptional<z.ZodEnum<{
|
|
286
288
|
start: "start";
|
|
287
289
|
end: "end";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/update/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,EACf,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;GAUG;AACH,8BAAsB,0BAA0B;;IAG9C
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/update/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,EACf,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;GAUG;AACH,8BAAsB,0BAA0B;;IAG9C;;;;;;;;;;;;;;;;;;;OAmBG;aACa,MAAM,CACpB,OAAO,EAAE,aAAa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EF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA"}
|
|
@@ -2,7 +2,7 @@ import * as z from "zod";
|
|
|
2
2
|
import { PluginApiReturn } from "../../../types";
|
|
3
3
|
import type { AnyArenaHandle } from "../../../handles";
|
|
4
4
|
/**
|
|
5
|
-
* The
|
|
5
|
+
* The 13 registry-arena handle kinds — the releasable families. Entity-style
|
|
6
6
|
* handles (component / material / underlay / terrain / importJob / comment) are
|
|
7
7
|
* raw engine ids with no arena entry and therefore no lifecycle: passing one to
|
|
8
8
|
* `release` is a silent no-op like any other unknown id.
|
|
@@ -12,6 +12,7 @@ export declare const ArenaKind: z.ZodEnum<{
|
|
|
12
12
|
quat: "quat";
|
|
13
13
|
line: "line";
|
|
14
14
|
arc: "arc";
|
|
15
|
+
spline: "spline";
|
|
15
16
|
circle: "circle";
|
|
16
17
|
profile: "profile";
|
|
17
18
|
contour: "contour";
|
|
@@ -162,6 +163,7 @@ export declare const PluginHandlesReleaseAllArgs: z.ZodObject<{
|
|
|
162
163
|
quat: "quat";
|
|
163
164
|
line: "line";
|
|
164
165
|
arc: "arc";
|
|
166
|
+
spline: "spline";
|
|
165
167
|
circle: "circle";
|
|
166
168
|
profile: "profile";
|
|
167
169
|
contour: "contour";
|
|
@@ -192,7 +194,7 @@ export type PluginHandlesEndScopeArgs = z.infer<typeof PluginHandlesEndScopeArgs
|
|
|
192
194
|
* | Property | Type | Description |
|
|
193
195
|
* |---|---|---|
|
|
194
196
|
* | `resources` | `number` | Live resource-arena entries (profile/contour) |
|
|
195
|
-
* | `values` | `number` | Live value-arena entries (vec3/quat/line/arc/circle) |
|
|
197
|
+
* | `values` | `number` | Live value-arena entries (vec3/quat/line/arc/spline/circle) |
|
|
196
198
|
* | `topology` | `number` | Live topology-arena entries (brep/face/edge/halfedge/vertex) |
|
|
197
199
|
* | `scopes` | `number` | Currently open handle scopes |
|
|
198
200
|
* | `hostHeapUsedBytes` | `number \| null` | Host page `usedJSHeapSize` (null where unsupported) |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/handles/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGtD;;;;;GAKG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/handles/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGtD;;;;;GAKG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;EAcpB,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA;AAEjD,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,QAAS,CAAA;AAEvC;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAA;AAE/B;;;;;;;;;;;GAWG;AACH,8BAAsB,oBAAoB;;IAGxC;;;;;;;;;;;;;;OAcG;aACa,OAAO,CAAC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC;IAEtF;;;;;;;;;;;;;;OAcG;aACa,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC;IAEnE;;;;;;;;;;;;;;;;;;;;;OAqBG;aACa,UAAU,IAAI,eAAe,CAAC,UAAU,CAAC;IAEzD;;;;;;;;;;;;;;;;;;;OAmBG;aACa,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,MAAM,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,GACrC,eAAe,CAAC,IAAI,CAAC;IAExB;;;;;;;;;;;;;;OAcG;aACa,KAAK,IAAI,eAAe,CAAC,wBAAwB,CAAC;CACnE;AAoBD;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;iBAEnC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;iBAEtC,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB;;;iBAGpC,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB;;;;;;;iBAOnC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
|
@@ -76,7 +76,7 @@ export type PluginDesignCreateGridArgs = z.infer<typeof PluginDesignCreateGridAr
|
|
|
76
76
|
* | …style | {@linkcode PluginGridStyleOptions} | Optional line styling |
|
|
77
77
|
*/
|
|
78
78
|
export declare const PluginDesignCreateGridFromCurveArgs: z.ZodObject<{
|
|
79
|
-
curve: 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>>]>;
|
|
79
|
+
curve: 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>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"spline">, string>>]>;
|
|
80
80
|
tag: z.ZodOptional<z.ZodString>;
|
|
81
81
|
style: z.ZodOptional<z.ZodEnum<{
|
|
82
82
|
SOLID: "SOLID";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../types";
|
|
3
|
-
import { ComponentHandle } from "../../handles";
|
|
3
|
+
import { BrepHandle, ComponentHandle } from "../../handles";
|
|
4
4
|
/**
|
|
5
5
|
* `snaptrude.design.family.*` — author NATIVE parametric families from a JSON spec.
|
|
6
6
|
*
|
|
@@ -17,15 +17,21 @@ import { ComponentHandle } from "../../handles";
|
|
|
17
17
|
* getReference() read the spec DSL once — grammar, ops, expressions, example
|
|
18
18
|
* prepare({ bundle }) validate + compile + show a live ghost; nothing committed
|
|
19
19
|
* flex({ values }) re-run at new values; returns the geometry delta
|
|
20
|
-
* place()
|
|
21
|
-
*
|
|
20
|
+
* place({ position }) put it in the model — saves the family as the first instance drops
|
|
21
|
+
* place() save the family, then arm placement — the USER clicks to drop it
|
|
22
|
+
* create({ teamId }) share with a team; a save with nothing placed also drops one instance
|
|
22
23
|
* ```
|
|
23
24
|
*
|
|
25
|
+
* `place` saves the prepared family to the user's personal library, so it
|
|
26
|
+
* survives reload with no extra step; finish on `place`, not on `create`.
|
|
27
|
+
*
|
|
24
28
|
* ## Read getReference() first
|
|
25
29
|
*
|
|
26
30
|
* The spec DSL is a closed expression language with its own op set, coordinate
|
|
27
|
-
* convention (**+Y up, Snaptrude units** — the scene's own unit, 1 SU = 254 mm
|
|
28
|
-
*
|
|
31
|
+
* convention (**+Y up, Snaptrude units** — the scene's own unit, 1 SU = 254 mm,
|
|
32
|
+
* the same unit `core.units.getBabylonType()` names and every geometry API
|
|
33
|
+
* takes; literals inside spec expressions may carry a unit suffix such as
|
|
34
|
+
* `600mm` or `2ft`)
|
|
29
35
|
* and part-naming law. It is deliberately NOT duplicated in these types:
|
|
30
36
|
* {@linkcode PluginDesignFamilyApi.getReference} returns the whole reference,
|
|
31
37
|
* generated from a family that is actually registered in the host, so the
|
|
@@ -40,6 +46,18 @@ import { ComponentHandle } from "../../handles";
|
|
|
40
46
|
* leaves the previous good draft standing, so it costs nothing but the node you
|
|
41
47
|
* broke. Re-authoring from scratch throws away everything already correct.
|
|
42
48
|
*
|
|
49
|
+
* ## Curved parts are exact
|
|
50
|
+
*
|
|
51
|
+
* A part whose sketch has a curved edge — any `revolve`, or an `extrude` /
|
|
52
|
+
* `sweep` / `loft` with an arc or circle in its profile (or an arc in a sweep
|
|
53
|
+
* path) — is built by the exact geometry kernel, the same one behind curved
|
|
54
|
+
* masses. Straight-edged parts keep the fast mesh builder. `getParameters` on a
|
|
55
|
+
* placed component reports which built each part in `parts[].engine`, and a
|
|
56
|
+
* kernel part carries a `brep`: read it with `core.geom.query.brep.*` and
|
|
57
|
+
* `core.geom.query.face.getSurfaceKind` — the same face-kind check as for a
|
|
58
|
+
* curved mass. If the kernel is unavailable a part falls back to the mesh
|
|
59
|
+
* builder (`engine: "mesh"`) rather than failing the family.
|
|
60
|
+
*
|
|
43
61
|
* Accessed via `snaptrude.design.family`.
|
|
44
62
|
*/
|
|
45
63
|
export declare abstract class PluginDesignFamilyApi {
|
|
@@ -65,20 +83,25 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
65
83
|
abstract getReference(): PluginApiReturn<PluginFamilyReference>;
|
|
66
84
|
/**
|
|
67
85
|
* Validate, compile and preview a family spec. Nothing is committed to the
|
|
68
|
-
* model or the library — call {@linkcode PluginDesignFamilyApi.place}
|
|
69
|
-
*
|
|
86
|
+
* model or the library — call {@linkcode PluginDesignFamilyApi.place} to put
|
|
87
|
+
* it in the model, which also saves it.
|
|
70
88
|
*
|
|
71
89
|
* Safe to call repeatedly while iterating. On success, check `partCount` and
|
|
72
90
|
* `bbox` against what you intended before treating the family as correct — a
|
|
73
91
|
* facade that built 3 parts, or a 3 m screen reporting 40 m of height, is a
|
|
74
92
|
* visible bug the validator cannot catch.
|
|
75
93
|
*
|
|
94
|
+
* Lengths — the spec's bare numbers, `bbox`, the sheet's `length` values — are
|
|
95
|
+
* Snaptrude units: the same 254 mm unit as the kernel's internal (`"babylon"`)
|
|
96
|
+
* unit. A unit suffix (`600mm`) is legal only inside a spec expression.
|
|
97
|
+
*
|
|
76
98
|
* @param args The spec bundle, as `{ bundle }` or `{ spec }`
|
|
77
99
|
* @returns Build report, or `{ ok: false, errors }` with JSON-pointer paths
|
|
78
100
|
*
|
|
79
101
|
* @examplePrompt Make a louvre screen with adjustable blade count and tilt
|
|
80
102
|
* @examplePrompt Design a curtain wall panel family with 8 bays
|
|
81
103
|
* @examplePrompt Create a railing family I can adjust
|
|
104
|
+
* @examplePrompt Make a pendant lamp family with a domed shade I can resize
|
|
82
105
|
*
|
|
83
106
|
* # Example
|
|
84
107
|
* ```ts
|
|
@@ -136,6 +159,9 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
136
159
|
* Put a family into the model — either the prepared draft or any family from
|
|
137
160
|
* {@linkcode PluginDesignFamilyApi.list}.
|
|
138
161
|
*
|
|
162
|
+
* Placing the prepared draft saves it to the user's personal library first,
|
|
163
|
+
* so its instances survive reload.
|
|
164
|
+
*
|
|
139
165
|
* Two modes, chosen by whether you pass `position`:
|
|
140
166
|
*
|
|
141
167
|
* **With `position`** the component is created there and then, undoably. Use
|
|
@@ -181,6 +207,9 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
181
207
|
* label the user says, and a Revit-imported family carries parameters that
|
|
182
208
|
* do not drive geometry at all.
|
|
183
209
|
*
|
|
210
|
+
* `length` values are Snaptrude units: the same 254 mm unit as the kernel's
|
|
211
|
+
* internal (`"babylon"`) unit — convert with `core.units.convert` to report.
|
|
212
|
+
*
|
|
184
213
|
* @param args The component to read
|
|
185
214
|
* @returns Its definition, current values, and the parameter sheet
|
|
186
215
|
*
|
|
@@ -203,6 +232,11 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
203
232
|
* that does not is accepted and stored (it round-trips to Revit) but nothing
|
|
204
233
|
* visible happens — say so rather than claiming a change the user cannot see.
|
|
205
234
|
*
|
|
235
|
+
* `length` values are Snaptrude units: the same 254 mm unit as the kernel's
|
|
236
|
+
* internal (`"babylon"`) unit — convert the user's number with
|
|
237
|
+
* `core.units.convert` first; a bare `400` is 400 SU, not 400 mm. Kernel part
|
|
238
|
+
* breps read before the edit are stale: re-read `getParameters`.
|
|
239
|
+
*
|
|
206
240
|
* @param args The component and the values to change
|
|
207
241
|
* @returns The values now in effect
|
|
208
242
|
*
|
|
@@ -216,8 +250,11 @@ export declare abstract class PluginDesignFamilyApi {
|
|
|
216
250
|
*/
|
|
217
251
|
abstract setParameters(args: PluginDesignFamilySetParametersArgs): PluginApiReturn<PluginFamilyInstanceParameters>;
|
|
218
252
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
253
|
+
* Save the prepared bundle to the library — the user's personal library
|
|
254
|
+
* unless `teamId` is given. {@linkcode PluginDesignFamilyApi.place} already
|
|
255
|
+
* saves, so `create` is for sharing with a team. When nothing of the family is
|
|
256
|
+
* in the model yet, one instance is also dropped at the centre of the current
|
|
257
|
+
* view on the active storey (`placed: true`), so a save is never invisible.
|
|
221
258
|
*
|
|
222
259
|
* @param args Optional library name and team scope
|
|
223
260
|
* @returns The catalogued definition's id and version
|
|
@@ -285,7 +322,7 @@ export interface PluginFamilyParameter {
|
|
|
285
322
|
key: string;
|
|
286
323
|
label: string;
|
|
287
324
|
type: "length" | "integer" | "enum" | "text" | "boolean";
|
|
288
|
-
/** Current value. `length
|
|
325
|
+
/** Current value. `length` (Snaptrude units) and `integer` are numbers; the rest are strings. */
|
|
289
326
|
value: string | number;
|
|
290
327
|
default: string | number;
|
|
291
328
|
/**
|
|
@@ -309,6 +346,24 @@ export interface PluginFamilyDiagnostic {
|
|
|
309
346
|
message: string;
|
|
310
347
|
hint?: string;
|
|
311
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* One placed part and which engine built it, from `getParameters`. `"kernel"` —
|
|
351
|
+
* a curved sketch built exactly; `"mesh"` — straight-edged, or the kernel
|
|
352
|
+
* fallback.
|
|
353
|
+
*/
|
|
354
|
+
export interface PluginFamilyPart {
|
|
355
|
+
name: string;
|
|
356
|
+
engine: "kernel" | "mesh";
|
|
357
|
+
/**
|
|
358
|
+
* Kernel parts only: the part's exact solid, for `core.geom.query.brep.*` /
|
|
359
|
+
* `core.geom.query.face.getSurfaceKind`. READ-ONLY and PART-LOCAL — in the
|
|
360
|
+
* part's own frame, not where the component sits, so never pass it to a
|
|
361
|
+
* boolean or `design.create.massFromBrep` (a family changes only through
|
|
362
|
+
* `setParameters`). Valid until the next parameter change: re-read
|
|
363
|
+
* `getParameters` after `setParameters`.
|
|
364
|
+
*/
|
|
365
|
+
brep?: BrepHandle;
|
|
366
|
+
}
|
|
312
367
|
/** What `prepare` reports. */
|
|
313
368
|
export interface PluginFamilyPrepareResult {
|
|
314
369
|
/** `false` means the spec was rejected — read `errors`, fix, re-prepare. */
|
|
@@ -405,6 +460,8 @@ export interface PluginFamilyInstanceParameters {
|
|
|
405
460
|
values: Record<string, number | string>;
|
|
406
461
|
/** The sheet: what each key means, its bounds, and whether it moves geometry. */
|
|
407
462
|
parameters: PluginFamilyParameter[];
|
|
463
|
+
/** The placed parts; kernel parts carry their exact `brep`. */
|
|
464
|
+
parts?: PluginFamilyPart[];
|
|
408
465
|
/** Present when `getParameters` was asked for a `snapshot`. */
|
|
409
466
|
snapshot?: PluginFamilySnapshot;
|
|
410
467
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family.d.ts","sourceRoot":"","sources":["../../../src/api/design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CAAA;AAErF;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;iBAI9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC;;;iBAG9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA"}
|
|
@@ -13,8 +13,8 @@ import { ComponentHandle, BrepHandle, ContourHandle, CurveHandle } from "../../.
|
|
|
13
13
|
* {@linkcode PluginDesignQueryGeometryApi.getCenterline} mints a
|
|
14
14
|
* {@linkcode CurveHandle} for a wall's core curve.
|
|
15
15
|
* {@linkcode PluginDesignQueryGeometryApi.getTriangulatedMeshes} is the
|
|
16
|
-
* handle-free exception: it returns the triangulated render
|
|
17
|
-
* world-space arrays.
|
|
16
|
+
* handle-free exception: it returns `{ meshes }` — the triangulated render
|
|
17
|
+
* meshes as plain world-space arrays, wrapped in an object, never bare.
|
|
18
18
|
*
|
|
19
19
|
* Returned handles are session-ephemeral and go stale on undo/redo/re-topologize
|
|
20
20
|
* — re-fetch a fresh one after edits.
|
|
@@ -27,10 +27,26 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
27
27
|
* scene entity, as a reusable {@linkcode BrepHandle} for the
|
|
28
28
|
* `core.geom.query.brep.*` reads.
|
|
29
29
|
*
|
|
30
|
+
* **Frame.** By default the brep comes back in the component's own LOCAL frame
|
|
31
|
+
* (its vertices are relative to the mesh origin, exactly as stored). This is
|
|
32
|
+
* the long-standing default, and existing callers rely on it. Pass
|
|
33
|
+
* `{ frame: "world" }` to get the same solid placed where it sits in the
|
|
34
|
+
* scene (world coordinates, like
|
|
35
|
+
* `getBottomContour` / `getTriangulatedMeshes` and every `design.query.measure`
|
|
36
|
+
* read). Use `"world"` whenever the handle will be COMBINED with other scene
|
|
37
|
+
* geometry or committed back beside its source: booleans between two scene
|
|
38
|
+
* masses, `brepFromFillet` / `brepFromShell` / `brepFromOffset` /
|
|
39
|
+
* `brepFromChamfer` on a scene mass followed by `massFromBrep`, or comparing
|
|
40
|
+
* its vertices with a bounding box. A world-frame handle from a parametrically
|
|
41
|
+
* live mass also carries that mass's recipe, so an operation result keeps an
|
|
42
|
+
* editable record.
|
|
43
|
+
*
|
|
30
44
|
* @param component - The scene component to read
|
|
31
|
-
* @
|
|
45
|
+
* @param options - `frame`: `"local"` (default, mesh-local coordinates) or `"world"` (scene coordinates)
|
|
46
|
+
* @returns The brep as a {@linkcode BrepHandle}, or `null` if the component has no brep geometry — also `null` for a parametric family: read `design.family.getParameters({ component }).parts[].brep`
|
|
32
47
|
*
|
|
33
48
|
* @examplePrompt Get the 3D solid geometry of the selected wall
|
|
49
|
+
* @examplePrompt Round the top rim of this column and put it back where it is
|
|
34
50
|
* @examplePrompt How many faces does this mass have?
|
|
35
51
|
* @examplePrompt Inspect the mesh of this slab so I can look at its faces and edges
|
|
36
52
|
* @examplePrompt Read the vertices of the selected column's geometry
|
|
@@ -41,9 +57,14 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
41
57
|
* if (brep) {
|
|
42
58
|
* const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
|
|
43
59
|
* }
|
|
60
|
+
*
|
|
61
|
+
* // Operate on a scene mass and commit the result where the mass sits:
|
|
62
|
+
* const placed = await snaptrude.design.query.geometry.getBrep(mass, { frame: "world" })
|
|
63
|
+
* const rounded = await snaptrude.core.geom.create.brepFromFillet(placed, edges, 0.2)
|
|
64
|
+
* await snaptrude.design.create.massFromBrep(rounded, "Rounded")
|
|
44
65
|
* ```
|
|
45
66
|
*/
|
|
46
|
-
abstract getBrep(component: ComponentHandle): PluginApiReturn<BrepHandle | null>;
|
|
67
|
+
abstract getBrep(component: ComponentHandle, options?: PluginDesignQueryGeometryGetBrepOptions): PluginApiReturn<BrepHandle | null>;
|
|
47
68
|
/**
|
|
48
69
|
* Get the **bottom-face contour** of a component — the footprint outline (outer
|
|
49
70
|
* profile + holes) of its lowest horizontal face, as a reusable
|
|
@@ -110,7 +131,8 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
110
131
|
* Get the **triangulated render meshes** of scene components as plain,
|
|
111
132
|
* serializable arrays — flat world-space vertex `positions` (`[x0, y0, z0,
|
|
112
133
|
* x1, …]`) and triangle `indices` (three per triangle), one record per
|
|
113
|
-
* requested component.
|
|
134
|
+
* requested component. The result is `{ meshes }`, not a bare array —
|
|
135
|
+
* destructure it before iterating.
|
|
114
136
|
*
|
|
115
137
|
* Unlike the other `geometry.*` reads this does NOT mint kernel handles — the
|
|
116
138
|
* raw arrays cross the boundary directly, ready for export, custom analysis,
|
|
@@ -169,8 +191,14 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
169
191
|
* |---|---|---|
|
|
170
192
|
* | `component` | {@linkcode ComponentHandle} | The scene component to read |
|
|
171
193
|
*/
|
|
194
|
+
/** Options for {@linkcode PluginDesignQueryGeometryApi.getBrep}: `frame` defaults to `"local"`. */
|
|
195
|
+
export type PluginDesignQueryGeometryGetBrepOptions = {
|
|
196
|
+
frame?: "local" | "world";
|
|
197
|
+
};
|
|
198
|
+
export declare const PluginDesignQueryGeometryGetBrepOptions: z.ZodType<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions>;
|
|
172
199
|
export declare const PluginDesignQueryGeometryGetBrepArgs: z.ZodObject<{
|
|
173
200
|
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
201
|
+
options: z.ZodOptional<z.ZodType<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions, z.core.$ZodTypeInternals<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions>>>;
|
|
174
202
|
}, z.core.$strip>;
|
|
175
203
|
export type PluginDesignQueryGeometryGetBrepArgs = z.infer<typeof PluginDesignQueryGeometryGetBrepArgs>;
|
|
176
204
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/design/query/geometry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,4BAA4B;;IAGhD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/design/query/geometry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,4BAA4B;;IAGhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,OAAO,CACrB,SAAS,EAAE,eAAe,EAC1B,OAAO,CAAC,EAAE,uCAAuC,GAChD,eAAe,CAAC,UAAU,GAAG,IAAI,CAAC;IAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;aACa,gBAAgB,CAC9B,SAAS,EAAE,eAAe,GACzB,eAAe,CAAC,aAAa,GAAG,IAAI,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;aACa,aAAa,CAC3B,SAAS,EAAE,eAAe,GACzB,eAAe,CAAC,WAAW,GAAG,IAAI,CAAC;IAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsDG;aACa,qBAAqB,CACnC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