@snaptrude/plugin-core 0.9.2 → 0.9.3

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
@@ -1,30 +1,4 @@
1
1
  [
2
- {
3
- "path": "analysis.daylight.compute",
4
- "namespace": "analysis.daylight",
5
- "summary": "Compute annual daylight metrics for the model's spaces.",
6
- "examplePrompts": [
7
- "Run an LM-83 ASE daylight analysis on all my spaces",
8
- "Which rooms fail annual sunlight exposure?",
9
- "Compute ASE with a 0.6m sensor grid at desk height",
10
- "Run an LM-83 sDA analysis with blinds operated",
11
- "Which spaces meet sDA300/50%?",
12
- "Compute sDA with 70% reflective ceilings and Tvis 0.6 glazing\n\n# Example\n```ts\nlet res = await snaptrude.analysis.daylight.compute({\nstandard: \"IES-LM-83-23\",\nmetrics: [\"sDA\", \"ASE\"],\ngrid: { spacingM: 0.6, workplaneHeightM: 0.76, boundaryOffsetM: 0.5 },\noptics: { materials: { \"Glass - Clear\": { transmittance: 0.6 } } },\n})\nconst runId = res.runId\nwhile (res.status === \"running\" && runId) {\nawait new Promise((r) => setTimeout(r, 5000))\nres = await snaptrude.analysis.daylight.poll({ runId })\n}\nconst failing = res.aggregates.filter(\n(a) => a.scope === \"space\" && (a.sdaPercent ?? 0) < 55,\n)\n```"
13
- ],
14
- "argsType": "PluginDaylightComputeArgs",
15
- "resultType": "PluginDaylightResults"
16
- },
17
- {
18
- "path": "analysis.daylight.poll",
19
- "namespace": "analysis.daylight",
20
- "summary": "Poll an asynchronous daylight run started by {@linkcode PluginAnalysisDaylightApi.compute}.",
21
- "examplePrompts": [
22
- "Check whether my sDA run has finished",
23
- "Get the results of the daylight run"
24
- ],
25
- "argsType": "PluginDaylightPollArgs",
26
- "resultType": "PluginDaylightResults"
27
- },
28
2
  {
29
3
  "path": "analysis.heatmaps.isActive",
30
4
  "namespace": "analysis.heatmaps",
@@ -37,79 +11,6 @@
37
11
  "argsType": null,
38
12
  "resultType": "boolean"
39
13
  },
40
- {
41
- "path": "analysis.heatmaps.overlays.hide",
42
- "namespace": "analysis.heatmaps.overlays",
43
- "summary": "Hide an overlay without removing it.",
44
- "examplePrompts": [
45
- "Hide the wind overlay but keep it around",
46
- "Temporarily hide my heatmap",
47
- "Turn off the occupancy colours without deleting them\n\n# Example\n```ts\nawait snaptrude.analysis.heatmaps.overlays.hide(\"wind\")\n```"
48
- ],
49
- "argsType": "string",
50
- "resultType": "boolean"
51
- },
52
- {
53
- "path": "analysis.heatmaps.overlays.list",
54
- "namespace": "analysis.heatmaps.overlays",
55
- "summary": "List the registered heatmap overlays.",
56
- "examplePrompts": [
57
- "Which heatmap overlays do I have?",
58
- "List my rendered analysis overlays",
59
- "Check which heatmap is currently visible\n\n# Example\n```ts\nconst { overlays } = await snaptrude.analysis.heatmaps.overlays.list()\nconst visible = overlays.find((o) => o.visible)\n```"
60
- ],
61
- "argsType": null,
62
- "resultType": "PluginAnalysisHeatmapOverlaysListResult"
63
- },
64
- {
65
- "path": "analysis.heatmaps.overlays.remove",
66
- "namespace": "analysis.heatmaps.overlays",
67
- "summary": "Remove an overlay — dispose its meshes and forget it.",
68
- "examplePrompts": [
69
- "Delete the wind overlay",
70
- "Remove my occupancy heatmap for good",
71
- "Free up an overlay slot\n\n# Example\n```ts\nawait snaptrude.analysis.heatmaps.overlays.remove(\"wind\")\n```"
72
- ],
73
- "argsType": "string",
74
- "resultType": "boolean"
75
- },
76
- {
77
- "path": "analysis.heatmaps.overlays.removeAll",
78
- "namespace": "analysis.heatmaps.overlays",
79
- "summary": "Remove every registered overlay and close the legend.",
80
- "examplePrompts": [
81
- "Clear all my heatmap overlays",
82
- "Remove every analysis overlay from the scene",
83
- "Start over with a clean set of overlays\n\n# Example\n```ts\nconst removed = await snaptrude.analysis.heatmaps.overlays.removeAll()\n```"
84
- ],
85
- "argsType": null,
86
- "resultType": "number"
87
- },
88
- {
89
- "path": "analysis.heatmaps.overlays.show",
90
- "namespace": "analysis.heatmaps.overlays",
91
- "summary": "Make a registered overlay the visible one.",
92
- "examplePrompts": [
93
- "Switch back to my wind heatmap",
94
- "Show the occupancy overlay",
95
- "Flip between my two analysis overlays\n\n# Example\n```ts\nawait snaptrude.analysis.heatmaps.overlays.show(\"wind\")\n```"
96
- ],
97
- "argsType": "string",
98
- "resultType": "boolean"
99
- },
100
- {
101
- "path": "analysis.heatmaps.renderField",
102
- "namespace": "analysis.heatmaps",
103
- "summary": "Render a heatmap from **arbitrary cell geometry** — planar polygons or pre-tessellated meshes, one scalar value each.",
104
- "examplePrompts": [
105
- "Overlay my FEA stress results on their solver mesh",
106
- "Color these Voronoi regions by footfall",
107
- "Paint each façade panel polygon by its PV yield",
108
- "Render pass/fail daylight compliance per zone polygon\n\n# Example\n```ts\n// Two triangular cells at ground level, coloured pass/fail at 300 lux.\nawait snaptrude.analysis.heatmaps.renderField(\n[\n{ polygon: [{ x: 0, y: 0, z: 0 }, { x: 4, y: 0, z: 0 }, { x: 0, y: 0, z: 4 }], value: 420 },\n{ polygon: [{ x: 4, y: 0, z: 4 }, { x: 0, y: 0, z: 4 }, { x: 4, y: 0, z: 0 }], value: 180 },\n],\n{ title: \"Daylight\", unit: \"lux\", scale: { type: \"threshold\", threshold: 300 } },\n)\n```"
109
- ],
110
- "argsType": "PluginAnalysisHeatmapFieldCell[]",
111
- "resultType": "PluginAnalysisHeatmapsRenderResult"
112
- },
113
14
  {
114
15
  "path": "analysis.heatmaps.renderGrid",
115
16
  "namespace": "analysis.heatmaps",
@@ -134,23 +35,10 @@
134
35
  "argsType": "PluginAnalysisHeatmapSpaceEntry[]",
135
36
  "resultType": "PluginAnalysisHeatmapsRenderResult"
136
37
  },
137
- {
138
- "path": "analysis.heatmaps.renderSurfaceGrid",
139
- "namespace": "analysis.heatmaps",
140
- "summary": "Render a grid heatmap on an **arbitrarily oriented plane** — a façade, a section cut, any flat surface.",
141
- "examplePrompts": [
142
- "Paint the solar irradiance results on the south façade",
143
- "Show my daylight values as a heatmap on this wall",
144
- "Render panel-level PV yield on the building face",
145
- "Overlay wind pressure on the tower's west elevation\n\n# Example\n```ts\n// Samples lie on a wall plane facing +X; colour each 1-unit cell by irradiance.\nawait snaptrude.analysis.heatmaps.renderSurfaceGrid(\nsamples.map((s) => ({ position: { x: wallX, y: s.y, z: s.z }, value: s.irradiance })),\n1,\n{ x: 1, y: 0, z: 0 }, // façade normal\n{ title: \"Irradiance\", unit: \"kWh/m²\", colors: [\"#0000ff\", \"#ffff00\", \"#ff0000\"] },\n)\n```"
146
- ],
147
- "argsType": "PluginAnalysisHeatmapGridCell[]",
148
- "resultType": "PluginAnalysisHeatmapsRenderResult"
149
- },
150
38
  {
151
39
  "path": "analysis.heatmaps.reset",
152
40
  "namespace": "analysis.heatmaps",
153
- "summary": "Clear every plugin heatmap overlay from the scene.",
41
+ "summary": "Clear the plugin heatmap from the scene.",
154
42
  "examplePrompts": [
155
43
  "Clear my custom heatmap",
156
44
  "Remove the wind overlay from the model",
@@ -267,18 +155,6 @@
267
155
  "argsType": "string",
268
156
  "resultType": "PluginAnalysisShadowsDateTimeResult"
269
157
  },
270
- {
271
- "path": "analysis.solar.sampleGrid",
272
- "namespace": "analysis.solar",
273
- "summary": "Sample solar exposure at a set of points.",
274
- "examplePrompts": [
275
- "What's the irradiance at these facade points at noon on June 21?",
276
- "How shaded are these balcony points across the summer?",
277
- "Sample direct sun visibility at these roof points right now\n\n# Example\n```ts\nconst grid = await snaptrude.analysis.solar.sampleGrid({\npoints: [\n{ id: \"a\", position: [0, 3, 0] },\n{ id: \"b\", position: [5, 3, 0], normal: [0, 0, 1] },\n],\ndateTime: \"2026-06-21T12:00:00+05:30\",\n})\nfor (const r of grid.results) {\nconsole.log(r.id, r.directSunVisible, r.totalIrradiance, grid.units)\n}\n```"
278
- ],
279
- "argsType": "PluginSolarSampleGridArgs",
280
- "resultType": "PluginSolarSampleGridResult"
281
- },
282
158
  {
283
159
  "path": "analysis.sunlightHours.cancel",
284
160
  "namespace": "analysis.sunlightHours",
@@ -363,18 +239,6 @@
363
239
  "argsType": null,
364
240
  "resultType": "boolean"
365
241
  },
366
- {
367
- "path": "analysis.weather.getSeries",
368
- "namespace": "analysis.weather",
369
- "summary": "Get the hourly weather series for a date range, paged.",
370
- "examplePrompts": [
371
- "Get the weather series for June at my site",
372
- "Pull the hourly temperature and irradiance for this location",
373
- "What EPW weather file is my project using?\n\n# Example\n```ts\nlet cursor: string | undefined = undefined\nconst rows = []\ndo {\nconst page = await snaptrude.analysis.weather.getSeries({\nstartDate: \"2026-06-01\",\nendDate: \"2026-06-30\",\ncursor,\n})\nrows.push(...page.rows)\ncursor = page.nextCursor ?? undefined\n} while (cursor)\n```"
374
- ],
375
- "argsType": "PluginWeatherGetSeriesArgs",
376
- "resultType": "PluginWeatherSeriesResult"
377
- },
378
242
  {
379
243
  "path": "core.buildings.copy",
380
244
  "namespace": "core.buildings",
@@ -548,32 +412,6 @@
548
412
  "argsType": "PluginStandardView",
549
413
  "resultType": "boolean"
550
414
  },
551
- {
552
- "path": "core.camera.zoomExtents",
553
- "namespace": "core.camera",
554
- "summary": "Zoom (fit) the camera to all geometry in the scene — the \"zoom extents\" action. View-state only — not undoable. Canonical home of the zoom-extents read (the deprecated `core.zoom.extents`).",
555
- "examplePrompts": [
556
- "Zoom out so I can see the whole model",
557
- "Fit everything in the view",
558
- "Frame the entire building in the viewport",
559
- "Do a zoom extents on the canvas\n\n# Example\n```ts\nawait snaptrude.core.camera.zoomExtents()\n```"
560
- ],
561
- "argsType": null,
562
- "resultType": "boolean"
563
- },
564
- {
565
- "path": "core.camera.zoomSelection",
566
- "namespace": "core.camera",
567
- "summary": "Zoom (fit) the camera to the current selection. View-state only — not undoable. Canonical home of the zoom-to-selection read (the deprecated `core.zoom.selection`).",
568
- "examplePrompts": [
569
- "Zoom in on what I have selected",
570
- "Frame the selected walls in the view",
571
- "Focus the camera on my current selection",
572
- "Fit the view to the selected room\n\n# Example\n```ts\nawait snaptrude.core.camera.zoomSelection()\n```"
573
- ],
574
- "argsType": null,
575
- "resultType": "boolean"
576
- },
577
415
  {
578
416
  "path": "core.comment.create",
579
417
  "namespace": "core.comment",
@@ -715,175 +553,6 @@
715
553
  "argsType": "Vec3Handle",
716
554
  "resultType": "ArcHandle"
717
555
  },
718
- {
719
- "path": "core.geom.create.brepFromChamfer",
720
- "namespace": "core.geom.create",
721
- "summary": "Bevels the given straight edges of a solid with a symmetric planar cut. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
722
- "examplePrompts": [
723
- "Bevel these edges by 100mm",
724
- "Chamfer the top edges of the plinth",
725
- "Cut a 45-degree flat along the corners of this mass\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst edges = await snaptrude.core.geom.query.brep.listEdges(brep)\nconst beveled = await snaptrude.core.geom.create.brepFromChamfer(brep, [edges[0]], 0.1)\n```"
726
- ],
727
- "argsType": "BrepHandle",
728
- "resultType": "BrepHandle"
729
- },
730
- {
731
- "path": "core.geom.create.brepFromExtrusion",
732
- "namespace": "core.geom.create",
733
- "summary": "Create a closed solid **B-rep** by extruding a contour along a direction. Host API call — returns a {@linkcode BrepHandle}. The direction is normalised by the host, so `amount` is the extrusion distance in raw Babylon units (negative extrudes the opposite way). The contour is copied — the input handle is never mutated. Holes and arc/circle profiles extrude natively (a circle profile yields a cylinder).",
734
- "examplePrompts": [
735
- "Extrude this profile 3 metres up",
736
- "Make a solid by extruding this outline",
737
- "Create a cylinder from a circle profile\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6\n```"
738
- ],
739
- "argsType": "ContourHandle",
740
- "resultType": "BrepHandle"
741
- },
742
- {
743
- "path": "core.geom.create.brepFromFaces",
744
- "namespace": "core.geom.create",
745
- "summary": "Create a closed solid **B-rep** from explicit face loops. Host API call — returns a {@linkcode BrepHandle}. Faces are plain arrays of `{x, y, z}` point components, NOT point handles (bulk-data precedent: `design.query.geometry.getTriangulatedMeshes`), in raw Babylon units.",
746
- "examplePrompts": [
747
- "Create a brep from faces",
748
- "Build a custom solid from a set of faces",
749
- "Make a pyramid from triangular faces\n\n# Example\n```ts\n// A pyramid: square base + 4 triangular sides\nconst apex = { x: 0, y: 4, z: 0 }\nconst a = { x: -2, y: 0, z: -2 }\nconst b = { x: 2, y: 0, z: -2 }\nconst c = { x: 2, y: 0, z: 2 }\nconst d = { x: -2, y: 0, z: 2 }\nconst brep = await snaptrude.core.geom.create.brepFromFaces([\n[a, d, c, b], // base\n[a, b, apex],\n[b, c, apex],\n[c, d, apex],\n[d, a, apex],\n])\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 5\n```"
750
- ],
751
- "argsType": "Vec3Components[][]",
752
- "resultType": "BrepHandle"
753
- },
754
- {
755
- "path": "core.geom.create.brepFromFillet",
756
- "namespace": "core.geom.create",
757
- "summary": "Rounds the given straight edges of a solid with a constant radius. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
758
- "examplePrompts": [
759
- "Round the edges of this mass",
760
- "Fillet the corners of the podium with a 0.5m radius",
761
- "Soften the vertical edges of this tower\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst edges = await snaptrude.core.geom.query.brep.listEdges(brep)\nconst rounded = await snaptrude.core.geom.create.brepFromFillet(brep, [edges[0]], 0.3)\n```"
762
- ],
763
- "argsType": "BrepHandle",
764
- "resultType": "BrepHandle"
765
- },
766
- {
767
- "path": "core.geom.create.brepFromIntersection",
768
- "namespace": "core.geom.create",
769
- "summary": "Create a closed solid **B-rep** as the boolean **intersection** of two breps (`a ∩ b` — the shared volume only). Host API call — returns a new {@linkcode BrepHandle}. Inputs are read-only and may be authored or scene-derived breps (see {@linkcode PluginGeomCreateApi.brepFromUnion}); coordinates are combined as-is.",
770
- "examplePrompts": [
771
- "Keep only the overlap of these two solids",
772
- "Intersect these two masses",
773
- "Clip the tower to the zoning envelope\n\n# Example\n```ts\nconst overlap = await snaptrude.core.geom.create.brepFromIntersection(towerBrep, envelopeBrep)\n```"
774
- ],
775
- "argsType": "BrepHandle",
776
- "resultType": "BrepHandle"
777
- },
778
- {
779
- "path": "core.geom.create.brepFromLoft",
780
- "namespace": "core.geom.create",
781
- "summary": "Create a closed solid **B-rep** by lofting between a bottom and a top contour, optionally through intermediate cross-sections. Host API call — returns a {@linkcode BrepHandle}. All sections must have the same number of edges; side faces connect corresponding edges by authored index. Corresponding edges must stay coplanar segment to segment (matching hole counts allowed in the two-section form) — a twisted loft would produce non-planar side faces and is rejected. With intermediates the loft is a chain of ruled segments folded into one solid: sections must be planar and hole-free, ordered bottom → intermediates → top. The contours are copied — the input handles are never mutated.",
782
- "examplePrompts": [
783
- "Make a tapered tower from these two outlines",
784
- "Loft between a large base and a smaller top",
785
- "Create a frustum from two squares",
786
- "Loft the tower through these three floor outlines\n\n# Example\n```ts\n// A square frustum: 4m base lofted to a 2m top, 3m up\nconst base = await snaptrude.core.geom.create.profileRect(4, 4)\nconst top = await snaptrude.core.geom.create.profileRect(2, 2, await snaptrude.core.math.vec3.new(0, 3, 0))\nconst brep = await snaptrude.core.geom.create.brepFromLoft(\nawait snaptrude.core.geom.create.contourFromProfile(base),\nawait snaptrude.core.geom.create.contourFromProfile(top),\n)\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6\n```"
787
- ],
788
- "argsType": "ContourHandle",
789
- "resultType": "BrepHandle"
790
- },
791
- {
792
- "path": "core.geom.create.brepFromMesh",
793
- "namespace": "core.geom.create",
794
- "summary": "Create a closed solid **B-rep** from indexed mesh data: a vertex position array plus face loops of indices into it. Host API call — returns a {@linkcode BrepHandle}. The indexed form of {@linkcode PluginGeomCreateApi.brepFromFaces} — same validation (planar faces, closed manifold solid, every edge shared by exactly two faces) after the indices are expanded to point loops.",
795
- "examplePrompts": [
796
- "Create a brep from mesh vertices and indices",
797
- "Turn this indexed mesh into a solid",
798
- "Build a solid from vertex positions and face indices\n\n# Example\n```ts\n// A tetrahedron from 4 vertices and 4 triangular faces\nconst positions = [\n{ x: 0, y: 0, z: 0 },\n{ x: 4, y: 0, z: 0 },\n{ x: 2, y: 0, z: 4 },\n{ x: 2, y: 3, z: 1.5 },\n]\nconst brep = await snaptrude.core.geom.create.brepFromMesh(positions, [\n[0, 2, 1], // base\n[0, 1, 3],\n[1, 2, 3],\n[2, 0, 3],\n])\nconst vertexCount = await snaptrude.core.geom.query.brep.getVertexCount(brep) // 4\n```"
799
- ],
800
- "argsType": "Vec3Components[]",
801
- "resultType": "BrepHandle"
802
- },
803
- {
804
- "path": "core.geom.create.brepFromOffset",
805
- "namespace": "core.geom.create",
806
- "summary": "Grows or shrinks a solid by offsetting every face — positive distance moves faces outward, negative moves them inward. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
807
- "examplePrompts": [
808
- "Grow this solid by 0.5m in every direction",
809
- "Shrink this mass by 200mm",
810
- "Offset the building envelope outward by 1m\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst grown = await snaptrude.core.geom.create.brepFromOffset(brep, 0.5)\n```"
811
- ],
812
- "argsType": "BrepHandle",
813
- "resultType": "BrepHandle"
814
- },
815
- {
816
- "path": "core.geom.create.brepFromRevolution",
817
- "namespace": "core.geom.create",
818
- "summary": "Revolves a planar profile about an axis to make a solid of revolution — a full turn by default. Host API call — returns a new {@linkcode BrepHandle}; the input contour is read-only. Holes in the profile are allowed. Profile segments must stay parallel or perpendicular to the axis — inclined or arc segments would revolve into surfaces Snaptrude cannot represent.",
819
- "examplePrompts": [
820
- "Create a dome from this section",
821
- "Revolve this profile 360 degrees around the vertical axis",
822
- "Build a rotunda by revolving this wall section\n\n# Example\n```ts\n// A cylinder: revolve a 2m-wide, 3m-tall rectangle about the Y axis at its edge\nconst rect = await snaptrude.core.geom.create.profileFromLinePoints([\nawait snaptrude.core.math.vec3.new(0, 0, 0),\nawait snaptrude.core.math.vec3.new(2, 0, 0),\nawait snaptrude.core.math.vec3.new(2, 3, 0),\nawait snaptrude.core.math.vec3.new(0, 3, 0),\n])\nconst profile = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst cylinder = await snaptrude.core.geom.create.brepFromRevolution(\nprofile,\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 1, z: 0 },\n)\n```"
823
- ],
824
- "argsType": "ContourHandle",
825
- "resultType": "BrepHandle"
826
- },
827
- {
828
- "path": "core.geom.create.brepFromShell",
829
- "namespace": "core.geom.create",
830
- "summary": "Hollows a solid into constant-thickness walls, removing the given faces as openings. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only. The outer surface is kept and the walls grow inward.",
831
- "examplePrompts": [
832
- "Hollow this mass into 200mm walls",
833
- "Shell this form with the top face open",
834
- "Turn this solid tower into a tube open at both ends\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst faces = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst hollow = await snaptrude.core.geom.create.brepFromShell(brep, [faces[0]], 0.2)\n```"
835
- ],
836
- "argsType": "BrepHandle",
837
- "resultType": "BrepHandle"
838
- },
839
- {
840
- "path": "core.geom.create.brepFromSubtraction",
841
- "namespace": "core.geom.create",
842
- "summary": "Create a closed solid **B-rep** as the boolean **subtraction** of two breps: **`a` minus `b`** — `b` is cut away from `a`. Host API call — returns a new {@linkcode BrepHandle}. Argument order matters: `brepFromSubtraction(a, b)` removes `b`'s volume from `a`. Inputs are read-only and may be authored or scene-derived breps (see {@linkcode PluginGeomCreateApi.brepFromUnion}); coordinates are combined as-is.",
843
- "examplePrompts": [
844
- "Subtract the courtyard from the building mass",
845
- "Cut this solid out of that one",
846
- "Punch a hole through the slab with this box\n\n# Example\n```ts\n// buildingBrep minus courtyardBrep — order matters\nconst carved = await snaptrude.core.geom.create.brepFromSubtraction(buildingBrep, courtyardBrep)\n```"
847
- ],
848
- "argsType": "BrepHandle",
849
- "resultType": "BrepHandle"
850
- },
851
- {
852
- "path": "core.geom.create.brepFromSweep",
853
- "namespace": "core.geom.create",
854
- "summary": "Sweeps a planar profile along an open polyline path, with mitred corners at each bend. Host API call — returns a new {@linkcode BrepHandle}; the input contour is read-only. The profile must be hole-free and must not lie in a plane containing the first path segment's direction.",
855
- "examplePrompts": [
856
- "Sweep this profile along the corridor path",
857
- "Extrude the railing section along this route",
858
- "Run a duct profile through these points\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.4, 0.4)\nconst profile = await snaptrude.core.geom.create.contourFromProfile(rect)\n// profileRect lies in the XZ plane, so the path must START out of that\n// plane (here: straight up), then it can run horizontally.\nconst duct = await snaptrude.core.geom.create.brepFromSweep(profile, [\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 2.8, z: 0 },\n{ x: 10, y: 2.8, z: 0 },\n])\n```"
859
- ],
860
- "argsType": "ContourHandle",
861
- "resultType": "BrepHandle"
862
- },
863
- {
864
- "path": "core.geom.create.brepFromUnion",
865
- "namespace": "core.geom.create",
866
- "summary": "Create a closed solid **B-rep** as the boolean **union** of two breps (`a ∪ b`). Host API call — returns a new {@linkcode BrepHandle}. Inputs are read-only and may be authored breps (any `core.geom.create` brep constructor) or scene-derived breps from `design.query.geometry.getBrep`; coordinates are combined as-is, so both inputs must share a frame. The result must be a single solid — disjoint inputs are rejected.",
867
- "examplePrompts": [
868
- "Union these two solids",
869
- "Merge these breps into one mass",
870
- "Combine the tower and the podium into a single solid\n\n# Example\n```ts\nconst a = await snaptrude.core.geom.create.brepFromExtrusion(baseContour, { x: 0, y: 1, z: 0 }, 3)\nconst b = await snaptrude.core.geom.create.brepFromExtrusion(overlappingContour, { x: 0, y: 1, z: 0 }, 5)\nconst merged = await snaptrude.core.geom.create.brepFromUnion(a, b)\n```"
871
- ],
872
- "argsType": "BrepHandle",
873
- "resultType": "BrepHandle"
874
- },
875
- {
876
- "path": "core.geom.create.brepsFromSplit",
877
- "namespace": "core.geom.create",
878
- "summary": "Cuts a solid by an infinite plane and returns one brep per resulting piece — a single piece if the plane misses the solid. Host API call — returns new {@linkcode BrepHandle}s; the input brep is read-only. The plane is defined by a point on it and its normal direction.",
879
- "examplePrompts": [
880
- "Cut this building at 12m height",
881
- "Split the tower from the podium with a horizontal plane",
882
- "Slice this mass along a vertical plane\n\n# Example\n```ts\nconst pieces = await snaptrude.core.geom.create.brepsFromSplit(\ntowerBrep,\n{ x: 0, y: 12, z: 0 },\n{ x: 0, y: 1, z: 0 },\n)\nconsole.log(\"pieces:\", pieces.length)\n```"
883
- ],
884
- "argsType": "BrepHandle",
885
- "resultType": "BrepHandle[]"
886
- },
887
556
  {
888
557
  "path": "core.geom.create.circle",
889
558
  "namespace": "core.geom.create",
@@ -963,8 +632,7 @@
963
632
  "summary": "Free a transient contour resource handle — releases its registry entry and reclaims its share of the plugin's resource quota. Handle-lifecycle only; does NOT tear down engine-side geometry, nor the contour's child profile handles.",
964
633
  "examplePrompts": [],
965
634
  "argsType": "ContourHandle",
966
- "resultType": "void",
967
- "deprecated": "core.handles.release"
635
+ "resultType": "void"
968
636
  },
969
637
  {
970
638
  "path": "core.geom.delete.profile",
@@ -972,8 +640,7 @@
972
640
  "summary": "Free a transient profile resource handle — releases its registry entry and reclaims its share of the plugin's resource quota. This is a handle-lifecycle operation only and does NOT tear down any engine-side geometry.",
973
641
  "examplePrompts": [],
974
642
  "argsType": "ProfileHandle",
975
- "resultType": "void",
976
- "deprecated": "core.handles.release"
643
+ "resultType": "void"
977
644
  },
978
645
  {
979
646
  "path": "core.geom.query.arc.getAxis",
@@ -1046,18 +713,6 @@
1046
713
  "argsType": "BrepHandle",
1047
714
  "resultType": "Vec3Components"
1048
715
  },
1049
- {
1050
- "path": "core.geom.query.brep.getDistance",
1051
- "namespace": "core.geom.query.brep",
1052
- "summary": "Measures the minimum distance between two solids, with the closest witness point on each. Touching or overlapping solids report a distance of 0 with contact points.",
1053
- "examplePrompts": [
1054
- "What is the clearance between these two masses?",
1055
- "How far apart are the tower and the neighbouring building?",
1056
- "Find the closest points between these two solids\n\n# Example\n```ts\nconst [a, b] = await snaptrude.design.query.listMasses()\nconst brepA = await snaptrude.design.query.geometry.getBrep(a)\nconst brepB = await snaptrude.design.query.geometry.getBrep(b)\nif (brepA && brepB) {\nconst { distance, pointA, pointB } = await snaptrude.core.geom.query.brep.getDistance(brepA, brepB)\nconsole.log(\"clearance:\", distance)\n}\n```"
1057
- ],
1058
- "argsType": "BrepHandle",
1059
- "resultType": "{ distance: number; pointA: Vec3Components; pointB: Vec3Components }"
1060
- },
1061
716
  {
1062
717
  "path": "core.geom.query.brep.getEdge",
1063
718
  "namespace": "core.geom.query.brep",
@@ -2565,18 +2220,6 @@
2565
2220
  "argsType": "string",
2566
2221
  "resultType": "ImportJobHandle"
2567
2222
  },
2568
- {
2569
- "path": "core.io.import.epw",
2570
- "namespace": "core.io.import",
2571
- "summary": "Import an **EPW weather file** into the project's weather catalog.",
2572
- "examplePrompts": [
2573
- "Import this EPW weather file for the site",
2574
- "Upload a custom weather file for the daylight analysis",
2575
- "Use this .epw as the project's weather source\n\n# Example\n```ts\nconst { weatherFileId, label } = await snaptrude.core.io.import.epw(\n\"https://example.com/Chicago-OHare.epw\",\n)\nconsole.log(`Weather set to ${label} (${weatherFileId})`)\n```"
2576
- ],
2577
- "argsType": "string",
2578
- "resultType": "PluginImportEpwResult"
2579
- },
2580
2223
  {
2581
2224
  "path": "core.io.import.image",
2582
2225
  "namespace": "core.io.import",
@@ -2847,19 +2490,6 @@
2847
2490
  "argsType": null,
2848
2491
  "resultType": "boolean | null"
2849
2492
  },
2850
- {
2851
- "path": "core.io.terrain.replaceMesh",
2852
- "namespace": "core.io.terrain",
2853
- "summary": "Replace the terrain surface with a caller-supplied triangle mesh. Undoable (one step), and the replacement persists with the project. The returned promise resolves only after the surface is fully applied and recorded — it is safe to toggle terrain resolution or read the surface back the moment it resolves.",
2854
- "examplePrompts": [
2855
- "Replace the terrain with this surveyed mesh",
2856
- "Flatten a building pad into the site surface",
2857
- "Load a custom DEM surface onto the terrain",
2858
- "Regrade the terrain from these points\n\n# Example\n```ts\n// Projects with no terrain yet: import first, then replace.\nif (!(await snaptrude.core.io.terrain.exists())) {\nawait snaptrude.core.io.import.terrain(40.7128, -74.006, 300, 300)\n}\nconst result = await snaptrude.core.io.terrain.replaceMesh(\npositions, // [x0, y0, z0, x1, y1, z1, …] — world space\nindices, // [a0, b0, c0, a1, b1, c1, …]\n\"meters\",\n{\ncoordinateSpace: \"world\",\nexpectedTerrain: await snaptrude.core.io.terrain.get(),\nbaseline: \"make-replacement-original\",\npreserve: { datum: true, geolocation: true, satellite: true, material: true },\nclientMutationId: \"survey-2026-08-05-r1\",\n},\n)\n// result.modelRevision — pass back as expectedModelRevision on the next call\n```"
2859
- ],
2860
- "argsType": "number[]",
2861
- "resultType": "PluginTerrainReplaceMeshResult"
2862
- },
2863
2493
  {
2864
2494
  "path": "core.io.terrain.setDatum",
2865
2495
  "namespace": "core.io.terrain",
@@ -3293,41 +2923,6 @@
3293
2923
  "argsType": "Vec3Handle",
3294
2924
  "resultType": "Vec3Handle"
3295
2925
  },
3296
- {
3297
- "path": "core.mode.get",
3298
- "namespace": "core.mode",
3299
- "summary": "Get the currently active application mode.",
3300
- "examplePrompts": [
3301
- "Which mode am I in right now?",
3302
- "Am I in present mode?",
3303
- "Check whether the editor is in BIM mode\n\n# Example\n```ts\nconst mode = await snaptrude.core.mode.get()\nif (mode !== \"present\") await snaptrude.core.mode.set(\"present\")\n```"
3304
- ],
3305
- "argsType": null,
3306
- "resultType": "PluginAppMode"
3307
- },
3308
- {
3309
- "path": "core.mode.list",
3310
- "namespace": "core.mode",
3311
- "summary": "List every application mode the editor has.",
3312
- "examplePrompts": [
3313
- "What modes does Snaptrude have?",
3314
- "List the editor modes I can switch to\n\n# Example\n```ts\nconst { modes } = await snaptrude.core.mode.list()\n// [\"design\", \"bim\", \"present\", \"program\"]\n```"
3315
- ],
3316
- "argsType": null,
3317
- "resultType": "PluginCoreModeListResult"
3318
- },
3319
- {
3320
- "path": "core.mode.set",
3321
- "namespace": "core.mode",
3322
- "summary": "Switch the editor to another application mode — the same action as clicking that tab in the top menu bar.",
3323
- "examplePrompts": [
3324
- "Switch to present mode",
3325
- "Open BIM mode",
3326
- "Go back to design mode\n\n# Example\n```ts\nawait snaptrude.core.mode.set(\"present\")\n// ... presentation work ...\nawait snaptrude.core.mode.set(\"design\")\n```"
3327
- ],
3328
- "argsType": "PluginAppMode",
3329
- "resultType": "PluginCoreModeSetResult"
3330
- },
3331
2926
  {
3332
2927
  "path": "core.project.settings.getTolerance",
3333
2928
  "namespace": "core.project.settings",
@@ -3697,98 +3292,6 @@
3697
3292
  "argsType": "string",
3698
3293
  "resultType": "PluginCoreProposalsSetActiveResult"
3699
3294
  },
3700
- {
3701
- "path": "core.storeys.copy",
3702
- "namespace": "core.storeys",
3703
- "summary": "Copy a storey into the adjacent level, up or down.",
3704
- "examplePrompts": [
3705
- "Copy this floor to the storey above",
3706
- "Copy the ground floor down into a new basement",
3707
- "Repeat this level upwards with its own independent geometry",
3708
- "Copy just the selected walls onto the next floor up\n\n# Example\n```ts\n// Copy the whole active storey one level up (instanced copies).\nconst { targetStories, created, skipped } =\nawait snaptrude.core.storeys.copy(\"up\")\nconsole.log(`Copied ${created.length} elements onto storey ${targetStories}`)\nif (skipped) console.log(`${skipped} elements were skipped`)\n```"
3709
- ],
3710
- "argsType": "\"up\" | \"down\"",
3711
- "resultType": "PluginStoryDuplicateResult"
3712
- },
3713
- {
3714
- "path": "core.storeys.create",
3715
- "namespace": "core.storeys",
3716
- "summary": "Create a new storey (floor) in the project.",
3717
- "examplePrompts": [
3718
- "Add a third floor to the building",
3719
- "Create a new storey above the second floor",
3720
- "Add a basement level to this project",
3721
- "Insert a new level with a custom floor height\n\n# Example\n```ts\n// Create a new third floor with custom height\nconst { storyId } = await snaptrude.core.storeys.create(3, 4.5)\n```"
3722
- ],
3723
- "argsType": "number",
3724
- "resultType": "PluginStoryCreateResult"
3725
- },
3726
- {
3727
- "path": "core.storeys.delete",
3728
- "namespace": "core.storeys",
3729
- "summary": "Delete a storey and everything on it — the same as removing it from the storey panel. Every element placed on the storey (walls, floors, masses, …) is deleted with it, the remaining storeys are re-stacked, and the active storey falls back to an adjacent one. Committed as a single undo step.",
3730
- "examplePrompts": [
3731
- "Delete the top floor",
3732
- "Remove the basement level",
3733
- "Get rid of storey 3",
3734
- "Delete the second floor and everything on it\n\n# Example\n```ts\nconst { newActiveStory } = await snaptrude.core.storeys.delete(3)\nconsole.log(`Deleted storey 3; now on storey ${newActiveStory}`)\n```"
3735
- ],
3736
- "argsType": "number",
3737
- "resultType": "PluginStoryDeleteResult"
3738
- },
3739
- {
3740
- "path": "core.storeys.get",
3741
- "namespace": "core.storeys",
3742
- "summary": "Get properties of a storey by its storey number.",
3743
- "examplePrompts": [
3744
- "What is the height of the ground floor?",
3745
- "How many rooms are on the second storey?",
3746
- "Get the total floor area of level 3",
3747
- "Is the first floor hidden in the viewport?",
3748
- "Show me the name and height of storey 2\n\n# Example\n```ts\nconst info = await snaptrude.core.storeys.get(1, [\"height\", \"name\", \"spacesCount\"])\nconsole.log(info.name, info.height, info.spacesCount)\n```"
3749
- ],
3750
- "argsType": "number",
3751
- "resultType": "PluginStoryGetResult"
3752
- },
3753
- {
3754
- "path": "core.storeys.list",
3755
- "namespace": "core.storeys",
3756
- "summary": "List all storeys in the current project.",
3757
- "examplePrompts": [
3758
- "How many floors does this building have?",
3759
- "List all the storeys in the project",
3760
- "Show me every level with its name",
3761
- "Which storeys exist in this model?\n\n# Example\n```ts\nconst { storeys } = await snaptrude.core.storeys.list()\nfor (const s of storeys) {\nconsole.log(`Storey ${s.value}: ${s.name} (id: ${s.id})`)\n}\n```"
3762
- ],
3763
- "argsType": null,
3764
- "resultType": "PluginCoreStoreysListResult"
3765
- },
3766
- {
3767
- "path": "core.storeys.setActive",
3768
- "namespace": "core.storeys",
3769
- "summary": "Make a storey the active storey — the same as clicking it in the storey/layer panel. Subsequent draws and creates target this storey, and in 2D the viewport switches to it. This is a view/navigation change: it is **not** undoable and commits nothing to the model.",
3770
- "examplePrompts": [
3771
- "Switch to the second floor",
3772
- "Make the ground storey active",
3773
- "Go to the basement level",
3774
- "Set level 3 as the current storey\n\n# Example\n```ts\n// Activate storey 2, then draw a wall — it lands on storey 2.\nawait snaptrude.core.storeys.setActive(2)\n```"
3775
- ],
3776
- "argsType": "number",
3777
- "resultType": "PluginStorySetActiveResult"
3778
- },
3779
- {
3780
- "path": "core.storeys.update",
3781
- "namespace": "core.storeys",
3782
- "summary": "Update a storey's floor-to-floor `height` and/or `name`.",
3783
- "examplePrompts": [
3784
- "Change the ground floor height to 3.5 metres",
3785
- "Make the second storey taller",
3786
- "Rename the ground floor to \"Lobby\"",
3787
- "Set the floor-to-floor height of level 1\n\n# Example\n```ts\n// Set ground floor height to 5 Babylon units — walls stretch and the\n// floors above move up to match, all in a single undo step.\nconst result = await snaptrude.core.storeys.update(1, 5)\n// Rename only, leaving the height untouched.\nawait snaptrude.core.storeys.update(1, undefined, { name: \"Lobby\" })\n```"
3788
- ],
3789
- "argsType": "number",
3790
- "resultType": "PluginStoryUpdateResult"
3791
- },
3792
3295
  {
3793
3296
  "path": "core.tags.assign",
3794
3297
  "namespace": "core.tags",
@@ -3883,8 +3386,7 @@
3883
3386
  "Show the labels applied to this room\n\n# Example\n```ts\nconst { tags } = await snaptrude.core.tags.getTagsForComponent(\"cmp_42\")\nfor (const t of tags) console.log(t.categoryName, t.tagName)\n```"
3884
3387
  ],
3885
3388
  "argsType": "ComponentHandle",
3886
- "resultType": "PluginCoreTagsGetTagsForComponentResult",
3887
- "deprecated": "core.tags.listForComponent"
3389
+ "resultType": "PluginCoreTagsGetTagsForComponentResult"
3888
3390
  },
3889
3391
  {
3890
3392
  "path": "core.tags.list",
@@ -3923,19 +3425,7 @@
3923
3425
  "resultType": "PluginCoreTagsListComponentsResult"
3924
3426
  },
3925
3427
  {
3926
- "path": "core.tags.listForComponent",
3927
- "namespace": "core.tags",
3928
- "summary": "List the tags carried by a component.",
3929
- "examplePrompts": [
3930
- "What tags does this space have?",
3931
- "List the tags on component cmp_42",
3932
- "Show the labels applied to this room\n\n# Example\n```ts\nconst { tags } = await snaptrude.core.tags.listForComponent(\"cmp_42\")\nfor (const t of tags) console.log(t.categoryName, t.tagName)\n```"
3933
- ],
3934
- "argsType": "ComponentHandle",
3935
- "resultType": "PluginCoreTagsGetTagsForComponentResult"
3936
- },
3937
- {
3938
- "path": "core.tags.unassign",
3428
+ "path": "core.tags.unassign",
3939
3429
  "namespace": "core.tags",
3940
3430
  "summary": "Clear a category's tag from components.",
3941
3431
  "examplePrompts": [
@@ -4060,8 +3550,7 @@
4060
3550
  "Show me the full scene\n\n# Example\n```ts\nawait snaptrude.core.zoom.extents()\n```"
4061
3551
  ],
4062
3552
  "argsType": null,
4063
- "resultType": "boolean",
4064
- "deprecated": "core.camera.zoomExtents"
3553
+ "resultType": "boolean"
4065
3554
  },
4066
3555
  {
4067
3556
  "path": "core.zoom.selection",
@@ -4074,8 +3563,7 @@
4074
3563
  "Fit the view to the selected room\n\n# Example\n```ts\nawait snaptrude.core.zoom.selection()\n```"
4075
3564
  ],
4076
3565
  "argsType": null,
4077
- "resultType": "boolean",
4078
- "deprecated": "core.camera.zoomSelection"
3566
+ "resultType": "boolean"
4079
3567
  },
