@snaptrude/plugin-core 1.0.2-plainpoint-20261026.2 → 1.0.2
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/AGENTS.md +1 -0
- package/CHANGELOG.md +12 -0
- package/api-manifest.json +60 -0
- package/dist/api/core/camera/index.d.ts +4 -12
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/comment/index.d.ts +3 -7
- package/dist/api/core/comment/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +21 -69
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/circle.d.ts +11 -31
- package/dist/api/core/geom/query/circle.d.ts.map +1 -1
- package/dist/api/core/geom/query/contour.d.ts +7 -19
- package/dist/api/core/geom/query/contour.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +24 -72
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/profile.d.ts +7 -19
- package/dist/api/core/geom/query/profile.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +12 -36
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +5 -13
- package/dist/api/core/geom/update/curve.d.ts.map +1 -1
- package/dist/api/core/geom/update/profile.d.ts +12 -36
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +3 -7
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/math/quat.d.ts +2 -2
- package/dist/api/core/math/quat.d.ts.map +1 -1
- package/dist/api/core/math/vec3.d.ts +15 -15
- package/dist/api/core/math/vec3.d.ts.map +1 -1
- package/dist/api/design/boolean/index.d.ts +4 -20
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +4 -20
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +27 -67
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +7 -14
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +4 -12
- package/dist/api/design/dimensions.d.ts.map +1 -1
- package/dist/api/design/edit/index.d.ts +3 -7
- package/dist/api/design/edit/index.d.ts.map +1 -1
- package/dist/api/design/erase/index.d.ts +2 -10
- package/dist/api/design/erase/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +1 -5
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +5 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/lock.d.ts +0 -3
- package/dist/api/design/lock.d.ts.map +1 -1
- package/dist/api/design/text.d.ts +400 -0
- package/dist/api/design/text.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +8 -28
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +6 -30
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/presentation/drawings.d.ts +46 -1
- package/dist/api/presentation/drawings.d.ts.map +1 -1
- package/dist/api/presentation/graphics.d.ts +4 -0
- package/dist/api/presentation/graphics.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +29 -1
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/standards.d.ts +14 -0
- package/dist/api/presentation/standards.d.ts.map +1 -1
- package/dist/handles.d.ts +0 -8
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2281 -2188
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2269 -2187
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/api/core/camera/index.ts +5 -5
- package/src/api/core/comment/index.ts +3 -3
- package/src/api/core/geom/create/index.ts +25 -25
- package/src/api/core/geom/query/circle.ts +11 -11
- package/src/api/core/geom/query/contour.ts +6 -7
- package/src/api/core/geom/query/curve.ts +25 -25
- package/src/api/core/geom/query/profile.ts +6 -7
- package/src/api/core/geom/update/contour.ts +11 -12
- package/src/api/core/geom/update/curve.ts +5 -5
- package/src/api/core/geom/update/profile.ts +11 -12
- package/src/api/core/io/import/index.ts +2 -3
- package/src/api/core/math/quat.ts +2 -2
- package/src/api/core/math/vec3.ts +16 -16
- package/src/api/design/boolean/index.ts +2 -2
- package/src/api/design/create/bulk-items.ts +2 -3
- package/src/api/design/create/index.ts +26 -27
- package/src/api/design/delete/index.ts +7 -14
- package/src/api/design/dimensions.ts +4 -5
- package/src/api/design/edit/index.ts +3 -3
- package/src/api/design/erase/index.ts +2 -2
- package/src/api/design/family.ts +1 -2
- package/src/api/design/index.ts +5 -0
- package/src/api/design/lock.ts +0 -6
- package/src/api/design/text.ts +394 -0
- package/src/api/design/transform/index.ts +7 -15
- package/src/api/entity/space.ts +4 -5
- package/src/api/presentation/graphics.ts +4 -1
- package/src/api/presentation/placedViews.ts +12 -0
- package/src/api/presentation/standards.ts +6 -0
- package/src/handles.ts +0 -11
- package/test/designText.test.mjs +72 -0
- package/test/paperPensContract.test.mjs +39 -0
- package/test/handles.test.mjs +0 -36
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../../types";
|
|
3
|
-
import { ContourHandle, ProfileHandle,
|
|
3
|
+
import { ContourHandle, ProfileHandle, Vec3Handle, Vec3Components, BBoxComponents } from "../../../../handles";
|
|
4
4
|
/**
|
|
5
5
|
* Contour queries — read-only geometric questions about a contour (an outer
|
|
6
6
|
* {@linkcode ProfileHandle} plus zero or more inner profiles that act as holes)
|
|
@@ -144,7 +144,7 @@ export declare abstract class PluginGeomQueryContourApi {
|
|
|
144
144
|
* console.log(nearest.x, nearest.y, nearest.z) // 2 0 0
|
|
145
145
|
* ```
|
|
146
146
|
*/
|
|
147
|
-
abstract getNearestPoint(contour: ContourHandle, point:
|
|
147
|
+
abstract getNearestPoint(contour: ContourHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
148
148
|
/**
|
|
149
149
|
* Test whether a point lies inside a contour (inside the outer profile and
|
|
150
150
|
* outside every hole).
|
|
@@ -164,7 +164,7 @@ export declare abstract class PluginGeomQueryContourApi {
|
|
|
164
164
|
* const inside = await snaptrude.core.geom.query.contour.hasPoint(contour, point) // true — outside the hole
|
|
165
165
|
* ```
|
|
166
166
|
*/
|
|
167
|
-
abstract hasPoint(contour: ContourHandle, point:
|
|
167
|
+
abstract hasPoint(contour: ContourHandle, point: Vec3Handle): PluginApiReturn<boolean>;
|
|
168
168
|
/**
|
|
169
169
|
* Test whether a point lies on a contour's boundary (any of its curves).
|
|
170
170
|
* @param contour The contour to query
|
|
@@ -179,7 +179,7 @@ export declare abstract class PluginGeomQueryContourApi {
|
|
|
179
179
|
* const onEdge = await snaptrude.core.geom.query.contour.isOnBoundary(contour, point) // true
|
|
180
180
|
* ```
|
|
181
181
|
*/
|
|
182
|
-
abstract isOnBoundary(contour: ContourHandle, point:
|
|
182
|
+
abstract isOnBoundary(contour: ContourHandle, point: Vec3Handle): PluginApiReturn<boolean>;
|
|
183
183
|
/**
|
|
184
184
|
* Test whether a contour's outer profile is wound clockwise on the XZ plane.
|
|
185
185
|
* @param contour The contour to query
|
|
@@ -350,11 +350,7 @@ export type PluginGeomQueryContourGetNormalArgs = z.infer<typeof PluginGeomQuery
|
|
|
350
350
|
*/
|
|
351
351
|
export declare const PluginGeomQueryContourGetNearestPointArgs: z.ZodObject<{
|
|
352
352
|
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
353
|
-
point: z.
|
|
354
|
-
x: z.ZodNumber;
|
|
355
|
-
y: z.ZodNumber;
|
|
356
|
-
z: z.ZodNumber;
|
|
357
|
-
}, z.core.$strip>]>;
|
|
353
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
358
354
|
}, z.core.$strip>;
|
|
359
355
|
export type PluginGeomQueryContourGetNearestPointArgs = z.infer<typeof PluginGeomQueryContourGetNearestPointArgs>;
|
|
360
356
|
/**
|
|
@@ -367,11 +363,7 @@ export type PluginGeomQueryContourGetNearestPointArgs = z.infer<typeof PluginGeo
|
|
|
367
363
|
*/
|
|
368
364
|
export declare const PluginGeomQueryContourHasPointArgs: z.ZodObject<{
|
|
369
365
|
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
370
|
-
point: z.
|
|
371
|
-
x: z.ZodNumber;
|
|
372
|
-
y: z.ZodNumber;
|
|
373
|
-
z: z.ZodNumber;
|
|
374
|
-
}, z.core.$strip>]>;
|
|
366
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
375
367
|
}, z.core.$strip>;
|
|
376
368
|
export type PluginGeomQueryContourHasPointArgs = z.infer<typeof PluginGeomQueryContourHasPointArgs>;
|
|
377
369
|
/**
|
|
@@ -384,11 +376,7 @@ export type PluginGeomQueryContourHasPointArgs = z.infer<typeof PluginGeomQueryC
|
|
|
384
376
|
*/
|
|
385
377
|
export declare const PluginGeomQueryContourIsOnBoundaryArgs: z.ZodObject<{
|
|
386
378
|
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
387
|
-
point: z.
|
|
388
|
-
x: z.ZodNumber;
|
|
389
|
-
y: z.ZodNumber;
|
|
390
|
-
z: z.ZodNumber;
|
|
391
|
-
}, z.core.$strip>]>;
|
|
379
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
392
380
|
}, z.core.$strip>;
|
|
393
381
|
export type PluginGeomQueryContourIsOnBoundaryArgs = z.infer<typeof PluginGeomQueryContourIsOnBoundaryArgs>;
|
|
394
382
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contour.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/query/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,
|
|
1
|
+
{"version":3,"file":"contour.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/query/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,EACd,cAAc,EACf,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;GAaG;AACH,8BAAsB,yBAAyB;;IAG7C;;;;;;;;;;;;OAYG;aACa,eAAe,CAC7B,OAAO,EAAE,aAAa,GACrB,eAAe,CAAC,aAAa,GAAG,IAAI,CAAC;IAExC;;;;;;;;;;;;;OAaG;aACa,SAAS,CACvB,OAAO,EAAE,aAAa,GACrB,eAAe,CAAC,aAAa,EAAE,CAAC;IAEnC;;;;;;;;;;;;;;;OAeG;aACa,YAAY,CAC1B,OAAO,EAAE,aAAa,GACrB,eAAe,CAAC,MAAM,CAAC;IAE1B;;;;;;;;;;;;;;;;OAgBG;aACa,OAAO,CACrB,OAAO,EAAE,aAAa,GACrB,eAAe,CAAC,MAAM,CAAC;IAE1B;;;;;;;;;;;;;;OAcG;aACa,YAAY,CAC1B,OAAO,EAAE,aAAa,GACrB,eAAe,CAAC,MAAM,CAAC;IAE1B;;;;;;;;;;;;;;OAcG;aACa,cAAc,CAC5B,OAAO,EAAE,aAAa,GACrB,eAAe,CAAC,cAAc,C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,OAAO,sCAAsC,CAAC,CAAA;AAE3G;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC;;iBAEhD,CAAA;AAEF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAA;AAEzG;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC;;iBAE7C,CAAA;AAEF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEnG;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC;;iBAE5C,CAAA;AAEF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAEjG;;;;;;GAMG;AACH,eAAO,MAAM,4CAA4C;;iBAEvD,CAAA;AAEF,MAAM,MAAM,4CAA4C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4CAA4C,CAAC,CAAA;AAEvH;;;;;;GAMG;AACH,eAAO,MAAM,4CAA4C;;iBAEvD,CAAA;AAEF,MAAM,MAAM,4CAA4C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4CAA4C,CAAC,CAAA;AAEvH;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC;;;iBAG5C,CAAA;AAEF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../../types";
|
|
3
|
-
import {
|
|
3
|
+
import { Vec3Handle, CurveHandle, LineHandle, Vec3Components } from "../../../../handles";
|
|
4
4
|
/**
|
|
5
5
|
* Curve queries — read-only geometric questions about curves (lines, arcs and
|
|
6
6
|
* splines) and the relationships between two curves.
|
|
@@ -143,7 +143,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
143
143
|
* const tangent = await snaptrude.core.geom.query.curve.getTangent(line, a) // { x: 0.6, y: 0, z: 0.8 }
|
|
144
144
|
* ```
|
|
145
145
|
*/
|
|
146
|
-
abstract getTangent(curve: CurveHandle, point:
|
|
146
|
+
abstract getTangent(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
147
147
|
/**
|
|
148
148
|
* Get the unit normal vector of a curve at a point on it.
|
|
149
149
|
* @param curve The curve to query
|
|
@@ -158,7 +158,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
158
158
|
* const normal = await snaptrude.core.geom.query.curve.getNormal(line, a)
|
|
159
159
|
* ```
|
|
160
160
|
*/
|
|
161
|
-
abstract getNormal(curve: CurveHandle, point:
|
|
161
|
+
abstract getNormal(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
162
162
|
/**
|
|
163
163
|
* Get the point on a curve nearest to an arbitrary point.
|
|
164
164
|
* @param curve The curve to query
|
|
@@ -177,7 +177,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
177
177
|
* }
|
|
178
178
|
* ```
|
|
179
179
|
*/
|
|
180
|
-
abstract getNearestPoint(curve: CurveHandle, point:
|
|
180
|
+
abstract getNearestPoint(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
181
181
|
/**
|
|
182
182
|
* Project a point onto a curve.
|
|
183
183
|
* @param curve The curve to project onto
|
|
@@ -193,7 +193,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
193
193
|
* const projected = await snaptrude.core.geom.query.curve.getProjection(line, point) // { x: 3, y: 0, z: 0 }
|
|
194
194
|
* ```
|
|
195
195
|
*/
|
|
196
|
-
abstract getProjection(curve: CurveHandle, point:
|
|
196
|
+
abstract getProjection(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
197
197
|
/**
|
|
198
198
|
* Get the point at a given distance along a curve from a reference point.
|
|
199
199
|
* @param curve The curve to query
|
|
@@ -214,7 +214,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
214
214
|
* const q = await snaptrude.core.geom.query.curve.getPointAtDistance(line, b, 2, false) // measured backwards from the end
|
|
215
215
|
* ```
|
|
216
216
|
*/
|
|
217
|
-
abstract getPointAtDistance(curve: CurveHandle, referencePoint:
|
|
217
|
+
abstract getPointAtDistance(curve: CurveHandle, referencePoint: Vec3Handle, distance: number, forward?: boolean): PluginApiReturn<Vec3Components>;
|
|
218
218
|
/**
|
|
219
219
|
* Get the curve parameter corresponding to a point on the curve.
|
|
220
220
|
* @param curve The curve to query
|
|
@@ -229,7 +229,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
229
229
|
* const t = await snaptrude.core.geom.query.curve.getParameterAtPoint(line, b)
|
|
230
230
|
* ```
|
|
231
231
|
*/
|
|
232
|
-
abstract getParameterAtPoint(curve: CurveHandle, point:
|
|
232
|
+
abstract getParameterAtPoint(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<number>;
|
|
233
233
|
/**
|
|
234
234
|
* Get the curvature of a curve at a point on it.
|
|
235
235
|
* @param curve The curve to query
|
|
@@ -246,7 +246,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
246
246
|
* const k = await snaptrude.core.geom.query.curve.getCurvature(arc, start) // 0.5 (1 / radius)
|
|
247
247
|
* ```
|
|
248
248
|
*/
|
|
249
|
-
abstract getCurvature(curve: CurveHandle, point:
|
|
249
|
+
abstract getCurvature(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<number>;
|
|
250
250
|
/**
|
|
251
251
|
* Get the shortest distance from an arbitrary point to a curve.
|
|
252
252
|
* @param curve The curve to query
|
|
@@ -266,7 +266,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
266
266
|
* }
|
|
267
267
|
* ```
|
|
268
268
|
*/
|
|
269
|
-
abstract getDistanceToPoint(curve: CurveHandle, point:
|
|
269
|
+
abstract getDistanceToPoint(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<number>;
|
|
270
270
|
/**
|
|
271
271
|
* Get the arc-length distance along a curve between two points on it.
|
|
272
272
|
* @param curve The curve to query
|
|
@@ -285,7 +285,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
285
285
|
* const d = await snaptrude.core.geom.query.curve.getDistanceAlong(line, a, mid) // 5
|
|
286
286
|
* ```
|
|
287
287
|
*/
|
|
288
|
-
abstract getDistanceAlong(curve: CurveHandle, pointA:
|
|
288
|
+
abstract getDistanceAlong(curve: CurveHandle, pointA: Vec3Handle, pointB: Vec3Handle): PluginApiReturn<number>;
|
|
289
289
|
/**
|
|
290
290
|
* List sampled points along a curve.
|
|
291
291
|
* @param curve The curve to sample
|
|
@@ -358,7 +358,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
358
358
|
* const on = await snaptrude.core.geom.query.curve.isOnCurve(line, point, 0.01) // true within tolerance
|
|
359
359
|
* ```
|
|
360
360
|
*/
|
|
361
|
-
abstract isOnCurve(curve: CurveHandle, point:
|
|
361
|
+
abstract isOnCurve(curve: CurveHandle, point: Vec3Handle, threshold?: number): PluginApiReturn<boolean>;
|
|
362
362
|
/**
|
|
363
363
|
* Test whether a curve contains a point, optionally including its endpoints.
|
|
364
364
|
* @param curve The curve to query
|
|
@@ -375,7 +375,7 @@ export declare abstract class PluginGeomQueryCurveApi {
|
|
|
375
375
|
* const interiorOnly = await snaptrude.core.geom.query.curve.hasPoint(line, b, false) // false
|
|
376
376
|
* ```
|
|
377
377
|
*/
|
|
378
|
-
abstract hasPoint(curve: CurveHandle, point:
|
|
378
|
+
abstract hasPoint(curve: CurveHandle, point: Vec3Handle, includeEndPoints?: boolean): PluginApiReturn<boolean>;
|
|
379
379
|
/**
|
|
380
380
|
* Test whether two curves are geometrically equal.
|
|
381
381
|
* @param curveA First curve
|
|
@@ -632,11 +632,7 @@ export type PluginGeomQueryCurveGetChordLengthArgs = z.infer<typeof PluginGeomQu
|
|
|
632
632
|
*/
|
|
633
633
|
export declare const PluginGeomQueryCurveGetTangentArgs: z.ZodObject<{
|
|
634
634
|
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>>]>;
|
|
635
|
-
point: z.
|
|
636
|
-
x: z.ZodNumber;
|
|
637
|
-
y: z.ZodNumber;
|
|
638
|
-
z: z.ZodNumber;
|
|
639
|
-
}, z.core.$strip>]>;
|
|
635
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
640
636
|
}, z.core.$strip>;
|
|
641
637
|
export type PluginGeomQueryCurveGetTangentArgs = z.infer<typeof PluginGeomQueryCurveGetTangentArgs>;
|
|
642
638
|
/**
|
|
@@ -649,11 +645,7 @@ export type PluginGeomQueryCurveGetTangentArgs = z.infer<typeof PluginGeomQueryC
|
|
|
649
645
|
*/
|
|
650
646
|
export declare const PluginGeomQueryCurveGetNormalArgs: z.ZodObject<{
|
|
651
647
|
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>>]>;
|
|
652
|
-
point: z.
|
|
653
|
-
x: z.ZodNumber;
|
|
654
|
-
y: z.ZodNumber;
|
|
655
|
-
z: z.ZodNumber;
|
|
656
|
-
}, z.core.$strip>]>;
|
|
648
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
657
649
|
}, z.core.$strip>;
|
|
658
650
|
export type PluginGeomQueryCurveGetNormalArgs = z.infer<typeof PluginGeomQueryCurveGetNormalArgs>;
|
|
659
651
|
/**
|
|
@@ -666,11 +658,7 @@ export type PluginGeomQueryCurveGetNormalArgs = z.infer<typeof PluginGeomQueryCu
|
|
|
666
658
|
*/
|
|
667
659
|
export declare const PluginGeomQueryCurveGetNearestPointArgs: z.ZodObject<{
|
|
668
660
|
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>>]>;
|
|
669
|
-
point: z.
|
|
670
|
-
x: z.ZodNumber;
|
|
671
|
-
y: z.ZodNumber;
|
|
672
|
-
z: z.ZodNumber;
|
|
673
|
-
}, z.core.$strip>]>;
|
|
661
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
674
662
|
}, z.core.$strip>;
|
|
675
663
|
export type PluginGeomQueryCurveGetNearestPointArgs = z.infer<typeof PluginGeomQueryCurveGetNearestPointArgs>;
|
|
676
664
|
/**
|
|
@@ -683,11 +671,7 @@ export type PluginGeomQueryCurveGetNearestPointArgs = z.infer<typeof PluginGeomQ
|
|
|
683
671
|
*/
|
|
684
672
|
export declare const PluginGeomQueryCurveGetProjectionArgs: z.ZodObject<{
|
|
685
673
|
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>>]>;
|
|
686
|
-
point: z.
|
|
687
|
-
x: z.ZodNumber;
|
|
688
|
-
y: z.ZodNumber;
|
|
689
|
-
z: z.ZodNumber;
|
|
690
|
-
}, z.core.$strip>]>;
|
|
674
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
691
675
|
}, z.core.$strip>;
|
|
692
676
|
export type PluginGeomQueryCurveGetProjectionArgs = z.infer<typeof PluginGeomQueryCurveGetProjectionArgs>;
|
|
693
677
|
/**
|
|
@@ -702,11 +686,7 @@ export type PluginGeomQueryCurveGetProjectionArgs = z.infer<typeof PluginGeomQue
|
|
|
702
686
|
*/
|
|
703
687
|
export declare const PluginGeomQueryCurveGetPointAtDistanceArgs: z.ZodObject<{
|
|
704
688
|
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>>]>;
|
|
705
|
-
referencePoint: z.
|
|
706
|
-
x: z.ZodNumber;
|
|
707
|
-
y: z.ZodNumber;
|
|
708
|
-
z: z.ZodNumber;
|
|
709
|
-
}, z.core.$strip>]>;
|
|
689
|
+
referencePoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
710
690
|
distance: z.ZodNumber;
|
|
711
691
|
forward: z.ZodOptional<z.ZodBoolean>;
|
|
712
692
|
}, z.core.$strip>;
|
|
@@ -721,11 +701,7 @@ export type PluginGeomQueryCurveGetPointAtDistanceArgs = z.infer<typeof PluginGe
|
|
|
721
701
|
*/
|
|
722
702
|
export declare const PluginGeomQueryCurveGetParameterAtPointArgs: z.ZodObject<{
|
|
723
703
|
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>>]>;
|
|
724
|
-
point: z.
|
|
725
|
-
x: z.ZodNumber;
|
|
726
|
-
y: z.ZodNumber;
|
|
727
|
-
z: z.ZodNumber;
|
|
728
|
-
}, z.core.$strip>]>;
|
|
704
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
729
705
|
}, z.core.$strip>;
|
|
730
706
|
export type PluginGeomQueryCurveGetParameterAtPointArgs = z.infer<typeof PluginGeomQueryCurveGetParameterAtPointArgs>;
|
|
731
707
|
/**
|
|
@@ -738,11 +714,7 @@ export type PluginGeomQueryCurveGetParameterAtPointArgs = z.infer<typeof PluginG
|
|
|
738
714
|
*/
|
|
739
715
|
export declare const PluginGeomQueryCurveGetCurvatureArgs: z.ZodObject<{
|
|
740
716
|
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>>]>;
|
|
741
|
-
point: z.
|
|
742
|
-
x: z.ZodNumber;
|
|
743
|
-
y: z.ZodNumber;
|
|
744
|
-
z: z.ZodNumber;
|
|
745
|
-
}, z.core.$strip>]>;
|
|
717
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
746
718
|
}, z.core.$strip>;
|
|
747
719
|
export type PluginGeomQueryCurveGetCurvatureArgs = z.infer<typeof PluginGeomQueryCurveGetCurvatureArgs>;
|
|
748
720
|
/**
|
|
@@ -755,11 +727,7 @@ export type PluginGeomQueryCurveGetCurvatureArgs = z.infer<typeof PluginGeomQuer
|
|
|
755
727
|
*/
|
|
756
728
|
export declare const PluginGeomQueryCurveGetDistanceToPointArgs: z.ZodObject<{
|
|
757
729
|
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>>]>;
|
|
758
|
-
point: z.
|
|
759
|
-
x: z.ZodNumber;
|
|
760
|
-
y: z.ZodNumber;
|
|
761
|
-
z: z.ZodNumber;
|
|
762
|
-
}, z.core.$strip>]>;
|
|
730
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
763
731
|
}, z.core.$strip>;
|
|
764
732
|
export type PluginGeomQueryCurveGetDistanceToPointArgs = z.infer<typeof PluginGeomQueryCurveGetDistanceToPointArgs>;
|
|
765
733
|
/**
|
|
@@ -773,16 +741,8 @@ export type PluginGeomQueryCurveGetDistanceToPointArgs = z.infer<typeof PluginGe
|
|
|
773
741
|
*/
|
|
774
742
|
export declare const PluginGeomQueryCurveGetDistanceAlongArgs: z.ZodObject<{
|
|
775
743
|
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>>]>;
|
|
776
|
-
pointA: z.
|
|
777
|
-
|
|
778
|
-
y: z.ZodNumber;
|
|
779
|
-
z: z.ZodNumber;
|
|
780
|
-
}, z.core.$strip>]>;
|
|
781
|
-
pointB: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>, z.ZodObject<{
|
|
782
|
-
x: z.ZodNumber;
|
|
783
|
-
y: z.ZodNumber;
|
|
784
|
-
z: z.ZodNumber;
|
|
785
|
-
}, z.core.$strip>]>;
|
|
744
|
+
pointA: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
745
|
+
pointB: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
786
746
|
}, z.core.$strip>;
|
|
787
747
|
export type PluginGeomQueryCurveGetDistanceAlongArgs = z.infer<typeof PluginGeomQueryCurveGetDistanceAlongArgs>;
|
|
788
748
|
/**
|
|
@@ -833,11 +793,7 @@ export type PluginGeomQueryCurveIsLinearArgs = z.infer<typeof PluginGeomQueryCur
|
|
|
833
793
|
*/
|
|
834
794
|
export declare const PluginGeomQueryCurveIsOnCurveArgs: z.ZodObject<{
|
|
835
795
|
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>>]>;
|
|
836
|
-
point: z.
|
|
837
|
-
x: z.ZodNumber;
|
|
838
|
-
y: z.ZodNumber;
|
|
839
|
-
z: z.ZodNumber;
|
|
840
|
-
}, z.core.$strip>]>;
|
|
796
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
841
797
|
threshold: z.ZodOptional<z.ZodNumber>;
|
|
842
798
|
}, z.core.$strip>;
|
|
843
799
|
export type PluginGeomQueryCurveIsOnCurveArgs = z.infer<typeof PluginGeomQueryCurveIsOnCurveArgs>;
|
|
@@ -852,11 +808,7 @@ export type PluginGeomQueryCurveIsOnCurveArgs = z.infer<typeof PluginGeomQueryCu
|
|
|
852
808
|
*/
|
|
853
809
|
export declare const PluginGeomQueryCurveHasPointArgs: z.ZodObject<{
|
|
854
810
|
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>>]>;
|
|
855
|
-
point: z.
|
|
856
|
-
x: z.ZodNumber;
|
|
857
|
-
y: z.ZodNumber;
|
|
858
|
-
z: z.ZodNumber;
|
|
859
|
-
}, z.core.$strip>]>;
|
|
811
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
860
812
|
includeEndPoints: z.ZodOptional<z.ZodBoolean>;
|
|
861
813
|
}, z.core.$strip>;
|
|
862
814
|
export type PluginGeomQueryCurveHasPointArgs = z.infer<typeof PluginGeomQueryCurveHasPointArgs>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curve.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/query/curve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"curve.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/query/curve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,8BAAsB,uBAAuB;;IAG3C;;;;;;;;;;;;;;;;OAgBG;aACa,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,eAAe,CAAC,cAAc,CAAC;IAElF;;;;;;;;;;;;;;OAcG;aACa,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,eAAe,CAAC,cAAc,CAAC;IAEhF;;;;;;;;;;;;;;;;;OAiBG;aAC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AAM,0CAA0C;;;iBAGrD,CAAA;AAEF,MAAM,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../../types";
|
|
3
|
-
import { ProfileHandle,
|
|
3
|
+
import { ProfileHandle, Vec3Handle, CurveHandle, Vec3Components, BBoxComponents } from "../../../../handles";
|
|
4
4
|
/**
|
|
5
5
|
* Profile queries — read-only geometric questions about a profile (an ordered
|
|
6
6
|
* loop or chain of curves) and the relationships between two profiles
|
|
@@ -120,7 +120,7 @@ export declare abstract class PluginGeomQueryProfileApi {
|
|
|
120
120
|
* console.log(nearest.x, nearest.y, nearest.z) // 2 0 0
|
|
121
121
|
* ```
|
|
122
122
|
*/
|
|
123
|
-
abstract getNearestPoint(profile: ProfileHandle, point:
|
|
123
|
+
abstract getNearestPoint(profile: ProfileHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
124
124
|
/**
|
|
125
125
|
* Test whether a point lies inside a profile.
|
|
126
126
|
* @param profile The profile to query
|
|
@@ -137,7 +137,7 @@ export declare abstract class PluginGeomQueryProfileApi {
|
|
|
137
137
|
* const inside = await snaptrude.core.geom.query.profile.hasPoint(rect, point) // true
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
|
-
abstract hasPoint(profile: ProfileHandle, point:
|
|
140
|
+
abstract hasPoint(profile: ProfileHandle, point: Vec3Handle): PluginApiReturn<boolean>;
|
|
141
141
|
/**
|
|
142
142
|
* Test whether a point lies on a profile's boundary.
|
|
143
143
|
* @param profile The profile to query
|
|
@@ -151,7 +151,7 @@ export declare abstract class PluginGeomQueryProfileApi {
|
|
|
151
151
|
* const onEdge = await snaptrude.core.geom.query.profile.isOnBoundary(rect, point) // true
|
|
152
152
|
* ```
|
|
153
153
|
*/
|
|
154
|
-
abstract isOnBoundary(profile: ProfileHandle, point:
|
|
154
|
+
abstract isOnBoundary(profile: ProfileHandle, point: Vec3Handle): PluginApiReturn<boolean>;
|
|
155
155
|
/**
|
|
156
156
|
* Test whether a profile forms a closed loop.
|
|
157
157
|
* @param profile The profile to query
|
|
@@ -310,11 +310,7 @@ export type PluginGeomQueryProfileGetNormalArgs = z.infer<typeof PluginGeomQuery
|
|
|
310
310
|
*/
|
|
311
311
|
export declare const PluginGeomQueryProfileGetNearestPointArgs: z.ZodObject<{
|
|
312
312
|
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
|
|
313
|
-
point: z.
|
|
314
|
-
x: z.ZodNumber;
|
|
315
|
-
y: z.ZodNumber;
|
|
316
|
-
z: z.ZodNumber;
|
|
317
|
-
}, z.core.$strip>]>;
|
|
313
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
318
314
|
}, z.core.$strip>;
|
|
319
315
|
export type PluginGeomQueryProfileGetNearestPointArgs = z.infer<typeof PluginGeomQueryProfileGetNearestPointArgs>;
|
|
320
316
|
/**
|
|
@@ -327,11 +323,7 @@ export type PluginGeomQueryProfileGetNearestPointArgs = z.infer<typeof PluginGeo
|
|
|
327
323
|
*/
|
|
328
324
|
export declare const PluginGeomQueryProfileHasPointArgs: z.ZodObject<{
|
|
329
325
|
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
|
|
330
|
-
point: z.
|
|
331
|
-
x: z.ZodNumber;
|
|
332
|
-
y: z.ZodNumber;
|
|
333
|
-
z: z.ZodNumber;
|
|
334
|
-
}, z.core.$strip>]>;
|
|
326
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
335
327
|
}, z.core.$strip>;
|
|
336
328
|
export type PluginGeomQueryProfileHasPointArgs = z.infer<typeof PluginGeomQueryProfileHasPointArgs>;
|
|
337
329
|
/**
|
|
@@ -344,11 +336,7 @@ export type PluginGeomQueryProfileHasPointArgs = z.infer<typeof PluginGeomQueryP
|
|
|
344
336
|
*/
|
|
345
337
|
export declare const PluginGeomQueryProfileIsOnBoundaryArgs: z.ZodObject<{
|
|
346
338
|
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
|
|
347
|
-
point: z.
|
|
348
|
-
x: z.ZodNumber;
|
|
349
|
-
y: z.ZodNumber;
|
|
350
|
-
z: z.ZodNumber;
|
|
351
|
-
}, z.core.$strip>]>;
|
|
339
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
352
340
|
}, z.core.$strip>;
|
|
353
341
|
export type PluginGeomQueryProfileIsOnBoundaryArgs = z.infer<typeof PluginGeomQueryProfileIsOnBoundaryArgs>;
|
|
354
342
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/query/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/query/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,EACd,cAAc,EACf,MAAM,qBAAqB,CAAA;AAE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AiC,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../../types";
|
|
3
|
-
import { ContourHandle, ProfileHandle,
|
|
3
|
+
import { ContourHandle, ProfileHandle, Vec3Handle, Vec3Components } from "../../../../handles";
|
|
4
4
|
/**
|
|
5
5
|
* Contour editing — produce NEW contours from an existing one (all-handle model, §11).
|
|
6
6
|
*
|
|
@@ -56,7 +56,7 @@ export declare abstract class PluginGeomUpdateContourApi {
|
|
|
56
56
|
* const moved = await snaptrude.core.geom.update.contour.move(contour, shift)
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
abstract move(contour: ContourHandle, translation:
|
|
59
|
+
abstract move(contour: ContourHandle, translation: Vec3Handle): PluginApiReturn<ContourHandle>;
|
|
60
60
|
/**
|
|
61
61
|
* Rotate a contour about an axis through an optional pivot. Immutable — returns a
|
|
62
62
|
* NEW contour and leaves the input unchanged.
|
|
@@ -79,7 +79,7 @@ export declare abstract class PluginGeomUpdateContourApi {
|
|
|
79
79
|
* const rotated = await snaptrude.core.geom.update.contour.rotate(contour, axis, Math.PI / 4, pivot)
|
|
80
80
|
* ```
|
|
81
81
|
*/
|
|
82
|
-
abstract rotate(contour: ContourHandle, axis:
|
|
82
|
+
abstract rotate(contour: ContourHandle, axis: Vec3Handle, angle: number, pivot?: Vec3Handle): PluginApiReturn<ContourHandle>;
|
|
83
83
|
/**
|
|
84
84
|
* Scale a contour uniformly or per-axis about an optional pivot. Immutable —
|
|
85
85
|
* returns a NEW contour and leaves the input unchanged.
|
|
@@ -100,7 +100,7 @@ export declare abstract class PluginGeomUpdateContourApi {
|
|
|
100
100
|
* const stretched = await snaptrude.core.geom.update.contour.scale(contour, { x: 2, y: 1, z: 1 })
|
|
101
101
|
* ```
|
|
102
102
|
*/
|
|
103
|
-
abstract scale(contour: ContourHandle, factor: number | Vec3Components, pivot?:
|
|
103
|
+
abstract scale(contour: ContourHandle, factor: number | Vec3Components, pivot?: Vec3Handle): PluginApiReturn<ContourHandle>;
|
|
104
104
|
/**
|
|
105
105
|
* Mirror a contour across a plane. Immutable — returns a NEW contour and leaves
|
|
106
106
|
* the input unchanged.
|
|
@@ -122,8 +122,8 @@ export declare abstract class PluginGeomUpdateContourApi {
|
|
|
122
122
|
* ```
|
|
123
123
|
*/
|
|
124
124
|
abstract mirror(contour: ContourHandle, plane: {
|
|
125
|
-
point:
|
|
126
|
-
normal:
|
|
125
|
+
point: Vec3Handle;
|
|
126
|
+
normal: Vec3Handle;
|
|
127
127
|
}): PluginApiReturn<ContourHandle>;
|
|
128
128
|
/**
|
|
129
129
|
* Add a hole to a contour by appending an inner profile. Immutable — returns a NEW
|
|
@@ -196,11 +196,7 @@ export type PluginGeomUpdateContourOffsetArgs = z.infer<typeof PluginGeomUpdateC
|
|
|
196
196
|
*/
|
|
197
197
|
export declare const PluginGeomUpdateContourMoveArgs: z.ZodObject<{
|
|
198
198
|
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
199
|
-
translation: z.
|
|
200
|
-
x: z.ZodNumber;
|
|
201
|
-
y: z.ZodNumber;
|
|
202
|
-
z: z.ZodNumber;
|
|
203
|
-
}, z.core.$strip>]>;
|
|
199
|
+
translation: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
204
200
|
}, z.core.$strip>;
|
|
205
201
|
export type PluginGeomUpdateContourMoveArgs = z.infer<typeof PluginGeomUpdateContourMoveArgs>;
|
|
206
202
|
/**
|
|
@@ -215,17 +211,9 @@ export type PluginGeomUpdateContourMoveArgs = z.infer<typeof PluginGeomUpdateCon
|
|
|
215
211
|
*/
|
|
216
212
|
export declare const PluginGeomUpdateContourRotateArgs: z.ZodObject<{
|
|
217
213
|
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
218
|
-
axis: z.
|
|
219
|
-
x: z.ZodNumber;
|
|
220
|
-
y: z.ZodNumber;
|
|
221
|
-
z: z.ZodNumber;
|
|
222
|
-
}, z.core.$strip>]>;
|
|
214
|
+
axis: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
223
215
|
angle: z.ZodNumber;
|
|
224
|
-
pivot: z.ZodOptional<z.
|
|
225
|
-
x: z.ZodNumber;
|
|
226
|
-
y: z.ZodNumber;
|
|
227
|
-
z: z.ZodNumber;
|
|
228
|
-
}, z.core.$strip>]>>;
|
|
216
|
+
pivot: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
|
|
229
217
|
}, z.core.$strip>;
|
|
230
218
|
export type PluginGeomUpdateContourRotateArgs = z.infer<typeof PluginGeomUpdateContourRotateArgs>;
|
|
231
219
|
/**
|
|
@@ -244,11 +232,7 @@ export declare const PluginGeomUpdateContourScaleArgs: z.ZodObject<{
|
|
|
244
232
|
y: z.ZodNumber;
|
|
245
233
|
z: z.ZodNumber;
|
|
246
234
|
}, z.core.$strip>]>;
|
|
247
|
-
pivot: z.ZodOptional<z.
|
|
248
|
-
x: z.ZodNumber;
|
|
249
|
-
y: z.ZodNumber;
|
|
250
|
-
z: z.ZodNumber;
|
|
251
|
-
}, z.core.$strip>]>>;
|
|
235
|
+
pivot: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
|
|
252
236
|
}, z.core.$strip>;
|
|
253
237
|
export type PluginGeomUpdateContourScaleArgs = z.infer<typeof PluginGeomUpdateContourScaleArgs>;
|
|
254
238
|
/**
|
|
@@ -262,16 +246,8 @@ export type PluginGeomUpdateContourScaleArgs = z.infer<typeof PluginGeomUpdateCo
|
|
|
262
246
|
export declare const PluginGeomUpdateContourMirrorArgs: z.ZodObject<{
|
|
263
247
|
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
|
|
264
248
|
plane: z.ZodObject<{
|
|
265
|
-
point: z.
|
|
266
|
-
|
|
267
|
-
y: z.ZodNumber;
|
|
268
|
-
z: z.ZodNumber;
|
|
269
|
-
}, z.core.$strip>]>;
|
|
270
|
-
normal: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>, z.ZodObject<{
|
|
271
|
-
x: z.ZodNumber;
|
|
272
|
-
y: z.ZodNumber;
|
|
273
|
-
z: z.ZodNumber;
|
|
274
|
-
}, z.core.$strip>]>;
|
|
249
|
+
point: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
250
|
+
normal: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
275
251
|
}, z.core.$strip>;
|
|
276
252
|
}, z.core.$strip>;
|
|
277
253
|
export type PluginGeomUpdateContourMirrorArgs = z.infer<typeof PluginGeomUpdateContourMirrorArgs>;
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"contour.d.ts","sourceRoot":"","sources":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