@snaptrude/plugin-core 0.9.4 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api-manifest.json CHANGED
@@ -2907,6 +2907,19 @@
2907
2907
  "argsType": "number",
2908
2908
  "resultType": "void"
2909
2909
  },
2910
+ {
2911
+ "path": "core.io.underlay.classifyArcs",
2912
+ "namespace": "core.io.underlay",
2913
+ "summary": "Classify one retained AutoCAD layer's **arcs as door swings** — the deterministic tracing primitive behind CAD-to-BIM door placement. A door swing is drawn as a ~90° arc whose radius IS the leaf width and whose centre IS the hinge point. This filters the layer's arcs by plausible radius and sweep (rejecting inch-scale fillets, full-circle symbols and long shallow curves), reads each survivor as a door candidate (hinge, leaf width, swing direction, hosting wall direction), merges mirrored pairs sharing a chord line into double doors, and returns a radius histogram — real drawings use a handful of standard door sizes, so the histogram's clusters are the drawing's door widths (sanity-check them against the catalog; distrust arcs in no cluster).",
2914
+ "examplePrompts": [
2915
+ "Find the doors on the a-door CAD layer",
2916
+ "Classify the door swing arcs in the imported drawing",
2917
+ "What door sizes does this DWG use?",
2918
+ "Read hinge points and leaf widths from the CAD door layer\n\n# Example\n```ts\nconst [cad] = await snaptrude.core.io.underlay.list()\nconst r = await snaptrude.core.io.underlay.classifyArcs(cad, \"a-door\")\nif (r) {\nconsole.log(`${r.doors.length} doors; sizes:`,\nr.radiusHistogram.filter((b) => b.count > 1))\n}\n```"
2919
+ ],
2920
+ "argsType": "UnderlayHandle",
2921
+ "resultType": "PluginCadArcClassifyResult | null"
2922
+ },
2910
2923
  {
2911
2924
  "path": "core.io.underlay.delete",
2912
2925
  "namespace": "core.io.underlay",
@@ -2920,6 +2933,19 @@
2920
2933
  "argsType": "UnderlayHandle",
2921
2934
  "resultType": "void"
2922
2935
  },
2936
+ {
2937
+ "path": "core.io.underlay.extractCenterlines",
2938
+ "namespace": "core.io.underlay",
2939
+ "summary": "Extract **continuous wall centrelines** from one retained AutoCAD layer's double-line wall faces — the deterministic tracing primitive behind CAD-to-BIM wall conversion. Instead of paging raw curves and re-deriving the geometry in worker code, this reads the whole layer and runs the vetted pipeline: cull fragments, dedupe, merge collinear runs into *faces*, pair parallel faces a wall-thickness apart into centrelines (midline = axis, separation = thickness), bridge collinear gaps up to `bridgeOpenings.maxWidth` into ONE continuous centreline while recording each bridged span as an opening, then snap near-touching endpoints at junctions.",
2940
+ "examplePrompts": [
2941
+ "Trace the walls from the a-wall CAD layer",
2942
+ "Convert the AutoCAD wall linework into Snaptrude walls",
2943
+ "Extract wall centrelines with thickness from the imported DWG",
2944
+ "Find the glazing runs on the a-glazing layer\n\n# Example\n```ts\nconst [cad] = await snaptrude.core.io.underlay.list()\nconst r = await snaptrude.core.io.underlay.extractCenterlines(cad, \"a-wall\")\nif (r) {\nconst items = r.centerlines.map((c) => ({\nprofile: [c.start, c.end],\nthickness: c.thickness,\n}))\nconsole.log(`${items.length} walls, ${r.unpaired.length} unpaired faces`)\n}\n```"
2945
+ ],
2946
+ "argsType": "UnderlayHandle",
2947
+ "resultType": "PluginCadCenterlinesResult | null"
2948
+ },
2923
2949
  {
2924
2950
  "path": "core.io.underlay.getBounds",
2925
2951
  "namespace": "core.io.underlay",
@@ -2933,6 +2959,17 @@
2933
2959
  "argsType": "UnderlayHandle",
2934
2960
  "resultType": "BBoxComponents | null"
2935
2961
  },
