@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.
- package/CHANGELOG.md +0 -23
- package/api-manifest.json +151 -12
- package/dist/api/core/geom/create/index.d.ts +918 -93
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +50 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +58 -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/curve.d.ts +5 -5
- package/dist/api/core/geom/update/profile.d.ts +1 -1
- package/dist/api/design/create/index.d.ts +6 -29
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +2 -20
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +27 -1
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +47 -2
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -66
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +87 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +2 -2
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +5 -7
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/api/presentation/placedViews.d.ts +1 -35
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/sheets.d.ts +2 -20
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/program/site.d.ts +4 -4
- package/dist/api/program/spreadsheet.d.ts +4 -4
- package/dist/errors/codes.d.ts +3 -8
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/handles.d.ts +12 -3
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +3188 -2769
- 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 +3141 -2764
- package/dist/index.js.map +1 -1
- package/dist/massParameters.d.ts +280 -0
- package/dist/massParameters.d.ts.map +1 -0
- package/dist/massParameters.ops.d.ts +135 -0
- package/dist/massParameters.ops.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/api/core/geom/create/index.ts +1011 -94
- package/src/api/core/geom/query/brep.ts +51 -0
- package/src/api/core/geom/query/curve.ts +25 -2
- package/src/api/core/geom/query/edge.ts +2 -2
- package/src/api/core/geom/query/face.ts +109 -4
- package/src/api/design/create/index.ts +8 -34
- package/src/api/design/delete/index.ts +1 -20
- package/src/api/design/query/geometry/index.ts +29 -0
- package/src/api/design/query/index.ts +50 -2
- package/src/api/design/query/spaces.ts +0 -68
- package/src/api/design/update/index.ts +94 -0
- package/src/api/entity/space.ts +0 -2
- package/src/api/presentation/placedViews.ts +1 -29
- package/src/api/presentation/sheets.ts +3 -19
- package/src/errors/codes.ts +2 -30
- package/src/handles.ts +15 -3
- package/src/index.ts +2 -0
- package/src/massParameters.ops.ts +243 -0
- package/src/massParameters.ts +418 -0
- package/test/errors.test.mjs +0 -4
- package/test/massParameters.test.mjs +936 -0
- package/snaptrude-plugin-core-0.11.0.tgz +0 -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,eAA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AM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;;GAOG;AACH,eAAO,MAAM,gDAAgD;;;iBAG3D,CAAA;AACF,MAAM,MAAM,gDAAgD,GAAG,CAAC,CAAC,KAAK,CACpE,OAAO,gDAAgD,CACxD,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,0CAA0C;;;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"}
|
|
@@ -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.
|
|
123
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
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.
|
|
137
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
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.
|
|
151
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
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.
|
|
165
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
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.
|
|
177
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
178
178
|
}, z.core.$strip>;
|
|
179
179
|
export type PluginGeomUpdateCurveReverseArgs = z.infer<typeof PluginGeomUpdateCurveReverseArgs>;
|
|
180
180
|
//# sourceMappingURL=curve.d.ts.map
|
|
@@ -281,7 +281,7 @@ export type PluginGeomUpdateProfileMirrorArgs = z.infer<typeof PluginGeomUpdateP
|
|
|
281
281
|
*/
|
|
282
282
|
export declare const PluginGeomUpdateProfileAddArgs: z.ZodObject<{
|
|
283
283
|
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
|
|
284
|
-
curve: z.
|
|
284
|
+
curve: z.ZodType<CurveHandle, unknown, z.core.$ZodTypeInternals<CurveHandle, unknown>>;
|
|
285
285
|
position: z.ZodOptional<z.ZodEnum<{
|
|
286
286
|
start: "start";
|
|
287
287
|
end: "end";
|
|
@@ -173,26 +173,11 @@ export declare abstract class PluginDesignCreateApi {
|
|
|
173
173
|
* Create a **floor** by extruding a footprint contour by `thickness`
|
|
174
174
|
* (extruded upward).
|
|
175
175
|
*
|
|
176
|
-
* The parametric engine owns floor topology and may resolve the request
|
|
177
|
-
* differently than asked: drawing against existing floors can **split** the
|
|
178
|
-
* footprint into several floors, or **merge** it into a pre-existing
|
|
179
|
-
* neighbour (that floor's region grows; nothing new is created). The call
|
|
180
|
-
* honors the engine's resolution and returns **every floor that covers the
|
|
181
|
-
* requested footprint after the operation** — the newly created floor(s),
|
|
182
|
-
* and/or the pre-existing floor that absorbed it. The array is never empty
|
|
183
|
-
* on success; a lone independently-created floor comes back as `[floor]`.
|
|
184
|
-
*
|
|
185
|
-
* **Breaking change in 0.11.0** — previously returned a single
|
|
186
|
-
* {@linkcode ComponentHandle}; callers must switch to the array (the first
|
|
187
|
-
* element preserves the old single-floor behavior for simple creates).
|
|
188
|
-
*
|
|
189
176
|
* @param contour - Footprint (outer + holes)
|
|
190
177
|
* @param thickness - Floor thickness (> 0)
|
|
191
178
|
* @param position - Offset from origin
|
|
192
|
-
* @returns the {@linkcode ComponentHandle}
|
|
193
|
-
*
|
|
194
|
-
* @throws if the contour is invalid, the thickness is not positive, or the
|
|
195
|
-
* engine rejected the operation (nothing covers the footprint)
|
|
179
|
+
* @returns the {@linkcode ComponentHandle} of the created floor
|
|
180
|
+
* @throws if the contour is invalid or the thickness is not positive
|
|
196
181
|
*
|
|
197
182
|
* @examplePrompt Create a floor from this room outline
|
|
198
183
|
* @examplePrompt Add a 100mm thick floor over the footprint
|
|
@@ -203,10 +188,10 @@ export declare abstract class PluginDesignCreateApi {
|
|
|
203
188
|
* ```ts
|
|
204
189
|
* const rect = await snaptrude.core.geom.create.profileRect(5, 4)
|
|
205
190
|
* const contour = await snaptrude.core.geom.create.contourFromProfile(rect)
|
|
206
|
-
* const
|
|
191
|
+
* const floor = await snaptrude.design.create.floor(contour, 0.1)
|
|
207
192
|
* ```
|
|
208
193
|
*/
|
|
209
|
-
abstract floor(contour: ContourHandle, thickness: number, position?: Vec3Handle): PluginApiReturn<ComponentHandle
|
|
194
|
+
abstract floor(contour: ContourHandle, thickness: number, position?: Vec3Handle): PluginApiReturn<ComponentHandle>;
|
|
210
195
|
/**
|
|
211
196
|
* Create a **roof** by extruding a footprint contour by `thickness`. Created
|
|
212
197
|
* flat (extruded downward); pitch/slope is a separate post-creation edit.
|
|
@@ -341,13 +326,7 @@ export declare abstract class PluginDesignCreateApi {
|
|
|
341
326
|
* single undo entry. The storey must already exist
|
|
342
327
|
* (`core.storeys.create` first). Default: geometry-derived — a profile
|
|
343
328
|
* drawn at y = 0 lands on storey 1; the ACTIVE storey is NOT consulted.
|
|
344
|
-
* @returns
|
|
345
|
-
* parametric engine owns wall topology — curves touching existing walls
|
|
346
|
-
* may merge into or split against them, so the returned count can differ
|
|
347
|
-
* from the input curve count. Profile-ordered 1:1 matches come first,
|
|
348
|
-
* then the remaining merged/split products in creation order. Re-query
|
|
349
|
-
* (e.g. `design.query.spaces.listGeneratedBim`) rather than assuming a
|
|
350
|
-
* wall per input curve.
|
|
329
|
+
* @returns a {@linkcode ComponentHandle}`[]` (one per wall), in profile order
|
|
351
330
|
* @throws if the profile is empty, `wallType` names no wall type in the
|
|
352
331
|
* project, `storey` does not exist, or wall creation fails
|
|
353
332
|
*
|
|
@@ -467,9 +446,7 @@ export declare abstract class PluginDesignCreateApi {
|
|
|
467
446
|
* the item's height yourself.
|
|
468
447
|
* @param options - Optional placement options: `label` — instance name
|
|
469
448
|
* (default auto `${name}Ins${n}`); `createNewSourceMesh` — emit a
|
|
470
|
-
* source-mesh creation command (default `true`)
|
|
471
|
-
* grounded: the placed instance's bounding-box bottom rests at it (the
|
|
472
|
-
* surface-flush grounding described above)
|
|
449
|
+
* source-mesh creation command (default `true`)
|
|
473
450
|
* @param angleInDegrees - Optional signed rotation about the vertical axis, in
|
|
474
451
|
* degrees (same convention as {@linkcode PluginDesignTransformApi.rotate}).
|
|
475
452
|
* Applied at creation time so it is part of the placement's single undo entry.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/create/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;A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,EACzB,QAAQ,CAAC,EAAE,cAAc,GACxB,eAAe,CAAC,eAAe,CAAC;IAEnC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/create/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EACL,UAAU,EACV,eAAe,EACf,aAAa,EACb,aAAa,EACb,UAAU,EACX,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,eAAe,EACf,cAAc,EACd,kBAAkB,EACnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,oCAAoC,EACpC,kCAAkC,EAClC,kCAAkC,EAClC,mCAAmC,EACpC,MAAM,gCAAgC,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkDG;aACa,KAAK,CACnB,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,UAAU,EACrB,SAAS,CAAC,EAAE,eAAe,EAC3B,QAAQ,CAAC,EAAE,cAAc,EACzB,YAAY,CAAC,EAAE,kBAAkB,EACjC,MAAM,CAAC,EAAE,MAAM,GACd,eAAe,CAAC,eAAe,CAAC;IAEnC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;aACa,IAAI,CAClB,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,UAAU,EACrB,QAAQ,CAAC,EAAE,cAAc,GACxB,eAAe,CAAC,eAAe,CAAC;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;aACa,YAAY,CAC1B,IAAI,EAAE,UAAU,EACh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AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAShC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../types";
|
|
3
3
|
import { ComponentHandle } from "../../../handles";
|
|
4
|
+
import { PluginDesignChangeResult } from "../lock";
|
|
4
5
|
/**
|
|
5
6
|
* Arguments for {@linkcode PluginDesignDeleteApi.entities}.
|
|
6
7
|
*
|
|
@@ -17,22 +18,6 @@ export declare const PluginDesignDeleteEntitiesArgs: z.ZodObject<{
|
|
|
17
18
|
components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
18
19
|
}, z.core.$strip>;
|
|
19
20
|
export type PluginDesignDeleteEntitiesArgs = z.infer<typeof PluginDesignDeleteEntitiesArgs>;
|
|
20
|
-
/**
|
|
21
|
-
* Result of {@linkcode PluginDesignDeleteApi.entities} — the shared
|
|
22
|
-
* change-result shape plus the delete cascade. Deliberately a delete-specific
|
|
23
|
-
* extension of {@linkcode PluginDesignChangeResult} (which other change
|
|
24
|
-
* mutations keep unchanged).
|
|
25
|
-
*
|
|
26
|
-
* | Property | Type | Description |
|
|
27
|
-
* |---|---|---|
|
|
28
|
-
* | `affected` | {@linkcode ComponentHandle}`[]` | The entities that were deleted (the resolved input set) |
|
|
29
|
-
* | `cascaded` | {@linkcode ComponentHandle}`[]`? | Components PG2 removed as a consequence — derived walls/floors/slabs of deleted spaces; returned so callers can invalidate cached handles |
|
|
30
|
-
*/
|
|
31
|
-
export declare const PluginDesignDeleteResult: z.ZodObject<{
|
|
32
|
-
affected: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
33
|
-
cascaded: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
export type PluginDesignDeleteResult = z.infer<typeof PluginDesignDeleteResult>;
|
|
36
21
|
/**
|
|
37
22
|
* `snaptrude.design.delete.*` — **hard removal** of scene BIM entities.
|
|
38
23
|
*
|
|
@@ -55,9 +40,6 @@ export declare abstract class PluginDesignDeleteApi {
|
|
|
55
40
|
* @returns The entities that were deleted, as {@linkcode ComponentHandle}`[]`
|
|
56
41
|
* (echoed host-side from the resolved+deleted set — the engine returns no ids).
|
|
57
42
|
* Deleted handles are **stale** afterwards: re-resolving one throws `HANDLE_INVALID`.
|
|
58
|
-
* When the parametric engine removes further components as a consequence
|
|
59
|
-
* (derived walls/floors/slabs of deleted spaces), those are reported in the
|
|
60
|
-
* optional `cascaded` array — invalidate any cached handles to them too.
|
|
61
43
|
* @throws If any supplied handle is unknown/forged (`HANDLE_INVALID`) — the whole
|
|
62
44
|
* call rejects before anything is deleted (all-or-nothing resolution).
|
|
63
45
|
*
|
|
@@ -79,6 +61,6 @@ export declare abstract class PluginDesignDeleteApi {
|
|
|
79
61
|
* }
|
|
80
62
|
* ```
|
|
81
63
|
*/
|
|
82
|
-
abstract entities(components: ComponentHandle[]): PluginApiReturn<
|
|
64
|
+
abstract entities(components: ComponentHandle[]): PluginApiReturn<PluginDesignChangeResult>;
|
|
83
65
|
}
|
|
84
66
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/delete/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/delete/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAE3F;;;;;;;;;GASG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;aACa,QAAQ,CACtB,UAAU,EAAE,eAAe,EAAE,GAC5B,eAAe,CAAC,wBAAwB,CAAC;CAC7C"}
|
|
@@ -27,10 +27,25 @@ 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) — the
|
|
32
|
+
* behaviour every 0.9.x caller relies on. Pass `{ frame: "world" }` to get the
|
|
33
|
+
* same solid placed where it sits in the scene (world coordinates, like
|
|
34
|
+
* `getBottomContour` / `getTriangulatedMeshes` and every `design.query.measure`
|
|
35
|
+
* read). Use `"world"` whenever the handle will be COMBINED with other scene
|
|
36
|
+
* geometry or committed back beside its source: booleans between two scene
|
|
37
|
+
* masses, `brepFromFillet` / `brepFromShell` / `brepFromOffset` /
|
|
38
|
+
* `brepFromChamfer` on a scene mass followed by `massFromBrep`, or comparing
|
|
39
|
+
* its vertices with a bounding box. A world-frame handle from a parametrically
|
|
40
|
+
* live mass also carries that mass's recipe, so an operation result keeps an
|
|
41
|
+
* editable record.
|
|
42
|
+
*
|
|
30
43
|
* @param component - The scene component to read
|
|
44
|
+
* @param options - `frame`: `"local"` (default, mesh-local coordinates) or `"world"` (scene coordinates)
|
|
31
45
|
* @returns The brep as a {@linkcode BrepHandle}, or `null` if the component has no brep geometry
|
|
32
46
|
*
|
|
33
47
|
* @examplePrompt Get the 3D solid geometry of the selected wall
|
|
48
|
+
* @examplePrompt Round the top rim of this column and put it back where it is
|
|
34
49
|
* @examplePrompt How many faces does this mass have?
|
|
35
50
|
* @examplePrompt Inspect the mesh of this slab so I can look at its faces and edges
|
|
36
51
|
* @examplePrompt Read the vertices of the selected column's geometry
|
|
@@ -41,9 +56,14 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
41
56
|
* if (brep) {
|
|
42
57
|
* const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
|
|
43
58
|
* }
|
|
59
|
+
*
|
|
60
|
+
* // Operate on a scene mass and commit the result where the mass sits:
|
|
61
|
+
* const placed = await snaptrude.design.query.geometry.getBrep(mass, { frame: "world" })
|
|
62
|
+
* const rounded = await snaptrude.core.geom.create.brepFromFillet(placed, edges, 0.2)
|
|
63
|
+
* await snaptrude.design.create.massFromBrep(rounded, "Rounded")
|
|
44
64
|
* ```
|
|
45
65
|
*/
|
|
46
|
-
abstract getBrep(component: ComponentHandle): PluginApiReturn<BrepHandle | null>;
|
|
66
|
+
abstract getBrep(component: ComponentHandle, options?: PluginDesignQueryGeometryGetBrepOptions): PluginApiReturn<BrepHandle | null>;
|
|
47
67
|
/**
|
|
48
68
|
* Get the **bottom-face contour** of a component — the footprint outline (outer
|
|
49
69
|
* profile + holes) of its lowest horizontal face, as a reusable
|
|
@@ -169,8 +189,14 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
169
189
|
* |---|---|---|
|
|
170
190
|
* | `component` | {@linkcode ComponentHandle} | The scene component to read |
|
|
171
191
|
*/
|
|
192
|
+
/** Options for {@linkcode PluginDesignQueryGeometryApi.getBrep}: `frame` defaults to `"local"`. */
|
|
193
|
+
export type PluginDesignQueryGeometryGetBrepOptions = {
|
|
194
|
+
frame?: "local" | "world";
|
|
195
|
+
};
|
|
196
|
+
export declare const PluginDesignQueryGeometryGetBrepOptions: z.ZodType<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions>;
|
|
172
197
|
export declare const PluginDesignQueryGeometryGetBrepArgs: z.ZodObject<{
|
|
173
198
|
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
199
|
+
options: z.ZodOptional<z.ZodType<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions, z.core.$ZodTypeInternals<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions>>>;
|
|
174
200
|
}, z.core.$strip>;
|
|
175
201
|
export type PluginDesignQueryGeometryGetBrepArgs = z.infer<typeof PluginDesignQueryGeometryGetBrepArgs>;
|
|
176
202
|
/**
|
|
@@ -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,8BA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AC,KAAK,CAC9D,OAAO,0CAA0C,CAClD,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;;;;iBAMjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,kDAAkD;;;;;;iBAQ7D,CAAA;AAEF,MAAM,MAAM,kDAAkD,GAAG,CAAC,CAAC,KAAK,CACtE,OAAO,kDAAkD,CAC1D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oDAAoD;;;;;;;;iBAE/D,CAAA;AAEF,MAAM,MAAM,oDAAoD,GAAG,CAAC,CAAC,KAAK,CACxE,OAAO,oDAAoD,CAC5D,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../types";
|
|
3
3
|
import { ComponentHandle, BBoxComponents } from "../../../handles";
|
|
4
|
+
import type { MassParametersRecord } from "../../../massParameters";
|
|
4
5
|
import { PluginDesignQueryGeometryApi } from "./geometry";
|
|
5
6
|
import { PluginDesignQuerySpacesApi } from "./spaces";
|
|
6
7
|
import { PluginDesignQueryReferenceLinesApi } from "./referenceLines";
|
|
@@ -290,7 +291,6 @@ export type PluginDesignQueryComponentsArgs = z.infer<typeof PluginDesignQueryCo
|
|
|
290
291
|
* | `isLocked` | `boolean` | Lock flag |
|
|
291
292
|
* | `isHidden` | `boolean` | User-hidden flag |
|
|
292
293
|
* | `isSelected` | `boolean` | Current selection state |
|
|
293
|
-
* | `isVisible` | `boolean` | Whether the entity currently has a visible representation on canvas (user hide flag AND LOD/mode gating both considered); read-only |
|
|
294
294
|
* | `boundingBox` | {@linkcode BBoxComponents} | World-space AABB |
|
|
295
295
|
* | `adjacency` | `{ spaceId: string; value: number }[]` | Adjacency relationships (spaces/masses only). `value`: `2` = Direct (required), `1` = Indirect or physical contact, `-1` = Restricted; `0` entries are filtered out. `[]` when adjacency has never been computed — see `program.adjacency.compute`. |
|
|
296
296
|
*/
|
|
@@ -343,7 +343,6 @@ export declare const PluginEntityProperties: z.ZodObject<{
|
|
|
343
343
|
isLocked: z.ZodOptional<z.ZodBoolean>;
|
|
344
344
|
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
345
345
|
isSelected: z.ZodOptional<z.ZodBoolean>;
|
|
346
|
-
isVisible: z.ZodOptional<z.ZodBoolean>;
|
|
347
346
|
boundingBox: z.ZodOptional<z.ZodObject<{
|
|
348
347
|
min: z.ZodObject<{
|
|
349
348
|
x: z.ZodNumber;
|
|
@@ -1129,6 +1128,52 @@ export declare abstract class PluginDesignQueryApi {
|
|
|
1129
1128
|
* ```
|
|
1130
1129
|
*/
|
|
1131
1130
|
abstract getStaircaseParams(staircase: ComponentHandle): PluginApiReturn<PluginStaircaseParams | null>;
|
|
1131
|
+
/**
|
|
1132
|
+
* Read a mass's creation-parameter record — the recipe it was built from
|
|
1133
|
+
* (`kind` plus the values that constructor was called with). Present on
|
|
1134
|
+
* masses committed from a `core.geom.create` brep constructor that carries a
|
|
1135
|
+
* recipe: {@linkcode MassParametersRecord} covers the four primitives
|
|
1136
|
+
* (sphere, cylinder, cone, torus), extrusions, revolutions, lofts and sweeps.
|
|
1137
|
+
*
|
|
1138
|
+
* A fillet, chamfer, shell or offset of a recorded solid keeps the record
|
|
1139
|
+
* too: `kind` stays the base constructor and the operation is appended to the
|
|
1140
|
+
* record's `operations` list. Edit any of it with `design.update.parameters`.
|
|
1141
|
+
*
|
|
1142
|
+
* `null` for everything else — drawn masses, imported geometry, booleans,
|
|
1143
|
+
* split parts, `brepFromFaces` / `brepFromMesh`, and results built on a
|
|
1144
|
+
* source that carried no record — and for a mass whose record no longer
|
|
1145
|
+
* matches what is on
|
|
1146
|
+
* screen (a later free-form edit dropped the recipe, or the mass carries a
|
|
1147
|
+
* baked scale). `null` too when the recipe was not recordable: the record
|
|
1148
|
+
* schema has its own caps (a sweep path of at most 512 points, a loft of at
|
|
1149
|
+
* most 32 sections, at most 8 chained `operations`, at most 256 curves in one
|
|
1150
|
+
* profile loop and 64 holes in one contour), and a mass built past one of
|
|
1151
|
+
* them — through a route that does not enforce the matching creator cap —
|
|
1152
|
+
* commits as ordinary geometry carrying no record. The `operations` cap is
|
|
1153
|
+
* the one an agent can walk into by accident: a 9th chained
|
|
1154
|
+
* fillet/chamfer/shell/offset drops the record silently, so the result
|
|
1155
|
+
* commits as ordinary geometry and reads back `null` here. A record is never
|
|
1156
|
+
* reported unless it is still the truth.
|
|
1157
|
+
*
|
|
1158
|
+
* Points and axes come back in **world** coordinates. Pure read — nothing is
|
|
1159
|
+
* created or modified.
|
|
1160
|
+
*
|
|
1161
|
+
* @param component - the mass's {@linkcode ComponentHandle}
|
|
1162
|
+
* @returns the {@linkcode MassParametersRecord}, or `null`
|
|
1163
|
+
*
|
|
1164
|
+
* @examplePrompt What radius is this sphere?
|
|
1165
|
+
* @examplePrompt Is this mass parametric?
|
|
1166
|
+
* @examplePrompt Read back the dome's creation parameters
|
|
1167
|
+
* @examplePrompt How tall was this cylinder made?
|
|
1168
|
+
*
|
|
1169
|
+
* # Example
|
|
1170
|
+
* ```ts
|
|
1171
|
+
* const [mass] = await snaptrude.design.query.listMasses({ isSelected: true })
|
|
1172
|
+
* const params = await snaptrude.design.query.getParameters(mass)
|
|
1173
|
+
* if (params?.kind === "sphere") console.log("radius:", params.values.radius)
|
|
1174
|
+
* ```
|
|
1175
|
+
*/
|
|
1176
|
+
abstract getParameters(component: ComponentHandle): PluginApiReturn<MassParametersRecord | null>;
|
|
1132
1177
|
/**
|
|
1133
1178
|
* Get the **union** axis-aligned bounding box enclosing a set of entities.
|
|
1134
1179
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;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