4080
3568
  {
4081
3569
  "path": "design.boolean.intersect",
@@ -4131,19 +3619,6 @@
4131
3619
  "argsType": "ContourHandle",
4132
3620
  "resultType": "ComponentHandle"
4133
3621
  },
4134
- {
4135
- "path": "design.create.buildableEnvelope",
4136
- "namespace": "design.create",
4137
- "summary": "Create a new parametric buildable envelope — the zoning-regulated volume a building may occupy — generated from a site polygon, tiered setbacks, a height or floor-count cap, and optional FAR and lot-coverage limits. The host mints the envelope id and returns it. Canonical home of the create formerly at `entity.buildableEnvelope.create` (now deprecated).",
4138
- "examplePrompts": [
4139
- "Create a buildable envelope for my site",
4140
- "Generate the zoning envelope with 10ft front setbacks",
4141
- "Show the maximum buildable volume with a 150ft height limit",
4142
- "Create a zoning envelope capped at 12 floors with FAR 3\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.design.create.buildableEnvelope(\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[\n{ aboveHeight: 0, front: 10, side: 5, rear: 10 },\n{ aboveHeight: 100, front: 20, side: 10, rear: 20 },\n],\n{ kind: \"max_height\", maxHeight: 150 },\n12,\n)\n```"
4143
- ],
4144
- "argsType": "PluginBuildableEnvelopePolygonVertex[]",
4145
- "resultType": "PluginBuildableEnvelopeCreateResult"
4146
- },
4147
3622
  {
4148
3623
  "path": "design.create.ceiling",
4149
3624
  "namespace": "design.create",
@@ -4241,18 +3716,6 @@
4241
3716
  "argsType": "ContourHandle",
4242
3717
  "resultType": "ComponentHandle"
4243
3718
  },