2962
+ {
2963
+ "path": "core.io.underlay.getCadLayerGeometry",
2964
+ "namespace": "core.io.underlay",
2965
+ "summary": "Read one original AutoCAD layer's retained line and arc geometry in **Snaptrude world space** and Snaptrude internal units. Results are paged so large drawings can be inspected without returning the whole DWG at once.",
2966
+ "examplePrompts": [
2967
+ "Read the wall geometry from the A-WALL layer in this CAD underlay",
2968
+ "Get the next 500 curves from the structural CAD layer\n\n# Example\n```ts\nconst page = await snaptrude.core.io.underlay.getCadLayerGeometry(\ncad,\n\"A-WALL\",\n{ offset: 0, limit: 500 },\n)\nif (page) console.log(`${page.curves.length} of ${page.total} curves`)\n```"
2969
+ ],
2970
+ "argsType": "UnderlayHandle",
2971
+ "resultType": "PluginCadLayerGeometryPage | null"
2972
+ },
2936
2973
  {
2937
2974
  "path": "core.io.underlay.getOpacity",
2938
2975
  "namespace": "core.io.underlay",
@@ -2972,6 +3009,17 @@
2972
3009
  "argsType": "number",
2973
3010
  "resultType": "UnderlayHandle[]"
2974
3011
  },
3012
+ {
3013
+ "path": "core.io.underlay.listCadLayers",
3014
+ "namespace": "core.io.underlay",
3015
+ "summary": "List the distinct original AutoCAD layer names retained by a placed CAD underlay. Returns `[]` for non-CAD underlays, legacy imports created before source-layer retention, missing underlays, or CAD drawings without layer tags.",
3016
+ "examplePrompts": [
3017
+ "List the original AutoCAD layers in this imported drawing",
3018
+ "Which CAD layers are available in this underlay?\n\n# Example\n```ts\nconst layers = await snaptrude.core.io.underlay.listCadLayers(cad)\nconsole.log(layers)\n```"
3019
+ ],
3020
+ "argsType": "UnderlayHandle",
3021
+ "resultType": "string[]"
3022
+ },
2975
3023
  {
2976
3024
  "path": "core.io.underlay.resetScale",
2977
3025
  "namespace": "core.io.underlay",
@@ -4274,6 +4322,18 @@
4274
4322
  "argsType": "BrepHandle",
4275
4323
  "resultType": "ComponentHandle"
4276
4324
  },
4325
+ {
4326
+ "path": "design.create.opening",
4327
+ "namespace": "design.create",
4328
+ "summary": "Place a catalog **door or window** into a host wall with optional size overrides.",
4329
+ "examplePrompts": [
4330
+ "Add a 1m wide door to this wall here",
4331
+ "Place a window with a 0.9m sill height on the selected wall"
4332
+ ],
4333
+ "argsType": "PluginDesignCreateOpeningOptions",
4334
+ "resultType": "ComponentHandle",
4335
+ "performance": "Single-opening creator — use it for one hosted opening. A plural API is intentionally unavailable until host placement can be atomic. # Example ```ts const opening = await snaptrude.design.create.opening({ kind: \"window\", catalogId: windowType.id, hostWall: wall, position: await snaptrude.core.math.vec3.new(3, 0, 5), width: 1.2, height: 1.5, sillHeight: 0.9, }) ```"
4336
+ },
4277
4337
  {
4278
4338
  "path": "design.create.referenceLines",
4279
4339
  "namespace": "design.create",
@@ -5471,6 +5531,19 @@
5471
5531
  "argsType": "ComponentHandle",
5472
5532
  "resultType": "ContourHandle | null"
5473
5533
  },
