@snaptrude/plugin-core 0.0.0-dev-20260708130115 → 0.0.0-dev-20260827135706

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 (261) hide show
  1. package/CHANGELOG.md +152 -1
  2. package/api-manifest.json +3620 -276
  3. package/dist/api/analysis/daylight.d.ts +603 -0
  4. package/dist/api/analysis/daylight.d.ts.map +1 -0
  5. package/dist/api/analysis/heatmaps.d.ts +658 -0
  6. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  7. package/dist/api/analysis/illuminance.d.ts +145 -0
  8. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  9. package/dist/api/analysis/index.d.ts +59 -0
  10. package/dist/api/analysis/index.d.ts.map +1 -0
  11. package/dist/api/analysis/shadows.d.ts +165 -0
  12. package/dist/api/analysis/shadows.d.ts.map +1 -0
  13. package/dist/api/analysis/solar.d.ts +249 -0
  14. package/dist/api/analysis/solar.d.ts.map +1 -0
  15. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  16. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  17. package/dist/api/analysis/sunpath.d.ts +80 -0
  18. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  19. package/dist/api/analysis/weather.d.ts +193 -0
  20. package/dist/api/analysis/weather.d.ts.map +1 -0
  21. package/dist/api/core/camera/index.d.ts +261 -0
  22. package/dist/api/core/camera/index.d.ts.map +1 -0
  23. package/dist/api/core/comment/index.d.ts +105 -2
  24. package/dist/api/core/comment/index.d.ts.map +1 -1
  25. package/dist/api/core/geom/create/index.d.ts +840 -14
  26. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  27. package/dist/api/core/geom/delete/index.d.ts +8 -2
  28. package/dist/api/core/geom/delete/index.d.ts.map +1 -1
  29. package/dist/api/core/geom/query/arc.d.ts +5 -5
  30. package/dist/api/core/geom/query/brep.d.ts +130 -18
  31. package/dist/api/core/geom/query/brep.d.ts.map +1 -1
  32. package/dist/api/core/geom/query/circle.d.ts +18 -18
  33. package/dist/api/core/geom/query/contour.d.ts +20 -20
  34. package/dist/api/core/geom/query/curve.d.ts +49 -49
  35. package/dist/api/core/geom/query/edge.d.ts +5 -5
  36. package/dist/api/core/geom/query/face.d.ts +16 -16
  37. package/dist/api/core/geom/query/halfedge.d.ts +8 -8
  38. package/dist/api/core/geom/query/profile.d.ts +19 -19
  39. package/dist/api/core/geom/query/vertex.d.ts +8 -8
  40. package/dist/api/core/geom/update/contour.d.ts +14 -14
  41. package/dist/api/core/geom/update/curve.d.ts +7 -7
  42. package/dist/api/core/geom/update/profile.d.ts +16 -16
  43. package/dist/api/core/handles/index.d.ts +210 -0
  44. package/dist/api/core/handles/index.d.ts.map +1 -0
  45. package/dist/api/core/index.d.ts +34 -0
  46. package/dist/api/core/index.d.ts.map +1 -1
  47. package/dist/api/core/io/export/index.d.ts +134 -0
  48. package/dist/api/core/io/export/index.d.ts.map +1 -0
  49. package/dist/api/core/io/import/index.d.ts +453 -0
  50. package/dist/api/core/io/import/index.d.ts.map +1 -0
  51. package/dist/api/core/io/index.d.ts +40 -0
  52. package/dist/api/core/io/index.d.ts.map +1 -0
  53. package/dist/api/core/io/job/index.d.ts +139 -0
  54. package/dist/api/core/io/job/index.d.ts.map +1 -0
  55. package/dist/api/core/io/query/index.d.ts +74 -0
  56. package/dist/api/core/io/query/index.d.ts.map +1 -0
  57. package/dist/api/core/io/terrain/index.d.ts +341 -0
  58. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  59. package/dist/api/core/io/underlay/index.d.ts +805 -0
  60. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  61. package/dist/api/core/layers.d.ts +7 -7
  62. package/dist/api/core/mode/index.d.ts +99 -0
  63. package/dist/api/core/mode/index.d.ts.map +1 -0
  64. package/dist/api/core/project/index.d.ts +68 -1
  65. package/dist/api/core/project/index.d.ts.map +1 -1
  66. package/dist/api/core/proposals/index.d.ts +531 -0
  67. package/dist/api/core/proposals/index.d.ts.map +1 -0
  68. package/dist/api/core/storeys/index.d.ts +265 -0
  69. package/dist/api/core/storeys/index.d.ts.map +1 -0
  70. package/dist/api/core/tags.d.ts +24 -0
  71. package/dist/api/core/tags.d.ts.map +1 -1
  72. package/dist/api/core/user.d.ts +44 -0
  73. package/dist/api/core/user.d.ts.map +1 -0
  74. package/dist/api/core/zoom/index.d.ts +4 -0
  75. package/dist/api/core/zoom/index.d.ts.map +1 -1
  76. package/dist/api/design/boolean/index.d.ts +4 -4
  77. package/dist/api/design/create/index.d.ts +568 -45
  78. package/dist/api/design/create/index.d.ts.map +1 -1
  79. package/dist/api/design/delete/index.d.ts +3 -0
  80. package/dist/api/design/delete/index.d.ts.map +1 -1
  81. package/dist/api/design/doors/index.d.ts +195 -0
  82. package/dist/api/design/doors/index.d.ts.map +1 -1
  83. package/dist/api/design/edit/index.d.ts +1 -1
  84. package/dist/api/design/erase/index.d.ts +2 -2
  85. package/dist/api/design/family.d.ts +349 -0
  86. package/dist/api/design/family.d.ts.map +1 -0
  87. package/dist/api/design/furniture/index.d.ts +181 -8
  88. package/dist/api/design/furniture/index.d.ts.map +1 -1
  89. package/dist/api/design/index.d.ts +98 -0
  90. package/dist/api/design/index.d.ts.map +1 -1
  91. package/dist/api/design/lock.d.ts +26 -0
  92. package/dist/api/design/lock.d.ts.map +1 -1
  93. package/dist/api/design/materials/index.d.ts +270 -16
  94. package/dist/api/design/materials/index.d.ts.map +1 -1
  95. package/dist/api/design/query/geometry/index.d.ts +112 -0
  96. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  97. package/dist/api/design/query/index.d.ts +282 -11
  98. package/dist/api/design/query/index.d.ts.map +1 -1
  99. package/dist/api/design/query/referenceLines.d.ts +45 -0
  100. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  101. package/dist/api/design/query/spaces.d.ts +181 -8
  102. package/dist/api/design/query/spaces.d.ts.map +1 -1
  103. package/dist/api/design/selection/index.d.ts +144 -0
  104. package/dist/api/design/selection/index.d.ts.map +1 -1
  105. package/dist/api/design/transform/index.d.ts +172 -10
  106. package/dist/api/design/transform/index.d.ts.map +1 -1
  107. package/dist/api/design/types/index.d.ts +181 -0
  108. package/dist/api/design/types/index.d.ts.map +1 -0
  109. package/dist/api/design/update/index.d.ts +553 -2
  110. package/dist/api/design/update/index.d.ts.map +1 -1
  111. package/dist/api/design/visibility.d.ts +126 -0
  112. package/dist/api/design/visibility.d.ts.map +1 -0
  113. package/dist/api/design/windows/index.d.ts +113 -2
  114. package/dist/api/design/windows/index.d.ts.map +1 -1
  115. package/dist/api/entity/buildableEnvelope.d.ts +4 -0
  116. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  117. package/dist/api/entity/referenceLine.d.ts +10 -2
  118. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  119. package/dist/api/entity/space.d.ts +21 -21
  120. package/dist/api/entity/story.d.ts +242 -15
  121. package/dist/api/entity/story.d.ts.map +1 -1
  122. package/dist/api/index.d.ts +10 -0
  123. package/dist/api/index.d.ts.map +1 -1
  124. package/dist/api/presentation/aiInspiration.d.ts +25 -25
  125. package/dist/api/presentation/annotate.d.ts +467 -0
  126. package/dist/api/presentation/annotate.d.ts.map +1 -0
  127. package/dist/api/presentation/diagrams.d.ts +111 -8
  128. package/dist/api/presentation/diagrams.d.ts.map +1 -1
  129. package/dist/api/presentation/export.d.ts +108 -0
  130. package/dist/api/presentation/export.d.ts.map +1 -0
  131. package/dist/api/presentation/import.d.ts +55 -4
  132. package/dist/api/presentation/import.d.ts.map +1 -1
  133. package/dist/api/presentation/index.d.ts +58 -1
  134. package/dist/api/presentation/index.d.ts.map +1 -1
  135. package/dist/api/presentation/placedViews.d.ts +1139 -0
  136. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  137. package/dist/api/presentation/shapes.d.ts +481 -0
  138. package/dist/api/presentation/shapes.d.ts.map +1 -0
  139. package/dist/api/presentation/sheets.d.ts +452 -13
  140. package/dist/api/presentation/sheets.d.ts.map +1 -1
  141. package/dist/api/presentation/slideshow.d.ts +125 -0
  142. package/dist/api/presentation/slideshow.d.ts.map +1 -0
  143. package/dist/api/presentation/tables.d.ts +81 -0
  144. package/dist/api/presentation/tables.d.ts.map +1 -0
  145. package/dist/api/presentation/views.d.ts +367 -7
  146. package/dist/api/presentation/views.d.ts.map +1 -1
  147. package/dist/api/program/areas.d.ts +102 -12
  148. package/dist/api/program/areas.d.ts.map +1 -1
  149. package/dist/api/program/cores.d.ts +3 -99
  150. package/dist/api/program/cores.d.ts.map +1 -1
  151. package/dist/api/program/index.d.ts +7 -15
  152. package/dist/api/program/index.d.ts.map +1 -1
  153. package/dist/api/program/layout.d.ts +346 -11
  154. package/dist/api/program/layout.d.ts.map +1 -1
  155. package/dist/api/program/site.d.ts +469 -13
  156. package/dist/api/program/site.d.ts.map +1 -1
  157. package/dist/api/program/spreadsheet.d.ts +365 -41
  158. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  159. package/dist/api/workspace/index.d.ts +505 -0
  160. package/dist/api/workspace/index.d.ts.map +1 -0
  161. package/dist/errors/codes.d.ts +34 -0
  162. package/dist/errors/codes.d.ts.map +1 -0
  163. package/dist/errors/envelope.d.ts +56 -0
  164. package/dist/errors/envelope.d.ts.map +1 -0
  165. package/dist/errors/index.d.ts +6 -0
  166. package/dist/errors/index.d.ts.map +1 -0
  167. package/dist/errors/plugin-error.d.ts +69 -0
  168. package/dist/errors/plugin-error.d.ts.map +1 -0
  169. package/dist/handles.d.ts +97 -25
  170. package/dist/handles.d.ts.map +1 -1
  171. package/dist/host-utils.d.ts +4 -0
  172. package/dist/host-utils.d.ts.map +1 -1
  173. package/dist/index.cjs +4582 -1422
  174. package/dist/index.cjs.map +1 -1
  175. package/dist/index.d.ts +1 -0
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +4171 -1411
  178. package/dist/index.js.map +1 -1
  179. package/package.json +4 -2
  180. package/scripts/generate-manifest.mjs +45 -0
  181. package/scripts/generate-manifest.test.mjs +103 -4
  182. package/src/api/analysis/daylight.ts +470 -0
  183. package/src/api/analysis/heatmaps.ts +683 -0
  184. package/src/api/analysis/illuminance.ts +155 -0
  185. package/src/api/analysis/index.ts +61 -0
  186. package/src/api/analysis/shadows.ts +183 -0
  187. package/src/api/analysis/solar.ts +237 -0
  188. package/src/api/analysis/sunlightHours.ts +211 -0
  189. package/src/api/analysis/sunpath.ts +83 -0
  190. package/src/api/analysis/weather.ts +179 -0
  191. package/src/api/core/camera/index.ts +268 -0
  192. package/src/api/core/comment/index.ts +120 -2
  193. package/src/api/core/geom/create/index.ts +912 -1
  194. package/src/api/core/geom/delete/index.ts +6 -0
  195. package/src/api/core/geom/query/brep.ts +119 -0
  196. package/src/api/core/handles/index.ts +233 -0
  197. package/src/api/core/index.ts +34 -0
  198. package/src/api/core/io/export/index.ts +126 -0
  199. package/src/api/core/io/import/index.ts +496 -0
  200. package/src/api/core/io/index.ts +42 -0
  201. package/src/api/core/io/job/index.ts +140 -0
  202. package/src/api/core/io/query/index.ts +71 -0
  203. package/src/api/core/io/terrain/index.ts +360 -0
  204. package/src/api/core/io/underlay/index.ts +705 -0
  205. package/src/api/core/mode/index.ts +96 -0
  206. package/src/api/core/project/index.ts +62 -1
  207. package/src/api/core/proposals/index.ts +569 -0
  208. package/src/api/core/storeys/index.ts +294 -0
  209. package/src/api/core/tags.ts +27 -0
  210. package/src/api/core/user.ts +46 -0
  211. package/src/api/core/zoom/index.ts +4 -0
  212. package/src/api/design/create/index.ts +670 -30
  213. package/src/api/design/delete/index.ts +3 -0
  214. package/src/api/design/doors/index.ts +208 -0
  215. package/src/api/design/erase/index.ts +1 -1
  216. package/src/api/design/family.ts +388 -0
  217. package/src/api/design/furniture/index.ts +197 -8
  218. package/src/api/design/index.ts +102 -0
  219. package/src/api/design/lock.ts +27 -0
  220. package/src/api/design/materials/index.ts +334 -27
  221. package/src/api/design/query/geometry/index.ts +125 -3
  222. package/src/api/design/query/index.ts +217 -7
  223. package/src/api/design/query/referenceLines.ts +52 -0
  224. package/src/api/design/query/spaces.ts +143 -0
  225. package/src/api/design/selection/index.ts +129 -0
  226. package/src/api/design/transform/index.ts +170 -9
  227. package/src/api/design/types/index.ts +156 -0
  228. package/src/api/design/update/index.ts +631 -3
  229. package/src/api/design/visibility.ts +143 -0
  230. package/src/api/design/windows/index.ts +128 -2
  231. package/src/api/entity/buildableEnvelope.ts +4 -0
  232. package/src/api/entity/referenceLine.ts +8 -0
  233. package/src/api/entity/story.ts +259 -15
  234. package/src/api/index.ts +10 -0
  235. package/src/api/presentation/annotate.ts +385 -0
  236. package/src/api/presentation/diagrams.ts +118 -8
  237. package/src/api/presentation/export.ts +108 -0
  238. package/src/api/presentation/import.ts +51 -4
  239. package/src/api/presentation/index.ts +66 -1
  240. package/src/api/presentation/placedViews.ts +1120 -0
  241. package/src/api/presentation/shapes.ts +274 -0
  242. package/src/api/presentation/sheets.ts +400 -13
  243. package/src/api/presentation/slideshow.ts +134 -0
  244. package/src/api/presentation/tables.ts +84 -0
  245. package/src/api/presentation/views.ts +376 -8
  246. package/src/api/program/areas.ts +88 -15
  247. package/src/api/program/cores.ts +3 -91
  248. package/src/api/program/index.ts +7 -15
  249. package/src/api/program/layout.ts +365 -11
  250. package/src/api/program/site.ts +435 -13
  251. package/src/api/program/spreadsheet.ts +376 -35
  252. package/src/api/workspace/index.ts +563 -0
  253. package/src/errors/codes.ts +136 -0
  254. package/src/errors/envelope.ts +75 -0
  255. package/src/errors/index.ts +21 -0
  256. package/src/errors/plugin-error.ts +134 -0
  257. package/src/handles.ts +123 -13
  258. package/src/host-utils.ts +4 -0
  259. package/src/index.ts +1 -0
  260. package/test/errors.test.mjs +184 -0
  261. package/tsconfig.json +7 -2