4244
- {
4245
- "path": "design.create.massFromBrep",
4246
- "namespace": "design.create",
4247
- "summary": "Create a **mass** from a custom solid built with a `core.geom.create` brep constructor (`brepFromFaces`, `brepFromExtrusion`, `brepFromLoft`, `brepFromMesh`, or a brep boolean) — the free-form counterpart of {@linkcode PluginDesignCreateApi.mass}, for solids that are not simple footprint extrusions (pyramids, wedges, faceted volumes).",
4248
- "examplePrompts": [
4249
- "Create a mass from these faces",
4250
- "Turn this custom brep into a scene mass",
4251
- "Add a pyramid-shaped mass to the model\n\n# Example\n```ts\nconst apex = { x: 0, y: 4, z: 0 }\nconst a = { x: -2, y: 0, z: -2 }\nconst b = { x: 2, y: 0, z: -2 }\nconst c = { x: 2, y: 0, z: 2 }\nconst d = { x: -2, y: 0, z: 2 }\nconst brep = await snaptrude.core.geom.create.brepFromFaces([\n[a, d, c, b],\n[a, b, apex],\n[b, c, apex],\n[c, d, apex],\n[d, a, apex],\n])\nconst pyramid = await snaptrude.design.create.massFromBrep(brep, \"Pavilion\")\n```"
4252
- ],
4253
- "argsType": "BrepHandle",
4254
- "resultType": "ComponentHandle"
4255
- },
4256
3719
  {
4257
3720
  "path": "design.create.referenceLines",
4258
3721
  "namespace": "design.create",
@@ -5026,19 +4489,6 @@
5026
4489
  "argsType": "ComponentHandle",
5027
4490
  "resultType": "CurveHandle | null"
5028
4491
  },
