@snaptrude/plugin-core 0.3.0 → 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 (266) hide show
  1. package/AGENTS.md +130 -48
  2. package/CHANGELOG.md +111 -0
  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 +261 -0
  102. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  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 +9 -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 +482 -249
  110. package/dist/api/entity/space.d.ts.map +1 -1
  111. package/dist/api/entity/story.d.ts +49 -39
  112. package/dist/api/entity/story.d.ts.map +1 -1
  113. package/dist/api/index.d.ts +17 -12
  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 +4001 -904
  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 +3392 -870
  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 +318 -0
  209. package/src/api/entity/department.ts +0 -113
  210. package/src/api/entity/index.ts +9 -9
  211. package/src/api/entity/referenceLine.ts +50 -38
  212. package/src/api/entity/space.ts +285 -226
  213. package/src/api/entity/story.ts +53 -42
  214. package/src/api/index.ts +17 -12
  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/tools/copy.d.ts +0 -59
  243. package/dist/api/tools/copy.d.ts.map +0 -1
  244. package/dist/api/tools/index.d.ts +0 -33
  245. package/dist/api/tools/index.d.ts.map +0 -1
  246. package/dist/api/tools/material.d.ts +0 -51
  247. package/dist/api/tools/material.d.ts.map +0 -1
  248. package/dist/api/tools/offset.d.ts +0 -43
  249. package/dist/api/tools/offset.d.ts.map +0 -1
  250. package/dist/api/tools/selection.d.ts +0 -48
  251. package/dist/api/tools/selection.d.ts.map +0 -1
  252. package/dist/api/tools/transform.d.ts +0 -114
  253. package/dist/api/tools/transform.d.ts.map +0 -1
  254. package/dist/api/units/index.d.ts +0 -163
  255. package/dist/api/units/index.d.ts.map +0 -1
  256. package/src/api/core/geom/arc.ts +0 -70
  257. package/src/api/core/geom/curve.ts +0 -41
  258. package/src/api/core/geom/line.ts +0 -53
  259. package/src/api/core/geom/profile.ts +0 -94
  260. package/src/api/tools/copy.ts +0 -55
  261. package/src/api/tools/index.ts +0 -39
  262. package/src/api/tools/material.ts +0 -49
  263. package/src/api/tools/offset.ts +0 -43
  264. package/src/api/tools/selection.ts +0 -51
  265. package/src/api/tools/transform.ts +0 -117
  266. package/src/api/units/index.ts +0 -163