@@ -0,0 +1,805 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../../../types";
3
+ import { UnderlayHandle, BBoxComponents } from "../../../../handles";
4
+ /**
5
+ * Underlays — inspect and edit the placed reference planes imported into the
6
+ * scene (`core.io.import.image` / `pdf` / `dwg` / `cadJson`).
7
+ *
8
+ * An underlay is an image, PDF, or CAD sketch dropped on a storey to trace over.
9
+ * This namespace lists them, calibrates their scale, sets opacity, and removes
10
+ * them. Every underlay is an {@linkcode UnderlayHandle}.
11
+ *
12
+ * ## Set-scale
13
+ * {@link PluginCoreIoUnderlayApi.setScale} takes **either** a numeric factor **or**
14
+ * a `{ planSize }` — the real-world length of the plan's longest side. A numeric
15
+ * factor is **absolute**: it is the total scale relative to the underlay's
16
+ * import-time size, the same number {@link PluginCoreIoUnderlayApi.getScale}
17
+ * returns as `scaleFactor` (so `setScale(u, 2)` is idempotent, and
18
+ * `setScale(u, (await getScale(u)).scaleFactor)` is a no-op). Use `planSize` to
19
+ * calibrate programmatically ("this plan is 50 m across") without clicking
20
+ * points on the canvas. Scale is supported for **image and PDF** underlays;
21
+ * **CAD scaling is not supported** (`getScale` returns `null`, `setScale`/`resetScale`
22
+ * throw). Image scale is tracked on the plan (and is **not undoable**); PDF scale is
23
+ * baked into the mesh (X/Z) and **is undoable**.
24
+ *
25
+ * Accessed via `snaptrude.core.io.underlay`.
26
+ */
27
+ export declare abstract class PluginCoreIoUnderlayApi {
28
+ constructor();
29
+ /**
30
+ * List the underlays in the scene, optionally limited to one storey.
31
+ *
32
+ * @param storey - When given, only underlays on this storey number.
33
+ * @returns an array of {@linkcode UnderlayHandle} (empty, never `null`).
34
+ *
35
+ * @examplePrompt List all the reference underlays in the model
36
+ * @examplePrompt What underlays are on the ground floor?
37
+ * @examplePrompt Show every imported floor plan and PDF
38
+ * @examplePrompt How many trace-over images are on storey 2?
39
+ *
40
+ * # Example
41
+ * ```ts
42
+ * const underlays = await snaptrude.core.io.underlay.list(1)
43
+ * console.log(`${underlays.length} underlays on storey 1`)
44
+ * ```
45
+ */
46
+ abstract list(storey?: number): PluginApiReturn<UnderlayHandle[]>;
47
+ /**
48
+ * Read an underlay's world-space bounding box (image, PDF, or CAD). `null` if
49
+ * the underlay no longer resolves or has no measurable mesh. Useful for fitting
50
+ * drawn geometry to a reference, or computing a plan size before scaling.
51
+ *
52
+ * @param underlay - The underlay to measure.
53
+ *
54
+ * @examplePrompt How big is this floor plan in the scene?
55
+ * @examplePrompt Get the bounding box of the underlay
56
+ * @examplePrompt What's the extent of the imported PDF?
57
+ * @examplePrompt Measure the CAD sketch's size
58
+ *
59
+ * # Example
60
+ * ```ts
61
+ * const bb = await snaptrude.core.io.underlay.getBounds(plan)
62
+ * if (bb) console.log(`width ${bb.max.x - bb.min.x}`)
63
+ * ```
64
+ */
65
+ abstract getBounds(underlay: UnderlayHandle): PluginApiReturn<BBoxComponents | null>;
66
+ /**
67
+ * List the distinct original AutoCAD layer names retained by a placed CAD
68
+ * underlay. Returns `[]` for non-CAD underlays, legacy imports created before
69
+ * source-layer retention, missing underlays, or CAD drawings without layer tags.
70
+ *
71
+ * @param underlay - The placed CAD underlay to inspect.
72
+ * @returns the retained AutoCAD layer names in first-appearance order.
73
+ *
74
+ * @examplePrompt List the original AutoCAD layers in this imported drawing
75
+ * @examplePrompt Which CAD layers are available in this underlay?
76
+ *
77
+ * # Example
78
+ * ```ts
79
+ * const layers = await snaptrude.core.io.underlay.listCadLayers(cad)
80
+ * console.log(layers)
81
+ * ```
82
+ */
83
+ abstract listCadLayers(underlay: UnderlayHandle): PluginApiReturn<string[]>;
84
+ /**
85
+ * Read one original AutoCAD layer's retained line and arc geometry in
86
+ * **Snaptrude world space** and Snaptrude internal units. Results are paged so
87
+ * large drawings can be inspected without returning the whole DWG at once.
88
+ *
89
+ * The world-space coordinates include the CAD underlay's current position,
90
+ * rotation, scale, and storey elevation. `null` means the underlay no longer
91
+ * resolves. An unknown layer returns a page with `total: 0`.
92
+ *
93
+ * @param underlay - The placed CAD underlay to inspect.
94
+ * @param layer - Exact, case-sensitive original AutoCAD layer name.
95
+ * @param options - Optional zero-based offset and page limit (default 500,
96
+ * maximum 1000).
97
+ * @returns a page of retained CAD curves, or `null` if the underlay is gone.
98
+ * @throws if the handle resolves to an image/PDF rather than a CAD underlay.
99
+ *
100
+ * @examplePrompt Read the wall geometry from the A-WALL layer in this CAD underlay
101
+ * @examplePrompt Get the next 500 curves from the structural CAD layer
102
+ *
103
+ * # Example
104
+ * ```ts
105
+ * const page = await snaptrude.core.io.underlay.getCadLayerGeometry(
106
+ * cad,
107
+ * "A-WALL",
108
+ * { offset: 0, limit: 500 },
109
+ * )
110
+ * if (page) console.log(`${page.curves.length} of ${page.total} curves`)
111
+ * ```
112
+ */
113
+ abstract getCadLayerGeometry(underlay: UnderlayHandle, layer: string, options?: PluginCadLayerGeometryOptions): PluginApiReturn<PluginCadLayerGeometryPage | null>;
114
+ /**
115
+ * Read an underlay's scale. Works for **image and PDF** underlays. Returns
116
+ * `null` for CAD (scaling not supported) or if the handle no longer resolves.
117
+ *
118
+ * - `scaleFactor` — the **cumulative user scale** relative to the underlay's
119
+ * import-time size (`1` = as imported). This is the same number
120
+ * {@link PluginCoreIoUnderlayApi.setScale} accepts.
121
+ * - `initialScaleFactor` — the engine's import-time fit factor (how the raw
122
+ * image was sized to the canvas on import); informational only. For PDF it
123
+ * is always `1`.
124
+ *
125
+ * @param underlay - The underlay to read.
126
+ *
127
+ * @examplePrompt What scale is this floor plan set to?
128
+ * @examplePrompt Get the current and original scale of the underlay
129
+ * @examplePrompt How much has this image been scaled since import?
130
+ * @examplePrompt Read the scale factor of the reference plan
131
+ *
132
+ * # Example
133
+ * ```ts
134
+ * const s = await snaptrude.core.io.underlay.getScale(plan)
135
+ * if (s) console.log(`scale ${s.scaleFactor} (was ${s.initialScaleFactor})`)
136
+ * ```
137
+ */
138
+ abstract getScale(underlay: UnderlayHandle): PluginApiReturn<{
139
+ scaleFactor: number;
140
+ initialScaleFactor: number;
141
+ } | null>;
142
+ /**
143
+ * Set an underlay's scale — the **calibration** step after import. Works for
144
+ * **image and PDF** underlays (CAD scaling is not supported — throws).
145
+ *
146
+ * Pass the `scale` argument as **either**:
147
+ * - a **number** — the **absolute** scale factor relative to the underlay's
148
+ * import-time size (e.g. `2` makes it twice its imported size, `0.5` half —
149
+ * no matter what the current scale is). It is the same number
150
+ * {@link PluginCoreIoUnderlayApi.getScale} returns as `scaleFactor`, so the
151
+ * call is idempotent: repeating `setScale(u, 2)` leaves the underlay at 2×.
152
+ * **Or**
153
+ * - a **`{ planSize }`** object — the real-world **length of the plan's longest
154
+ * side**, in the project's length unit. The factor is computed precisely so the
155
+ * underlay's longest side becomes exactly `planSize`. This is the way to
156
+ * calibrate programmatically without clicking points on the canvas: if you
157
+ * know the plan is 50&nbsp;m across, pass `{ planSize: 50 }`.
158
+ *
159
+ * Image scale is not undoable; PDF scale is undoable.
160
+ *
161
+ * @param underlay - The underlay to scale (image or PDF).
162
+ * @param scale - An absolute numeric factor, **or** `{ planSize }` (the real
163
+ * length of the underlay's longest side, in project units).
164
+ * @returns the applied `{ scaleFactor }` (the new absolute factor).
165
+ * @throws if writes are disabled, the underlay is CAD / can't be resolved, the plan
166
+ * has zero size, or the engine fails.
167
+ *
168
+ * @examplePrompt Scale this floor plan so it's 50 meters across
169
+ * @examplePrompt Set the plan size to 30m — it's imported too small
170
+ * @examplePrompt Make the reference image twice its imported size
171
+ * @examplePrompt Calibrate the PDF: the site is 120 meters long
172
+ *
173
+ * # Example
174
+ * ```ts
175
+ * // Absolute factor — set the underlay to 2× its imported size:
176
+ * await snaptrude.core.io.underlay.setScale(plan, 2)
177
+ *
178
+ * // Fit to a real-world size — make the plan's longest side 50 project-units:
179
+ * await snaptrude.core.io.underlay.setScale(plan, { planSize: 50 })
180
+ * ```
181
+ */
182
+ abstract setScale(underlay: UnderlayHandle, scale: number | {
183
+ planSize: number;
184
+ }): PluginApiReturn<{
185
+ scaleFactor: number;
186
+ }>;
187
+ /**
188
+ * Reset an underlay's scale back to its import-time size (image or PDF; CAD
189
+ * scaling is not supported — throws). Equivalent to `setScale(underlay, 1)`.
190
+ *
191
+ * @param underlay - The underlay to reset (image or PDF).
192
+ * @returns the restored `{ scaleFactor }` (`1`).
193
+ * @throws if writes are disabled, the underlay is CAD / can't be resolved, or the engine fails.
194
+ *
195
+ * @examplePrompt Reset this floor plan's scale to how it was imported
196
+ * @examplePrompt Undo the scaling on the underlay
197
+ * @examplePrompt Put the reference image back to its original size
198
+ * @examplePrompt Restore the plan's default scale
199
+ *
200
+ * # Example
201
+ * ```ts
202
+ * await snaptrude.core.io.underlay.resetScale(plan)
203
+ * ```
204
+ */
205
+ abstract resetScale(underlay: UnderlayHandle): PluginApiReturn<{
206
+ scaleFactor: number;
207
+ }>;
208
+ /**
209
+ * Read an underlay's opacity (`0`..`1`), or `null` if it has no material.
210
+ *
211
+ * @param underlay - The underlay to read.
212
+ *
213
+ * @examplePrompt How transparent is this underlay?
214
+ * @examplePrompt Get the opacity of the floor plan
215
+ * @examplePrompt What's the fade level on the reference image?
216
+ * @examplePrompt Read the underlay's opacity
217
+ *
218
+ * # Example
219
+ * ```ts
220
+ * const o = await snaptrude.core.io.underlay.getOpacity(plan)
221
+ * ```
222
+ */
223
+ abstract getOpacity(underlay: UnderlayHandle): PluginApiReturn<number | null>;
224
+ /**
225
+ * Set an underlay's opacity (`0` = transparent .. `1` = opaque). Undoable.
226
+ * The engine keeps underlays faintly visible: values below `0.01` clamp to
227
+ * `0.01`, so `setOpacity(u, 0)` reads back as `0.01`, not `0`.
228
+ *
229
+ * @param underlay - The underlay to change.
230
+ * @param opacity - Target opacity, `0`..`1` (engine floor `0.01`).
231
+ * @throws if writes are disabled, the underlay can't be resolved, or the
232
+ * underlay is **locked** (unlock it in the app first).
233
+ *
234
+ * @examplePrompt Fade this floor plan to 30% so I can see through it
235
+ * @examplePrompt Make the underlay half transparent
236
+ * @examplePrompt Set the reference image opacity to 0.2
237
+ * @examplePrompt Dim the trace-over plan
238
+ *
239
+ * # Example
240
+ * ```ts
241
+ * await snaptrude.core.io.underlay.setOpacity(plan, 0.3)
242
+ * ```
243
+ */
244
+ abstract setOpacity(underlay: UnderlayHandle, opacity: number): PluginApiReturn<void>;
245
+ /**
246
+ * Delete an underlay from the scene (and its backend record). Applies to image,
247
+ * PDF, and CAD underlays.
248
+ *
249
+ * @param underlay - The underlay to delete.
250
+ * @throws if writes are disabled or the underlay can't be resolved.
251
+ *
252
+ * @examplePrompt Delete this floor plan underlay
253
+ * @examplePrompt Remove the imported PDF from the scene
254
+ * @examplePrompt Get rid of the CAD sketch I traced over
255
+ * @examplePrompt Clear the reference image off storey 1
256
+ *
257
+ * # Example
258
+ * ```ts
259
+ * const [first] = await snaptrude.core.io.underlay.list(1)
260
+ * if (first) await snaptrude.core.io.underlay.delete(first)
261
+ * ```
262
+ */
263
+ abstract delete(underlay: UnderlayHandle): PluginApiReturn<void>;
264
+ /**
265
+ * Extract **continuous wall centrelines** from one retained AutoCAD layer's
266
+ * double-line wall faces — the deterministic tracing primitive behind
267
+ * CAD-to-BIM wall conversion. Instead of paging raw curves and re-deriving
268
+ * the geometry in worker code, this reads the whole layer and runs the vetted
269
+ * pipeline: cull fragments, dedupe, merge collinear runs into *faces*, pair
270
+ * parallel faces a wall-thickness apart into centrelines (midline = axis,
271
+ * separation = thickness), bridge collinear gaps up to
272
+ * `bridgeOpenings.maxWidth` into ONE continuous centreline while recording
273
+ * each bridged span as an opening, then snap near-touching endpoints at
274
+ * junctions.
275
+ *
276
+ * CAD drafters interrupt wall faces at every door/window, so raw wall layers
277
+ * always have gaps; Snaptrude doors/windows must host into a continuous wall.
278
+ * The returned centrelines are ready for `design.create.walls`, and each
279
+ * centreline's `openings` records where the CAD had a gap — feed those to the
280
+ * door/window placement step. `unpaired` faces (no parallel partner at wall
281
+ * thickness) are evidence, not noise: a run of unpaired perimeter faces
282
+ * usually means that stretch of facade is glazed, not solid.
283
+ *
284
+ * All lengths are in **Snaptrude internal units** (convert from project units
285
+ * with `core.units.convert`). Coordinates are world-space plan (x, z).
286
+ *
287
+ * Thin parallel pairs (glass lines, mullion faces) are the same algorithm at
288
+ * a smaller separation: pass e.g. `thicknessRange: [0.01, 0.25]` with
289
+ * `bridgeOpenings: null` to detect glazing runs on a glazing layer.
290
+ *
291
+ * @param underlay - The placed CAD underlay to read.
292
+ * @param layer - Exact, case-sensitive original AutoCAD layer name.
293
+ * @param options - Tolerances; see {@linkcode PluginCadCenterlineOptions}.
294
+ * @returns centrelines + unpaired faces + stats, or `null` if the underlay is gone.
295
+ * @throws if the handle resolves to an image/PDF rather than a CAD underlay.
296
+ *
297
+ * @examplePrompt Trace the walls from the a-wall CAD layer
298
+ * @examplePrompt Convert the AutoCAD wall linework into Snaptrude walls
299
+ * @examplePrompt Extract wall centrelines with thickness from the imported DWG
300
+ * @examplePrompt Find the glazing runs on the a-glazing layer
301
+ *
302
+ * # Example
303
+ * ```ts
304
+ * const [cad] = await snaptrude.core.io.underlay.list()
305
+ * const r = await snaptrude.core.io.underlay.extractCenterlines(cad, "a-wall")
306
+ * if (r) {
307
+ * const items = r.centerlines.map((c) => ({
308
+ * profile: [c.start, c.end],
309
+ * thickness: c.thickness,
310
+ * }))
311
+ * console.log(`${items.length} walls, ${r.unpaired.length} unpaired faces`)
312
+ * }
313
+ * ```
314
+ */
315
+ abstract extractCenterlines(underlay: UnderlayHandle, layer: string, options?: PluginCadCenterlineOptions): PluginApiReturn<PluginCadCenterlinesResult | null>;
316
+ /**
317
+ * Classify one retained AutoCAD layer's **arcs as door swings** — the
318
+ * deterministic tracing primitive behind CAD-to-BIM door placement. A door
319
+ * swing is drawn as a ~90° arc whose radius IS the leaf width and whose
320
+ * centre IS the hinge point. This filters the layer's arcs by plausible
321
+ * radius and sweep (rejecting inch-scale fillets, full-circle symbols and
322
+ * long shallow curves), reads each survivor as a door candidate (hinge, leaf
323
+ * width, swing direction, hosting wall direction), merges mirrored pairs
324
+ * sharing a chord line into double doors, and returns a radius histogram —
325
+ * real drawings use a handful of standard door sizes, so the histogram's
326
+ * clusters are the drawing's door widths (sanity-check them against the
327
+ * catalog; distrust arcs in no cluster).
328
+ *
329
+ * All lengths are in **Snaptrude internal units**. `rejected` lists filtered
330
+ * arcs with reasons so nothing is silently dropped.
331
+ *
332
+ * @param underlay - The placed CAD underlay to read.
333
+ * @param layer - Exact, case-sensitive original AutoCAD layer name.
334
+ * @param options - Gates and binning; see {@linkcode PluginCadArcClassifyOptions}.
335
+ * @returns door candidates + rejected arcs + histogram, or `null` if the underlay is gone.
336
+ * @throws if the handle resolves to an image/PDF rather than a CAD underlay.
337
+ *
338
+ * @examplePrompt Find the doors on the a-door CAD layer
339
+ * @examplePrompt Classify the door swing arcs in the imported drawing
340
+ * @examplePrompt What door sizes does this DWG use?
341
+ * @examplePrompt Read hinge points and leaf widths from the CAD door layer
342
+ *
343
+ * # Example
344
+ * ```ts
345
+ * const [cad] = await snaptrude.core.io.underlay.list()
346
+ * const r = await snaptrude.core.io.underlay.classifyArcs(cad, "a-door")
347
+ * if (r) {
348
+ * console.log(`${r.doors.length} doors; sizes:`,
349
+ * r.radiusHistogram.filter((b) => b.count > 1))
350
+ * }
351
+ * ```
352
+ */
353
+ abstract classifyArcs(underlay: UnderlayHandle, layer: string, options?: PluginCadArcClassifyOptions): PluginApiReturn<PluginCadArcClassifyResult | null>;
354
+ }
355
+ /**
356
+ * Arguments for {@link PluginCoreIoUnderlayApi.list}.
357
+ *
358
+ * | Property | Type | Description |
359
+ * |---|---|---|
360
+ * | `storey` | `number`? | Only underlays on this storey (default: all) |
361
+ */
362
+ export declare const PluginUnderlayListArgs: z.ZodObject<{
363
+ storey: z.ZodOptional<z.ZodNumber>;
364
+ }, z.core.$strip>;
365
+ export type PluginUnderlayListArgs = z.infer<typeof PluginUnderlayListArgs>;
366
+ /**
367
+ * Fit-to-size calibration: the real-world **length of the plan's longest side**, in
368
+ * the project's length unit. Passed to {@link PluginCoreIoUnderlayApi.setScale}; the
369
+ * factor is computed as `planSize / currentLongestSide`.
370
+ *
371
+ * | Property | Type | Description |
372
+ * |---|---|---|
373
+ * | `planSize` | `number` | Real-world length of the underlay's longest side (project units) |
374
+ */
375
+ export declare const PluginUnderlayPlanSize: z.ZodObject<{
376
+ planSize: z.ZodNumber;
377
+ }, z.core.$strip>;
378
+ export type PluginUnderlayPlanSize = z.infer<typeof PluginUnderlayPlanSize>;
379
+ /** The `scale` argument of {@link PluginCoreIoUnderlayApi.setScale}: a direct factor or a `{ planSize }`. */
380
+ export declare const PluginUnderlaySetScaleValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
381
+ planSize: z.ZodNumber;
382
+ }, z.core.$strip>]>;
383
+ export type PluginUnderlaySetScaleValue = z.infer<typeof PluginUnderlaySetScaleValue>;
384
+ /**
385
+ * Arguments for {@link PluginCoreIoUnderlayApi.setScale}.
386
+ *
387
+ * | Property | Type | Description |
388
+ * |---|---|---|
389
+ * | `underlay` | {@link UnderlayHandle} | The image/PDF underlay to scale |
390
+ * | `scale` | `number \| {@link PluginUnderlayPlanSize}` | Direct factor, or `{ planSize }` |
391
+ */
392
+ export declare const PluginUnderlaySetScaleArgs: z.ZodObject<{
393
+ underlay: z.ZodPipe<z.ZodString, z.ZodTransform<UnderlayHandle, string>>;
394
+ scale: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
395
+ planSize: z.ZodNumber;
396
+ }, z.core.$strip>]>;
397
+ }, z.core.$strip>;
398
+ export type PluginUnderlaySetScaleArgs = z.infer<typeof PluginUnderlaySetScaleArgs>;
399
+ /**
400
+ * Arguments for {@link PluginCoreIoUnderlayApi.setOpacity}.
401
+ *
402
+ * | Property | Type | Description |
403
+ * |---|---|---|
404
+ * | `underlay` | {@link UnderlayHandle} | The underlay to change |
405
+ * | `opacity` | `number` | Target opacity, `0`..`1` |
406
+ */
407
+ export declare const PluginUnderlaySetOpacityArgs: z.ZodObject<{
408
+ underlay: z.ZodPipe<z.ZodString, z.ZodTransform<UnderlayHandle, string>>;
409
+ opacity: z.ZodNumber;
410
+ }, z.core.$strip>;
411
+ export type PluginUnderlaySetOpacityArgs = z.infer<typeof PluginUnderlaySetOpacityArgs>;
412
+ /**
413
+ * Arguments for the single-underlay methods
414
+ * ({@link PluginCoreIoUnderlayApi.getScale} / `resetScale` / `getOpacity` / `delete`).
415
+ *
416
+ * | Property | Type | Description |
417
+ * |---|---|---|
418
+ * | `underlay` | {@link UnderlayHandle} | The target underlay |
419
+ */
420
+ export declare const PluginUnderlayRefArgs: z.ZodObject<{
421
+ underlay: z.ZodPipe<z.ZodString, z.ZodTransform<UnderlayHandle, string>>;
422
+ }, z.core.$strip>;
423
+ export type PluginUnderlayRefArgs = z.infer<typeof PluginUnderlayRefArgs>;
424
+ /** A retained AutoCAD line represented as a world-space read record. */
425
+ export declare const PluginCadLineGeometry: z.ZodObject<{
426
+ type: z.ZodLiteral<"line">;
427
+ start: z.ZodObject<{
428
+ x: z.ZodNumber;
429
+ y: z.ZodNumber;
430
+ z: z.ZodNumber;
431
+ }, z.core.$strip>;
432
+ end: z.ZodObject<{
433
+ x: z.ZodNumber;
434
+ y: z.ZodNumber;
435
+ z: z.ZodNumber;
436
+ }, z.core.$strip>;
437
+ }, z.core.$strip>;
438
+ export type PluginCadLineGeometry = z.infer<typeof PluginCadLineGeometry>;
439
+ /** A retained AutoCAD arc represented as a world-space read record. */
440
+ export declare const PluginCadArcGeometry: z.ZodObject<{
441
+ type: z.ZodLiteral<"arc">;
442
+ centre: z.ZodObject<{
443
+ x: z.ZodNumber;
444
+ y: z.ZodNumber;
445
+ z: z.ZodNumber;
446
+ }, z.core.$strip>;
447
+ axis: z.ZodObject<{
448
+ x: z.ZodNumber;
449
+ y: z.ZodNumber;
450
+ z: z.ZodNumber;
451
+ }, z.core.$strip>;
452
+ start: z.ZodObject<{
453
+ x: z.ZodNumber;
454
+ y: z.ZodNumber;
455
+ z: z.ZodNumber;
456
+ }, z.core.$strip>;
457
+ end: z.ZodObject<{
458
+ x: z.ZodNumber;
459
+ y: z.ZodNumber;
460
+ z: z.ZodNumber;
461
+ }, z.core.$strip>;
462
+ }, z.core.$strip>;
463
+ export type PluginCadArcGeometry = z.infer<typeof PluginCadArcGeometry>;
464
+ /** Line or arc geometry returned by `getCadLayerGeometry`. */
465
+ export declare const PluginCadGeometry: z.ZodDiscriminatedUnion<[z.ZodObject<{
466
+ type: z.ZodLiteral<"line">;
467
+ start: z.ZodObject<{
468
+ x: z.ZodNumber;
469
+ y: z.ZodNumber;
470
+ z: z.ZodNumber;
471
+ }, z.core.$strip>;
472
+ end: z.ZodObject<{
473
+ x: z.ZodNumber;
474
+ y: z.ZodNumber;
475
+ z: z.ZodNumber;
476
+ }, z.core.$strip>;
477
+ }, z.core.$strip>, z.ZodObject<{
478
+ type: z.ZodLiteral<"arc">;
479
+ centre: z.ZodObject<{
480
+ x: z.ZodNumber;
481
+ y: z.ZodNumber;
482
+ z: z.ZodNumber;
483
+ }, z.core.$strip>;
484
+ axis: z.ZodObject<{
485
+ x: z.ZodNumber;
486
+ y: z.ZodNumber;
487
+ z: z.ZodNumber;
488
+ }, z.core.$strip>;
489
+ start: z.ZodObject<{
490
+ x: z.ZodNumber;
491
+ y: z.ZodNumber;
492
+ z: z.ZodNumber;
493
+ }, z.core.$strip>;
494
+ end: z.ZodObject<{
495
+ x: z.ZodNumber;
496
+ y: z.ZodNumber;
497
+ z: z.ZodNumber;
498
+ }, z.core.$strip>;
499
+ }, z.core.$strip>], "type">;
500
+ export type PluginCadGeometry = z.infer<typeof PluginCadGeometry>;
501
+ /** Pagination options for `getCadLayerGeometry`. */
502
+ export declare const PluginCadLayerGeometryOptions: z.ZodObject<{
503
+ offset: z.ZodDefault<z.ZodNumber>;
504
+ limit: z.ZodDefault<z.ZodNumber>;
505
+ }, z.core.$strip>;
506
+ export type PluginCadLayerGeometryOptions = z.input<typeof PluginCadLayerGeometryOptions>;
507
+ /** Arguments for {@link PluginCoreIoUnderlayApi.getCadLayerGeometry}. */
508
+ export declare const PluginCadLayerGeometryArgs: z.ZodObject<{
509
+ underlay: z.ZodPipe<z.ZodString, z.ZodTransform<UnderlayHandle, string>>;
510
+ layer: z.ZodString;
511
+ options: z.ZodDefault<z.ZodObject<{
512
+ offset: z.ZodDefault<z.ZodNumber>;
513
+ limit: z.ZodDefault<z.ZodNumber>;
514
+ }, z.core.$strip>>;
515
+ }, z.core.$strip>;
516
+ export type PluginCadLayerGeometryArgs = z.infer<typeof PluginCadLayerGeometryArgs>;
517
+ /** A page of one original AutoCAD layer's geometry in Snaptrude world space. */
518
+ export declare const PluginCadLayerGeometryPage: z.ZodObject<{
519
+ layer: z.ZodString;
520
+ coordinateSpace: z.ZodLiteral<"snaptrude-world">;
521
+ units: z.ZodLiteral<"snaptrude-internal">;
522
+ total: z.ZodNumber;
523
+ offset: z.ZodNumber;
524
+ curves: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
525
+ type: z.ZodLiteral<"line">;
526
+ start: z.ZodObject<{
527
+ x: z.ZodNumber;
528
+ y: z.ZodNumber;
529
+ z: z.ZodNumber;
530
+ }, z.core.$strip>;
531
+ end: z.ZodObject<{
532
+ x: z.ZodNumber;
533
+ y: z.ZodNumber;
534
+ z: z.ZodNumber;
535
+ }, z.core.$strip>;
536
+ }, z.core.$strip>, z.ZodObject<{
537
+ type: z.ZodLiteral<"arc">;
538
+ centre: z.ZodObject<{
539
+ x: z.ZodNumber;
540
+ y: z.ZodNumber;
541
+ z: z.ZodNumber;
542
+ }, z.core.$strip>;
543
+ axis: z.ZodObject<{
544
+ x: z.ZodNumber;
545
+ y: z.ZodNumber;
546
+ z: z.ZodNumber;
547
+ }, z.core.$strip>;
548
+ start: z.ZodObject<{
549
+ x: z.ZodNumber;
550
+ y: z.ZodNumber;
551
+ z: z.ZodNumber;
552
+ }, z.core.$strip>;
553
+ end: z.ZodObject<{
554
+ x: z.ZodNumber;
555
+ y: z.ZodNumber;
556
+ z: z.ZodNumber;
557
+ }, z.core.$strip>;
558
+ }, z.core.$strip>], "type">>;
559
+ }, z.core.$strip>;
560
+ export type PluginCadLayerGeometryPage = z.infer<typeof PluginCadLayerGeometryPage>;
561
+ /** A point in the world-space plan (x, z) projection, Snaptrude internal units. */
562
+ export declare const PluginPlanPoint: z.ZodObject<{
563
+ x: z.ZodNumber;
564
+ z: z.ZodNumber;
565
+ }, z.core.$strip>;
566
+ export type PluginPlanPoint = z.infer<typeof PluginPlanPoint>;
567
+ /**
568
+ * Options for {@link PluginCoreIoUnderlayApi.extractCenterlines}. All lengths in
569
+ * Snaptrude internal units.
570
+ *
571
+ * | Property | Type | Description |
572
+ * |---|---|---|
573
+ * | `thicknessRange` | `[number, number]`? | Plausible wall thickness `[min, max]` (default `[0.3, 1.6]` ≈ 3–16 in) |
574
+ * | `mergeGap` | `number`? | Noise tolerance joining collinear segments that are really one face (default `0.05`) |
575
+ * | `minLength` | `number`? | Cull fragments shorter than this (default `0.1`) |
576
+ * | `parallelTolDeg` | `number`? | Max angle in degrees between faces still considered parallel (default `2`) |
577
+ * | `minOverlap` | `number`? | Fraction of the shorter face that must overlap its pair (default `0.6`) |
578
+ * | `bridgeOpenings` | `{ maxWidth }` \| `null`? | Close collinear centreline gaps up to `maxWidth`, recording each as an opening (default `{ maxWidth: 9.6 }` ≈ 8 ft); `null` disables bridging |
579
+ */
580
+ export declare const PluginCadCenterlineOptions: z.ZodObject<{
581
+ thicknessRange: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
582
+ mergeGap: z.ZodDefault<z.ZodNumber>;
583
+ minLength: z.ZodDefault<z.ZodNumber>;
584
+ parallelTolDeg: z.ZodDefault<z.ZodNumber>;
585
+ minOverlap: z.ZodDefault<z.ZodNumber>;
586
+ bridgeOpenings: z.ZodDefault<z.ZodNullable<z.ZodObject<{
587
+ maxWidth: z.ZodNumber;
588
+ }, z.core.$strip>>>;
589
+ }, z.core.$strip>;
590
+ export type PluginCadCenterlineOptions = z.input<typeof PluginCadCenterlineOptions>;
591
+ /** Arguments for {@link PluginCoreIoUnderlayApi.extractCenterlines}. */
592
+ export declare const PluginCadCenterlinesArgs: z.ZodObject<{
593
+ underlay: z.ZodPipe<z.ZodString, z.ZodTransform<UnderlayHandle, string>>;
594
+ layer: z.ZodString;
595
+ options: z.ZodDefault<z.ZodObject<{
596
+ thicknessRange: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
597
+ mergeGap: z.ZodDefault<z.ZodNumber>;
598
+ minLength: z.ZodDefault<z.ZodNumber>;
599
+ parallelTolDeg: z.ZodDefault<z.ZodNumber>;
600
+ minOverlap: z.ZodDefault<z.ZodNumber>;
601
+ bridgeOpenings: z.ZodDefault<z.ZodNullable<z.ZodObject<{
602
+ maxWidth: z.ZodNumber;
603
+ }, z.core.$strip>>>;
604
+ }, z.core.$strip>>;
605
+ }, z.core.$strip>;
606
+ export type PluginCadCenterlinesArgs = z.infer<typeof PluginCadCenterlinesArgs>;
607
+ /** A span bridged over a CAD gap in a continuous centreline — a door/window opening candidate. */
608
+ export declare const PluginCadOpening: z.ZodObject<{
609
+ start: z.ZodObject<{
610
+ x: z.ZodNumber;
611
+ z: z.ZodNumber;
612
+ }, z.core.$strip>;
613
+ end: z.ZodObject<{
614
+ x: z.ZodNumber;
615
+ z: z.ZodNumber;
616
+ }, z.core.$strip>;
617
+ width: z.ZodNumber;
618
+ }, z.core.$strip>;
619
+ export type PluginCadOpening = z.infer<typeof PluginCadOpening>;
620
+ /**
621
+ * One continuous wall centreline extracted from CAD wall faces. `thickness` is
622
+ * the measured face separation; `openings` are the CAD gaps bridged into this
623
+ * centreline (feed the door/window step).
624
+ */
625
+ export declare const PluginCadCenterline: z.ZodObject<{
626
+ start: z.ZodObject<{
627
+ x: z.ZodNumber;
628
+ z: z.ZodNumber;
629
+ }, z.core.$strip>;
630
+ end: z.ZodObject<{
631
+ x: z.ZodNumber;
632
+ z: z.ZodNumber;
633
+ }, z.core.$strip>;
634
+ thickness: z.ZodNumber;
635
+ length: z.ZodNumber;
636
+ sourceFaceCount: z.ZodNumber;
637
+ openings: z.ZodArray<z.ZodObject<{
638
+ start: z.ZodObject<{
639
+ x: z.ZodNumber;
640
+ z: z.ZodNumber;
641
+ }, z.core.$strip>;
642
+ end: z.ZodObject<{
643
+ x: z.ZodNumber;
644
+ z: z.ZodNumber;
645
+ }, z.core.$strip>;
646
+ width: z.ZodNumber;
647
+ }, z.core.$strip>>;
648
+ }, z.core.$strip>;
649
+ export type PluginCadCenterline = z.infer<typeof PluginCadCenterline>;
650
+ /** A merged face with no parallel partner at wall thickness — evidence (often glazing), not noise. */
651
+ export declare const PluginCadUnpairedFace: z.ZodObject<{
652
+ start: z.ZodObject<{
653
+ x: z.ZodNumber;
654
+ z: z.ZodNumber;
655
+ }, z.core.$strip>;
656
+ end: z.ZodObject<{
657
+ x: z.ZodNumber;
658
+ z: z.ZodNumber;
659
+ }, z.core.$strip>;
660
+ length: z.ZodNumber;
661
+ }, z.core.$strip>;
662
+ export type PluginCadUnpairedFace = z.infer<typeof PluginCadUnpairedFace>;
663
+ /** Result of {@link PluginCoreIoUnderlayApi.extractCenterlines}. */
664
+ export declare const PluginCadCenterlinesResult: z.ZodObject<{
665
+ layer: z.ZodString;
666
+ coordinateSpace: z.ZodLiteral<"snaptrude-world">;
667
+ units: z.ZodLiteral<"snaptrude-internal">;
668
+ centerlines: z.ZodArray<z.ZodObject<{
669
+ start: z.ZodObject<{
670
+ x: z.ZodNumber;
671
+ z: z.ZodNumber;
672
+ }, z.core.$strip>;
673
+ end: z.ZodObject<{
674
+ x: z.ZodNumber;
675
+ z: z.ZodNumber;
676
+ }, z.core.$strip>;
677
+ thickness: z.ZodNumber;
678
+ length: z.ZodNumber;
679
+ sourceFaceCount: z.ZodNumber;
680
+ openings: z.ZodArray<z.ZodObject<{
681
+ start: z.ZodObject<{
682
+ x: z.ZodNumber;
683
+ z: z.ZodNumber;
684
+ }, z.core.$strip>;
685
+ end: z.ZodObject<{
686
+ x: z.ZodNumber;
687
+ z: z.ZodNumber;
688
+ }, z.core.$strip>;
689
+ width: z.ZodNumber;
690
+ }, z.core.$strip>>;
691
+ }, z.core.$strip>>;
692
+ unpaired: z.ZodArray<z.ZodObject<{
693
+ start: z.ZodObject<{
694
+ x: z.ZodNumber;
695
+ z: z.ZodNumber;
696
+ }, z.core.$strip>;
697
+ end: z.ZodObject<{
698
+ x: z.ZodNumber;
699
+ z: z.ZodNumber;
700
+ }, z.core.$strip>;
701
+ length: z.ZodNumber;
702
+ }, z.core.$strip>>;
703
+ stats: z.ZodObject<{
704
+ curvesRead: z.ZodNumber;
705
+ arcsSkipped: z.ZodNumber;
706
+ fragmentsCulled: z.ZodNumber;
707
+ duplicates: z.ZodNumber;
708
+ faces: z.ZodNumber;
709
+ }, z.core.$strip>;
710
+ }, z.core.$strip>;
711
+ export type PluginCadCenterlinesResult = z.infer<typeof PluginCadCenterlinesResult>;
712
+ /**
713
+ * Options for {@link PluginCoreIoUnderlayApi.classifyArcs}. Lengths in Snaptrude
714
+ * internal units, sweeps in degrees.
715
+ *
716
+ * | Property | Type | Description |
717
+ * |---|---|---|
718
+ * | `radiusRange` | `[number, number]`? | Plausible door-leaf widths (default `[3, 5.4]` ≈ 2.5–4.5 ft) |
719
+ * | `sweepRangeDeg` | `[number, number]`? | Accepted arc sweep in degrees (default `[60, 120]`; a swing is ~90°) |
720
+ * | `clusterTol` | `number`? | Radius bin size for the histogram (default `0.1`) |
721
+ */
722
+ export declare const PluginCadArcClassifyOptions: z.ZodObject<{
723
+ radiusRange: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
724
+ sweepRangeDeg: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
725
+ clusterTol: z.ZodDefault<z.ZodNumber>;
726
+ }, z.core.$strip>;
727
+ export type PluginCadArcClassifyOptions = z.input<typeof PluginCadArcClassifyOptions>;
728
+ /** Arguments for {@link PluginCoreIoUnderlayApi.classifyArcs}. */
729
+ export declare const PluginCadArcClassifyArgs: z.ZodObject<{
730
+ underlay: z.ZodPipe<z.ZodString, z.ZodTransform<UnderlayHandle, string>>;
731
+ layer: z.ZodString;
732
+ options: z.ZodDefault<z.ZodObject<{
733
+ radiusRange: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
734
+ sweepRangeDeg: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
735
+ clusterTol: z.ZodDefault<z.ZodNumber>;
736
+ }, z.core.$strip>>;
737
+ }, z.core.$strip>;
738
+ export type PluginCadArcClassifyArgs = z.infer<typeof PluginCadArcClassifyArgs>;
739
+ /**
740
+ * One door candidate read from a CAD swing arc. `hinge` is the arc centre,
741
+ * `leafWidth` the arc radius, `swingDir` the unit direction from hinge toward
742
+ * the open leaf, `wallDir` the unit direction of the hosting wall (hinge →
743
+ * closed-leaf chord end). `openingWidth` equals `leafWidth` for singles and
744
+ * `2 × leafWidth` for doubles.
745
+ */
746
+ export declare const PluginCadDoorCandidate: z.ZodObject<{
747
+ hinge: z.ZodObject<{
748
+ x: z.ZodNumber;
749
+ z: z.ZodNumber;
750
+ }, z.core.$strip>;
751
+ leafWidth: z.ZodNumber;
752
+ swingDir: z.ZodObject<{
753
+ x: z.ZodNumber;
754
+ z: z.ZodNumber;
755
+ }, z.core.$strip>;
756
+ wallDir: z.ZodObject<{
757
+ x: z.ZodNumber;
758
+ z: z.ZodNumber;
759
+ }, z.core.$strip>;
760
+ openingWidth: z.ZodNumber;
761
+ double: z.ZodBoolean;
762
+ }, z.core.$strip>;
763
+ export type PluginCadDoorCandidate = z.infer<typeof PluginCadDoorCandidate>;
764
+ /** Result of {@link PluginCoreIoUnderlayApi.classifyArcs}. */
765
+ export declare const PluginCadArcClassifyResult: z.ZodObject<{
766
+ layer: z.ZodString;
767
+ coordinateSpace: z.ZodLiteral<"snaptrude-world">;
768
+ units: z.ZodLiteral<"snaptrude-internal">;
769
+ doors: z.ZodArray<z.ZodObject<{
770
+ hinge: z.ZodObject<{
771
+ x: z.ZodNumber;
772
+ z: z.ZodNumber;
773
+ }, z.core.$strip>;
774
+ leafWidth: z.ZodNumber;
775
+ swingDir: z.ZodObject<{
776
+ x: z.ZodNumber;
777
+ z: z.ZodNumber;
778
+ }, z.core.$strip>;
779
+ wallDir: z.ZodObject<{
780
+ x: z.ZodNumber;
781
+ z: z.ZodNumber;
782
+ }, z.core.$strip>;
783
+ openingWidth: z.ZodNumber;
784
+ double: z.ZodBoolean;
785
+ }, z.core.$strip>>;
786
+ rejected: z.ZodArray<z.ZodObject<{
787
+ centre: z.ZodObject<{
788
+ x: z.ZodNumber;
789
+ z: z.ZodNumber;
790
+ }, z.core.$strip>;
791
+ radius: z.ZodNumber;
792
+ sweepDeg: z.ZodNumber;
793
+ reason: z.ZodString;
794
+ }, z.core.$strip>>;
795
+ radiusHistogram: z.ZodArray<z.ZodObject<{
796
+ radius: z.ZodNumber;
797
+ count: z.ZodNumber;
798
+ }, z.core.$strip>>;
799
+ stats: z.ZodObject<{
800
+ curvesRead: z.ZodNumber;
801
+ arcsConsidered: z.ZodNumber;
802
+ }, z.core.$strip>;
803
+ }, z.core.$strip>;
804
+ export type PluginCadArcClassifyResult = z.infer<typeof PluginCadArcClassifyResult>;
805
+ //# sourceMappingURL=index.d.ts.map