5029
- {
5030
- "path": "design.query.geometry.getTriangulatedMeshes",
5031
- "namespace": "design.query.geometry",
5032
- "summary": "Get the **triangulated render meshes** of scene components as plain, serializable arrays — flat world-space vertex `positions` (`[x0, y0, z0, x1, …]`) and triangle `indices` (three per triangle), one record per requested component.",
5033
- "examplePrompts": [
5034
- "Export the selected masses as a triangle mesh",
5035
- "Get the raw vertices and triangles of this wall in world coordinates",
5036
- "Give me the triangulated geometry of every space with its materials",
5037
- "Compute the surface area of this roof from its triangles"
5038
- ],
5039
- "argsType": "ComponentHandle[]",
5040
- "resultType": "PluginDesignQueryGeometryGetTriangulatedMeshesResult"
5041
- },
5042
4492
  {
5043
4493
  "path": "design.query.getBoundingBox",
5044
4494
  "namespace": "design.query",
@@ -5397,19 +4847,6 @@
5397
4847
  "argsType": "ComponentHandle",
5398
4848
  "resultType": "PluginEntityMeasurements | null"
5399
4849
  },
5400
- {
5401
- "path": "design.query.referenceLines.get",
5402
- "namespace": "design.query.referenceLines",
5403
- "summary": "Get properties of a reference line by its ID.",
5404
- "examplePrompts": [
5405
- "Get the curve geometry of this reference line",
5406
- "Where does this grid line run?",
5407
- "Read the geometry of a guide line by its id",
5408
- "Look up the curve of the selected reference line\n\n# Example\n```ts\nconst [refLine] = await snaptrude.design.query.listReferenceLines()\nconst result = await snaptrude.design.query.referenceLines.get(refLine, [\"curve\"])\n// result.curve is an opaque CurveHandle; read its coordinates via\n// `snaptrude.core.geom.curve`.\n```"
5409
- ],
5410
- "argsType": "string",
5411
- "resultType": "PluginReferenceLineGetResult"
5412
- },
5413
4850
  {
5414
4851
  "path": "design.query.spaces.get",
5415
4852
  "namespace": "design.query.spaces",
@@ -5424,19 +4861,6 @@
5424
4861
  "argsType": "ComponentHandle",
5425
4862
  "resultType": "PluginDesignQuerySpacesGetResult"
5426
4863
  },
