@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.
Files changed (269) hide show
  1. package/AGENTS.md +128 -50
  2. package/CHANGELOG.md +52 -6
  3. package/api-manifest.full.json +3999 -0
  4. package/api-manifest.json +3845 -0
  5. package/dist/api/core/buildings.d.ts +427 -0
  6. package/dist/api/core/buildings.d.ts.map +1 -0
  7. package/dist/api/core/comment/index.d.ts +230 -0
  8. package/dist/api/core/comment/index.d.ts.map +1 -0
  9. package/dist/api/core/geom/create/index.d.ts +247 -0
  10. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  11. package/dist/api/core/geom/delete/index.d.ts +72 -0
  12. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  13. package/dist/api/core/geom/index.d.ts +24 -23
  14. package/dist/api/core/geom/index.d.ts.map +1 -1
  15. package/dist/api/core/geom/query/arc.d.ts +169 -0
  16. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  17. package/dist/api/core/geom/query/brep.d.ts +402 -0
  18. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  19. package/dist/api/core/geom/query/circle.d.ts +378 -0
  20. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  21. package/dist/api/core/geom/query/contour.d.ts +450 -0
  22. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  23. package/dist/api/core/geom/query/curve.d.ts +918 -0
  24. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  25. package/dist/api/core/geom/query/edge.d.ts +128 -0
  26. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  27. package/dist/api/core/geom/query/face.d.ts +363 -0
  28. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  29. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  30. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  31. package/dist/api/core/geom/query/index.d.ts +61 -0
  32. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  33. package/dist/api/core/geom/query/profile.d.ts +410 -0
  34. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  36. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  37. package/dist/api/core/geom/update/contour.d.ts +272 -0
  38. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  39. package/dist/api/core/geom/update/curve.d.ts +180 -0
  40. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  41. package/dist/api/core/geom/update/index.d.ts +27 -0
  42. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  43. package/dist/api/core/geom/update/profile.d.ts +329 -0
  44. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  45. package/dist/api/core/groups.d.ts +485 -0
  46. package/dist/api/core/groups.d.ts.map +1 -0
  47. package/dist/api/core/history/index.d.ts +78 -0
  48. package/dist/api/core/history/index.d.ts.map +1 -0
  49. package/dist/api/core/index.d.ts +46 -1
  50. package/dist/api/core/index.d.ts.map +1 -1
  51. package/dist/api/core/layers.d.ts +402 -0
  52. package/dist/api/core/layers.d.ts.map +1 -0
  53. package/dist/api/core/math/quat.d.ts +111 -128
  54. package/dist/api/core/math/quat.d.ts.map +1 -1
  55. package/dist/api/core/math/vec3.d.ts +120 -102
  56. package/dist/api/core/math/vec3.d.ts.map +1 -1
  57. package/dist/api/core/project/index.d.ts +399 -0
  58. package/dist/api/core/project/index.d.ts.map +1 -0
  59. package/dist/api/core/tags.d.ts +755 -0
  60. package/dist/api/core/tags.d.ts.map +1 -0
  61. package/dist/api/core/units/index.d.ts +175 -0
  62. package/dist/api/core/units/index.d.ts.map +1 -0
  63. package/dist/api/core/zoom/index.d.ts +45 -0
  64. package/dist/api/core/zoom/index.d.ts.map +1 -0
  65. package/dist/api/design/boolean/index.d.ts +168 -0
  66. package/dist/api/design/boolean/index.d.ts.map +1 -0
  67. package/dist/api/design/create/index.d.ts +828 -0
  68. package/dist/api/design/create/index.d.ts.map +1 -0
  69. package/dist/api/design/delete/index.d.ts +63 -0
  70. package/dist/api/design/delete/index.d.ts.map +1 -0
  71. package/dist/api/design/doors/index.d.ts +268 -0
  72. package/dist/api/design/doors/index.d.ts.map +1 -0
  73. package/dist/api/design/edit/index.d.ts +49 -0
  74. package/dist/api/design/edit/index.d.ts.map +1 -0
  75. package/dist/api/design/erase/index.d.ts +160 -0
  76. package/dist/api/design/erase/index.d.ts.map +1 -0
  77. package/dist/api/design/furniture/index.d.ts +123 -0
  78. package/dist/api/design/furniture/index.d.ts.map +1 -0
  79. package/dist/api/design/index.d.ts +153 -0
  80. package/dist/api/design/index.d.ts.map +1 -0
  81. package/dist/api/design/lock.d.ts +41 -0
  82. package/dist/api/design/lock.d.ts.map +1 -0
  83. package/dist/api/design/materials/index.d.ts +297 -0
  84. package/dist/api/design/materials/index.d.ts.map +1 -0
  85. package/dist/api/design/query/geometry/index.d.ts +140 -0
  86. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  87. package/dist/api/design/query/index.d.ts +1011 -0
  88. package/dist/api/design/query/index.d.ts.map +1 -0
  89. package/dist/api/design/query/spaces.d.ts +221 -0
  90. package/dist/api/design/query/spaces.d.ts.map +1 -0
  91. package/dist/api/design/selection/index.d.ts +138 -0
  92. package/dist/api/design/selection/index.d.ts.map +1 -0
  93. package/dist/api/design/shared.d.ts +38 -0
  94. package/dist/api/design/shared.d.ts.map +1 -0
  95. package/dist/api/design/transform/index.d.ts +87 -0
  96. package/dist/api/design/transform/index.d.ts.map +1 -0
  97. package/dist/api/design/update/index.d.ts +178 -0
  98. package/dist/api/design/update/index.d.ts.map +1 -0
  99. package/dist/api/design/windows/index.d.ts +189 -0
  100. package/dist/api/design/windows/index.d.ts.map +1 -0
  101. package/dist/api/entity/buildableEnvelope.d.ts +51 -23
  102. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  103. package/dist/api/entity/department.d.ts +0 -98
  104. package/dist/api/entity/department.d.ts.map +1 -1
  105. package/dist/api/entity/index.d.ts +4 -9
  106. package/dist/api/entity/index.d.ts.map +1 -1
  107. package/dist/api/entity/referenceLine.d.ts +49 -106
  108. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  109. package/dist/api/entity/space.d.ts +76 -828
  110. package/dist/api/entity/space.d.ts.map +1 -1
  111. package/dist/api/entity/story.d.ts +47 -37
  112. package/dist/api/entity/story.d.ts.map +1 -1
  113. package/dist/api/index.d.ts +17 -17
  114. package/dist/api/index.d.ts.map +1 -1
  115. package/dist/api/presentation/aiInspiration.d.ts +440 -0
  116. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  117. package/dist/api/presentation/diagrams.d.ts +81 -0
  118. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  119. package/dist/api/presentation/import.d.ts +113 -0
  120. package/dist/api/presentation/import.d.ts.map +1 -0
  121. package/dist/api/presentation/index.d.ts +46 -0
  122. package/dist/api/presentation/index.d.ts.map +1 -0
  123. package/dist/api/presentation/sheets.d.ts +176 -0
  124. package/dist/api/presentation/sheets.d.ts.map +1 -0
  125. package/dist/api/presentation/views.d.ts +296 -0
  126. package/dist/api/presentation/views.d.ts.map +1 -0
  127. package/dist/api/program/adjacency.d.ts +155 -0
  128. package/dist/api/program/adjacency.d.ts.map +1 -0
  129. package/dist/api/program/areas.d.ts +360 -0
  130. package/dist/api/program/areas.d.ts.map +1 -0
  131. package/dist/api/program/classification.d.ts +135 -0
  132. package/dist/api/program/classification.d.ts.map +1 -0
  133. package/dist/api/program/cores.d.ts +174 -0
  134. package/dist/api/program/cores.d.ts.map +1 -0
  135. package/dist/api/program/departments.d.ts +431 -0
  136. package/dist/api/program/departments.d.ts.map +1 -0
  137. package/dist/api/program/index.d.ts +69 -0
  138. package/dist/api/program/index.d.ts.map +1 -0
  139. package/dist/api/program/layout.d.ts +63 -0
  140. package/dist/api/program/layout.d.ts.map +1 -0
  141. package/dist/api/program/metrics.d.ts +108 -0
  142. package/dist/api/program/metrics.d.ts.map +1 -0
  143. package/dist/api/program/site.d.ts +367 -0
  144. package/dist/api/program/site.d.ts.map +1 -0
  145. package/dist/api/program/spreadsheet.d.ts +2041 -0
  146. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  147. package/dist/handles.d.ts +138 -0
  148. package/dist/handles.d.ts.map +1 -0
  149. package/dist/host-utils.d.ts +7 -5
  150. package/dist/host-utils.d.ts.map +1 -1
  151. package/dist/index.cjs +3897 -1542
  152. package/dist/index.cjs.map +1 -1
  153. package/dist/index.d.ts +1 -0
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +3326 -1462
  156. package/dist/index.js.map +1 -1
  157. package/package.json +6 -2
  158. package/scripts/generate-manifest.mjs +193 -0
  159. package/scripts/generate-manifest.test.mjs +193 -0
  160. package/src/api/core/buildings.ts +485 -0
  161. package/src/api/core/comment/index.ts +258 -0
  162. package/src/api/core/geom/create/index.ts +293 -0
  163. package/src/api/core/geom/delete/index.ts +78 -0
  164. package/src/api/core/geom/index.ts +24 -23
  165. package/src/api/core/geom/query/arc.ts +169 -0
  166. package/src/api/core/geom/query/brep.ts +444 -0
  167. package/src/api/core/geom/query/circle.ts +404 -0
  168. package/src/api/core/geom/query/contour.ts +540 -0
  169. package/src/api/core/geom/query/curve.ts +1078 -0
  170. package/src/api/core/geom/query/edge.ts +130 -0
  171. package/src/api/core/geom/query/face.ts +403 -0
  172. package/src/api/core/geom/query/halfedge.ts +210 -0
  173. package/src/api/core/geom/query/index.ts +63 -0
  174. package/src/api/core/geom/query/profile.ts +473 -0
  175. package/src/api/core/geom/query/vertex.ts +205 -0
  176. package/src/api/core/geom/update/contour.ts +315 -0
  177. package/src/api/core/geom/update/curve.ts +209 -0
  178. package/src/api/core/geom/update/index.ts +29 -0
  179. package/src/api/core/geom/update/profile.ts +377 -0
  180. package/src/api/core/groups.ts +521 -0
  181. package/src/api/core/history/index.ts +84 -0
  182. package/src/api/core/index.ts +46 -1
  183. package/src/api/core/layers.ts +333 -0
  184. package/src/api/core/math/quat.ts +112 -235
  185. package/src/api/core/math/vec3.ts +124 -159
  186. package/src/api/core/project/index.ts +418 -0
  187. package/src/api/core/tags.ts +808 -0
  188. package/src/api/core/units/index.ts +164 -0
  189. package/src/api/core/zoom/index.ts +47 -0
  190. package/src/api/design/boolean/index.ts +179 -0
  191. package/src/api/design/create/index.ts +886 -0
  192. package/src/api/design/delete/index.ts +67 -0
  193. package/src/api/design/doors/index.ts +285 -0
  194. package/src/api/design/edit/index.ts +54 -0
  195. package/src/api/design/erase/index.ts +151 -0
  196. package/src/api/design/furniture/index.ts +130 -0
  197. package/src/api/design/index.ts +162 -0
  198. package/src/api/design/lock.ts +42 -0
  199. package/src/api/design/materials/index.ts +301 -0
  200. package/src/api/design/query/geometry/index.ts +166 -0
  201. package/src/api/design/query/index.ts +937 -0
  202. package/src/api/design/query/spaces.ts +132 -0
  203. package/src/api/design/selection/index.ts +144 -0
  204. package/src/api/design/shared.ts +40 -0
  205. package/src/api/design/transform/index.ts +93 -0
  206. package/src/api/design/update/index.ts +117 -0
  207. package/src/api/design/windows/index.ts +207 -0
  208. package/src/api/entity/buildableEnvelope.ts +64 -23
  209. package/src/api/entity/department.ts +0 -113
  210. package/src/api/entity/index.ts +4 -9
  211. package/src/api/entity/referenceLine.ts +50 -38
  212. package/src/api/entity/space.ts +84 -440
  213. package/src/api/entity/story.ts +53 -42
  214. package/src/api/index.ts +17 -17
  215. package/src/api/presentation/aiInspiration.ts +362 -0
  216. package/src/api/presentation/diagrams.ts +84 -0
  217. package/src/api/presentation/import.ts +112 -0
  218. package/src/api/presentation/index.ts +48 -0
  219. package/src/api/presentation/sheets.ts +198 -0
  220. package/src/api/presentation/views.ts +303 -0
  221. package/src/api/program/adjacency.ts +164 -0
  222. package/src/api/program/areas.ts +335 -0
  223. package/src/api/program/classification.ts +138 -0
  224. package/src/api/program/cores.ts +171 -0
  225. package/src/api/program/departments.ts +465 -0
  226. package/src/api/program/index.ts +71 -0
  227. package/src/api/program/layout.ts +68 -0
  228. package/src/api/program/metrics.ts +120 -0
  229. package/src/api/program/site.ts +326 -0
  230. package/src/api/program/spreadsheet.ts +2075 -0
  231. package/src/handles.ts +148 -0
  232. package/src/host-utils.ts +10 -6
  233. package/src/index.ts +1 -0
  234. package/dist/api/core/geom/arc.d.ts +0 -81
  235. package/dist/api/core/geom/arc.d.ts.map +0 -1
  236. package/dist/api/core/geom/curve.d.ts +0 -70
  237. package/dist/api/core/geom/curve.d.ts.map +0 -1
  238. package/dist/api/core/geom/line.d.ts +0 -56
  239. package/dist/api/core/geom/line.d.ts.map +0 -1
  240. package/dist/api/core/geom/profile.d.ts +0 -121
  241. package/dist/api/core/geom/profile.d.ts.map +0 -1
  242. package/dist/api/documentation/aiInspiration.d.ts +0 -2155
  243. package/dist/api/documentation/aiInspiration.d.ts.map +0 -1
  244. package/dist/api/documentation/index.d.ts +0 -13
  245. package/dist/api/documentation/index.d.ts.map +0 -1
  246. package/dist/api/tools/copy.d.ts +0 -59
  247. package/dist/api/tools/copy.d.ts.map +0 -1
  248. package/dist/api/tools/index.d.ts +0 -29
  249. package/dist/api/tools/index.d.ts.map +0 -1
  250. package/dist/api/tools/offset.d.ts +0 -43
  251. package/dist/api/tools/offset.d.ts.map +0 -1
  252. package/dist/api/tools/selection.d.ts +0 -48
  253. package/dist/api/tools/selection.d.ts.map +0 -1
  254. package/dist/api/tools/transform.d.ts +0 -114
  255. package/dist/api/tools/transform.d.ts.map +0 -1
  256. package/dist/api/units/index.d.ts +0 -163
  257. package/dist/api/units/index.d.ts.map +0 -1
  258. package/src/api/core/geom/arc.ts +0 -70
  259. package/src/api/core/geom/curve.ts +0 -41
  260. package/src/api/core/geom/line.ts +0 -53
  261. package/src/api/core/geom/profile.ts +0 -94
  262. package/src/api/documentation/aiInspiration.ts +0 -871
  263. package/src/api/documentation/index.ts +0 -15
  264. package/src/api/tools/copy.ts +0 -55
  265. package/src/api/tools/index.ts +0 -35
  266. package/src/api/tools/offset.ts +0 -43
  267. package/src/api/tools/selection.ts +0 -51
  268. package/src/api/tools/transform.ts +0 -117
  269. package/src/api/units/index.ts +0 -163
