@snaptrude/plugin-core 0.2.9 → 0.5.0
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 +128 -50
- package/CHANGELOG.md +52 -6
- package/api-manifest.full.json +3999 -0
- package/api-manifest.json +3845 -0
- package/dist/api/core/buildings.d.ts +427 -0
- package/dist/api/core/buildings.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +230 -0
- package/dist/api/core/comment/index.d.ts.map +1 -0
- package/dist/api/core/geom/create/index.d.ts +247 -0
- package/dist/api/core/geom/create/index.d.ts.map +1 -0
- package/dist/api/core/geom/delete/index.d.ts +72 -0
- package/dist/api/core/geom/delete/index.d.ts.map +1 -0
- package/dist/api/core/geom/index.d.ts +24 -23
- package/dist/api/core/geom/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/arc.d.ts +169 -0
- package/dist/api/core/geom/query/arc.d.ts.map +1 -0
- package/dist/api/core/geom/query/brep.d.ts +402 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -0
- package/dist/api/core/geom/query/circle.d.ts +378 -0
- package/dist/api/core/geom/query/circle.d.ts.map +1 -0
- package/dist/api/core/geom/query/contour.d.ts +450 -0
- package/dist/api/core/geom/query/contour.d.ts.map +1 -0
- package/dist/api/core/geom/query/curve.d.ts +918 -0
- package/dist/api/core/geom/query/curve.d.ts.map +1 -0
- package/dist/api/core/geom/query/edge.d.ts +128 -0
- package/dist/api/core/geom/query/edge.d.ts.map +1 -0
- package/dist/api/core/geom/query/face.d.ts +363 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -0
- package/dist/api/core/geom/query/halfedge.d.ts +206 -0
- package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
- package/dist/api/core/geom/query/index.d.ts +61 -0
- package/dist/api/core/geom/query/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/profile.d.ts +410 -0
- package/dist/api/core/geom/query/profile.d.ts.map +1 -0
- package/dist/api/core/geom/query/vertex.d.ts +187 -0
- package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
- package/dist/api/core/geom/update/contour.d.ts +272 -0
- package/dist/api/core/geom/update/contour.d.ts.map +1 -0
- package/dist/api/core/geom/update/curve.d.ts +180 -0
- package/dist/api/core/geom/update/curve.d.ts.map +1 -0
- package/dist/api/core/geom/update/index.d.ts +27 -0
- package/dist/api/core/geom/update/index.d.ts.map +1 -0
- package/dist/api/core/geom/update/profile.d.ts +329 -0
- package/dist/api/core/geom/update/profile.d.ts.map +1 -0
- package/dist/api/core/groups.d.ts +485 -0
- package/dist/api/core/groups.d.ts.map +1 -0
- package/dist/api/core/history/index.d.ts +78 -0
- package/dist/api/core/history/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +46 -1
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +402 -0
- package/dist/api/core/layers.d.ts.map +1 -0
- package/dist/api/core/math/quat.d.ts +111 -128
- package/dist/api/core/math/quat.d.ts.map +1 -1
- package/dist/api/core/math/vec3.d.ts +120 -102
- package/dist/api/core/math/vec3.d.ts.map +1 -1
- package/dist/api/core/project/index.d.ts +399 -0
- package/dist/api/core/project/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +755 -0
- package/dist/api/core/tags.d.ts.map +1 -0
- package/dist/api/core/units/index.d.ts +175 -0
- package/dist/api/core/units/index.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +45 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +168 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +828 -0
- package/dist/api/design/create/index.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +63 -0
- package/dist/api/design/delete/index.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +268 -0
- package/dist/api/design/doors/index.d.ts.map +1 -0
- package/dist/api/design/edit/index.d.ts +49 -0
- package/dist/api/design/edit/index.d.ts.map +1 -0
- package/dist/api/design/erase/index.d.ts +160 -0
- package/dist/api/design/erase/index.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +123 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +153 -0
- package/dist/api/design/index.d.ts.map +1 -0
- package/dist/api/design/lock.d.ts +41 -0
- package/dist/api/design/lock.d.ts.map +1 -0
- package/dist/api/design/materials/index.d.ts +297 -0
- package/dist/api/design/materials/index.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +140 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +1011 -0
- package/dist/api/design/query/index.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +221 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -0
- package/dist/api/design/selection/index.d.ts +138 -0
- package/dist/api/design/selection/index.d.ts.map +1 -0
- package/dist/api/design/shared.d.ts +38 -0
- package/dist/api/design/shared.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +87 -0
- package/dist/api/design/transform/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +178 -0
- package/dist/api/design/update/index.d.ts.map +1 -0
- package/dist/api/design/windows/index.d.ts +189 -0
- package/dist/api/design/windows/index.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +51 -23
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/department.d.ts +0 -98
- package/dist/api/entity/department.d.ts.map +1 -1
- package/dist/api/entity/index.d.ts +4 -9
- package/dist/api/entity/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +49 -106
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +76 -828
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +47 -37
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +17 -17
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +440 -0
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +81 -0
- package/dist/api/presentation/diagrams.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +113 -0
- package/dist/api/presentation/import.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +46 -0
- package/dist/api/presentation/index.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +176 -0
- package/dist/api/presentation/sheets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +296 -0
- package/dist/api/presentation/views.d.ts.map +1 -0
- package/dist/api/program/adjacency.d.ts +155 -0
- package/dist/api/program/adjacency.d.ts.map +1 -0
- package/dist/api/program/areas.d.ts +360 -0
- package/dist/api/program/areas.d.ts.map +1 -0
- package/dist/api/program/classification.d.ts +135 -0
- package/dist/api/program/classification.d.ts.map +1 -0
- package/dist/api/program/cores.d.ts +174 -0
- package/dist/api/program/cores.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +431 -0
- package/dist/api/program/departments.d.ts.map +1 -0
- package/dist/api/program/index.d.ts +69 -0
- package/dist/api/program/index.d.ts.map +1 -0
- package/dist/api/program/layout.d.ts +63 -0
- package/dist/api/program/layout.d.ts.map +1 -0
- package/dist/api/program/metrics.d.ts +108 -0
- package/dist/api/program/metrics.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +367 -0
- package/dist/api/program/site.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +2041 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -0
- package/dist/handles.d.ts +138 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/host-utils.d.ts +7 -5
- package/dist/host-utils.d.ts.map +1 -1
- package/dist/index.cjs +3897 -1542
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3326 -1462
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/scripts/generate-manifest.mjs +193 -0
- package/scripts/generate-manifest.test.mjs +193 -0
- package/src/api/core/buildings.ts +485 -0
- package/src/api/core/comment/index.ts +258 -0
- package/src/api/core/geom/create/index.ts +293 -0
- package/src/api/core/geom/delete/index.ts +78 -0
- package/src/api/core/geom/index.ts +24 -23
- package/src/api/core/geom/query/arc.ts +169 -0
- package/src/api/core/geom/query/brep.ts +444 -0
- package/src/api/core/geom/query/circle.ts +404 -0
- package/src/api/core/geom/query/contour.ts +540 -0
- package/src/api/core/geom/query/curve.ts +1078 -0
- package/src/api/core/geom/query/edge.ts +130 -0
- package/src/api/core/geom/query/face.ts +403 -0
- package/src/api/core/geom/query/halfedge.ts +210 -0
- package/src/api/core/geom/query/index.ts +63 -0
- package/src/api/core/geom/query/profile.ts +473 -0
- package/src/api/core/geom/query/vertex.ts +205 -0
- package/src/api/core/geom/update/contour.ts +315 -0
- package/src/api/core/geom/update/curve.ts +209 -0
- package/src/api/core/geom/update/index.ts +29 -0
- package/src/api/core/geom/update/profile.ts +377 -0
- package/src/api/core/groups.ts +521 -0
- package/src/api/core/history/index.ts +84 -0
- package/src/api/core/index.ts +46 -1
- package/src/api/core/layers.ts +333 -0
- package/src/api/core/math/quat.ts +112 -235
- package/src/api/core/math/vec3.ts +124 -159
- package/src/api/core/project/index.ts +418 -0
- package/src/api/core/tags.ts +808 -0
- package/src/api/core/units/index.ts +164 -0
- package/src/api/core/zoom/index.ts +47 -0
- package/src/api/design/boolean/index.ts +179 -0
- package/src/api/design/create/index.ts +886 -0
- package/src/api/design/delete/index.ts +67 -0
- package/src/api/design/doors/index.ts +285 -0
- package/src/api/design/edit/index.ts +54 -0
- package/src/api/design/erase/index.ts +151 -0
- package/src/api/design/furniture/index.ts +130 -0
- package/src/api/design/index.ts +162 -0
- package/src/api/design/lock.ts +42 -0
- package/src/api/design/materials/index.ts +301 -0
- package/src/api/design/query/geometry/index.ts +166 -0
- package/src/api/design/query/index.ts +937 -0
- package/src/api/design/query/spaces.ts +132 -0
- package/src/api/design/selection/index.ts +144 -0
- package/src/api/design/shared.ts +40 -0
- package/src/api/design/transform/index.ts +93 -0
- package/src/api/design/update/index.ts +117 -0
- package/src/api/design/windows/index.ts +207 -0
- package/src/api/entity/buildableEnvelope.ts +64 -23
- package/src/api/entity/department.ts +0 -113
- package/src/api/entity/index.ts +4 -9
- package/src/api/entity/referenceLine.ts +50 -38
- package/src/api/entity/space.ts +84 -440
- package/src/api/entity/story.ts +53 -42
- package/src/api/index.ts +17 -17
- package/src/api/presentation/aiInspiration.ts +362 -0
- package/src/api/presentation/diagrams.ts +84 -0
- package/src/api/presentation/import.ts +112 -0
- package/src/api/presentation/index.ts +48 -0
- package/src/api/presentation/sheets.ts +198 -0
- package/src/api/presentation/views.ts +303 -0
- package/src/api/program/adjacency.ts +164 -0
- package/src/api/program/areas.ts +335 -0
- package/src/api/program/classification.ts +138 -0
- package/src/api/program/cores.ts +171 -0
- package/src/api/program/departments.ts +465 -0
- package/src/api/program/index.ts +71 -0
- package/src/api/program/layout.ts +68 -0
- package/src/api/program/metrics.ts +120 -0
- package/src/api/program/site.ts +326 -0
- package/src/api/program/spreadsheet.ts +2075 -0
- package/src/handles.ts +148 -0
- package/src/host-utils.ts +10 -6
- package/src/index.ts +1 -0
- package/dist/api/core/geom/arc.d.ts +0 -81
- package/dist/api/core/geom/arc.d.ts.map +0 -1
- package/dist/api/core/geom/curve.d.ts +0 -70
- package/dist/api/core/geom/curve.d.ts.map +0 -1
- package/dist/api/core/geom/line.d.ts +0 -56
- package/dist/api/core/geom/line.d.ts.map +0 -1
- package/dist/api/core/geom/profile.d.ts +0 -121
- package/dist/api/core/geom/profile.d.ts.map +0 -1
- package/dist/api/documentation/aiInspiration.d.ts +0 -2155
- package/dist/api/documentation/aiInspiration.d.ts.map +0 -1
- package/dist/api/documentation/index.d.ts +0 -13
- package/dist/api/documentation/index.d.ts.map +0 -1
- package/dist/api/tools/copy.d.ts +0 -59
- package/dist/api/tools/copy.d.ts.map +0 -1
- package/dist/api/tools/index.d.ts +0 -29
- package/dist/api/tools/index.d.ts.map +0 -1
- package/dist/api/tools/offset.d.ts +0 -43
- package/dist/api/tools/offset.d.ts.map +0 -1
- package/dist/api/tools/selection.d.ts +0 -48
- package/dist/api/tools/selection.d.ts.map +0 -1
- package/dist/api/tools/transform.d.ts +0 -114
- package/dist/api/tools/transform.d.ts.map +0 -1
- package/dist/api/units/index.d.ts +0 -163
- package/dist/api/units/index.d.ts.map +0 -1
- package/src/api/core/geom/arc.ts +0 -70
- package/src/api/core/geom/curve.ts +0 -41
- package/src/api/core/geom/line.ts +0 -53
- package/src/api/core/geom/profile.ts +0 -94
- package/src/api/documentation/aiInspiration.ts +0 -871
- package/src/api/documentation/index.ts +0 -15
- package/src/api/tools/copy.ts +0 -55
- package/src/api/tools/index.ts +0 -35
- package/src/api/tools/offset.ts +0 -43
- package/src/api/tools/selection.ts +0 -51
- package/src/api/tools/transform.ts +0 -117
- package/src/api/units/index.ts +0 -163
|
@@ -0,0 +1,918 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../../types";
|
|
3
|
+
import { Vec3Handle, CurveHandle, LineHandle, Vec3Components } from "../../../../handles";
|
|
4
|
+
/**
|
|
5
|
+
* Curve queries — read-only geometric questions about curves (lines and arcs)
|
|
6
|
+
* and the relationships between two curves (all-handle model, §11).
|
|
7
|
+
*
|
|
8
|
+
* Every method takes opaque curve handles ({@linkcode CurveHandle}/{@linkcode LineHandle})
|
|
9
|
+
* and point handles ({@linkcode Vec3Handle}) and returns plain values — points as
|
|
10
|
+
* {@linkcode Vec3Components}, lengths/distances/parameters as `number`, predicates as
|
|
11
|
+
* `boolean`. Relationship methods that produce a new curve return a
|
|
12
|
+
* {@linkcode CurveHandle} (or `null` when there is no result). No query mutates its
|
|
13
|
+
* inputs.
|
|
14
|
+
*
|
|
15
|
+
* Accessed via `snaptrude.core.geom.query.curve`.
|
|
16
|
+
*/
|
|
17
|
+
export declare abstract class PluginGeomQueryCurveApi {
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Get the start point of a curve.
|
|
21
|
+
* @param curve The curve to query
|
|
22
|
+
* @returns The start point as {@linkcode Vec3Components}
|
|
23
|
+
*
|
|
24
|
+
* @examplePrompt Where does this wall edge start?
|
|
25
|
+
*
|
|
26
|
+
* # Example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const [wall] = await snaptrude.design.query.listWalls()
|
|
29
|
+
* const centerline = await snaptrude.design.query.geometry.getCenterline(wall)
|
|
30
|
+
* if (centerline) {
|
|
31
|
+
* const start = await snaptrude.core.geom.query.curve.getStartPoint(centerline)
|
|
32
|
+
* console.log(start.x, start.y, start.z)
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
abstract getStartPoint(curve: CurveHandle): PluginApiReturn<Vec3Components>;
|
|
37
|
+
/**
|
|
38
|
+
* Get the end point of a curve.
|
|
39
|
+
* @param curve The curve to query
|
|
40
|
+
* @returns The end point as {@linkcode Vec3Components}
|
|
41
|
+
*
|
|
42
|
+
* @examplePrompt Get the coordinates of the far end of this edge
|
|
43
|
+
*
|
|
44
|
+
* # Example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
47
|
+
* const b = await snaptrude.core.math.vec3.new(5, 0, 0)
|
|
48
|
+
* const line = await snaptrude.core.geom.create.line(a, b)
|
|
49
|
+
* const end = await snaptrude.core.geom.query.curve.getEndPoint(line) // { x: 5, y: 0, z: 0 }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
abstract getEndPoint(curve: CurveHandle): PluginApiReturn<Vec3Components>;
|
|
53
|
+
/**
|
|
54
|
+
* Get the mid point of a curve.
|
|
55
|
+
* @param curve The curve to query
|
|
56
|
+
* @returns The mid point as {@linkcode Vec3Components}
|
|
57
|
+
*
|
|
58
|
+
* @examplePrompt Find the midpoint of this wall edge
|
|
59
|
+
* @examplePrompt Where is the centre of this boundary line?
|
|
60
|
+
*
|
|
61
|
+
* # Example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const [wall] = await snaptrude.design.query.listWalls()
|
|
64
|
+
* const centerline = await snaptrude.design.query.geometry.getCenterline(wall)
|
|
65
|
+
* if (centerline) {
|
|
66
|
+
* const mid = await snaptrude.core.geom.query.curve.getMidPoint(centerline)
|
|
67
|
+
* console.log(mid.x, mid.y, mid.z)
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
abstract getMidPoint(curve: CurveHandle): PluginApiReturn<Vec3Components>;
|
|
72
|
+
/**
|
|
73
|
+
* Get the arc-length of a curve.
|
|
74
|
+
* @param curve The curve to query
|
|
75
|
+
* @returns The curve length as a `number`
|
|
76
|
+
*
|
|
77
|
+
* @examplePrompt How long is this wall edge?
|
|
78
|
+
* @examplePrompt Measure the length of this curved boundary
|
|
79
|
+
*
|
|
80
|
+
* # Example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const [wall] = await snaptrude.design.query.listWalls()
|
|
83
|
+
* const centerline = await snaptrude.design.query.geometry.getCenterline(wall)
|
|
84
|
+
* if (centerline) {
|
|
85
|
+
* const length = await snaptrude.core.geom.query.curve.getLength(centerline)
|
|
86
|
+
* }
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
abstract getLength(curve: CurveHandle): PluginApiReturn<number>;
|
|
90
|
+
/**
|
|
91
|
+
* Get the straight-line chord length between a curve's endpoints.
|
|
92
|
+
* @param curve The curve to query
|
|
93
|
+
* @returns The chord length as a `number`
|
|
94
|
+
*
|
|
95
|
+
* @examplePrompt What is the straight-line distance between the two ends of this arc?
|
|
96
|
+
*
|
|
97
|
+
* # Example
|
|
98
|
+
* ```ts
|
|
99
|
+
* const start = await snaptrude.core.math.vec3.new(5, 0, 0)
|
|
100
|
+
* const end = await snaptrude.core.math.vec3.new(-5, 0, 0)
|
|
101
|
+
* const centre = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
102
|
+
* const axis = await snaptrude.core.math.vec3.new(0, 1, 0)
|
|
103
|
+
* const arc = await snaptrude.core.geom.create.arc(start, end, centre, axis)
|
|
104
|
+
* const chord = await snaptrude.core.geom.query.curve.getChordLength(arc) // 10 (getLength gives the arc length)
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
abstract getChordLength(curve: CurveHandle): PluginApiReturn<number>;
|
|
108
|
+
/**
|
|
109
|
+
* Get the unit tangent vector of a curve at a point on it.
|
|
110
|
+
* @param curve The curve to query
|
|
111
|
+
* @param point Point on the curve
|
|
112
|
+
* @returns The tangent vector as {@linkcode Vec3Components}
|
|
113
|
+
*
|
|
114
|
+
* # Example
|
|
115
|
+
* ```ts
|
|
116
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
117
|
+
* const b = await snaptrude.core.math.vec3.new(3, 0, 4)
|
|
118
|
+
* const line = await snaptrude.core.geom.create.line(a, b)
|
|
119
|
+
* const tangent = await snaptrude.core.geom.query.curve.getTangent(line, a) // { x: 0.6, y: 0, z: 0.8 }
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
abstract getTangent(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
123
|
+
/**
|
|
124
|
+
* Get the unit normal vector of a curve at a point on it.
|
|
125
|
+
* @param curve The curve to query
|
|
126
|
+
* @param point Point on the curve
|
|
127
|
+
* @returns The normal vector as {@linkcode Vec3Components}
|
|
128
|
+
*
|
|
129
|
+
* # Example
|
|
130
|
+
* ```ts
|
|
131
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
132
|
+
* const b = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
133
|
+
* const line = await snaptrude.core.geom.create.line(a, b)
|
|
134
|
+
* const normal = await snaptrude.core.geom.query.curve.getNormal(line, a)
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
abstract getNormal(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
138
|
+
/**
|
|
139
|
+
* Get the point on a curve nearest to an arbitrary point.
|
|
140
|
+
* @param curve The curve to query
|
|
141
|
+
* @param point The reference point
|
|
142
|
+
* @returns The nearest point on the curve as {@linkcode Vec3Components}
|
|
143
|
+
*
|
|
144
|
+
* @examplePrompt Find the point on this edge closest to the column
|
|
145
|
+
*
|
|
146
|
+
* # Example
|
|
147
|
+
* ```ts
|
|
148
|
+
* const [wall] = await snaptrude.design.query.listWalls()
|
|
149
|
+
* const centerline = await snaptrude.design.query.geometry.getCenterline(wall)
|
|
150
|
+
* const reference = await snaptrude.core.math.vec3.new(2, 0, 3)
|
|
151
|
+
* if (centerline) {
|
|
152
|
+
* const nearest = await snaptrude.core.geom.query.curve.getNearestPoint(centerline, reference)
|
|
153
|
+
* }
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
abstract getNearestPoint(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
157
|
+
/**
|
|
158
|
+
* Project a point onto a curve.
|
|
159
|
+
* @param curve The curve to project onto
|
|
160
|
+
* @param point The point to project
|
|
161
|
+
* @returns The projected point as {@linkcode Vec3Components}
|
|
162
|
+
*
|
|
163
|
+
* # Example
|
|
164
|
+
* ```ts
|
|
165
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
166
|
+
* const b = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
167
|
+
* const line = await snaptrude.core.geom.create.line(a, b)
|
|
168
|
+
* const point = await snaptrude.core.math.vec3.new(3, 0, 4)
|
|
169
|
+
* const projected = await snaptrude.core.geom.query.curve.getProjection(line, point) // { x: 3, y: 0, z: 0 }
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
abstract getProjection(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<Vec3Components>;
|
|
173
|
+
/**
|
|
174
|
+
* Get the point at a given distance along a curve from a reference point.
|
|
175
|
+
* @param curve The curve to query
|
|
176
|
+
* @param referencePoint Point on the curve to measure from
|
|
177
|
+
* @param distance Distance along the curve from the reference point
|
|
178
|
+
* @param forward Optional direction along the curve (defaults to `true`)
|
|
179
|
+
* @returns The resulting point as {@linkcode Vec3Components}
|
|
180
|
+
*
|
|
181
|
+
* @examplePrompt Find the point 2 metres along this edge from the corner
|
|
182
|
+
* @examplePrompt Mark a spot 900mm from the start of the wall edge
|
|
183
|
+
*
|
|
184
|
+
* # Example
|
|
185
|
+
* ```ts
|
|
186
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
187
|
+
* const b = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
188
|
+
* const line = await snaptrude.core.geom.create.line(a, b)
|
|
189
|
+
* const p = await snaptrude.core.geom.query.curve.getPointAtDistance(line, a, 2) // { x: 2, y: 0, z: 0 }
|
|
190
|
+
* const q = await snaptrude.core.geom.query.curve.getPointAtDistance(line, b, 2, false) // measured backwards from the end
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
abstract getPointAtDistance(curve: CurveHandle, referencePoint: Vec3Handle, distance: number, forward?: boolean): PluginApiReturn<Vec3Components>;
|
|
194
|
+
/**
|
|
195
|
+
* Get the curve parameter corresponding to a point on the curve.
|
|
196
|
+
* @param curve The curve to query
|
|
197
|
+
* @param point Point on the curve
|
|
198
|
+
* @returns The parameter as a `number`
|
|
199
|
+
*
|
|
200
|
+
* # Example
|
|
201
|
+
* ```ts
|
|
202
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
203
|
+
* const b = await snaptrude.core.math.vec3.new(8, 0, 0)
|
|
204
|
+
* const line = await snaptrude.core.geom.create.line(a, b)
|
|
205
|
+
* const t = await snaptrude.core.geom.query.curve.getParameterAtPoint(line, b)
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
abstract getParameterAtPoint(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<number>;
|
|
209
|
+
/**
|
|
210
|
+
* Get the curvature of a curve at a point on it.
|
|
211
|
+
* @param curve The curve to query
|
|
212
|
+
* @param point Point on the curve
|
|
213
|
+
* @returns The curvature as a `number`
|
|
214
|
+
*
|
|
215
|
+
* # Example
|
|
216
|
+
* ```ts
|
|
217
|
+
* const start = await snaptrude.core.math.vec3.new(2, 0, 0)
|
|
218
|
+
* const end = await snaptrude.core.math.vec3.new(-2, 0, 0)
|
|
219
|
+
* const centre = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
220
|
+
* const axis = await snaptrude.core.math.vec3.new(0, 1, 0)
|
|
221
|
+
* const arc = await snaptrude.core.geom.create.arc(start, end, centre, axis)
|
|
222
|
+
* const k = await snaptrude.core.geom.query.curve.getCurvature(arc, start) // 0.5 (1 / radius)
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
abstract getCurvature(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<number>;
|
|
226
|
+
/**
|
|
227
|
+
* Get the shortest distance from an arbitrary point to a curve.
|
|
228
|
+
* @param curve The curve to query
|
|
229
|
+
* @param point The point to measure from
|
|
230
|
+
* @returns The distance as a `number`
|
|
231
|
+
*
|
|
232
|
+
* @examplePrompt How far is this column from the wall edge?
|
|
233
|
+
* @examplePrompt What is the shortest distance from this point to the boundary line?
|
|
234
|
+
*
|
|
235
|
+
* # Example
|
|
236
|
+
* ```ts
|
|
237
|
+
* const [wall] = await snaptrude.design.query.listWalls()
|
|
238
|
+
* const centerline = await snaptrude.design.query.geometry.getCenterline(wall)
|
|
239
|
+
* const point = await snaptrude.core.math.vec3.new(2, 0, 3)
|
|
240
|
+
* if (centerline) {
|
|
241
|
+
* const distance = await snaptrude.core.geom.query.curve.getDistanceToPoint(centerline, point)
|
|
242
|
+
* }
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
245
|
+
abstract getDistanceToPoint(curve: CurveHandle, point: Vec3Handle): PluginApiReturn<number>;
|
|
246
|
+
/**
|
|
247
|
+
* Get the arc-length distance along a curve between two points on it.
|
|
248
|
+
* @param curve The curve to query
|
|
249
|
+
* @param pointA First point on the curve
|
|
250
|
+
* @param pointB Second point on the curve
|
|
251
|
+
* @returns The distance along the curve as a `number`
|
|
252
|
+
*
|
|
253
|
+
* @examplePrompt How far apart are these two points measured along the curved wall?
|
|
254
|
+
*
|
|
255
|
+
* # Example
|
|
256
|
+
* ```ts
|
|
257
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
258
|
+
* const b = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
259
|
+
* const line = await snaptrude.core.geom.create.line(a, b)
|
|
260
|
+
* const mid = await snaptrude.core.math.vec3.new(5, 0, 0)
|
|
261
|
+
* const d = await snaptrude.core.geom.query.curve.getDistanceAlong(line, a, mid) // 5
|
|
262
|
+
* ```
|
|
263
|
+
*/
|
|
264
|
+
abstract getDistanceAlong(curve: CurveHandle, pointA: Vec3Handle, pointB: Vec3Handle): PluginApiReturn<number>;
|
|
265
|
+
/**
|
|
266
|
+
* List sampled points along a curve.
|
|
267
|
+
* @param curve The curve to sample
|
|
268
|
+
* @param resolution Optional number of samples for arcs (defaults to `20`; ignored for lines)
|
|
269
|
+
* @returns The sampled points as {@linkcode Vec3Components}`[]`
|
|
270
|
+
*
|
|
271
|
+
* # Example
|
|
272
|
+
* ```ts
|
|
273
|
+
* const start = await snaptrude.core.math.vec3.new(5, 0, 0)
|
|
274
|
+
* const end = await snaptrude.core.math.vec3.new(0, 0, 5)
|
|
275
|
+
* const centre = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
276
|
+
* const axis = await snaptrude.core.math.vec3.new(0, 1, 0)
|
|
277
|
+
* const arc = await snaptrude.core.geom.create.arc(start, end, centre, axis)
|
|
278
|
+
* const points = await snaptrude.core.geom.query.curve.listPoints(arc, 40)
|
|
279
|
+
* for (const p of points) console.log(p.x, p.y, p.z)
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
abstract listPoints(curve: CurveHandle, resolution?: number): PluginApiReturn<Vec3Components[]>;
|
|
283
|
+
/**
|
|
284
|
+
* List the points produced by subdividing a curve into equal segments.
|
|
285
|
+
* @param curve The curve to subdivide
|
|
286
|
+
* @param segments Number of equal segments to divide the curve into
|
|
287
|
+
* @returns The subdivision points as {@linkcode Vec3Components}`[]`
|
|
288
|
+
*
|
|
289
|
+
* @examplePrompt Divide this edge into 5 equal segments
|
|
290
|
+
* @examplePrompt Split the wall line into equal parts for placing columns
|
|
291
|
+
*
|
|
292
|
+
* # Example
|
|
293
|
+
* ```ts
|
|
294
|
+
* const [wall] = await snaptrude.design.query.listWalls()
|
|
295
|
+
* const centerline = await snaptrude.design.query.geometry.getCenterline(wall)
|
|
296
|
+
* if (centerline) {
|
|
297
|
+
* const points = await snaptrude.core.geom.query.curve.listSubdivisions(centerline, 5)
|
|
298
|
+
* }
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
abstract listSubdivisions(curve: CurveHandle, segments: number): PluginApiReturn<Vec3Components[]>;
|
|
302
|
+
/**
|
|
303
|
+
* Test whether a curve is a straight line.
|
|
304
|
+
* @param curve The curve to query
|
|
305
|
+
* @returns `true` if the curve is linear, otherwise `false`
|
|
306
|
+
*
|
|
307
|
+
* @examplePrompt Is this edge straight or curved?
|
|
308
|
+
*
|
|
309
|
+
* # Example
|
|
310
|
+
* ```ts
|
|
311
|
+
* const [wall] = await snaptrude.design.query.listWalls()
|
|
312
|
+
* const centerline = await snaptrude.design.query.geometry.getCenterline(wall)
|
|
313
|
+
* if (centerline) {
|
|
314
|
+
* const straight = await snaptrude.core.geom.query.curve.isLinear(centerline)
|
|
315
|
+
* }
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
abstract isLinear(curve: CurveHandle): PluginApiReturn<boolean>;
|
|
319
|
+
/**
|
|
320
|
+
* Test whether a point lies on a curve within an optional threshold.
|
|
321
|
+
* @param curve The curve to query
|
|
322
|
+
* @param point The point to test
|
|
323
|
+
* @param threshold Optional distance tolerance (defaults to the engine default)
|
|
324
|
+
* @returns `true` if the point is on the curve, otherwise `false`
|
|
325
|
+
*
|
|
326
|
+
* @examplePrompt Check whether this point lies on the wall edge
|
|
327
|
+
*
|
|
328
|
+
* # Example
|
|
329
|
+
* ```ts
|
|
330
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
331
|
+
* const b = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
332
|
+
* const line = await snaptrude.core.geom.create.line(a, b)
|
|
333
|
+
* const point = await snaptrude.core.math.vec3.new(5, 0, 0.005)
|
|
334
|
+
* const on = await snaptrude.core.geom.query.curve.isOnCurve(line, point, 0.01) // true within tolerance
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
abstract isOnCurve(curve: CurveHandle, point: Vec3Handle, threshold?: number): PluginApiReturn<boolean>;
|
|
338
|
+
/**
|
|
339
|
+
* Test whether a curve contains a point, optionally including its endpoints.
|
|
340
|
+
* @param curve The curve to query
|
|
341
|
+
* @param point The point to test
|
|
342
|
+
* @param includeEndPoints Optional flag to count endpoints as contained (defaults to `true`)
|
|
343
|
+
* @returns `true` if the curve contains the point, otherwise `false`
|
|
344
|
+
*
|
|
345
|
+
* # Example
|
|
346
|
+
* ```ts
|
|
347
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
348
|
+
* const b = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
349
|
+
* const line = await snaptrude.core.geom.create.line(a, b)
|
|
350
|
+
* const atEnd = await snaptrude.core.geom.query.curve.hasPoint(line, b) // true (endpoints count by default)
|
|
351
|
+
* const interiorOnly = await snaptrude.core.geom.query.curve.hasPoint(line, b, false) // false
|
|
352
|
+
* ```
|
|
353
|
+
*/
|
|
354
|
+
abstract hasPoint(curve: CurveHandle, point: Vec3Handle, includeEndPoints?: boolean): PluginApiReturn<boolean>;
|
|
355
|
+
/**
|
|
356
|
+
* Test whether two curves are geometrically equal.
|
|
357
|
+
* @param curveA First curve
|
|
358
|
+
* @param curveB Second curve
|
|
359
|
+
* @returns `true` if the curves are equal, otherwise `false`
|
|
360
|
+
*
|
|
361
|
+
* # Example
|
|
362
|
+
* ```ts
|
|
363
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
364
|
+
* const b = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
365
|
+
* const lineA = await snaptrude.core.geom.create.line(a, b)
|
|
366
|
+
* const lineB = await snaptrude.core.geom.create.line(a, b)
|
|
367
|
+
* const same = await snaptrude.core.geom.query.curve.isEqual(lineA, lineB) // true
|
|
368
|
+
* ```
|
|
369
|
+
*/
|
|
370
|
+
abstract isEqual(curveA: CurveHandle, curveB: CurveHandle): PluginApiReturn<boolean>;
|
|
371
|
+
/**
|
|
372
|
+
* Test whether two curves overlap (share a collinear/concentric span), optionally including their endpoints.
|
|
373
|
+
* @param curveA First curve
|
|
374
|
+
* @param curveB Second curve
|
|
375
|
+
* @param includeEndPoints Optional flag to count endpoint contact as overlap (defaults to `false`)
|
|
376
|
+
* @returns `true` if the curves overlap, otherwise `false`
|
|
377
|
+
*
|
|
378
|
+
* @examplePrompt Do these two wall edges overlap?
|
|
379
|
+
*
|
|
380
|
+
* # Example
|
|
381
|
+
* ```ts
|
|
382
|
+
* const p0 = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
383
|
+
* const p5 = await snaptrude.core.math.vec3.new(5, 0, 0)
|
|
384
|
+
* const p10 = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
385
|
+
* const p15 = await snaptrude.core.math.vec3.new(15, 0, 0)
|
|
386
|
+
* const lineA = await snaptrude.core.geom.create.line(p0, p10)
|
|
387
|
+
* const lineB = await snaptrude.core.geom.create.line(p5, p15)
|
|
388
|
+
* const overlaps = await snaptrude.core.geom.query.curve.isOverlapping(lineA, lineB) // true (share the 5..10 span)
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
abstract isOverlapping(curveA: CurveHandle, curveB: CurveHandle, includeEndPoints?: boolean): PluginApiReturn<boolean>;
|
|
392
|
+
/**
|
|
393
|
+
* Get the common (overlapping) part of two curves.
|
|
394
|
+
* @param curveA First curve
|
|
395
|
+
* @param curveB Second curve
|
|
396
|
+
* @returns The common part as a {@linkcode CurveHandle}, or `null` if there is none
|
|
397
|
+
*
|
|
398
|
+
* @examplePrompt Get the shared segment where these two edges overlap
|
|
399
|
+
*
|
|
400
|
+
* # Example
|
|
401
|
+
* ```ts
|
|
402
|
+
* const p0 = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
403
|
+
* const p5 = await snaptrude.core.math.vec3.new(5, 0, 0)
|
|
404
|
+
* const p10 = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
405
|
+
* const p15 = await snaptrude.core.math.vec3.new(15, 0, 0)
|
|
406
|
+
* const lineA = await snaptrude.core.geom.create.line(p0, p10)
|
|
407
|
+
* const lineB = await snaptrude.core.geom.create.line(p5, p15)
|
|
408
|
+
* const common = await snaptrude.core.geom.query.curve.getCommonPart(lineA, lineB)
|
|
409
|
+
* if (common) {
|
|
410
|
+
* const length = await snaptrude.core.geom.query.curve.getLength(common) // 5
|
|
411
|
+
* }
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
abstract getCommonPart(curveA: CurveHandle, curveB: CurveHandle): PluginApiReturn<CurveHandle | null>;
|
|
415
|
+
/**
|
|
416
|
+
* List the intersection points between two curves.
|
|
417
|
+
* @param curveA First curve
|
|
418
|
+
* @param curveB Second curve
|
|
419
|
+
* @param boundedA Optional flag to bound intersections to `curveA`'s extent (defaults to `true`)
|
|
420
|
+
* @param boundedB Optional flag to bound intersections to `curveB`'s extent (defaults to `true`)
|
|
421
|
+
* @returns The intersection points as {@linkcode Vec3Components}`[]`
|
|
422
|
+
*
|
|
423
|
+
* @examplePrompt Where do these two lines cross?
|
|
424
|
+
* @examplePrompt Find the intersection points of these two gridlines
|
|
425
|
+
*
|
|
426
|
+
* # Example
|
|
427
|
+
* ```ts
|
|
428
|
+
* const a1 = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
429
|
+
* const a2 = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
430
|
+
* const b1 = await snaptrude.core.math.vec3.new(5, 0, -5)
|
|
431
|
+
* const b2 = await snaptrude.core.math.vec3.new(5, 0, 5)
|
|
432
|
+
* const lineA = await snaptrude.core.geom.create.line(a1, a2)
|
|
433
|
+
* const lineB = await snaptrude.core.geom.create.line(b1, b2)
|
|
434
|
+
* const points = await snaptrude.core.geom.query.curve.listIntersections(lineA, lineB) // [{ x: 5, y: 0, z: 0 }]
|
|
435
|
+
* const unbounded = await snaptrude.core.geom.query.curve.listIntersections(lineA, lineB, false, false) // treat both as infinite
|
|
436
|
+
* ```
|
|
437
|
+
*/
|
|
438
|
+
abstract listIntersections(curveA: CurveHandle, curveB: CurveHandle, boundedA?: boolean, boundedB?: boolean): PluginApiReturn<Vec3Components[]>;
|
|
439
|
+
/**
|
|
440
|
+
* Merge two curves into a single curve when they are mergeable.
|
|
441
|
+
* @param curveA First curve
|
|
442
|
+
* @param curveB Second curve
|
|
443
|
+
* @returns The merged curve as a {@linkcode CurveHandle}, or `null` if they cannot be merged
|
|
444
|
+
*
|
|
445
|
+
* @examplePrompt Merge these two line segments into a single line
|
|
446
|
+
*
|
|
447
|
+
* # Example
|
|
448
|
+
* ```ts
|
|
449
|
+
* const p0 = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
450
|
+
* const p5 = await snaptrude.core.math.vec3.new(5, 0, 0)
|
|
451
|
+
* const p10 = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
452
|
+
* const lineA = await snaptrude.core.geom.create.line(p0, p5)
|
|
453
|
+
* const lineB = await snaptrude.core.geom.create.line(p5, p10)
|
|
454
|
+
* const merged = await snaptrude.core.geom.query.curve.getMergedCurve(lineA, lineB)
|
|
455
|
+
* if (merged) {
|
|
456
|
+
* const length = await snaptrude.core.geom.query.curve.getLength(merged) // 10
|
|
457
|
+
* }
|
|
458
|
+
* ```
|
|
459
|
+
*/
|
|
460
|
+
abstract getMergedCurve(curveA: CurveHandle, curveB: CurveHandle): PluginApiReturn<CurveHandle | null>;
|
|
461
|
+
/**
|
|
462
|
+
* Test whether two curves are continuous (share an endpoint without a gap).
|
|
463
|
+
* @param curveA First curve
|
|
464
|
+
* @param curveB Second curve
|
|
465
|
+
* @returns `true` if the curves are continuous, otherwise `false`
|
|
466
|
+
*
|
|
467
|
+
* @examplePrompt Do these two edges connect end to end without a gap?
|
|
468
|
+
*
|
|
469
|
+
* # Example
|
|
470
|
+
* ```ts
|
|
471
|
+
* const a = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
472
|
+
* const b = await snaptrude.core.math.vec3.new(5, 0, 0)
|
|
473
|
+
* const c = await snaptrude.core.math.vec3.new(5, 0, 5)
|
|
474
|
+
* const lineA = await snaptrude.core.geom.create.line(a, b)
|
|
475
|
+
* const lineB = await snaptrude.core.geom.create.line(b, c)
|
|
476
|
+
* const connected = await snaptrude.core.geom.query.curve.isContinuous(lineA, lineB) // true
|
|
477
|
+
* ```
|
|
478
|
+
*/
|
|
479
|
+
abstract isContinuous(curveA: CurveHandle, curveB: CurveHandle): PluginApiReturn<boolean>;
|
|
480
|
+
/**
|
|
481
|
+
* Test whether two lines are parallel within an optional tolerance.
|
|
482
|
+
* @param lineA First line
|
|
483
|
+
* @param lineB Second line
|
|
484
|
+
* @param tolerance Optional angular tolerance (defaults to the engine default)
|
|
485
|
+
* @returns `true` if the lines are parallel, otherwise `false`
|
|
486
|
+
*
|
|
487
|
+
* @examplePrompt Are these two walls parallel?
|
|
488
|
+
* @examplePrompt Check if these gridlines run parallel to each other
|
|
489
|
+
*
|
|
490
|
+
* # Example
|
|
491
|
+
* ```ts
|
|
492
|
+
* const a1 = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
493
|
+
* const a2 = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
494
|
+
* const b1 = await snaptrude.core.math.vec3.new(0, 0, 3)
|
|
495
|
+
* const b2 = await snaptrude.core.math.vec3.new(10, 0, 3)
|
|
496
|
+
* const lineA = await snaptrude.core.geom.create.line(a1, a2)
|
|
497
|
+
* const lineB = await snaptrude.core.geom.create.line(b1, b2)
|
|
498
|
+
* const parallel = await snaptrude.core.geom.query.curve.isParallel(lineA, lineB) // true
|
|
499
|
+
* ```
|
|
500
|
+
*/
|
|
501
|
+
abstract isParallel(lineA: LineHandle, lineB: LineHandle, tolerance?: number): PluginApiReturn<boolean>;
|
|
502
|
+
/**
|
|
503
|
+
* Get the shortest gap between two curves, optionally including their endpoints.
|
|
504
|
+
* @param curveA First curve
|
|
505
|
+
* @param curveB Second curve
|
|
506
|
+
* @param includeEndPoints Optional flag to include endpoints when measuring (defaults to `false`)
|
|
507
|
+
* @returns The shortest gap as a `number`
|
|
508
|
+
*
|
|
509
|
+
* @examplePrompt What is the gap between these two wall edges?
|
|
510
|
+
* @examplePrompt How close do these two curves get to each other?
|
|
511
|
+
*
|
|
512
|
+
* # Example
|
|
513
|
+
* ```ts
|
|
514
|
+
* const a1 = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
515
|
+
* const a2 = await snaptrude.core.math.vec3.new(5, 0, 0)
|
|
516
|
+
* const b1 = await snaptrude.core.math.vec3.new(0, 0, 2)
|
|
517
|
+
* const b2 = await snaptrude.core.math.vec3.new(5, 0, 2)
|
|
518
|
+
* const curveA = await snaptrude.core.geom.create.line(a1, a2)
|
|
519
|
+
* const curveB = await snaptrude.core.geom.create.line(b1, b2)
|
|
520
|
+
* const gap = await snaptrude.core.geom.query.curve.getShortestGap(curveA, curveB) // 2
|
|
521
|
+
* ```
|
|
522
|
+
*/
|
|
523
|
+
abstract getShortestGap(curveA: CurveHandle, curveB: CurveHandle, includeEndPoints?: boolean): PluginApiReturn<number>;
|
|
524
|
+
/**
|
|
525
|
+
* Get the perpendicular distance between two parallel lines.
|
|
526
|
+
* @param lineA First line
|
|
527
|
+
* @param lineB Second line
|
|
528
|
+
* @returns The distance between the lines as a `number`
|
|
529
|
+
*
|
|
530
|
+
* @examplePrompt How far apart are these two parallel walls?
|
|
531
|
+
* @examplePrompt Measure the spacing between these two gridlines
|
|
532
|
+
*
|
|
533
|
+
* # Example
|
|
534
|
+
* ```ts
|
|
535
|
+
* const a1 = await snaptrude.core.math.vec3.new(0, 0, 0)
|
|
536
|
+
* const a2 = await snaptrude.core.math.vec3.new(10, 0, 0)
|
|
537
|
+
* const b1 = await snaptrude.core.math.vec3.new(0, 0, 4)
|
|
538
|
+
* const b2 = await snaptrude.core.math.vec3.new(10, 0, 4)
|
|
539
|
+
* const lineA = await snaptrude.core.geom.create.line(a1, a2)
|
|
540
|
+
* const lineB = await snaptrude.core.geom.create.line(b1, b2)
|
|
541
|
+
* const spacing = await snaptrude.core.geom.query.curve.getDistanceBetween(lineA, lineB) // 4
|
|
542
|
+
* ```
|
|
543
|
+
*/
|
|
544
|
+
abstract getDistanceBetween(lineA: LineHandle, lineB: LineHandle): PluginApiReturn<number>;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getStartPoint}.
|
|
548
|
+
*
|
|
549
|
+
* | Property | Type | Description |
|
|
550
|
+
* |---|---|---|
|
|
551
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
552
|
+
*/
|
|
553
|
+
export declare const PluginGeomQueryCurveGetStartPointArgs: z.ZodObject<{
|
|
554
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
555
|
+
}, z.core.$strip>;
|
|
556
|
+
export type PluginGeomQueryCurveGetStartPointArgs = z.infer<typeof PluginGeomQueryCurveGetStartPointArgs>;
|
|
557
|
+
/**
|
|
558
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getEndPoint}.
|
|
559
|
+
*
|
|
560
|
+
* | Property | Type | Description |
|
|
561
|
+
* |---|---|---|
|
|
562
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
563
|
+
*/
|
|
564
|
+
export declare const PluginGeomQueryCurveGetEndPointArgs: z.ZodObject<{
|
|
565
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
566
|
+
}, z.core.$strip>;
|
|
567
|
+
export type PluginGeomQueryCurveGetEndPointArgs = z.infer<typeof PluginGeomQueryCurveGetEndPointArgs>;
|
|
568
|
+
/**
|
|
569
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getMidPoint}.
|
|
570
|
+
*
|
|
571
|
+
* | Property | Type | Description |
|
|
572
|
+
* |---|---|---|
|
|
573
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
574
|
+
*/
|
|
575
|
+
export declare const PluginGeomQueryCurveGetMidPointArgs: z.ZodObject<{
|
|
576
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
577
|
+
}, z.core.$strip>;
|
|
578
|
+
export type PluginGeomQueryCurveGetMidPointArgs = z.infer<typeof PluginGeomQueryCurveGetMidPointArgs>;
|
|
579
|
+
/**
|
|
580
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getLength}.
|
|
581
|
+
*
|
|
582
|
+
* | Property | Type | Description |
|
|
583
|
+
* |---|---|---|
|
|
584
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
585
|
+
*/
|
|
586
|
+
export declare const PluginGeomQueryCurveGetLengthArgs: z.ZodObject<{
|
|
587
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
588
|
+
}, z.core.$strip>;
|
|
589
|
+
export type PluginGeomQueryCurveGetLengthArgs = z.infer<typeof PluginGeomQueryCurveGetLengthArgs>;
|
|
590
|
+
/**
|
|
591
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getChordLength}.
|
|
592
|
+
*
|
|
593
|
+
* | Property | Type | Description |
|
|
594
|
+
* |---|---|---|
|
|
595
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
596
|
+
*/
|
|
597
|
+
export declare const PluginGeomQueryCurveGetChordLengthArgs: z.ZodObject<{
|
|
598
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
599
|
+
}, z.core.$strip>;
|
|
600
|
+
export type PluginGeomQueryCurveGetChordLengthArgs = z.infer<typeof PluginGeomQueryCurveGetChordLengthArgs>;
|
|
601
|
+
/**
|
|
602
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getTangent}.
|
|
603
|
+
*
|
|
604
|
+
* | Property | Type | Description |
|
|
605
|
+
* |---|---|---|
|
|
606
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
607
|
+
* | `point` | {@linkcode Vec3Handle} | Point on the curve |
|
|
608
|
+
*/
|
|
609
|
+
export declare const PluginGeomQueryCurveGetTangentArgs: z.ZodObject<{
|
|
610
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
611
|
+
point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
612
|
+
}, z.core.$strip>;
|
|
613
|
+
export type PluginGeomQueryCurveGetTangentArgs = z.infer<typeof PluginGeomQueryCurveGetTangentArgs>;
|
|
614
|
+
/**
|
|
615
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getNormal}.
|
|
616
|
+
*
|
|
617
|
+
* | Property | Type | Description |
|
|
618
|
+
* |---|---|---|
|
|
619
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
620
|
+
* | `point` | {@linkcode Vec3Handle} | Point on the curve |
|
|
621
|
+
*/
|
|
622
|
+
export declare const PluginGeomQueryCurveGetNormalArgs: z.ZodObject<{
|
|
623
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
624
|
+
point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
625
|
+
}, z.core.$strip>;
|
|
626
|
+
export type PluginGeomQueryCurveGetNormalArgs = z.infer<typeof PluginGeomQueryCurveGetNormalArgs>;
|
|
627
|
+
/**
|
|
628
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getNearestPoint}.
|
|
629
|
+
*
|
|
630
|
+
* | Property | Type | Description |
|
|
631
|
+
* |---|---|---|
|
|
632
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
633
|
+
* | `point` | {@linkcode Vec3Handle} | The reference point |
|
|
634
|
+
*/
|
|
635
|
+
export declare const PluginGeomQueryCurveGetNearestPointArgs: z.ZodObject<{
|
|
636
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
637
|
+
point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
638
|
+
}, z.core.$strip>;
|
|
639
|
+
export type PluginGeomQueryCurveGetNearestPointArgs = z.infer<typeof PluginGeomQueryCurveGetNearestPointArgs>;
|
|
640
|
+
/**
|
|
641
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getProjection}.
|
|
642
|
+
*
|
|
643
|
+
* | Property | Type | Description |
|
|
644
|
+
* |---|---|---|
|
|
645
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to project onto |
|
|
646
|
+
* | `point` | {@linkcode Vec3Handle} | The point to project |
|
|
647
|
+
*/
|
|
648
|
+
export declare const PluginGeomQueryCurveGetProjectionArgs: z.ZodObject<{
|
|
649
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
650
|
+
point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
651
|
+
}, z.core.$strip>;
|
|
652
|
+
export type PluginGeomQueryCurveGetProjectionArgs = z.infer<typeof PluginGeomQueryCurveGetProjectionArgs>;
|
|
653
|
+
/**
|
|
654
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getPointAtDistance}.
|
|
655
|
+
*
|
|
656
|
+
* | Property | Type | Description |
|
|
657
|
+
* |---|---|---|
|
|
658
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
659
|
+
* | `referencePoint` | {@linkcode Vec3Handle} | Point on the curve to measure from |
|
|
660
|
+
* | `distance` | `number` | Distance along the curve from the reference point |
|
|
661
|
+
* | `forward` | `boolean` | Optional direction along the curve (defaults to `true`) |
|
|
662
|
+
*/
|
|
663
|
+
export declare const PluginGeomQueryCurveGetPointAtDistanceArgs: z.ZodObject<{
|
|
664
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
665
|
+
referencePoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
666
|
+
distance: z.ZodNumber;
|
|
667
|
+
forward: z.ZodOptional<z.ZodBoolean>;
|
|
668
|
+
}, z.core.$strip>;
|
|
669
|
+
export type PluginGeomQueryCurveGetPointAtDistanceArgs = z.infer<typeof PluginGeomQueryCurveGetPointAtDistanceArgs>;
|
|
670
|
+
/**
|
|
671
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getParameterAtPoint}.
|
|
672
|
+
*
|
|
673
|
+
* | Property | Type | Description |
|
|
674
|
+
* |---|---|---|
|
|
675
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
676
|
+
* | `point` | {@linkcode Vec3Handle} | Point on the curve |
|
|
677
|
+
*/
|
|
678
|
+
export declare const PluginGeomQueryCurveGetParameterAtPointArgs: z.ZodObject<{
|
|
679
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
680
|
+
point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
681
|
+
}, z.core.$strip>;
|
|
682
|
+
export type PluginGeomQueryCurveGetParameterAtPointArgs = z.infer<typeof PluginGeomQueryCurveGetParameterAtPointArgs>;
|
|
683
|
+
/**
|
|
684
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getCurvature}.
|
|
685
|
+
*
|
|
686
|
+
* | Property | Type | Description |
|
|
687
|
+
* |---|---|---|
|
|
688
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
689
|
+
* | `point` | {@linkcode Vec3Handle} | Point on the curve |
|
|
690
|
+
*/
|
|
691
|
+
export declare const PluginGeomQueryCurveGetCurvatureArgs: z.ZodObject<{
|
|
692
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
693
|
+
point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
694
|
+
}, z.core.$strip>;
|
|
695
|
+
export type PluginGeomQueryCurveGetCurvatureArgs = z.infer<typeof PluginGeomQueryCurveGetCurvatureArgs>;
|
|
696
|
+
/**
|
|
697
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getDistanceToPoint}.
|
|
698
|
+
*
|
|
699
|
+
* | Property | Type | Description |
|
|
700
|
+
* |---|---|---|
|
|
701
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
702
|
+
* | `point` | {@linkcode Vec3Handle} | The point to measure from |
|
|
703
|
+
*/
|
|
704
|
+
export declare const PluginGeomQueryCurveGetDistanceToPointArgs: z.ZodObject<{
|
|
705
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
706
|
+
point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
707
|
+
}, z.core.$strip>;
|
|
708
|
+
export type PluginGeomQueryCurveGetDistanceToPointArgs = z.infer<typeof PluginGeomQueryCurveGetDistanceToPointArgs>;
|
|
709
|
+
/**
|
|
710
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getDistanceAlong}.
|
|
711
|
+
*
|
|
712
|
+
* | Property | Type | Description |
|
|
713
|
+
* |---|---|---|
|
|
714
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
715
|
+
* | `pointA` | {@linkcode Vec3Handle} | First point on the curve |
|
|
716
|
+
* | `pointB` | {@linkcode Vec3Handle} | Second point on the curve |
|
|
717
|
+
*/
|
|
718
|
+
export declare const PluginGeomQueryCurveGetDistanceAlongArgs: z.ZodObject<{
|
|
719
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
720
|
+
pointA: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
721
|
+
pointB: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
722
|
+
}, z.core.$strip>;
|
|
723
|
+
export type PluginGeomQueryCurveGetDistanceAlongArgs = z.infer<typeof PluginGeomQueryCurveGetDistanceAlongArgs>;
|
|
724
|
+
/**
|
|
725
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.listPoints}.
|
|
726
|
+
*
|
|
727
|
+
* | Property | Type | Description |
|
|
728
|
+
* |---|---|---|
|
|
729
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to sample |
|
|
730
|
+
* | `resolution` | `number` | Optional number of samples for arcs (defaults to `20`; ignored for lines) |
|
|
731
|
+
*/
|
|
732
|
+
export declare const PluginGeomQueryCurveListPointsArgs: z.ZodObject<{
|
|
733
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
734
|
+
resolution: z.ZodOptional<z.ZodNumber>;
|
|
735
|
+
}, z.core.$strip>;
|
|
736
|
+
export type PluginGeomQueryCurveListPointsArgs = z.infer<typeof PluginGeomQueryCurveListPointsArgs>;
|
|
737
|
+
/**
|
|
738
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.listSubdivisions}.
|
|
739
|
+
*
|
|
740
|
+
* | Property | Type | Description |
|
|
741
|
+
* |---|---|---|
|
|
742
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to subdivide |
|
|
743
|
+
* | `segments` | `number` | Number of equal segments to divide the curve into |
|
|
744
|
+
*/
|
|
745
|
+
export declare const PluginGeomQueryCurveListSubdivisionsArgs: z.ZodObject<{
|
|
746
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
747
|
+
segments: z.ZodNumber;
|
|
748
|
+
}, z.core.$strip>;
|
|
749
|
+
export type PluginGeomQueryCurveListSubdivisionsArgs = z.infer<typeof PluginGeomQueryCurveListSubdivisionsArgs>;
|
|
750
|
+
/**
|
|
751
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.isLinear}.
|
|
752
|
+
*
|
|
753
|
+
* | Property | Type | Description |
|
|
754
|
+
* |---|---|---|
|
|
755
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
756
|
+
*/
|
|
757
|
+
export declare const PluginGeomQueryCurveIsLinearArgs: z.ZodObject<{
|
|
758
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
759
|
+
}, z.core.$strip>;
|
|
760
|
+
export type PluginGeomQueryCurveIsLinearArgs = z.infer<typeof PluginGeomQueryCurveIsLinearArgs>;
|
|
761
|
+
/**
|
|
762
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.isOnCurve}.
|
|
763
|
+
*
|
|
764
|
+
* | Property | Type | Description |
|
|
765
|
+
* |---|---|---|
|
|
766
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
767
|
+
* | `point` | {@linkcode Vec3Handle} | The point to test |
|
|
768
|
+
* | `threshold` | `number` | Optional distance tolerance (defaults to the engine default) |
|
|
769
|
+
*/
|
|
770
|
+
export declare const PluginGeomQueryCurveIsOnCurveArgs: z.ZodObject<{
|
|
771
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
772
|
+
point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
773
|
+
threshold: z.ZodOptional<z.ZodNumber>;
|
|
774
|
+
}, z.core.$strip>;
|
|
775
|
+
export type PluginGeomQueryCurveIsOnCurveArgs = z.infer<typeof PluginGeomQueryCurveIsOnCurveArgs>;
|
|
776
|
+
/**
|
|
777
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.hasPoint}.
|
|
778
|
+
*
|
|
779
|
+
* | Property | Type | Description |
|
|
780
|
+
* |---|---|---|
|
|
781
|
+
* | `curve` | {@linkcode CurveHandle} | The curve to query |
|
|
782
|
+
* | `point` | {@linkcode Vec3Handle} | The point to test |
|
|
783
|
+
* | `includeEndPoints` | `boolean` | Optional flag to count endpoints as contained (defaults to `true`) |
|
|
784
|
+
*/
|
|
785
|
+
export declare const PluginGeomQueryCurveHasPointArgs: z.ZodObject<{
|
|
786
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
787
|
+
point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
788
|
+
includeEndPoints: z.ZodOptional<z.ZodBoolean>;
|
|
789
|
+
}, z.core.$strip>;
|
|
790
|
+
export type PluginGeomQueryCurveHasPointArgs = z.infer<typeof PluginGeomQueryCurveHasPointArgs>;
|
|
791
|
+
/**
|
|
792
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.isEqual}.
|
|
793
|
+
*
|
|
794
|
+
* | Property | Type | Description |
|
|
795
|
+
* |---|---|---|
|
|
796
|
+
* | `curveA` | {@linkcode CurveHandle} | First curve |
|
|
797
|
+
* | `curveB` | {@linkcode CurveHandle} | Second curve |
|
|
798
|
+
*/
|
|
799
|
+
export declare const PluginGeomQueryCurveIsEqualArgs: z.ZodObject<{
|
|
800
|
+
curveA: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
801
|
+
curveB: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
802
|
+
}, z.core.$strip>;
|
|
803
|
+
export type PluginGeomQueryCurveIsEqualArgs = z.infer<typeof PluginGeomQueryCurveIsEqualArgs>;
|
|
804
|
+
/**
|
|
805
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.isOverlapping}.
|
|
806
|
+
*
|
|
807
|
+
* | Property | Type | Description |
|
|
808
|
+
* |---|---|---|
|
|
809
|
+
* | `curveA` | {@linkcode CurveHandle} | First curve |
|
|
810
|
+
* | `curveB` | {@linkcode CurveHandle} | Second curve |
|
|
811
|
+
* | `includeEndPoints` | `boolean` | Optional flag to count endpoint contact as overlap (defaults to `false`) |
|
|
812
|
+
*/
|
|
813
|
+
export declare const PluginGeomQueryCurveIsOverlappingArgs: z.ZodObject<{
|
|
814
|
+
curveA: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
815
|
+
curveB: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
816
|
+
includeEndPoints: z.ZodOptional<z.ZodBoolean>;
|
|
817
|
+
}, z.core.$strip>;
|
|
818
|
+
export type PluginGeomQueryCurveIsOverlappingArgs = z.infer<typeof PluginGeomQueryCurveIsOverlappingArgs>;
|
|
819
|
+
/**
|
|
820
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getCommonPart}.
|
|
821
|
+
*
|
|
822
|
+
* | Property | Type | Description |
|
|
823
|
+
* |---|---|---|
|
|
824
|
+
* | `curveA` | {@linkcode CurveHandle} | First curve |
|
|
825
|
+
* | `curveB` | {@linkcode CurveHandle} | Second curve |
|
|
826
|
+
*/
|
|
827
|
+
export declare const PluginGeomQueryCurveGetCommonPartArgs: z.ZodObject<{
|
|
828
|
+
curveA: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
829
|
+
curveB: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
830
|
+
}, z.core.$strip>;
|
|
831
|
+
export type PluginGeomQueryCurveGetCommonPartArgs = z.infer<typeof PluginGeomQueryCurveGetCommonPartArgs>;
|
|
832
|
+
/**
|
|
833
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.listIntersections}.
|
|
834
|
+
*
|
|
835
|
+
* | Property | Type | Description |
|
|
836
|
+
* |---|---|---|
|
|
837
|
+
* | `curveA` | {@linkcode CurveHandle} | First curve |
|
|
838
|
+
* | `curveB` | {@linkcode CurveHandle} | Second curve |
|
|
839
|
+
* | `boundedA` | `boolean` | Optional flag to bound intersections to `curveA`'s extent (defaults to `true`) |
|
|
840
|
+
* | `boundedB` | `boolean` | Optional flag to bound intersections to `curveB`'s extent (defaults to `true`) |
|
|
841
|
+
*/
|
|
842
|
+
export declare const PluginGeomQueryCurveListIntersectionsArgs: z.ZodObject<{
|
|
843
|
+
curveA: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
844
|
+
curveB: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
845
|
+
boundedA: z.ZodOptional<z.ZodBoolean>;
|
|
846
|
+
boundedB: z.ZodOptional<z.ZodBoolean>;
|
|
847
|
+
}, z.core.$strip>;
|
|
848
|
+
export type PluginGeomQueryCurveListIntersectionsArgs = z.infer<typeof PluginGeomQueryCurveListIntersectionsArgs>;
|
|
849
|
+
/**
|
|
850
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getMergedCurve}.
|
|
851
|
+
*
|
|
852
|
+
* | Property | Type | Description |
|
|
853
|
+
* |---|---|---|
|
|
854
|
+
* | `curveA` | {@linkcode CurveHandle} | First curve |
|
|
855
|
+
* | `curveB` | {@linkcode CurveHandle} | Second curve |
|
|
856
|
+
*/
|
|
857
|
+
export declare const PluginGeomQueryCurveGetMergedCurveArgs: z.ZodObject<{
|
|
858
|
+
curveA: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
859
|
+
curveB: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
860
|
+
}, z.core.$strip>;
|
|
861
|
+
export type PluginGeomQueryCurveGetMergedCurveArgs = z.infer<typeof PluginGeomQueryCurveGetMergedCurveArgs>;
|
|
862
|
+
/**
|
|
863
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.isContinuous}.
|
|
864
|
+
*
|
|
865
|
+
* | Property | Type | Description |
|
|
866
|
+
* |---|---|---|
|
|
867
|
+
* | `curveA` | {@linkcode CurveHandle} | First curve |
|
|
868
|
+
* | `curveB` | {@linkcode CurveHandle} | Second curve |
|
|
869
|
+
*/
|
|
870
|
+
export declare const PluginGeomQueryCurveIsContinuousArgs: z.ZodObject<{
|
|
871
|
+
curveA: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
872
|
+
curveB: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
873
|
+
}, z.core.$strip>;
|
|
874
|
+
export type PluginGeomQueryCurveIsContinuousArgs = z.infer<typeof PluginGeomQueryCurveIsContinuousArgs>;
|
|
875
|
+
/**
|
|
876
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.isParallel}.
|
|
877
|
+
*
|
|
878
|
+
* | Property | Type | Description |
|
|
879
|
+
* |---|---|---|
|
|
880
|
+
* | `lineA` | {@linkcode LineHandle} | First line |
|
|
881
|
+
* | `lineB` | {@linkcode LineHandle} | Second line |
|
|
882
|
+
* | `tolerance` | `number` | Optional angular tolerance (defaults to the engine default) |
|
|
883
|
+
*/
|
|
884
|
+
export declare const PluginGeomQueryCurveIsParallelArgs: z.ZodObject<{
|
|
885
|
+
lineA: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>;
|
|
886
|
+
lineB: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>;
|
|
887
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
888
|
+
}, z.core.$strip>;
|
|
889
|
+
export type PluginGeomQueryCurveIsParallelArgs = z.infer<typeof PluginGeomQueryCurveIsParallelArgs>;
|
|
890
|
+
/**
|
|
891
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getShortestGap}.
|
|
892
|
+
*
|
|
893
|
+
* | Property | Type | Description |
|
|
894
|
+
* |---|---|---|
|
|
895
|
+
* | `curveA` | {@linkcode CurveHandle} | First curve |
|
|
896
|
+
* | `curveB` | {@linkcode CurveHandle} | Second curve |
|
|
897
|
+
* | `includeEndPoints` | `boolean` | Optional flag to include endpoints when measuring (defaults to `false`) |
|
|
898
|
+
*/
|
|
899
|
+
export declare const PluginGeomQueryCurveGetShortestGapArgs: z.ZodObject<{
|
|
900
|
+
curveA: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
901
|
+
curveB: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
|
|
902
|
+
includeEndPoints: z.ZodOptional<z.ZodBoolean>;
|
|
903
|
+
}, z.core.$strip>;
|
|
904
|
+
export type PluginGeomQueryCurveGetShortestGapArgs = z.infer<typeof PluginGeomQueryCurveGetShortestGapArgs>;
|
|
905
|
+
/**
|
|
906
|
+
* Arguments for {@linkcode PluginGeomQueryCurveApi.getDistanceBetween}.
|
|
907
|
+
*
|
|
908
|
+
* | Property | Type | Description |
|
|
909
|
+
* |---|---|---|
|
|
910
|
+
* | `lineA` | {@linkcode LineHandle} | First line |
|
|
911
|
+
* | `lineB` | {@linkcode LineHandle} | Second line |
|
|
912
|
+
*/
|
|
913
|
+
export declare const PluginGeomQueryCurveGetDistanceBetweenArgs: z.ZodObject<{
|
|
914
|
+
lineA: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>;
|
|
915
|
+
lineB: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>;
|
|
916
|
+
}, z.core.$strip>;
|
|
917
|
+
export type PluginGeomQueryCurveGetDistanceBetweenArgs = z.infer<typeof PluginGeomQueryCurveGetDistanceBetweenArgs>;
|
|
918
|
+
//# sourceMappingURL=curve.d.ts.map
|