5427
- {
5428
- "path": "design.query.spaces.getEnclosure",
5429
- "namespace": "design.query.spaces",
5430
- "summary": "Get the **enclosure** of a space — the floor and ceiling that cap it, the bounding walls around it (with each wall's door/window openings), and the neighbouring spaces it shares a boundary with.",
5431
- "examplePrompts": [
5432
- "What walls, floor and ceiling enclose this room?",
5433
- "Which of this room's walls are external?",
5434
- "List the doors and windows around the selected space",
5435
- "Which spaces are adjacent to this room, and through which wall?\n\n# Example\n```ts\nconst [space] = await snaptrude.design.query.listSpaces()\nconst enclosure = await snaptrude.design.query.spaces.getEnclosure(space)\nif (enclosure) {\nconst walls = enclosure.surfaces.filter((s) => s.role === \"wall\")\nconst external = walls.filter((s) => s.isExternal)\nconsole.log(`${walls.length} walls, ${external.length} external`)\n}\n```"
5436
- ],
5437
- "argsType": "ComponentHandle",
5438
- "resultType": "PluginSpaceEnclosure | null"
5439
- },
5440
4864
  {
5441
4865
  "path": "design.query.spaces.getFootprint",
5442
4866
  "namespace": "design.query.spaces",
@@ -5643,19 +5067,6 @@
5643
5067
  "argsType": "ComponentHandle[]",
5644
5068
  "resultType": "PluginDesignChangeResult"
5645
5069
  },
5646
- {
5647
- "path": "design.update.buildableEnvelope",
5648
- "namespace": "design.update",
5649
- "summary": "Update an existing parametric buildable envelope — regenerate the zoning volume from a revised site polygon, setbacks, vertical cap, or FAR and lot-coverage limits, keeping the same envelope id. Canonical home of the update formerly at `entity.buildableEnvelope.update` (now deprecated).",
5650
- "examplePrompts": [
5651
- "Change the envelope's height limit to 175 feet",
5652
- "Update the setbacks on the buildable envelope",
5653
- "Regenerate the zoning envelope with a new site boundary",
5654
- "Increase the FAR on the buildable volume\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.design.update.buildableEnvelope(\nexistingId,\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[{ aboveHeight: 0, front: 10, side: 5, rear: 10 }],\n{ kind: \"max_height\", maxHeight: 175 },\n12,\n)\n```"
5655
- ],
5656
- "argsType": "string",
5657
- "resultType": "PluginBuildableEnvelopeUpdateResult"
5658
- },
5659
5070
  {
5660
5071
  "path": "design.update.ceiling",
5661
5072
  "namespace": "design.update",
@@ -5998,8 +5409,7 @@
5998
5409
  "Create a zoning envelope capped at 12 floors with FAR 3\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.create(\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[\n{ aboveHeight: 0, front: 10, side: 5, rear: 10 },\n{ aboveHeight: 100, front: 20, side: 10, rear: 20 },\n],\n{ kind: \"max_height\", maxHeight: 150 },\n12,\n)\n```"
5999
5410
  ],
6000
5411
  "argsType": "PluginBuildableEnvelopePolygonVertex[]",
6001
- "resultType": "PluginBuildableEnvelopeCreateResult",
6002
- "deprecated": "design.create.buildableEnvelope"
5412
+ "resultType": "PluginBuildableEnvelopeCreateResult"
6003
5413
  },
6004
5414
  {
6005
5415
  "path": "entity.buildableEnvelope.update",
@@ -6013,8 +5423,7 @@
6013
5423
  "Modify the envelope to allow 15 storeys instead\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.update(\nexistingId,\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[{ aboveHeight: 0, front: 10, side: 5, rear: 10 }],\n{ kind: \"max_height\", maxHeight: 175 },\n12,\n)\n```"
6014
5424
  ],
6015
5425
  "argsType": "string",
6016
- "resultType": "PluginBuildableEnvelopeUpdateResult",
6017
- "deprecated": "design.update.buildableEnvelope"
5426
+ "resultType": "PluginBuildableEnvelopeUpdateResult"
6018
5427
  },
6019
5428
  {
6020
5429
  "path": "entity.referenceLine.createMulti",
@@ -6028,8 +5437,7 @@
6028
5437
  "Turn this profile into reference lines\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\n\nconst start = await vec3.new(0, 0, 0)\nconst mid = await vec3.new(10, 0, 0)\nconst end = await vec3.new(10, 0, 10)\nconst l1 = await snaptrude.core.geom.create.line(start, mid)\nconst l2 = await snaptrude.core.geom.create.line(mid, end)\nconst profile = await snaptrude.core.geom.create.profileFromCurves([l1, l2])\n\nconst { referenceLineIds } = await snaptrude.entity.referenceLine.createMulti(profile)\n```"
6029
5438
  ],
6030
5439
  "argsType": "ProfileHandle",
6031
- "resultType": "PluginReferenceLineCreateMultiResult",
6032
- "deprecated": "design.create.referenceLines"
5440
+ "resultType": "PluginReferenceLineCreateMultiResult"
6033
5441
  },
6034
5442
  {
6035
5443
  "path": "entity.referenceLine.delete",
@@ -6042,8 +5450,7 @@
6042
5450
  "Erase a reference line by its id\n\n# Example\n```ts\nawait snaptrude.entity.referenceLine.delete(\"some-ref-line-id\")\n```"
6043
5451
  ],
6044
5452
  "argsType": "string",
6045
- "resultType": "PluginReferenceLineDeleteResult",
6046
- "deprecated": "design.delete.entities"
5453
+ "resultType": "PluginReferenceLineDeleteResult"
6047
5454
  },
6048
5455
  {
6049
5456
  "path": "entity.referenceLine.get",
@@ -6056,8 +5463,7 @@
6056
5463
  "Look up the curve of the selected reference line\n\n# Example\n```ts\nconst result = await snaptrude.entity.referenceLine.get(\"some-ref-line-id\", [\"curve\"])\n// result.curve is an opaque CurveHandle; a dedicated curve read API for its\n// coordinates is exposed separately via `snaptrude.core.geom.curve`.\n```"
6057
5464
  ],
6058
5465
  "argsType": "string",
6059
- "resultType": "PluginReferenceLineGetResult",
6060
- "deprecated": "design.query.referenceLines.get"
5466
+ "resultType": "PluginReferenceLineGetResult"
6061
5467
  },
6062
5468
  {
6063
5469
  "path": "entity.referenceLine.getAll",
@@ -6070,8 +5476,7 @@
6070
5476
  "Do I have any reference lines in this project?\n\n# Example\n```ts\nconst { referenceLineIds } = await snaptrude.entity.referenceLine.getAll()\nconsole.log(`Project has ${referenceLineIds.length} reference lines`)\n```"
6071
5477
  ],
6072
5478
  "argsType": null,
6073
- "resultType": "PluginReferenceLineGetAllResult",
6074
- "deprecated": "design.query.listReferenceLines"
5479
+ "resultType": "PluginReferenceLineGetAllResult"
6075
5480
  },
6076
5481
  {
6077
5482
  "path": "entity.story.create",
@@ -6085,8 +5490,7 @@
6085
5490
  "Add another floor on top of the building\n\n# Example\n```ts\n// Create a new third floor with custom height\nconst { storyId } = await snaptrude.entity.story.create(3, 4.5)\n```"
6086
5491
  ],
6087
5492
  "argsType": "number",
6088
- "resultType": "PluginStoryCreateResult",
6089
- "deprecated": "core.storeys.create"
5493
+ "resultType": "PluginStoryCreateResult"
6090
5494
  },
6091
5495
  {
6092
5496
  "path": "entity.story.delete",
@@ -6099,8 +5503,7 @@
6099
5503
  "Delete the second floor and everything on it\n\n# Example\n```ts\nconst { newActiveStory } = await snaptrude.entity.story.delete(3)\nconsole.log(`Deleted story 3; now on story ${newActiveStory}`)\n```"
6100
5504
  ],
6101
5505
  "argsType": "number",
6102
- "resultType": "PluginStoryDeleteResult",
6103
- "deprecated": "core.storeys.delete"
5506
+ "resultType": "PluginStoryDeleteResult"
6104
5507
  },
6105
5508
  {
6106
5509
  "path": "entity.story.duplicate",
@@ -6114,8 +5517,7 @@
6114
5517
  ],
6115
5518
  "argsType": "\"up\" | \"down\"",
6116
5519
  "resultType": "PluginStoryDuplicateResult",
6117
- "performance": "For storeys that share a layout, duplicate the storey instead of recreating its contents floor by floor — this copies every eligible element in one call, and the default instanced copies keep the floors linked. To stack many identical floors, either call this per level or capture the storey's component ids and `design.create.copy(ids, oneFloorRise, { count })` to lay them all down in a single call. # Example ```ts // Duplicate the whole active story one level up (instanced copies). const { targetStories, created, skipped } = await snaptrude.entity.story.duplicate(\"up\") console.log(`Copied ${created.length} elements onto story ${targetStories}`) if (skipped) console.log(`${skipped} elements were skipped`) ```",
6118
- "deprecated": "core.storeys.copy"
5520
+ "performance": "For storeys that share a layout, duplicate the storey instead of recreating its contents floor by floor — this copies every eligible element in one call, and the default instanced copies keep the floors linked. To stack many identical floors, either call this per level or capture the storey's component ids and `design.create.copy(ids, oneFloorRise, { count })` to lay them all down in a single call. # Example ```ts // Duplicate the whole active story one level up (instanced copies). const { targetStories, created, skipped } = await snaptrude.entity.story.duplicate(\"up\") console.log(`Copied ${created.length} elements onto story ${targetStories}`) if (skipped) console.log(`${skipped} elements were skipped`) ```"
6119
5521
  },
6120
5522
  {
6121
5523
  "path": "entity.story.get",
@@ -6129,8 +5531,7 @@
6129
5531
  "Show me the name and height of story 2\n\n# Example\n```ts\nconst info = await snaptrude.entity.story.get(1, [\"height\", \"name\", \"spacesCount\"])\nconsole.log(info.name, info.height, info.spacesCount)\n```"
6130
5532
  ],
6131
5533
  "argsType": "number",
6132
- "resultType": "PluginStoryGetResult",
6133
- "deprecated": "core.storeys.get"
5534
+ "resultType": "PluginStoryGetResult"
6134
5535
  },
6135
5536
  {
6136
5537
  "path": "entity.story.getAll",
@@ -6143,8 +5544,7 @@
6143
5544
  "Which stories exist in this model?\n\n# Example\n```ts\nconst { stories } = await snaptrude.entity.story.getAll()\nfor (const s of stories) {\nconsole.log(`Story ${s.value}: ${s.name} (id: ${s.id})`)\n}\n```"
6144
5545
  ],
6145
5546
  "argsType": null,
6146
- "resultType": "PluginStoryGetAllResult",
6147
- "deprecated": "core.storeys.list"
5547
+ "resultType": "PluginStoryGetAllResult"
6148
5548
  },
6149
5549
  {
6150
5550
  "path": "entity.story.setActive",
@@ -6157,8 +5557,7 @@
6157
5557
  "Set level 3 as the current storey\n\n# Example\n```ts\n// Activate story 2, then draw a wall — it lands on story 2.\nawait snaptrude.entity.story.setActive(2)\n```"
6158
5558
  ],