5534
+ {
5535
+ "path": "design.query.storeyOutline",
5536
+ "namespace": "design.query",
5537
+ "summary": "Compute the plan **outline of what is built on a storey** — the union of the storey's wall (by default) footprints as polygons-with-holes. This is the footprint-from-the-built-model query: by the time slabs are needed the walls exist, and the engine's own solids (snapped, joined and mitred at creation) are the cleanest wall network available — no CAD re-tracing.",
5538
+ "examplePrompts": [
5539
+ "What is the building footprint on the ground floor?",
5540
+ "Create a floor slab covering the whole storey",
5541
+ "Get the outline of the walls on storey 1",
5542
+ "How much area do the ground-floor walls enclose?\n\n# Example\n```ts\nconst r = await snaptrude.design.query.storeyOutline({ storey: 1 })\nconst main = r.footprints.find((f) => f.enclosed)\nif (main) {\nconst profile = await snaptrude.core.geom.create.profileFromLinePoints(\nmain.outline.map((p) => ({ x: p.x, y: 0, z: p.z })),\n)\n// → design.create.slab with the profile's contour\n}\n```"
5543
+ ],
5544
+ "argsType": "PluginStoreyOutlineOptions",
5545
+ "resultType": "PluginStoreyOutlineResult"
5546
+ },
5474
5547
  {
5475
5548
  "path": "design.selection.add",
5476
5549
  "namespace": "design.selection",
@@ -7551,6 +7624,17 @@
7551
7624
  "argsType": null,
7552
7625
  "resultType": "PluginProgramSiteNorthAngleResult"
7553
7626
  },
7627
+ {
7628
+ "path": "program.site.getSiteAnalysis",
7629
+ "namespace": "program.site",
7630
+ "summary": "Read the persisted Site Analysis sheet for the active proposal.",
7631
+ "examplePrompts": [
7632
+ "Read the current Site Analysis sheet",
7633
+ "What zoning constraints are recorded for this proposal?\n\n# Example\n```ts\nconst analysis = await snaptrude.program.site.getSiteAnalysis()\nif (analysis) console.log(analysis.sheetName, analysis.rows)\n```"
7634
+ ],
7635
+ "argsType": null,
7636
+ "resultType": "PluginProgramSiteAnalysisResult"
7637
+ },
7554
7638
  {
7555
7639
  "path": "program.site.getTimezone",
7556
7640
  "namespace": "program.site",
@@ -7615,6 +7699,17 @@
7615
7699
  "argsType": null,
7616
7700
  "resultType": "PluginProgramSiteListPolygonsResult"
7617
7701
  },
7702
+ {
7703
+ "path": "program.site.updateSiteAnalysis",
7704
+ "namespace": "program.site",
7705
+ "summary": "Merge sourced site/zoning constraints into the active proposal's persisted Site Analysis sheet.",
7706
+ "examplePrompts": [
7707
+ "Save these zoning constraints to Site Analysis",
7708
+ "Update the FAR and setbacks in the Site Analysis sheet\n\n# Example\n```ts\nconst result = await snaptrude.program.site.updateSiteAnalysis([\n{ category: \"FAR\", description: \"Floor Area Ratio\", quantity: 3.5, unit: \"ratio\" },\n{ category: \"Set backs\", description: \"Front setbacks\", quantity: 6, unit: \"m\" },\n])\nconsole.log(result.sheetName, result.updatedRows, result.appendedRows)\n```"
7709
+ ],
7710
+ "argsType": "PluginSiteAnalysisRow[]",
7711
+ "resultType": "PluginProgramSiteAnalysisUpdateResult"
7712
+ },
7618
7713
  {
7619
7714
  "path": "program.spreadsheet.addChart",
7620
7715
  "namespace": "program.spreadsheet",
@@ -63,6 +63,54 @@ export declare abstract class PluginCoreIoUnderlayApi {
63
63
  * ```
64
64
  */
65
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>;
66
114
  /**
67
115
  * Read an underlay's scale. Works for **image and PDF** underlays. Returns
68
116
  * `null` for CAD (scaling not supported) or if the handle no longer resolves.
@@ -213,6 +261,96 @@ export declare abstract class PluginCoreIoUnderlayApi {
213
261
  * ```
214
262
  */
215
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>;
216
354
  }
217
355
  /**
218
356
  * Arguments for {@link PluginCoreIoUnderlayApi.list}.
@@ -283,4 +421,385 @@ export declare const PluginUnderlayRefArgs: z.ZodObject<{
283
421
  underlay: z.ZodPipe<z.ZodString, z.ZodTransform<UnderlayHandle, string>>;
284
422
  }, z.core.$strip>;
285
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>;
286
805
  //# sourceMappingURL=index.d.ts.map