@@ -0,0 +1,247 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../../../types";
3
+ import { Vec3Handle, LineHandle, ArcHandle, CircleHandle, CurveHandle, ProfileHandle, ContourHandle } from "../../../../handles";
4
+ /**
5
+ * Curve creation — construct new geometric curves from point handles (all-handle
6
+ * model, §11).
7
+ *
8
+ * Each method takes point handles ({@linkcode Vec3Handle}) and returns an opaque
9
+ * curve handle ({@linkcode LineHandle} or {@linkcode ArcHandle}) that you pass to
10
+ * query, update, or entity-creation methods. Read geometry back as plain values
11
+ * via the `snaptrude.core.geom.query.*` methods.
12
+ *
13
+ * Accessed via `snaptrude.core.geom.create`.
14
+ */
15
+ export declare abstract class PluginGeomCreateApi {
16
+ constructor();
17
+ /**
18
+ * Create a straight line segment between two point handles. Host API call —
19
+ * returns a handle.
20
+ *
21
+ * @param startPoint Start point of the line segment
22
+ * @param endPoint End point of the line segment
23
+ * @returns The new line as a {@linkcode LineHandle}
24
+ *
25
+ * @examplePrompt Draw a line from point A to point B
26
+ * @examplePrompt Draw a straight edge between these two points
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const line = snaptrude.core.geom.create.line(startPoint, endPoint)
31
+ * ```
32
+ */
33
+ abstract line(startPoint: Vec3Handle, endPoint: Vec3Handle): PluginApiReturn<LineHandle>;
34
+ /**
35
+ * Create a circular arc from its start, end, centre, and axis point handles.
36
+ * Host API call — returns a handle.
37
+ *
38
+ * @param startPoint Start point of the arc
39
+ * @param endPoint End point of the arc
40
+ * @param centrePoint Centre point of the arc
41
+ * @param axis Axis direction of the arc
42
+ * @returns The new arc as an {@linkcode ArcHandle}
43
+ *
44
+ * @examplePrompt Draw an arc between these two points around a centre
45
+ * @examplePrompt Add a curved segment from A to B
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const arc = snaptrude.core.geom.create.arc(startPoint, endPoint, centrePoint, axis)
50
+ * ```
51
+ */
52
+ abstract arc(startPoint: Vec3Handle, endPoint: Vec3Handle, centrePoint: Vec3Handle, axis: Vec3Handle): PluginApiReturn<ArcHandle>;
53
+ /**
54
+ * Create a circle from a centre point, an axis (plane normal), and a radius.
55
+ * Host API call — returns a handle. A circle is a closed curve; read it back via
56
+ * `snaptrude.core.geom.query.circle.*`.
57
+ *
58
+ * @param centrePoint Centre point of the circle
59
+ * @param axis Axis direction (plane normal) of the circle
60
+ * @param radius Radius of the circle
61
+ * @returns The new circle as a {@linkcode CircleHandle}
62
+ *
63
+ * @examplePrompt Make a circle of radius 2 at this point
64
+ * @examplePrompt Draw a circular outline 5m across
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const circle = snaptrude.core.geom.create.circle(centrePoint, axis, 2)
69
+ * ```
70
+ */
71
+ abstract circle(centrePoint: Vec3Handle, axis: Vec3Handle, radius: number): PluginApiReturn<CircleHandle>;
72
+ /**
73
+ * Create a closed profile from an ordered list of point handles connected by
74
+ * line segments (last auto-connected to first). Host API call — returns a handle.
75
+ *
76
+ * @param points Ordered vertex handles of the profile
77
+ * @returns The new profile as a {@linkcode ProfileHandle}
78
+ *
79
+ * @examplePrompt Draw a closed polygon through these corner points
80
+ * @examplePrompt Create an L-shaped outline from a list of points
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * const profile = snaptrude.core.geom.create.profileFromLinePoints(points)
85
+ * ```
86
+ */
87
+ abstract profileFromLinePoints(points: Vec3Handle[]): PluginApiReturn<ProfileHandle>;
88
+ /**
89
+ * Create a profile from an ordered list of curve handles forming a closed loop.
90
+ * Host API call — returns a handle.
91
+ *
92
+ * @param curves Ordered curve handles forming a closed loop
93
+ * @returns The new profile as a {@linkcode ProfileHandle}
94
+ *
95
+ * @examplePrompt Join these lines and arcs into one closed shape
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * const profile = snaptrude.core.geom.create.profileFromCurves([line, arc])
100
+ * ```
101
+ */
102
+ abstract profileFromCurves(curves: CurveHandle[]): PluginApiReturn<ProfileHandle>;
103
+ /**
104
+ * Create an axis-aligned **rectangle** profile (XZ plane) of `width` × `depth`,
105
+ * centred at `center` (defaults to the origin). Host API call — returns a handle.
106
+ *
107
+ * Pair with `design.create.space` / `design.create.spaces` to author a rectangular
108
+ * (box) space — there is no dedicated rectangular-space creator; build the profile
109
+ * here, then extrude it.
110
+ *
111
+ * @param width Extent along X
112
+ * @param depth Extent along Z
113
+ * @param center Optional centre point (default origin)
114
+ * @returns The new rectangle profile as a {@linkcode ProfileHandle}
115
+ *
116
+ * @examplePrompt Draw a 4m by 3m rectangle
117
+ * @examplePrompt Make a rectangular outline for a room footprint
118
+ *
119
+ * @example
120
+ * ```ts
121
+ * const rect = snaptrude.core.geom.create.profileRect(4, 3)
122
+ * const contour = snaptrude.core.geom.create.contourFromProfile(rect)
123
+ * const space = snaptrude.design.create.space(contour, 3)
124
+ * ```
125
+ */
126
+ abstract profileRect(width: number, depth: number, center?: Vec3Handle): PluginApiReturn<ProfileHandle>;
127
+ /**
128
+ * Create a contour (an outer profile loop, no holes). Host API call — returns a handle.
129
+ *
130
+ * @param outer The outer boundary loop
131
+ * @returns The new contour as a {@linkcode ContourHandle}
132
+ * @example
133
+ * ```ts
134
+ * const contour = snaptrude.core.geom.create.contourFromProfile(outer)
135
+ * ```
136
+ */
137
+ abstract contourFromProfile(outer: ProfileHandle): PluginApiReturn<ContourHandle>;
138
+ /**
139
+ * Create a contour from an outer profile plus zero or more inner profiles (holes).
140
+ * Host API call — returns a handle.
141
+ *
142
+ * @param outer The outer boundary loop
143
+ * @param holes Optional inner hole loops
144
+ * @returns The new contour as a {@linkcode ContourHandle}
145
+ *
146
+ * @examplePrompt Make a shape with a hole in the middle
147
+ * @examplePrompt Cut a courtyard opening out of this floor outline
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * const contour = snaptrude.core.geom.create.contourFromProfiles(outer, [hole])
152
+ * ```
153
+ */
154
+ abstract contourFromProfiles(outer: ProfileHandle, holes?: ProfileHandle[]): PluginApiReturn<ContourHandle>;
155
+ }
156
+ /**
157
+ * Arguments for {@linkcode PluginGeomCreateApi.line}.
158
+ *
159
+ * | Property | Type | Description |
160
+ * |---|---|---|
161
+ * | `startPoint` | {@linkcode Vec3Handle} | Start point of the line segment |
162
+ * | `endPoint` | {@linkcode Vec3Handle} | End point of the line segment |
163
+ */
164
+ export declare const PluginGeomCreateLineArgs: z.ZodObject<{
165
+ startPoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
166
+ endPoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
167
+ }, z.core.$strip>;
168
+ export type PluginGeomCreateLineArgs = z.infer<typeof PluginGeomCreateLineArgs>;
169
+ /**
170
+ * Arguments for {@linkcode PluginGeomCreateApi.arc}.
171
+ *
172
+ * | Property | Type | Description |
173
+ * |---|---|---|
174
+ * | `startPoint` | {@linkcode Vec3Handle} | Start point of the arc |
175
+ * | `endPoint` | {@linkcode Vec3Handle} | End point of the arc |
176
+ * | `centrePoint` | {@linkcode Vec3Handle} | Centre point of the arc |
177
+ * | `axis` | {@linkcode Vec3Handle} | Axis direction of the arc |
178
+ */
179
+ export declare const PluginGeomCreateArcArgs: z.ZodObject<{
180
+ startPoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
181
+ endPoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
182
+ centrePoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
183
+ axis: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
184
+ }, z.core.$strip>;
185
+ export type PluginGeomCreateArcArgs = z.infer<typeof PluginGeomCreateArcArgs>;
186
+ /**
187
+ * Arguments for {@linkcode PluginGeomCreateApi.circle}.
188
+ *
189
+ * | Property | Type | Description |
190
+ * |---|---|---|
191
+ * | `centrePoint` | {@linkcode Vec3Handle} | Centre point of the circle |
192
+ * | `axis` | {@linkcode Vec3Handle} | Axis direction (plane normal) of the circle |
193
+ * | `radius` | `number` | Radius of the circle |
194
+ */
195
+ export declare const PluginGeomCreateCircleArgs: z.ZodObject<{
196
+ centrePoint: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
197
+ axis: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
198
+ radius: z.ZodNumber;
199
+ }, z.core.$strip>;
200
+ export type PluginGeomCreateCircleArgs = z.infer<typeof PluginGeomCreateCircleArgs>;
201
+ /**
202
+ * Arguments for {@linkcode PluginGeomCreateApi.profileFromLinePoints}.
203
+ *
204
+ * | Property | Type | Description |
205
+ * |---|---|---|
206
+ * | `points` | {@linkcode Vec3Handle}`[]` | Ordered vertex handles of the profile |
207
+ */
208
+ export declare const PluginGeomCreateProfileFromLinePointsArgs: z.ZodObject<{
209
+ points: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
210
+ }, z.core.$strip>;
211
+ export type PluginGeomCreateProfileFromLinePointsArgs = z.infer<typeof PluginGeomCreateProfileFromLinePointsArgs>;
212
+ /**
213
+ * Arguments for {@linkcode PluginGeomCreateApi.profileFromCurves}.
214
+ *
215
+ * | Property | Type | Description |
216
+ * |---|---|---|
217
+ * | `curves` | {@linkcode CurveHandle}`[]` | Ordered curve handles forming a closed loop |
218
+ */
219
+ export declare const PluginGeomCreateProfileFromCurvesArgs: z.ZodObject<{
220
+ curves: z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>>;
221
+ }, z.core.$strip>;
222
+ export type PluginGeomCreateProfileFromCurvesArgs = z.infer<typeof PluginGeomCreateProfileFromCurvesArgs>;
223
+ /**
224
+ * Arguments for {@linkcode PluginGeomCreateApi.contourFromProfile}.
225
+ *
226
+ * | Property | Type | Description |
227
+ * |---|---|---|
228
+ * | `outer` | {@linkcode ProfileHandle} | The outer boundary loop |
229
+ */
230
+ export declare const PluginGeomCreateContourFromProfileArgs: z.ZodObject<{
231
+ outer: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
232
+ }, z.core.$strip>;
233
+ export type PluginGeomCreateContourFromProfileArgs = z.infer<typeof PluginGeomCreateContourFromProfileArgs>;
234
+ /**
235
+ * Arguments for {@linkcode PluginGeomCreateApi.contourFromProfiles}.
236
+ *
237
+ * | Property | Type | Description |
238
+ * |---|---|---|
239
+ * | `outer` | {@linkcode ProfileHandle} | The outer boundary loop |
240
+ * | `holes` | {@linkcode ProfileHandle}`[]` | Optional inner hole loops |
241
+ */
242
+ export declare const PluginGeomCreateContourFromProfilesArgs: z.ZodObject<{
243
+ outer: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
244
+ holes: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>>>;
245
+ }, z.core.$strip>;
246
+ export type PluginGeomCreateContourFromProfilesArgs = z.infer<typeof PluginGeomCreateContourFromProfilesArgs>;
247
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/create/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEhI;;;;;;;;;;GAUG;AACH,8BAAsB,mBAAmB;;IAGvC;;;;;;;;;;;;;;;OAeG;aACa,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;IAE/F;;;;;;;;;;;;;;;;;OAiBG;aACa,GAAG,CACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,UAAU,EACvB,IAAI,EAAE,UAAU,GACf,eAAe,CAAC,SAAS,CAAC;IAE7B;;;;;;;;;;;;;;;;;OAiBG;aACa,MAAM,CACpB,WAAW,EAAE,UAAU,EACvB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,GACb,eAAe,CAAC,YAAY,CAAC;IAEhC;;;;;;;;;;;;;;OAcG;aACa,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,eAAe,CAAC,aAAa,CAAC;IAE3F;;;;;;;;;;;;;OAaG;aACa,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC,aAAa,CAAC;IAExF;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,UAAU,GAClB,eAAe,CAAC,aAAa,CAAC;IAEjC;;;;;;;;;OASG;aACa,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,eAAe,CAAC,aAAa,CAAC;IAExF;;;;;;;;;;;;;;;OAeG;aACa,mBAAmB,CACjC,KAAK,EAAE,aAAa,EACpB,KAAK,CAAC,EAAE,aAAa,EAAE,GACtB,eAAe,CAAC,aAAa,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB;;;iBAGnC,CAAA;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B;;;;iBAIrC,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;;;;GAMG;AACH,eAAO,MAAM,yCAAyC;;iBAEpD,CAAA;AAEF,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAC7D,OAAO,yCAAyC,CACjD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC;;iBAEhD,CAAA;AAEF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,qCAAqC,CAC7C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC;;iBAEjD,CAAA;AAEF,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAC1D,OAAO,sCAAsC,CAC9C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uCAAuC;;;iBAGlD,CAAA;AAEF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,uCAAuC,CAC/C,CAAA"}
@@ -0,0 +1,72 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../../../types";
3
+ import { ProfileHandle, ContourHandle } from "../../../../handles";
4
+ /**
5
+ * Geometry deletion — release transient geometry resource handles (all-handle model, §11).
6
+ *
7
+ * Methods here free a handle's backing registry entry and reclaim its share of the
8
+ * plugin's resource quota. This is purely a handle-lifecycle operation: it does NOT
9
+ * tear down or delete any engine-side geometry. Once released, the handle is no
10
+ * longer resolvable and must not be reused.
11
+ *
12
+ * Accessed via `snaptrude.core.geom.delete`.
13
+ */
14
+ export declare abstract class PluginGeomDeleteApi {
15
+ constructor();
16
+ /**
17
+ * Free a transient profile resource handle — releases its registry entry and
18
+ * reclaims its share of the plugin's resource quota. This is a handle-lifecycle
19
+ * operation only and does NOT tear down any engine-side geometry.
20
+ *
21
+ * @param profile The transient profile handle to release
22
+ * @returns Nothing
23
+ *
24
+ * # Example
25
+ * ```ts
26
+ * const rect = await snaptrude.core.geom.create.profileRect(4, 3)
27
+ * const area = await snaptrude.core.geom.query.profile.getArea(rect)
28
+ * await snaptrude.core.geom.delete.profile(rect) // rect is no longer resolvable
29
+ * ```
30
+ */
31
+ abstract profile(profile: ProfileHandle): PluginApiReturn<void>;
32
+ /**
33
+ * Free a transient contour resource handle — releases its registry entry and
34
+ * reclaims its share of the plugin's resource quota. Handle-lifecycle only; does
35
+ * NOT tear down engine-side geometry, nor the contour's child profile handles.
36
+ *
37
+ * @param contour The transient contour handle to release
38
+ * @returns Nothing
39
+ *
40
+ * # Example
41
+ * ```ts
42
+ * const rect = await snaptrude.core.geom.create.profileRect(4, 3)
43
+ * const contour = await snaptrude.core.geom.create.contourFromProfile(rect)
44
+ * const area = await snaptrude.core.geom.query.contour.getArea(contour)
45
+ * await snaptrude.core.geom.delete.contour(contour) // contour freed; rect still valid
46
+ * ```
47
+ */
48
+ abstract contour(contour: ContourHandle): PluginApiReturn<void>;
49
+ }
50
+ /**
51
+ * Arguments for {@linkcode PluginGeomDeleteApi.profile}.
52
+ *
53
+ * | Property | Type | Description |
54
+ * |---|---|---|
55
+ * | `profile` | {@linkcode ProfileHandle} | The transient profile handle to release |
56
+ */
57
+ export declare const PluginGeomDeleteProfileArgs: z.ZodObject<{
58
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
59
+ }, z.core.$strip>;
60
+ export type PluginGeomDeleteProfileArgs = z.infer<typeof PluginGeomDeleteProfileArgs>;
61
+ /**
62
+ * Arguments for {@linkcode PluginGeomDeleteApi.contour}.
63
+ *
64
+ * | Property | Type | Description |
65
+ * |---|---|---|
66
+ * | `contour` | {@linkcode ContourHandle} | The transient contour handle to release |
67
+ */
68
+ export declare const PluginGeomDeleteContourArgs: z.ZodObject<{
69
+ contour: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
70
+ }, z.core.$strip>;
71
+ export type PluginGeomDeleteContourArgs = z.infer<typeof PluginGeomDeleteContourArgs>;
72
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/delete/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAElE;;;;;;;;;GASG;AACH,8BAAsB,mBAAmB;;IAGvC;;;;;;;;;;;;;;OAcG;aACa,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,eAAe,CAAC,IAAI,CAAC;IAEtE;;;;;;;;;;;;;;;OAeG;aACa,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,eAAe,CAAC,IAAI,CAAC;CACvE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;iBAEtC,CAAA;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAErF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;iBAEtC,CAAA;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
@@ -1,32 +1,33 @@
1
- import { PluginLineApi } from "./line";
2
- import { PluginArcApi } from "./arc";
3
- import { PluginCurveApi } from "./curve";
4
- import { PluginProfileApi } from "./profile";
1
+ import { PluginGeomCreateApi } from "./create";
2
+ import { PluginGeomQueryApi } from "./query";
3
+ import { PluginGeomUpdateApi } from "./update";
4
+ import { PluginGeomDeleteApi } from "./delete";
5
5
  /**
6
- * Geometry primitives for constructing 2D/3D shapes.
6
+ * Geometry kernel domain-free construction, query, editing, and disposal of
7
+ * curves (lines / arcs) and profiles. No BIM/AEC knowledge lives here; build
8
+ * geometry bottom-up: points ({@linkcode Vec3Handle}) → curves → profiles → entities.
9
+ *
10
+ * - {@linkcode PluginGeomApi.create} — construct lines, arcs, and profiles
11
+ * - {@linkcode PluginGeomApi.query} — read curve / arc / profile geometry and relationships
12
+ * - {@linkcode PluginGeomApi.update} — derive new curves / profiles (immutable edits)
13
+ * - {@linkcode PluginGeomApi.delete} — free a transient profile resource handle
7
14
  *
8
- * Build geometry bottom-up: points ({@linkcode PVec3}) → lines/arcs → curves → profiles.
9
15
  * Profiles can then be used with entity creation methods like
10
16
  * {@linkcode PluginSpaceApi.createFromProfile}.
11
- *
12
- * - {@linkcode PluginGeomApi.line} — Line segment construction
13
- * - {@linkcode PluginGeomApi.arc} — Arc construction
14
- * - {@linkcode PluginGeomApi.curve} — Unified curve wrapper (line or arc)
15
- * - {@linkcode PluginGeomApi.profile} — Closed loop of curves
16
17
  */