6159
5559
  "argsType": "number",
6160
- "resultType": "PluginStorySetActiveResult",
6161
- "deprecated": "core.storeys.setActive"
5560
+ "resultType": "PluginStorySetActiveResult"
6162
5561
  },
6163
5562
  {
6164
5563
  "path": "entity.story.update",
@@ -6172,8 +5571,7 @@
6172
5571
  "Rename storey 2 and make it taller in one go\n\n# Example\n```ts\n// Set ground floor height to 5 Babylon units — walls stretch and the\n// floors above move up to match, all in a single undo step.\nconst result = await snaptrude.entity.story.update(1, 5)\n// Rename only, leaving the height untouched.\nawait snaptrude.entity.story.update(1, undefined, { name: \"Lobby\" })\n```"
6173
5572
  ],
6174
5573
  "argsType": "number",
6175
- "resultType": "PluginStoryUpdateResult",
6176
- "deprecated": "core.storeys.update"
5574
+ "resultType": "PluginStoryUpdateResult"
6177
5575
  },
6178
5576
  {
6179
5577
  "path": "presentation.aiInspiration.cancelJob",
@@ -6442,18 +5840,6 @@
6442
5840
  "argsType": null,
6443
5841
  "resultType": "PluginPresentationDiagramsGenerateResult"
6444
5842
  },
6445
- {
6446
- "path": "presentation.diagrams.generateSite",
6447
- "namespace": "presentation.diagrams",
6448
- "summary": "Generate the site diagrams (location, streetview, climate) for the current model, creating new layout sheets.",
6449
- "examplePrompts": [
6450
- "Generate the site diagrams for this project",
6451
- "Create the location, streetview and climate sheets",
6452
- "Add a climate diagram sheet to the presentation\n\n# Example\n```ts\nconst { sheetIds } = await snaptrude.presentation.diagrams.generateSite({\ntypes: [\"location\", \"climate\"],\n})\n```"
6453
- ],
6454
- "argsType": "{\n types?: PluginPresentationSiteDiagramType[]\n }",
6455
- "resultType": "PluginPresentationDiagramsGenerateResult"
6456
- },
6457
5843
  {
6458
5844
  "path": "presentation.diagrams.place",
6459
5845
  "namespace": "presentation.diagrams",
@@ -6519,316 +5905,6 @@
6519
5905
  "argsType": "{ url?: string; dataUrl?: string }",
6520
5906
  "resultType": "PluginPresentationImportResult"
6521
5907
  },
6522
- {
6523
- "path": "presentation.placedViews.deleteShapes",
6524
- "namespace": "presentation.placedViews",
6525
- "summary": "Delete Present-canvas shapes. One undoable step for the whole batch, and the batch is atomic — if any id is rejected, nothing is deleted.",
6526
- "examplePrompts": [
6527
- "Delete the old AI renders from the sheet",
6528
- "Remove that placed view",
6529
- "Clear the diagram images I placed\n\n# Example\n```ts\nconst { deleted } = await snaptrude.presentation.placedViews.deleteShapes([\nout1.shapeId,\nout2.shapeId,\n])\n```"
6530
- ],
6531
- "argsType": "string[]",
6532
- "resultType": "PluginCanvasShapesDeleteResult"
6533
- },
6534
- {
6535
- "path": "presentation.placedViews.get",
6536
- "namespace": "presentation.placedViews",
6537
- "summary": "Get a single placed view by its shape id.",
6538
- "examplePrompts": [
6539
- "Get the placed view I just dropped on the sheet",
6540
- "Read the position and scale of this placed view",
6541
- "What's the crop on shape_123?\n\n# Example\n```ts\nconst placed = await snaptrude.presentation.placedViews.get(shapeId)\nconsole.log(placed.position, placed.scale)\n```"
6542
- ],
6543
- "argsType": "string",
6544
- "resultType": "PluginPlacedView"
6545
- },
6546
- {
6547
- "path": "presentation.placedViews.getShape",
6548
- "namespace": "presentation.placedViews",
6549
- "summary": "Get one Present-canvas shape by id — works for any top-level shape (placed view, AI output, diagram image, plugin shape, annotation), unlike `get` which requires a placed view. Requires Present mode to be open.",
6550
- "examplePrompts": [
6551
- "Inspect the AI render I just generated",
6552
- "Get the bounds of that diagram image"
6553
- ],
6554
- "argsType": "string",
6555
- "resultType": "PluginCanvasShape"
6556
- },
6557
- {
6558
- "path": "presentation.placedViews.getStyles",
6559
- "namespace": "presentation.placedViews",
6560
- "summary": "Read a placed view's (or sheet's) per-category presentation styles.",
6561
- "examplePrompts": [
6562
- "What line weights is this placed plan using?",
6563
- "Read the styling of the placed view",
6564
- "Which categories can I restyle on this sheet?\n\n# Example\n```ts\nconst styles = await snaptrude.presentation.placedViews.getStyles(shapeId)\nconst space = styles.categories.find((c) => c.category === \"Space\")\nconsole.log(space?.settings.cutWidth, space?.settings.lineStyle)\n```"
6565
- ],
6566
- "argsType": "string",
6567
- "resultType": "PluginPlacedViewStylesResult"
6568
- },
6569
- {
6570
- "path": "presentation.placedViews.list",
6571
- "namespace": "presentation.placedViews",
6572
- "summary": "List the placed views in the presentation.",
6573
- "examplePrompts": [
6574
- "Which views are placed on this sheet?",
6575
- "List all the placed views in the presentation",
6576
- "What's laid out on sheet 2?",
6577
- "Show me every view on the Present canvas\n\n# Example\n```ts\nconst { placedViews } = await snaptrude.presentation.placedViews.list(\"sheet_1\")\n```"
6578
- ],
6579
- "argsType": "string",
6580
- "resultType": "PluginPresentationPlacedViewsListResult"
6581
- },
6582
- {
6583
- "path": "presentation.placedViews.listLabels",
6584
- "namespace": "presentation.placedViews",
6585
- "summary": "List a placed view's labels — the text children generated from the view's content (space names, departments, areas, dimension texts). Each label is individually addressable: it can be moved and hidden. Returns `[]` when the view has no labels. Requires Present mode to be open.",
6586
- "examplePrompts": [
6587
- "List the labels on this placed plan",
6588
- "Where are the space labels on this view?",
6589
- "Show every label with its position\n\n# Example\n```ts\nconst { labels } = await snaptrude.presentation.placedViews.listLabels(shapeId)\nfor (const l of labels) console.log(l.text, l.position, l.hidden)\n```"
6590
- ],
6591
- "argsType": "string",
6592
- "resultType": "PluginPlacedViewLabelsResult"
6593
- },
6594
- {
6595
- "path": "presentation.placedViews.listShapes",
6596
- "namespace": "presentation.placedViews",
6597
- "summary": "List the top-level shapes on the Present canvas — not just placed views: AI-generated outputs, placed diagram images, plugin-created shapes, and annotations, each with an `origin` classification. Sheets (frames) are not listed — use `sheets.list`. Pass `sheetId` to list only shapes on that sheet. Returns `[]` when Present mode is closed.",
6598
- "examplePrompts": [
6599
- "List everything on the Present canvas",
6600
- "What AI outputs are on this sheet?",
6601
- "Show all the shapes with their positions\n\n# Example\n```ts\nconst { shapes } = await snaptrude.presentation.placedViews.listShapes()\nconst aiOutputs = shapes.filter((s) => s.origin === \"aiOutput\")\n```"
6602
- ],
6603
- "argsType": "string",
6604
- "resultType": "PluginCanvasShapesListResult"
6605
- },
6606
- {
6607
- "path": "presentation.placedViews.move",
6608
- "namespace": "presentation.placedViews",
6609
- "summary": "Move a placed view.",
6610
- "examplePrompts": [
6611
- "Move the site plan view to the top-left of sheet 2",
6612
- "Reposition this placed view to 100, 200",
6613
- "Move the hero perspective onto the cover sheet\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.move(shapeId, { x: 50, y: 50 }, {\nsheetId: \"sheet_2\",\n})\n```"
6614
- ],
6615
- "argsType": "string",
6616
- "resultType": "PluginPlacedView"
6617
- },
6618
- {
6619
- "path": "presentation.placedViews.moveLabel",
6620
- "namespace": "presentation.placedViews",
6621
- "summary": "Move a label to a new position (coordinates relative to its placed view, the same space `listLabels` reports). The manual position survives style changes. Undoable. Requires Present mode to be open.",
6622
- "examplePrompts": [
6623
- "Move the kitchen label out of the hatched area",
6624
- "Nudge this label 20 units right",
6625
- "Reposition the area text"
6626
- ],
6627
- "argsType": "string",
6628
- "resultType": "PluginPlacedViewLabel"
6629
- },
6630
- {
6631
- "path": "presentation.placedViews.moveShape",
6632
- "namespace": "presentation.placedViews",
6633
- "summary": "Move any Present-canvas shape (AI outputs, diagram images, plugin shapes, annotations — placed views too). Same coordinate semantics as `move`: sheet-local when on a sheet, page coordinates otherwise; pass `options.sheetId` to reparent onto a sheet. Undoable. Requires Present mode to be open.",
6634
- "examplePrompts": [
6635
- "Move the AI render to the top of the sheet",
6636
- "Put the diagram image at 100, 200"
6637
- ],
6638
- "argsType": "string",
6639
- "resultType": "PluginCanvasShape"
6640
- },
6641
- {
6642
- "path": "presentation.placedViews.resetStyles",
6643
- "namespace": "presentation.placedViews",
6644
- "summary": "Reset a placed view's styling to defaults — the sidebar's Reset button: clears every per-category override and view-style restyle, resets font styles, and un-hides labels hidden by styling. Undoable. Requires Present mode to be open.",
6645
- "examplePrompts": [
6646
- "Reset this view's styling",
6647
- "Clear all the style overrides on the placed plan",
6648
- "Put the sheet styles back to default"
6649
- ],
6650
- "argsType": "string",
6651
- "resultType": "void"
6652
- },
6653
- {
6654
- "path": "presentation.placedViews.resizeShape",
6655
- "namespace": "presentation.placedViews",
6656
- "summary": "Resize any Present-canvas shape by a uniform factor about its top-left corner (aspect ratio held) — the generic counterpart of `scale`, which requires a placed view. Undoable. Requires Present mode to be open.",
6657
- "examplePrompts": [
6658
- "Make the AI output half its size",
6659
- "Double the size of that image"
6660
- ],
6661
- "argsType": "string",
6662
- "resultType": "PluginCanvasShape"
6663
- },
6664
- {
6665
- "path": "presentation.placedViews.rotateShape",
6666
- "namespace": "presentation.placedViews",
6667
- "summary": "Rotate any Present-canvas shape (AI outputs, diagram images, plugin shapes, annotations — placed views too) — the generic counterpart of `setRotation`, same target rules as `moveShape`. Same semantics: **absolute** angle in radians (tldraw convention) about the shape's bounds center, canonicalized into `[0, 2π)` (pass values in that range for an exact round-trip via `getShape`), one undo step. A placed view passed here falls under the same 3D-only rule as `setRotation`: 2D and site-plan views cannot rotate and are refused with a typed `PRECONDITION_FAILED`. Requires Present mode to be open.",
6668
- "examplePrompts": [
6669
- "Rotate the AI render 15 degrees",
6670
- "Turn that image sideways",
6671
- "Reset the diagram image's rotation"
6672
- ],
6673
- "argsType": "string",
6674
- "resultType": "PluginCanvasShape"
6675
- },
6676
- {
6677
- "path": "presentation.placedViews.scale",
6678
- "namespace": "presentation.placedViews",
6679
- "summary": "Resize a placed view by a uniform factor.",
6680
- "examplePrompts": [
6681
- "Make this placed view twice as big",
6682
- "Shrink the placed 3D view to half its size",
6683
- "Scale the placed plan up by 50%\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.scale(shapeId, 2)\n```"
6684
- ],
6685
- "argsType": "string",
6686
- "resultType": "PluginPlacedView"
6687
- },
6688
- {
6689
- "path": "presentation.placedViews.setCrop",
6690
- "namespace": "presentation.placedViews",
6691
- "summary": "Crop a placed view, or clear its crop.",
6692
- "examplePrompts": [
6693
- "Crop the placed view to its left half",
6694
- "Crop this view to the top-right quarter",
6695
- "Remove the crop from the placed plan\n\n# Example\n```ts\n// keep the left half of the view\nawait snaptrude.presentation.placedViews.setCrop(shapeId, {\ntopLeft: { x: 0, y: 0 },\nbottomRight: { x: 0.5, y: 1 },\n})\nawait snaptrude.presentation.placedViews.setCrop(shapeId, null) // clear\n```"
6696
- ],
6697
- "argsType": "string",
6698
- "resultType": "PluginPlacedView"
6699
- },
6700
- {
6701
- "path": "presentation.placedViews.setLabelHidden",
6702
- "namespace": "presentation.placedViews",
6703
- "summary": "Hide or show a single label (independent of the category-level label visibility). Undoable. Requires Present mode to be open.",
6704
- "examplePrompts": [
6705
- "Hide the corridor label",
6706
- "Show that label again"
6707
- ],
6708
- "argsType": "string",
6709
- "resultType": "PluginPlacedViewLabel"
6710
- },
6711
- {
6712
- "path": "presentation.placedViews.setMask",
6713
- "namespace": "presentation.placedViews",
6714
- "summary": "Toggle \"mask context buildings\" on a placed view — mutes the inactive proposal buildings in the view (the sidebar checkbox). Views only. Undoable. Requires Present mode to be open.",
6715
- "examplePrompts": [
6716
- "Mask the context buildings in this view",
6717
- "Show the neighboring proposals again in the placed view"
6718
- ],
6719
- "argsType": "string",
6720
- "resultType": "void"
6721
- },
6722
- {
6723
- "path": "presentation.placedViews.setOpacity",
6724
- "namespace": "presentation.placedViews",
6725
- "summary": "Set a Present-canvas shape's opacity (`0` transparent .. `1` opaque) — the sidebar's whole-shape opacity slider (distinct from the per-category fill opacity in `updateStyles`). Works for any top-level shape. Undoable. Requires Present mode to be open.",
6726
- "examplePrompts": [
6727
- "Fade the placed view to 50%",
6728
- "Make the AI render semi-transparent"
6729
- ],
6730
- "argsType": "string",
6731
- "resultType": "void"
6732
- },
6733
- {
6734
- "path": "presentation.placedViews.setRotation",
6735
- "namespace": "presentation.placedViews",
6736
- "summary": "Set a placed view's rotation.",
6737
- "examplePrompts": [
6738
- "Rotate the placed plan 90 degrees",
6739
- "Set this view's rotation to 45 degrees",
6740
- "Straighten the placed view back to zero rotation\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.setRotation(shapeId, Math.PI / 2)\n```"
6741
- ],
6742
- "argsType": "string",
6743
- "resultType": "PluginPlacedView"
6744
- },
6745
- {
6746
- "path": "presentation.placedViews.setScale",
6747
- "namespace": "presentation.placedViews",
6748
- "summary": "Set a placed view's architectural scale.",
6749
- "examplePrompts": [
6750
- "Set the plan to 1:100",
6751
- "Change the placed floor plan to 1:50 scale",
6752
- "Make this view print at quarter-inch scale\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.setScale(shapeId, 100) // 1:100\n```"
6753
- ],
6754
- "argsType": "string",
6755
- "resultType": "PluginPlacedView"
6756
- },
6757
- {
6758
- "path": "presentation.placedViews.updateFontStyles",
6759
- "namespace": "presentation.placedViews",
6760
- "summary": "Update a category's label typography on a placed view (or sheet) — the configure panel's Text tab.",
6761
- "examplePrompts": [
6762
- "Set the space labels to Roboto 24px bold",
6763
- "Hide the area values on this plan",
6764
- "Make the department labels italic\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.updateFontStyles(shapeId, \"Space\", {\nobjectLabels: { fontFamily: \"Roboto\", fontWeight: \"700\", fontSize: 24 },\nvisibleTypes: [\"objectLabels\", \"areas\"],\n})\n```"
6765
- ],
6766
- "argsType": "string",
6767
- "resultType": "void"
6768
- },
6769
- {
6770
- "path": "presentation.placedViews.updateStyles",
6771
- "namespace": "presentation.placedViews",
6772
- "summary": "Update one style category on a placed view (or sheet) — the same writes the Present sidebar's per-category configure panel performs.",
6773
- "examplePrompts": [
6774
- "Set the Space cut line weight to 0.5 mm",
6775
- "Make the Department lines dashed",
6776
- "Color the plan by department",
6777
- "Hide the dimension lines on this view",
6778
- "Round the space corners with a 2 ft radius\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.updateStyles(shapeId, \"Space\", {\ncutWidth: 0.5,\nprojectionWidth: 0.18,\nlineStyle: \"dashed\",\ncolorMode: \"department\",\n})\n```"
6779
- ],
6780
- "argsType": "string",
6781
- "resultType": "PluginPlacedViewCategoryStyles"
6782
- },
6783
- {
6784
- "path": "presentation.shapes.list",
6785
- "namespace": "presentation.shapes",
6786
- "summary": "List the calling plugin's shapes.",
6787
- "examplePrompts": [
6788
- "Which annotations has my plugin placed on the sheets?",
6789
- "List the plugin's shapes before refreshing them",
6790
- "Check whether the FAR label already exists\n\n# Example\n```ts\nconst { shapes } = await snaptrude.presentation.shapes.list()\nconst hasLabel = shapes.some((s) => s.key === \"far-label\")\n```"
6791
- ],
6792
- "argsType": null,
6793
- "resultType": "PluginPresentationShapesListResult"
6794
- },
6795
- {
6796
- "path": "presentation.shapes.remove",
6797
- "namespace": "presentation.shapes",
6798
- "summary": "Delete the shape for a key.",
6799
- "examplePrompts": [
6800
- "Remove the FAR label from the sheet",
6801
- "Delete the highlight the plugin added earlier",
6802
- "Clear the \"far-label\" annotation\n\n# Example\n```ts\nconst removed = await snaptrude.presentation.shapes.remove(\"far-label\")\n```"
6803
- ],
6804
- "argsType": "string",
6805
- "resultType": "boolean"
6806
- },
6807
- {
6808
- "path": "presentation.shapes.removeAll",
6809
- "namespace": "presentation.shapes",
6810
- "summary": "Delete every shape owned by the calling plugin.",
6811
- "examplePrompts": [
6812
- "Clear all annotations my plugin added",
6813
- "Reset the sheet output before rerunning the analysis",
6814
- "Remove every plugin-drawn shape\n\n# Example\n```ts\nconst deleted = await snaptrude.presentation.shapes.removeAll()\n```"
6815
- ],
6816
- "argsType": null,
6817
- "resultType": "number"
6818
- },
6819
- {
6820
- "path": "presentation.shapes.upsert",
6821
- "namespace": "presentation.shapes",
6822
- "summary": "Create or update the shape for a key.",
6823
- "examplePrompts": [
6824
- "Update the analysis label on the sheet instead of adding another one",
6825
- "Rerun the daylight report and refresh its annotations",
6826
- "Keep one \"FAR: 2.4\" text on Sheet 1 that updates on each run",
6827
- "Draw a highlight rectangle the plugin can move on the next run\n\n# Example\n```ts\nconst { shapeId, created } = await snaptrude.presentation.shapes.upsert(\"far-label\", {\ntype: \"text\",\ntext: \"FAR: 2.4\",\nposition: { x: 40, y: 40 },\ncolor: \"blue\",\n})\n```"
6828
- ],
6829
- "argsType": "string",
6830
- "resultType": "PluginPresentationShapesUpsertResult"
6831
- },
6832
5908
  {
6833
5909
  "path": "presentation.sheets.create",
6834
5910
  "namespace": "presentation.sheets",
@@ -6929,18 +6005,6 @@
6929
6005
  "argsType": "string",
6930
6006
  "resultType": "PluginPresentationSheet"
6931
6007
  },