@@ -0,0 +1,329 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../../../types";
3
+ import { ProfileHandle, Vec3Handle, CurveHandle, Vec3Components } from "../../../../handles";
4
+ /**
5
+ * Profile editing — produce NEW profiles from an existing one (all-handle model, §11).
6
+ *
7
+ * Every method is an immutable derive-new operation: it takes an opaque
8
+ * {@linkcode ProfileHandle} (plus any extra inputs) and returns a fresh
9
+ * {@linkcode ProfileHandle} for the resulting profile. The input profile is never
10
+ * mutated — the original handle keeps referring to the unchanged profile. Read the
11
+ * resulting geometry back as plain values with the query namespace.
12
+ *
13
+ * Accessed via `snaptrude.core.geom.update.profile`.
14
+ */
15
+ export declare abstract class PluginGeomUpdateProfileApi {
16
+ constructor();
17
+ /**
18
+ * Offset a closed profile inward/outward by a signed distance. Immutable —
19
+ * returns a NEW profile and leaves the input unchanged.
20
+ *
21
+ * @param profile The closed profile to offset
22
+ * @param distance Signed offset distance (outward when positive, inward when negative)
23
+ * @returns The offset profile as a NEW {@linkcode ProfileHandle}
24
+ *
25
+ * @examplePrompt Offset this outline 300mm inward
26
+ * @examplePrompt Inset this boundary by a foot all around
27
+ *
28
+ * # Example
29
+ * ```ts
30
+ * const rect = await snaptrude.core.geom.create.profileRect(10, 8)
31
+ * const inset = await snaptrude.core.geom.update.profile.offset(rect, -0.3)
32
+ * const area = await snaptrude.core.geom.query.profile.getArea(inset)
33
+ * ```
34
+ */
35
+ abstract offset(profile: ProfileHandle, distance: number): PluginApiReturn<ProfileHandle>;
36
+ /**
37
+ * Translate a profile by a vector. Immutable — returns a NEW profile and leaves
38
+ * the input unchanged.
39
+ *
40
+ * @param profile The profile to move
41
+ * @param translation Translation vector to move the profile by
42
+ * @returns The moved profile as a NEW {@linkcode ProfileHandle}
43
+ *
44
+ * @examplePrompt Move this outline 3 metres along the x axis
45
+ * @examplePrompt Shift this boundary to a new position
46
+ *
47
+ * # Example
48
+ * ```ts
49
+ * const rect = await snaptrude.core.geom.create.profileRect(6, 4)
50
+ * const shift = await snaptrude.core.math.vec3.new(3, 0, 0)
51
+ * const moved = await snaptrude.core.geom.update.profile.move(rect, shift)
52
+ * ```
53
+ */
54
+ abstract move(profile: ProfileHandle, translation: Vec3Handle): PluginApiReturn<ProfileHandle>;
55
+ /**
56
+ * Rotate a profile about an axis through an optional pivot. Immutable — returns a
57
+ * NEW profile and leaves the input unchanged.
58
+ *
59
+ * @param profile The profile to rotate
60
+ * @param axis Rotation axis direction
61
+ * @param angle Rotation angle in radians
62
+ * @param pivot Optional pivot point to rotate about (defaults to the origin)
63
+ * @returns The rotated profile as a NEW {@linkcode ProfileHandle}
64
+ *
65
+ * @examplePrompt Rotate this outline 30 degrees
66
+ * @examplePrompt Turn this boundary about its centre point
67
+ *
68
+ * # Example
69
+ * ```ts
70
+ * const rect = await snaptrude.core.geom.create.profileRect(6, 4)
71
+ * const axis = await snaptrude.core.math.vec3.new(0, 1, 0)
72
+ * const rotated = await snaptrude.core.geom.update.profile.rotate(rect, axis, Math.PI / 6)
73
+ * ```
74
+ */
75
+ abstract rotate(profile: ProfileHandle, axis: Vec3Handle, angle: number, pivot?: Vec3Handle): PluginApiReturn<ProfileHandle>;
76
+ /**
77
+ * Scale a profile uniformly or per-axis about an optional pivot. Immutable —
78
+ * returns a NEW profile and leaves the input unchanged.
79
+ *
80
+ * @param profile The profile to scale
81
+ * @param factor Uniform scale factor, or per-axis factors
82
+ * @param pivot Optional pivot point to scale about (defaults to the origin)
83
+ * @returns The scaled profile as a NEW {@linkcode ProfileHandle}
84
+ *
85
+ * @examplePrompt Scale this outline down to half size
86
+ * @examplePrompt Enlarge this boundary by 50 percent
87
+ *
88
+ * # Example
89
+ * ```ts
90
+ * const rect = await snaptrude.core.geom.create.profileRect(6, 4)
91
+ * const half = await snaptrude.core.geom.update.profile.scale(rect, 0.5)
92
+ * const stretched = await snaptrude.core.geom.update.profile.scale(rect, { x: 2, y: 1, z: 1 })
93
+ * ```
94
+ */
95
+ abstract scale(profile: ProfileHandle, factor: number | Vec3Components, pivot?: Vec3Handle): PluginApiReturn<ProfileHandle>;
96
+ /**
97
+ * Mirror a profile across a plane. Immutable — returns a NEW profile and leaves
98
+ * the input unchanged.
99
+ *
100
+ * @param profile The profile to mirror
101
+ * @param plane Mirror plane defined by a point on it and its normal
102
+ * @returns The mirrored profile as a NEW {@linkcode ProfileHandle}
103
+ *
104
+ * @examplePrompt Mirror this outline across the vertical plane
105
+ * @examplePrompt Flip this boundary to its mirror image
106
+ *
107
+ * # Example
108
+ * ```ts
109
+ * const rect = await snaptrude.core.geom.create.profileRect(6, 4)
110
+ * const point = await snaptrude.core.math.vec3.new(0, 0, 0)
111
+ * const normal = await snaptrude.core.math.vec3.new(1, 0, 0)
112
+ * const mirrored = await snaptrude.core.geom.update.profile.mirror(rect, { point, normal })
113
+ * ```
114
+ */
115
+ abstract mirror(profile: ProfileHandle, plane: {
116
+ point: Vec3Handle;
117
+ normal: Vec3Handle;
118
+ }): PluginApiReturn<ProfileHandle>;
119
+ /**
120
+ * Append a curve to the start or end of a profile. The curve must connect to the
121
+ * chosen end. Immutable — returns a NEW profile and leaves the input unchanged.
122
+ *
123
+ * @param profile The profile to append to
124
+ * @param curve The curve to append; it must connect to the chosen end
125
+ * @param position Optional end to append at (defaults to `"end"`)
126
+ * @returns The extended profile as a NEW {@linkcode ProfileHandle}
127
+ *
128
+ * # Example
129
+ * ```ts
130
+ * const rect = await snaptrude.core.geom.create.profileRect(4, 3)
131
+ * const open = await snaptrude.core.geom.update.profile.remove(rect, "end")
132
+ * const pts = await snaptrude.core.geom.query.profile.listPoints(open)
133
+ * const last = pts[pts.length - 1]
134
+ * const from = await snaptrude.core.math.vec3.new(last.x, last.y, last.z)
135
+ * const to = await snaptrude.core.math.vec3.new(pts[0].x, pts[0].y, pts[0].z)
136
+ * const closer = await snaptrude.core.geom.create.line(from, to)
137
+ * const closed = await snaptrude.core.geom.update.profile.add(open, closer, "end")
138
+ * ```
139
+ */
140
+ abstract add(profile: ProfileHandle, curve: CurveHandle, position?: "start" | "end"): PluginApiReturn<ProfileHandle>;
141
+ /**
142
+ * Remove the curve at the start or end of a profile. Immutable — returns a NEW
143
+ * profile and leaves the input unchanged.
144
+ *
145
+ * @param profile The profile to remove a curve from
146
+ * @param position Optional end to remove from (defaults to `"end"`)
147
+ * @returns The trimmed profile as a NEW {@linkcode ProfileHandle}
148
+ *
149
+ * # Example
150
+ * ```ts
151
+ * const rect = await snaptrude.core.geom.create.profileRect(4, 3)
152
+ * const open = await snaptrude.core.geom.update.profile.remove(rect, "end")
153
+ * const isClosed = await snaptrude.core.geom.query.profile.isClosed(open) // false
154
+ * ```
155
+ */
156
+ abstract remove(profile: ProfileHandle, position?: "start" | "end"): PluginApiReturn<ProfileHandle>;
157
+ /**
158
+ * Reverse the orientation of a profile. Immutable — returns a NEW profile and
159
+ * leaves the input unchanged.
160
+ *
161
+ * @param profile The profile to reverse
162
+ * @returns The reversed profile as a NEW {@linkcode ProfileHandle}
163
+ *
164
+ * # Example
165
+ * ```ts
166
+ * const rect = await snaptrude.core.geom.create.profileRect(4, 3)
167
+ * const reversed = await snaptrude.core.geom.update.profile.reverse(rect)
168
+ * const clockwise = await snaptrude.core.geom.query.profile.isClockwise(reversed)
169
+ * ```
170
+ */
171
+ abstract reverse(profile: ProfileHandle): PluginApiReturn<ProfileHandle>;
172
+ /**
173
+ * Simplify a profile by merging collinear/redundant segments. Immutable —
174
+ * returns a NEW profile and leaves the input unchanged.
175
+ *
176
+ * @param profile The profile to simplify
177
+ * @returns The simplified profile as a NEW {@linkcode ProfileHandle}
178
+ *
179
+ * @examplePrompt Clean up this outline by merging collinear segments
180
+ * @examplePrompt Simplify this polyline and remove redundant points
181
+ *
182
+ * # Example
183
+ * ```ts
184
+ * const p0 = await snaptrude.core.math.vec3.new(0, 0, 0)
185
+ * const p1 = await snaptrude.core.math.vec3.new(2, 0, 0) // collinear with p0 and p2
186
+ * const p2 = await snaptrude.core.math.vec3.new(4, 0, 0)
187
+ * const p3 = await snaptrude.core.math.vec3.new(4, 0, 3)
188
+ * const jagged = await snaptrude.core.geom.create.profileFromLinePoints([p0, p1, p2, p3])
189
+ * const clean = await snaptrude.core.geom.update.profile.simplify(jagged)
190
+ * const curves = await snaptrude.core.geom.query.profile.listCurves(clean) // p0→p2 merged
191
+ * ```
192
+ */
193
+ abstract simplify(profile: ProfileHandle): PluginApiReturn<ProfileHandle>;
194
+ }
195
+ /**
196
+ * Arguments for {@linkcode PluginGeomUpdateProfileApi.offset}.
197
+ *
198
+ * | Property | Type | Description |
199
+ * |---|---|---|
200
+ * | `profile` | {@linkcode ProfileHandle} | The closed profile to offset |
201
+ * | `distance` | `number` | Signed offset distance (outward when positive, inward when negative) |
202
+ */
203
+ export declare const PluginGeomUpdateProfileOffsetArgs: z.ZodObject<{
204
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
205
+ distance: z.ZodNumber;
206
+ }, z.core.$strip>;
207
+ export type PluginGeomUpdateProfileOffsetArgs = z.infer<typeof PluginGeomUpdateProfileOffsetArgs>;
208
+ /**
209
+ * Arguments for {@linkcode PluginGeomUpdateProfileApi.move}.
210
+ *
211
+ * | Property | Type | Description |
212
+ * |---|---|---|
213
+ * | `profile` | {@linkcode ProfileHandle} | The profile to move |
214
+ * | `translation` | {@linkcode Vec3Handle} | Translation vector to move the profile by |
215
+ */
216
+ export declare const PluginGeomUpdateProfileMoveArgs: z.ZodObject<{
217
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
218
+ translation: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
219
+ }, z.core.$strip>;
220
+ export type PluginGeomUpdateProfileMoveArgs = z.infer<typeof PluginGeomUpdateProfileMoveArgs>;
221
+ /**
222
+ * Arguments for {@linkcode PluginGeomUpdateProfileApi.rotate}.
223
+ *
224
+ * | Property | Type | Description |
225
+ * |---|---|---|
226
+ * | `profile` | {@linkcode ProfileHandle} | The profile to rotate |
227
+ * | `axis` | {@linkcode Vec3Handle} | Rotation axis direction |
228
+ * | `angle` | `number` | Rotation angle in radians |
229
+ * | `pivot` | {@linkcode Vec3Handle} | Optional pivot point to rotate about (defaults to the origin) |
230
+ */
231
+ export declare const PluginGeomUpdateProfileRotateArgs: z.ZodObject<{
232
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
233
+ axis: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
234
+ angle: z.ZodNumber;
235
+ pivot: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
236
+ }, z.core.$strip>;
237
+ export type PluginGeomUpdateProfileRotateArgs = z.infer<typeof PluginGeomUpdateProfileRotateArgs>;
238
+ /**
239
+ * Arguments for {@linkcode PluginGeomUpdateProfileApi.scale}.
240
+ *
241
+ * | Property | Type | Description |
242
+ * |---|---|---|
243
+ * | `profile` | {@linkcode ProfileHandle} | The profile to scale |
244
+ * | `factor` | `number` \| {@linkcode Vec3Components} | Uniform scale factor, or per-axis factors |
245
+ * | `pivot` | {@linkcode Vec3Handle} | Optional pivot point to scale about (defaults to the origin) |
246
+ */
247
+ export declare const PluginGeomUpdateProfileScaleArgs: z.ZodObject<{
248
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
249
+ factor: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
250
+ x: z.ZodNumber;
251
+ y: z.ZodNumber;
252
+ z: z.ZodNumber;
253
+ }, z.core.$strip>]>;
254
+ pivot: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
255
+ }, z.core.$strip>;
256
+ export type PluginGeomUpdateProfileScaleArgs = z.infer<typeof PluginGeomUpdateProfileScaleArgs>;
257
+ /**
258
+ * Arguments for {@linkcode PluginGeomUpdateProfileApi.mirror}.
259
+ *
260
+ * | Property | Type | Description |
261
+ * |---|---|---|
262
+ * | `profile` | {@linkcode ProfileHandle} | The profile to mirror |
263
+ * | `plane` | `{ point: `{@linkcode Vec3Handle}`, normal: `{@linkcode Vec3Handle}` }` | Mirror plane defined by a point on it and its normal |
264
+ */
265
+ export declare const PluginGeomUpdateProfileMirrorArgs: z.ZodObject<{
266
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
267
+ plane: z.ZodObject<{
268
+ point: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
269
+ normal: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
270
+ }, z.core.$strip>;
271
+ }, z.core.$strip>;
272
+ export type PluginGeomUpdateProfileMirrorArgs = z.infer<typeof PluginGeomUpdateProfileMirrorArgs>;
273
+ /**
274
+ * Arguments for {@linkcode PluginGeomUpdateProfileApi.add}.
275
+ *
276
+ * | Property | Type | Description |
277
+ * |---|---|---|
278
+ * | `profile` | {@linkcode ProfileHandle} | The profile to append to |
279
+ * | `curve` | {@linkcode CurveHandle} | The curve to append; it must connect to the chosen end |
280
+ * | `position` | `"start"` \| `"end"` | Optional end to append at (defaults to `"end"`) |
281
+ */
282
+ export declare const PluginGeomUpdateProfileAddArgs: z.ZodObject<{
283
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
284
+ curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"arc">, string>>]>;
285
+ position: z.ZodOptional<z.ZodEnum<{
286
+ start: "start";
287
+ end: "end";
288
+ }>>;
289
+ }, z.core.$strip>;
290
+ export type PluginGeomUpdateProfileAddArgs = z.infer<typeof PluginGeomUpdateProfileAddArgs>;
291
+ /**
292
+ * Arguments for {@linkcode PluginGeomUpdateProfileApi.remove}.
293
+ *
294
+ * | Property | Type | Description |
295
+ * |---|---|---|
296
+ * | `profile` | {@linkcode ProfileHandle} | The profile to remove a curve from |
297
+ * | `position` | `"start"` \| `"end"` | Optional end to remove from (defaults to `"end"`) |
298
+ */
299
+ export declare const PluginGeomUpdateProfileRemoveArgs: z.ZodObject<{
300
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
301
+ position: z.ZodOptional<z.ZodEnum<{
302
+ start: "start";
303
+ end: "end";
304
+ }>>;
305
+ }, z.core.$strip>;
306
+ export type PluginGeomUpdateProfileRemoveArgs = z.infer<typeof PluginGeomUpdateProfileRemoveArgs>;
307
+ /**
308
+ * Arguments for {@linkcode PluginGeomUpdateProfileApi.reverse}.
309
+ *
310
+ * | Property | Type | Description |
311
+ * |---|---|---|
312
+ * | `profile` | {@linkcode ProfileHandle} | The profile to reverse |
313
+ */
314
+ export declare const PluginGeomUpdateProfileReverseArgs: z.ZodObject<{
315
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
316
+ }, z.core.$strip>;
317
+ export type PluginGeomUpdateProfileReverseArgs = z.infer<typeof PluginGeomUpdateProfileReverseArgs>;
318
+ /**
319
+ * Arguments for {@linkcode PluginGeomUpdateProfileApi.simplify}.
320
+ *
321
+ * | Property | Type | Description |
322
+ * |---|---|---|
323
+ * | `profile` | {@linkcode ProfileHandle} | The profile to simplify |
324
+ */
325
+ export declare const PluginGeomUpdateProfileSimplifyArgs: z.ZodObject<{
326
+ profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../../..").Handle<"profile">, string>>;
327
+ }, z.core.$strip>;
328
+ export type PluginGeomUpdateProfileSimplifyArgs = z.infer<typeof PluginGeomUpdateProfileSimplifyArgs>;
329
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/update/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE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