17
18
  export declare abstract class PluginGeomApi {
18
- /** Line segment construction. See {@linkcode PluginLineApi}. */
19
- abstract line: PluginLineApi;
20
- /** Arc construction. See {@linkcode PluginArcApi}. */
21
- abstract arc: PluginArcApi;
22
- /** Unified curve wrapper. See {@linkcode PluginCurveApi}. */
23
- abstract curve: PluginCurveApi;
24
- /** Closed profile (loop of curves). See {@linkcode PluginProfileApi}. */
25
- abstract profile: PluginProfileApi;
19
+ /** Curve and profile construction. See {@linkcode PluginGeomCreateApi}. */
20
+ abstract create: PluginGeomCreateApi;
21
+ /** Curve, arc, and profile queries. See {@linkcode PluginGeomQueryApi}. */
22
+ abstract query: PluginGeomQueryApi;
23
+ /** Curve and profile editing (derive-new). See {@linkcode PluginGeomUpdateApi}. */
24
+ abstract update: PluginGeomUpdateApi;
25
+ /** Resource-handle disposal (profile). See {@linkcode PluginGeomDeleteApi}. */
26
+ abstract delete: PluginGeomDeleteApi;
26
27
  constructor();
27
28
  }
28
- export * from "./line";
29
- export * from "./arc";
30
- export * from "./curve";
31
- export * from "./profile";
29
+ export * from "./create";
30
+ export * from "./query";
31
+ export * from "./update";
32
+ export * from "./delete";
32
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/geom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE5C;;;;;;;;;;;GAWG;AACH,8BAAsB,aAAa;IACjC,gEAAgE;IAChE,SAAgB,IAAI,EAAE,aAAa,CAAA;IACnC,sDAAsD;IACtD,SAAgB,GAAG,EAAE,YAAY,CAAA;IACjC,6DAA6D;IAC7D,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,yEAAyE;IACzE,SAAgB,OAAO,EAAE,gBAAgB,CAAA;;CAG1C;AAED,cAAc,QAAQ,CAAA;AACtB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/geom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C;;;;;;;;;;;;GAYG;AACH,8BAAsB,aAAa;IACjC,2EAA2E;IAC3E,SAAgB,MAAM,EAAE,mBAAmB,CAAA;IAC3C,2EAA2E;IAC3E,SAAgB,KAAK,EAAE,kBAAkB,CAAA;IACzC,mFAAmF;IACnF,SAAgB,MAAM,EAAE,mBAAmB,CAAA;IAC3C,+EAA+E;IAC/E,SAAgB,MAAM,EAAE,mBAAmB,CAAA;;CAG5C;AAED,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA"}
@@ -0,0 +1,169 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../../../types";
3
+ import { ArcHandle, Vec3Components } from "../../../../handles";
4
+ /**
5
+ * Arc-specific geometry queries — read circular-arc properties as plain values.
6
+ *
7
+ * Every method takes an opaque {@linkcode ArcHandle} and returns plain values
8
+ * (numbers or {@linkcode Vec3Components}), never a handle. Use these to inspect
9
+ * the radius, centre, axis, sweep angle, and validity of an arc handle obtained
10
+ * from {@linkcode PluginGeomCreateApi.arc} or another query.
11
+ *
12
+ * Accessed via `snaptrude.core.geom.query.arc`.
13
+ */
14
+ export declare abstract class PluginGeomQueryArcApi {
15
+ constructor();
16
+ /**
17
+ * Read the radius of an arc.
18
+ *
19
+ * @param arc The arc to query
20
+ * @returns The arc radius as a `number`
21
+ *
22
+ * @examplePrompt What is the radius of this curved wall segment?
23
+ * @examplePrompt Measure the radius of the selected arc
24
+ *
25
+ * # Example
26
+ * ```ts
27
+ * const start = await snaptrude.core.math.vec3.new(5, 0, 0)
28
+ * const end = await snaptrude.core.math.vec3.new(0, 0, 5)
29
+ * const origin = await snaptrude.core.math.vec3.new(0, 0, 0)
30
+ * const up = await snaptrude.core.math.vec3.new(0, 1, 0)
31
+ * const arc = await snaptrude.core.geom.create.arc(start, end, origin, up)
32
+ * const radius = await snaptrude.core.geom.query.arc.getRadius(arc)
33
+ * ```
34
+ */
35
+ abstract getRadius(arc: ArcHandle): PluginApiReturn<number>;
36
+ /**
37
+ * Read the centre point of an arc.
38
+ *
39
+ * @param arc The arc to query
40
+ * @returns The arc centre as {@linkcode Vec3Components}
41
+ *
42
+ * @examplePrompt Where is the centre of this arc?
43
+ * @examplePrompt Find the center point of the curved wall
44
+ *
45
+ * # Example
46
+ * ```ts
47
+ * const start = await snaptrude.core.math.vec3.new(5, 0, 0)
48
+ * const end = await snaptrude.core.math.vec3.new(0, 0, 5)
49
+ * const origin = await snaptrude.core.math.vec3.new(0, 0, 0)
50
+ * const up = await snaptrude.core.math.vec3.new(0, 1, 0)
51
+ * const arc = await snaptrude.core.geom.create.arc(start, end, origin, up)
52
+ * const centre = await snaptrude.core.geom.query.arc.getCentre(arc)
53
+ * console.log(centre.x, centre.y, centre.z)
54
+ * ```
55
+ */
56
+ abstract getCentre(arc: ArcHandle): PluginApiReturn<Vec3Components>;
57
+ /**
58
+ * Read the rotation axis of an arc.
59
+ *
60
+ * @param arc The arc to query
61
+ * @returns The arc axis as {@linkcode Vec3Components}
62
+ *
63
+ * # Example
64
+ * ```ts
65
+ * const start = await snaptrude.core.math.vec3.new(5, 0, 0)
66
+ * const end = await snaptrude.core.math.vec3.new(0, 0, 5)
67
+ * const origin = await snaptrude.core.math.vec3.new(0, 0, 0)
68
+ * const up = await snaptrude.core.math.vec3.new(0, 1, 0)
69
+ * const arc = await snaptrude.core.geom.create.arc(start, end, origin, up)
70
+ * const axis = await snaptrude.core.geom.query.arc.getAxis(arc)
71
+ * console.log(axis.x, axis.y, axis.z)
72
+ * ```
73
+ */
74
+ abstract getAxis(arc: ArcHandle): PluginApiReturn<Vec3Components>;
75
+ /**
76
+ * Read the sweep angle of an arc (the angle subtended at its centre).
77
+ *
78
+ * @param arc The arc to query
79
+ * @returns The sweep angle in radians as a `number`
80
+ *
81
+ * @examplePrompt What angle does this arc sweep through?
82
+ * @examplePrompt How many degrees does this curved wall turn?
83
+ *
84
+ * # Example
85
+ * ```ts
86
+ * const start = await snaptrude.core.math.vec3.new(5, 0, 0)
87
+ * const end = await snaptrude.core.math.vec3.new(0, 0, 5)
88
+ * const origin = await snaptrude.core.math.vec3.new(0, 0, 0)
89
+ * const up = await snaptrude.core.math.vec3.new(0, 1, 0)
90
+ * const arc = await snaptrude.core.geom.create.arc(start, end, origin, up)
91
+ * const sweep = await snaptrude.core.geom.query.arc.getSweepAngle(arc)
92
+ * console.log("degrees:", (sweep * 180) / Math.PI)
93
+ * ```
94
+ */
95
+ abstract getSweepAngle(arc: ArcHandle): PluginApiReturn<number>;
96
+ /**
97
+ * Check whether an arc is geometrically valid.
98
+ *
99
+ * @param arc The arc to query
100
+ * @returns `true` if the arc is valid as a `boolean`
101
+ *
102
+ * # Example
103
+ * ```ts
104
+ * const start = await snaptrude.core.math.vec3.new(5, 0, 0)
105
+ * const end = await snaptrude.core.math.vec3.new(0, 0, 5)
106
+ * const origin = await snaptrude.core.math.vec3.new(0, 0, 0)
107
+ * const up = await snaptrude.core.math.vec3.new(0, 1, 0)
108
+ * const arc = await snaptrude.core.geom.create.arc(start, end, origin, up)
109
+ * const ok = await snaptrude.core.geom.query.arc.isValid(arc)
110
+ * ```
111
+ */
112
+ abstract isValid(arc: ArcHandle): PluginApiReturn<boolean>;
113
+ }
114
+ /**
115
+ * Arguments for {@linkcode PluginGeomQueryArcApi.getRadius}.
116
+ *
117
+ * | Property | Type | Description |
118
+ * |---|---|---|
119
+ * | `arc` | {@linkcode ArcHandle} | The arc to query |
120
+ */
121
+ export declare const PluginGeomQueryArcGetRadiusArgs: z.ZodObject<{
122
+ arc: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>;
123
+ }, z.core.$strip>;
124
+ export type PluginGeomQueryArcGetRadiusArgs = z.infer<typeof PluginGeomQueryArcGetRadiusArgs>;
125
+ /**
126
+ * Arguments for {@linkcode PluginGeomQueryArcApi.getCentre}.
127
+ *
128
+ * | Property | Type | Description |
129
+ * |---|---|---|
130
+ * | `arc` | {@linkcode ArcHandle} | The arc to query |
131
+ */
132
+ export declare const PluginGeomQueryArcGetCentreArgs: z.ZodObject<{
133
+ arc: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>;
134
+ }, z.core.$strip>;
135
+ export type PluginGeomQueryArcGetCentreArgs = z.infer<typeof PluginGeomQueryArcGetCentreArgs>;
136
+ /**
137
+ * Arguments for {@linkcode PluginGeomQueryArcApi.getAxis}.
138
+ *
139
+ * | Property | Type | Description |
140
+ * |---|---|---|
141
+ * | `arc` | {@linkcode ArcHandle} | The arc to query |
142
+ */
143
+ export declare const PluginGeomQueryArcGetAxisArgs: z.ZodObject<{
144
+ arc: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>;
145
+ }, z.core.$strip>;
146
+ export type PluginGeomQueryArcGetAxisArgs = z.infer<typeof PluginGeomQueryArcGetAxisArgs>;
147
+ /**
148
+ * Arguments for {@linkcode PluginGeomQueryArcApi.getSweepAngle}.
149
+ *
150
+ * | Property | Type | Description |
151
+ * |---|---|---|
152
+ * | `arc` | {@linkcode ArcHandle} | The arc to query |
153
+ */
154
+ export declare const PluginGeomQueryArcGetSweepAngleArgs: z.ZodObject<{
155
+ arc: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>;
156
+ }, z.core.$strip>;
157
+ export type PluginGeomQueryArcGetSweepAngleArgs = z.infer<typeof PluginGeomQueryArcGetSweepAngleArgs>;
158
+ /**
159
+ * Arguments for {@linkcode PluginGeomQueryArcApi.isValid}.
160
+ *
161
+ * | Property | Type | Description |
162
+ * |---|---|---|
163
+ * | `arc` | {@linkcode ArcHandle} | The arc to query |
164
+ */
165
+ export declare const PluginGeomQueryArcIsValidArgs: z.ZodObject<{
166
+ arc: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>;
167
+ }, z.core.$strip>;
168
+ export type PluginGeomQueryArcIsValidArgs = z.infer<typeof PluginGeomQueryArcIsValidArgs>;
169
+ //# sourceMappingURL=arc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arc.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/query/arc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAE/D;;;;;;;;;GASG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;;;;OAkBG;aACa,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC;IAElE;;;;;;;;;;;;;;;;;;;OAmBG;aACa,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,eAAe,CAAC,cAAc,CAAC;IAE1E;;;;;;;;;;;;;;;;OAgBG;aACa,OAAO,CAAC,GAAG,EAAE,SAAS,GAAG,eAAe,CAAC,cAAc,CAAC;IAExE;;;;;;;;;;;;;;;;;;;OAmBG;aACa,aAAa,CAAC,GAAG,EAAE,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC;IAEtE;;;;;;;;;;;;;;;OAeG;aACa,OAAO,CAAC,GAAG,EAAE,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC;CAClE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;iBAA+B,CAAA;AAC3E,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;iBAA+B,CAAA;AAC3E,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;iBAA+B,CAAA;AACzE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEzF;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC;;iBAA+B,CAAA;AAC/E,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAErG;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;iBAA+B,CAAA;AACzE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA"}