6932
- {
6933
- "path": "presentation.sheets.setMargin",
6934
- "namespace": "presentation.sheets",
6935
- "summary": "Set a sheet's print margin.",
6936
- "examplePrompts": [
6937
- "Set the sheet margin to half an inch",
6938
- "Remove the margins on sheet_1",
6939
- "Give the cover sheet a 10mm margin\n\n# Example\n```ts\nconst sheet = await snaptrude.presentation.sheets.setMargin(\"sheet_1\", 0.5)\n```"
6940
- ],
6941
- "argsType": "string",
6942
- "resultType": "PluginPresentationSheet"
6943
- },
6944
6008
  {
6945
6009
  "path": "presentation.sheets.setSize",
6946
6010
  "namespace": "presentation.sheets",
@@ -6966,56 +6030,6 @@
6966
6030
  "argsType": "{\n sheetId?: string\n }",
6967
6031
  "resultType": "PluginPresentationSheetsUpdatePlacedViewResult"
6968
6032
  },
6969
- {
6970
- "path": "presentation.slideshow.getState",
6971
- "namespace": "presentation.slideshow",
6972
- "summary": "Read the slideshow state.",
6973
- "examplePrompts": [
6974
- "Is the slideshow running?",
6975
- "Which slide is the presentation on?",
6976
- "Check the slideshow state\n\n# Example\n```ts\nconst { running, index } = await snaptrude.presentation.slideshow.getState()\n```"
6977
- ],
6978
- "argsType": null,
6979
- "resultType": "PluginPresentationSlideshowState"
6980
- },
6981
- {
6982
- "path": "presentation.slideshow.start",
6983
- "namespace": "presentation.slideshow",
6984
- "summary": "Start the slideshow.",
6985
- "examplePrompts": [
6986
- "Start the slideshow",
6987
- "Present the sheets from the beginning",
6988
- "Start the slideshow on sheet 3",
6989
- "Play the presentation starting at the cover sheet\n\n# Example\n```ts\nconst state = await snaptrude.presentation.slideshow.start({ startIndex: 2 })\nconsole.log(state.running, state.index) // true, 2\n```"
6990
- ],
6991
- "argsType": "{\n sheetIds?: string[]\n startIndex?: number\n }",
6992
- "resultType": "PluginPresentationSlideshowState"
6993
- },
6994
- {
6995
- "path": "presentation.slideshow.stop",
6996
- "namespace": "presentation.slideshow",
6997
- "summary": "Stop the slideshow.",
6998
- "examplePrompts": [
6999
- "Stop the slideshow",
7000
- "Exit the presentation",
7001
- "Close the slideshow and go back to the sheets\n\n# Example\n```ts\nawait snaptrude.presentation.slideshow.stop()\n```"
7002
- ],
7003
- "argsType": null,
7004
- "resultType": "PluginPresentationSlideshowState"
7005
- },
7006
- {
7007
- "path": "presentation.tables.place",
7008
- "namespace": "presentation.tables",
7009
- "summary": "Place a table on a sheet.",
7010
- "examplePrompts": [
7011
- "Put the area schedule as a table on Sheet 1",
7012
- "Add a table of the room programs to the cover sheet",
7013
- "Paste this data as a table on the sheet",
7014
- "Place a two-column table of space names and areas\n\n# Example\n```ts\nconst shape = await snaptrude.presentation.tables.place(\"sheet_1\", {\nrows: [\n[\"Room\", \"Area\"],\n[\"Kitchen\", \"12.4 m²\"],\n[\"Living\", \"28.0 m²\"],\n],\n}, { position: { x: 40, y: 40 } })\n```"
7015
- ],
7016
- "argsType": "string",
7017
- "resultType": "PluginCanvasShape"
7018
- },
7019
6033
  {
7020
6034
  "path": "presentation.views.capture",
7021
6035
  "namespace": "presentation.views",
@@ -7530,44 +6544,6 @@
7530
6544
  "argsType": null,
7531
6545
  "resultType": "PluginProgramSiteNorthAngleResult"
7532
6546
  },
7533
- {
7534
- "path": "program.site.getTimezone",
7535
- "namespace": "program.site",
7536
- "summary": "Get the IANA timezone of the project's geographic location.",
7537
- "examplePrompts": [
7538
- "What timezone is this project in?",
7539
- "Get the site's IANA timezone",
7540
- "What's the local time zone at the project location?",
7541
- "Which timezone should I use for the sun study schedule?\n\n# Example\n```ts\nconst timezone = await snaptrude.program.site.getTimezone()\nif (timezone) console.log(`Project timezone: ${timezone}`)\n```"
7542
- ],
7543
- "argsType": null,
7544
- "resultType": "PluginProgramSiteTimezoneResult"
7545
- },
7546
- {
7547
- "path": "program.site.getWeather",
7548
- "namespace": "program.site",
7549
- "summary": "Get the weather file resolved for the project site.",
7550
- "examplePrompts": [
7551
- "Which weather file is my project using?",
7552
- "What EPW station was resolved for this site?",
7553
- "Get the weather file id for the daylight analysis\n\n# Example\n```ts\nconst weather = await snaptrude.program.site.getWeather()\nif (weather) console.log(weather.station, weather.selectionMethod)\n```"
7554
- ],
7555
- "argsType": null,
7556
- "resultType": "PluginProgramSiteWeatherResult"
7557
- },
7558
- {
7559
- "path": "program.site.listEdges",
7560
- "namespace": "program.site",
7561
- "summary": "List each site parcel's boundary edges with their front / side / rear classification — the same per-edge roles the buildable-envelope setback pills show on canvas, so a plugin can pick up the user's edge tagging without asking them to set it up again.",
7562
- "examplePrompts": [
7563
- "Which edge of my site is the front?",
7564
- "Read the front / side / rear edges of the plot",
7565
- "What setback applies to each site edge?",
7566
- "Get the site edges the way the setback pills show them\n\n# Example\n```ts\nconst { sites } = await snaptrude.program.site.listEdges()\nfor (const site of sites)\nfor (const e of site.edges)\nconsole.log(e.edgeIndex, e.role, e.roleSource, e.setbackMeters)\n```"
7567
- ],
7568
- "argsType": null,
7569
- "resultType": "PluginProgramSiteListEdgesResult"
7570
- },
7571
6547
  {
7572
6548
  "path": "program.site.listGeoPolygons",
7573
6549
  "namespace": "program.site",
@@ -7619,19 +6595,6 @@
7619
6595
  "argsType": "string",
7620
6596
  "resultType": "PluginProgramSpreadsheetAddConditionalFormattingResult"
7621
6597
  },
7622
- {
7623
- "path": "program.spreadsheet.addImage",
7624
- "namespace": "program.spreadsheet",
7625
- "summary": "Place a floating image on a workbook sheet from a base64 data URI.",
7626
- "examplePrompts": [
7627
- "Add my logo image to the report sheet",
7628
- "Place a PNG at cell B2 on the Takeoff sheet",
7629
- "Put an SVG diagram on a spreadsheet sheet",
7630
- "Insert an image into the workbook\n\n# Example\n```ts\nconst { name } = await snaptrude.program.spreadsheet.addImage(\n\"Report\",\n{ dataUri: \"data:image/png;base64,iVBORw0...\" },\n{ anchorCell: \"B2\", size: { width: 240, height: 120 }, name: \"logo\" },\n)\n```"
7631
- ],
7632
- "argsType": "string",
7633
- "resultType": "PluginProgramSpreadsheetAddImageResult"
7634
- },
7635
6598
  {
7636
6599
  "path": "program.spreadsheet.bindings.create",
7637
6600
  "namespace": "program.spreadsheet.bindings",
@@ -7681,31 +6644,6 @@
7681
6644
  "argsType": "string",
7682
6645
  "resultType": "PluginProgramSpreadsheetCreateSheetResult"
7683
6646
  },
7684
- {
7685
- "path": "program.spreadsheet.datasets.list",
7686
- "namespace": "program.spreadsheet.datasets",
7687
- "summary": "List the stored plugin datasets.",
7688
- "examplePrompts": [
7689
- "List my plugin datasets",
7690
- "What datasets are stored for the sheets?",
7691
- "Show the data sets bindings can use\n\n# Example\n```ts\nconst { datasets } = await snaptrude.program.spreadsheet.datasets.list()\n```"
7692
- ],
7693
- "argsType": null,
7694
- "resultType": "PluginProgramSpreadsheetDatasetsListResult"
7695
- },
7696
- {
7697
- "path": "program.spreadsheet.datasets.set",
7698
- "namespace": "program.spreadsheet.datasets",
7699
- "summary": "Store (upsert) a named plugin dataset.",
7700
- "examplePrompts": [
7701
- "Store my plugin's rows as a named dataset",
7702
- "Upload data the sheets can bind to and refresh",
7703
- "Save a dataset for a live sheet binding",
7704
- "Push my computed table so a binding keeps it fresh\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.datasets.set(\n\"costs\",\n[\n{ key: \"item\", header: \"Item\" },\n{ key: \"cost\", header: \"Cost\", align: \"right\" },\n],\n[{ item: \"Concrete\", cost: 120 }],\n)\n```"
7705
- ],
7706
- "argsType": "string",
7707
- "resultType": "PluginProgramSpreadsheetDatasetsSetResult"
7708
- },
7709
6647
  {
7710
6648
  "path": "program.spreadsheet.export",
7711
6649
  "namespace": "program.spreadsheet",
@@ -7974,127 +6912,5 @@
7974
6912
  ],
7975
6913
  "argsType": "PluginSpreadsheetTransactionOp[]",
7976
6914
  "resultType": "PluginProgramSpreadsheetTransactionResult"
7977
- },
7978
- {
7979
- "path": "workspace.closePresentMode",
7980
- "namespace": "workspace",
7981
- "summary": "Close Present mode and return to the modeling canvas.",
7982
- "examplePrompts": [
7983
- "Close present mode",
7984
- "Exit the presentation editor",
7985
- "Go back to the modeling canvas\n\n# Example\n```ts\nawait snaptrude.workspace.closePresentMode()\n```"
7986
- ],
7987
- "argsType": null,
7988
- "resultType": "void"
7989
- },
7990
- {
7991
- "path": "workspace.openPresentMode",
7992
- "namespace": "workspace",
7993
- "summary": "Open Present mode — the documentation editor the `presentation.*` namespaces operate on.",
7994
- "examplePrompts": [
7995
- "Open present mode",
7996
- "Switch to the presentation editor",
7997
- "Open the sheets so I can lay out views\n\n# Example\n```ts\nawait snaptrude.workspace.openPresentMode()\nconst { sheets } = await snaptrude.presentation.sheets.list()\n```"
7998
- ],
7999
- "argsType": null,
8000
- "resultType": "void"
8001
- },
8002
- {
8003
- "path": "workspace.projects.copy",
8004
- "namespace": "workspace.projects",
8005
- "summary": "Copy the **current** project into a new project — the dashboard's \"Save As\".",
8006
- "examplePrompts": [
8007
- "Save this project as a new copy called Tower Study v2",
8008
- "Duplicate the current project into the Acme team",
8009
- "Make a copy of this project so I can try changes\n\n# Example\n```ts\nconst { projectId } = await snaptrude.workspace.projects.copy(\"Tower Study v2\")\n```"
8010
- ],
8011
- "argsType": "string",
8012
- "resultType": "PluginWorkspaceProjectsCopyResult"
8013
- },
8014
- {
8015
- "path": "workspace.projects.create",
8016
- "namespace": "workspace.projects",
8017
- "summary": "Create a new, empty BIM project.",
8018
- "examplePrompts": [
8019
- "Create a new project called Tower Study",
8020
- "Start a new project in the Acme team",
8021
- "Make a fresh project using millimeters",
8022
- "Create an empty project for me to work in\n\n# Example\n```ts\nconst { projectId } = await snaptrude.workspace.projects.create(\"Tower Study\", {\nteamId: \"team_1\",\nunit: \"mm\",\n})\n```"
8023
- ],
8024
- "argsType": "string",
8025
- "resultType": "PluginWorkspaceProjectsCreateResult"
8026
- },
8027
- {
8028
- "path": "workspace.projects.get",
8029
- "namespace": "workspace.projects",
8030
- "summary": "Get a single project by id.",
8031
- "examplePrompts": [
8032
- "Get the project with this id",
8033
- "Look up a project by its floorkey",
8034
- "What is the name of this project?\n\n# Example\n```ts\nconst project = await snaptrude.workspace.projects.get(\"floorkey_123\")\nif (project) console.log(project.name)\n```"
8035
- ],
8036
- "argsType": "string",
8037
- "resultType": "PluginWorkspaceProjectsGetResult"
8038
- },
8039
- {
8040
- "path": "workspace.projects.list",
8041
- "namespace": "workspace.projects",
8042
- "summary": "List the projects the user can access.",
8043
- "examplePrompts": [
8044
- "List all my projects",
8045
- "Show the projects in the Acme team",
8046
- "How many projects do I have?",
8047
- "What projects can I open?\n\n# Example\n```ts\nconst { projects } = await snaptrude.workspace.projects.list({ teamId: \"team_1\" })\nfor (const p of projects) console.log(p.id, p.name)\n```"
8048
- ],
8049
- "argsType": "{ teamId?: string }",
8050
- "resultType": "PluginWorkspaceProjectsListResult"
8051
- },
8052
- {
8053
- "path": "workspace.projects.rename",
8054
- "namespace": "workspace.projects",
8055
- "summary": "Rename a project.",
8056
- "examplePrompts": [
8057
- "Rename this project to Tower Study Final",
8058
- "Change the name of project floorkey_123",
8059
- "Give this project a new name\n\n# Example\n```ts\nconst { projectId } = await snaptrude.workspace.projects.rename(\n\"floorkey_123\",\n\"Tower Study Final\",\n)\n```"
8060
- ],
8061
- "argsType": "string",
8062
- "resultType": "PluginWorkspaceProjectsRenameResult"
8063
- },
8064
- {
8065
- "path": "workspace.teams.get",
8066
- "namespace": "workspace.teams",
8067
- "summary": "Get a single team by id.",
8068
- "examplePrompts": [
8069
- "Get the team with id team_1",
8070
- "Look up a team by its id",
8071
- "What is the name of this team?\n\n# Example\n```ts\nconst team = await snaptrude.workspace.teams.get(\"team_1\")\nif (team) console.log(team.name)\n```"
8072
- ],
8073
- "argsType": "string",
8074
- "resultType": "PluginWorkspaceTeamsGetResult"
8075
- },
8076
- {
8077
- "path": "workspace.teams.list",
8078
- "namespace": "workspace.teams",
8079
- "summary": "List the teams the user belongs to.",
8080
- "examplePrompts": [
8081
- "List all my teams",
8082
- "Which teams am I a member of?",
8083
- "Show every team I can access\n\n# Example\n```ts\nconst { teams } = await snaptrude.workspace.teams.list()\nfor (const t of teams) console.log(t.id, t.name)\n```"
8084
- ],
8085
- "argsType": null,
8086
- "resultType": "PluginWorkspaceTeamsListResult"
8087
- },
8088
- {
8089
- "path": "workspace.teams.listMembers",
8090
- "namespace": "workspace.teams",
8091
- "summary": "List the members of a team.",
8092
- "examplePrompts": [
8093
- "List the members of the Acme team",
8094
- "Who is on team_1?",
8095
- "How many people are in this team?\n\n# Example\n```ts\nconst { members } = await snaptrude.workspace.teams.listMembers(\"team_1\")\nfor (const m of members) console.log(m.name, m.email)\n```"
8096
- ],
8097
- "argsType": "string",
8098
- "resultType": "PluginWorkspaceTeamsListMembersResult"
8099
6915
  }
8100
6916
  ]