@snaptrude/plugin-core 0.7.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/api-manifest.full.json +7703 -0
- package/api-manifest.json +2946 -259
- package/dist/api/analysis/daylight.d.ts +603 -0
- package/dist/api/analysis/daylight.d.ts.map +1 -0
- package/dist/api/analysis/heatmaps.d.ts +438 -14
- package/dist/api/analysis/heatmaps.d.ts.map +1 -1
- package/dist/api/analysis/index.d.ts +15 -0
- package/dist/api/analysis/index.d.ts.map +1 -1
- package/dist/api/analysis/solar.d.ts +249 -0
- package/dist/api/analysis/solar.d.ts.map +1 -0
- package/dist/api/analysis/weather.d.ts +193 -0
- package/dist/api/analysis/weather.d.ts.map +1 -0
- package/dist/api/core/camera/index.d.ts +245 -0
- package/dist/api/core/camera/index.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +105 -2
- package/dist/api/core/comment/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +331 -14
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/delete/index.d.ts +8 -2
- package/dist/api/core/geom/delete/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/arc.d.ts +5 -5
- package/dist/api/core/geom/query/brep.d.ts +18 -18
- package/dist/api/core/geom/query/circle.d.ts +18 -18
- package/dist/api/core/geom/query/contour.d.ts +20 -20
- package/dist/api/core/geom/query/curve.d.ts +49 -49
- package/dist/api/core/geom/query/edge.d.ts +5 -5
- package/dist/api/core/geom/query/face.d.ts +16 -16
- package/dist/api/core/geom/query/halfedge.d.ts +8 -8
- package/dist/api/core/geom/query/profile.d.ts +19 -19
- package/dist/api/core/geom/query/vertex.d.ts +8 -8
- package/dist/api/core/geom/update/contour.d.ts +14 -14
- package/dist/api/core/geom/update/curve.d.ts +7 -7
- package/dist/api/core/geom/update/profile.d.ts +16 -16
- package/dist/api/core/handles/index.d.ts +210 -0
- package/dist/api/core/handles/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +24 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/export/index.d.ts +134 -0
- package/dist/api/core/io/export/index.d.ts.map +1 -0
- package/dist/api/core/io/import/index.d.ts +62 -1
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/io/index.d.ts +5 -0
- package/dist/api/core/io/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +7 -7
- package/dist/api/core/mode/index.d.ts +99 -0
- package/dist/api/core/mode/index.d.ts.map +1 -0
- package/dist/api/core/proposals/index.d.ts +65 -9
- package/dist/api/core/proposals/index.d.ts.map +1 -1
- package/dist/api/core/storeys/index.d.ts +251 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +24 -0
- package/dist/api/core/tags.d.ts.map +1 -1
- package/dist/api/core/user.d.ts +44 -0
- package/dist/api/core/user.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +4 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/boolean/index.d.ts +4 -4
- package/dist/api/design/create/index.d.ts +253 -47
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +3 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +36 -0
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/edit/index.d.ts +1 -1
- package/dist/api/design/erase/index.d.ts +2 -2
- package/dist/api/design/furniture/index.d.ts +114 -3
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +10 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/materials/index.d.ts +111 -14
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +112 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +35 -1
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/referenceLines.d.ts +45 -0
- package/dist/api/design/query/referenceLines.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +178 -5
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- package/dist/api/design/transform/index.d.ts +95 -14
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/types/index.d.ts +181 -0
- package/dist/api/design/types/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +385 -2
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/visibility.d.ts +98 -0
- package/dist/api/design/visibility.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +4 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +10 -2
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +19 -19
- package/dist/api/entity/story.d.ts +148 -15
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/annotate.d.ts +448 -0
- package/dist/api/presentation/annotate.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +49 -8
- package/dist/api/presentation/diagrams.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +108 -0
- package/dist/api/presentation/export.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +6 -0
- package/dist/api/presentation/import.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +47 -0
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +370 -0
- package/dist/api/presentation/placedViews.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +481 -0
- package/dist/api/presentation/shapes.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +410 -13
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +165 -10
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/program/areas.d.ts +63 -3
- package/dist/api/program/areas.d.ts.map +1 -1
- package/dist/api/program/cores.d.ts +3 -99
- package/dist/api/program/cores.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +2 -2
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/layout.d.ts +172 -12
- package/dist/api/program/layout.d.ts.map +1 -1
- package/dist/api/program/site.d.ts +105 -8
- package/dist/api/program/site.d.ts.map +1 -1
- package/dist/api/program/spreadsheet.d.ts +365 -41
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +460 -0
- package/dist/api/workspace/index.d.ts.map +1 -0
- package/dist/handles.d.ts +64 -25
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +3210 -1671
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3008 -1666
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/scripts/generate-manifest.mjs +45 -0
- package/src/api/analysis/daylight.ts +470 -0
- package/src/api/analysis/heatmaps.ts +444 -17
- package/src/api/analysis/index.ts +15 -0
- package/src/api/analysis/solar.ts +237 -0
- package/src/api/analysis/weather.ts +179 -0
- package/src/api/core/camera/index.ts +251 -0
- package/src/api/core/comment/index.ts +120 -2
- package/src/api/core/geom/create/index.ts +344 -1
- package/src/api/core/geom/delete/index.ts +6 -0
- package/src/api/core/handles/index.ts +233 -0
- package/src/api/core/index.ts +24 -0
- package/src/api/core/io/export/index.ts +126 -0
- package/src/api/core/io/import/index.ts +64 -0
- package/src/api/core/io/index.ts +5 -0
- package/src/api/core/mode/index.ts +96 -0
- package/src/api/core/proposals/index.ts +71 -11
- package/src/api/core/storeys/index.ts +279 -0
- package/src/api/core/tags.ts +27 -0
- package/src/api/core/user.ts +46 -0
- package/src/api/core/zoom/index.ts +4 -0
- package/src/api/design/create/index.ts +303 -36
- package/src/api/design/delete/index.ts +3 -0
- package/src/api/design/doors/index.ts +40 -0
- package/src/api/design/furniture/index.ts +127 -3
- package/src/api/design/index.ts +10 -0
- package/src/api/design/materials/index.ts +157 -30
- package/src/api/design/query/geometry/index.ts +125 -3
- package/src/api/design/query/index.ts +37 -7
- package/src/api/design/query/referenceLines.ts +52 -0
- package/src/api/design/query/spaces.ts +143 -0
- package/src/api/design/transform/index.ts +101 -12
- package/src/api/design/types/index.ts +156 -0
- package/src/api/design/update/index.ts +467 -6
- package/src/api/design/visibility.ts +109 -0
- package/src/api/entity/buildableEnvelope.ts +4 -0
- package/src/api/entity/referenceLine.ts +8 -0
- package/src/api/entity/story.ts +161 -15
- package/src/api/index.ts +5 -0
- package/src/api/presentation/annotate.ts +360 -0
- package/src/api/presentation/diagrams.ts +53 -8
- package/src/api/presentation/export.ts +108 -0
- package/src/api/presentation/import.ts +6 -0
- package/src/api/presentation/index.ts +55 -0
- package/src/api/presentation/placedViews.ts +363 -0
- package/src/api/presentation/shapes.ts +274 -0
- package/src/api/presentation/sheets.ts +346 -13
- package/src/api/presentation/views.ts +164 -12
- package/src/api/program/areas.ts +57 -6
- package/src/api/program/cores.ts +3 -91
- package/src/api/program/index.ts +2 -2
- package/src/api/program/layout.ts +182 -12
- package/src/api/program/site.ts +106 -8
- package/src/api/program/spreadsheet.ts +376 -35
- package/src/api/workspace/index.ts +516 -0
- package/src/handles.ts +77 -13
- package/tsconfig.json +7 -2
package/api-manifest.json
CHANGED
|
@@ -1,4 +1,380 @@
|
|
|
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
|
+
{
|
|
29
|
+
"path": "analysis.heatmaps.isActive",
|
|
30
|
+
"namespace": "analysis.heatmaps",
|
|
31
|
+
"summary": "Is a plugin heatmap currently showing?",
|
|
32
|
+
"examplePrompts": [
|
|
33
|
+
"Is my heatmap still showing?",
|
|
34
|
+
"Check whether the custom heatmap is active",
|
|
35
|
+
"Do I need to re-render the wind overlay?\n\n# Example\n```ts\nif (!(await snaptrude.analysis.heatmaps.isActive())) {\nawait snaptrude.analysis.heatmaps.renderGrid(cells, 2)\n}\n```"
|
|
36
|
+
],
|
|
37
|
+
"argsType": null,
|
|
38
|
+
"resultType": "boolean"
|
|
39
|
+
},
|
|
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
|
+
{
|
|
114
|
+
"path": "analysis.heatmaps.renderGrid",
|
|
115
|
+
"namespace": "analysis.heatmaps",
|
|
116
|
+
"summary": "Render a grid heatmap — a coloured mesh from point samples.",
|
|
117
|
+
"examplePrompts": [
|
|
118
|
+
"Overlay my CFD wind simulation results on the site",
|
|
119
|
+
"Render a noise-level grid around the building",
|
|
120
|
+
"Show these sampled microclimate values as a colored grid\n\n# Example\n```ts\n// World coordinates are y-up: a ground-level field varies in x/z at y = 0.\nawait snaptrude.analysis.heatmaps.renderGrid(\nsamples.map((s) => ({ position: { x: s.x, y: 0, z: s.z }, value: s.windSpeed })),\n2, // 2-unit square cells\n{ title: \"Wind speed\", unit: \"m/s\", colors: [\"#0000ff\", \"#00ff00\", \"#ff0000\"] },\n)\n```"
|
|
121
|
+
],
|
|
122
|
+
"argsType": "PluginAnalysisHeatmapGridCell[]",
|
|
123
|
+
"resultType": "PluginAnalysisHeatmapsRenderResult"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"path": "analysis.heatmaps.renderSpaces",
|
|
127
|
+
"namespace": "analysis.heatmaps",
|
|
128
|
+
"summary": "Render a per-space heatmap — one flat colour per space's top face.",
|
|
129
|
+
"examplePrompts": [
|
|
130
|
+
"Color each room by its occupancy count",
|
|
131
|
+
"Show my energy simulation results as a heatmap per space",
|
|
132
|
+
"Paint the rooms red to blue by temperature\n\n# Example\n```ts\nconst spaces = await snaptrude.design.query.listSpaces()\nawait snaptrude.analysis.heatmaps.renderSpaces(\nspaces.map((space) => ({ space, value: occupancy[space] ?? 0 })),\n{ title: \"Occupancy\", unit: \"people\", min: 0, max: 50 },\n)\n```"
|
|
133
|
+
],
|
|
134
|
+
"argsType": "PluginAnalysisHeatmapSpaceEntry[]",
|
|
135
|
+
"resultType": "PluginAnalysisHeatmapsRenderResult"
|
|
136
|
+
},
|
|
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
|
+
{
|
|
151
|
+
"path": "analysis.heatmaps.reset",
|
|
152
|
+
"namespace": "analysis.heatmaps",
|
|
153
|
+
"summary": "Clear every plugin heatmap overlay from the scene.",
|
|
154
|
+
"examplePrompts": [
|
|
155
|
+
"Clear my custom heatmap",
|
|
156
|
+
"Remove the wind overlay from the model",
|
|
157
|
+
"Reset the plugin heatmap view\n\n# Example\n```ts\nawait snaptrude.analysis.heatmaps.reset()\n```"
|
|
158
|
+
],
|
|
159
|
+
"argsType": null,
|
|
160
|
+
"resultType": "boolean"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"path": "analysis.illuminance.cancel",
|
|
164
|
+
"namespace": "analysis.illuminance",
|
|
165
|
+
"summary": "Cancel the in-flight illuminance run.",
|
|
166
|
+
"examplePrompts": [
|
|
167
|
+
"Cancel the illuminance analysis",
|
|
168
|
+
"Stop the running daylight computation",
|
|
169
|
+
"Abort the lux study\n\n# Example\n```ts\nawait snaptrude.analysis.illuminance.cancel()\n```"
|
|
170
|
+
],
|
|
171
|
+
"argsType": null,
|
|
172
|
+
"resultType": "boolean"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"path": "analysis.illuminance.compute",
|
|
176
|
+
"namespace": "analysis.illuminance",
|
|
177
|
+
"summary": "Start a daylight-illuminance run for a date range.",
|
|
178
|
+
"examplePrompts": [
|
|
179
|
+
"Run a daylight illuminance analysis for December",
|
|
180
|
+
"Compute the lux levels inside the building for winter",
|
|
181
|
+
"How much daylight do the interior floors get?\n\n# Example\n```ts\nconst { success } = await snaptrude.analysis.illuminance.compute(\n\"2026-12-01\",\n\"2026-12-31\",\n)\n// poll until the heatmap is rendered\nlet job = await snaptrude.analysis.illuminance.get()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.analysis.illuminance.get()\n}\n```"
|
|
182
|
+
],
|
|
183
|
+
"argsType": "string",
|
|
184
|
+
"resultType": "PluginAnalysisComputeResult"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"path": "analysis.illuminance.get",
|
|
188
|
+
"namespace": "analysis.illuminance",
|
|
189
|
+
"summary": "Get the state of the illuminance study.",
|
|
190
|
+
"examplePrompts": [
|
|
191
|
+
"Is the illuminance analysis done?",
|
|
192
|
+
"Check the status of the daylight lux run",
|
|
193
|
+
"What date range was the illuminance heatmap computed for?\n\n# Example\n```ts\nconst job = await snaptrude.analysis.illuminance.get()\nif (job?.status === \"active\") console.log(job.startDate, job.endDate)\n```"
|
|
194
|
+
],
|
|
195
|
+
"argsType": null,
|
|
196
|
+
"resultType": "PluginAnalysisJobStateResult"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"path": "analysis.illuminance.reset",
|
|
200
|
+
"namespace": "analysis.illuminance",
|
|
201
|
+
"summary": "Clear the illuminance heatmap from the scene.",
|
|
202
|
+
"examplePrompts": [
|
|
203
|
+
"Clear the illuminance heatmap",
|
|
204
|
+
"Remove the daylight lux colours from the model",
|
|
205
|
+
"Reset the illuminance analysis view\n\n# Example\n```ts\nawait snaptrude.analysis.illuminance.reset()\n```"
|
|
206
|
+
],
|
|
207
|
+
"argsType": null,
|
|
208
|
+
"resultType": "boolean"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"path": "analysis.shadows.disable",
|
|
212
|
+
"namespace": "analysis.shadows",
|
|
213
|
+
"summary": "Turn real-time sun shadows OFF.",
|
|
214
|
+
"examplePrompts": [
|
|
215
|
+
"Turn off shadows",
|
|
216
|
+
"Hide the sun shadows",
|
|
217
|
+
"Disable shadow rendering in the scene\n\n# Example\n```ts\nawait snaptrude.analysis.shadows.disable()\n```"
|
|
218
|
+
],
|
|
219
|
+
"argsType": null,
|
|
220
|
+
"resultType": "boolean"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"path": "analysis.shadows.enable",
|
|
224
|
+
"namespace": "analysis.shadows",
|
|
225
|
+
"summary": "Turn real-time sun shadows ON, optionally at a specific date and time.",
|
|
226
|
+
"examplePrompts": [
|
|
227
|
+
"Turn on shadows",
|
|
228
|
+
"Show the shadows at 3pm on June 21st",
|
|
229
|
+
"Enable sun shadows for the summer solstice afternoon\n\n# Example\n```ts\nawait snaptrude.analysis.shadows.enable({ dateTime: \"2026-06-21T15:00\" })\n```"
|
|
230
|
+
],
|
|
231
|
+
"argsType": "PluginAnalysisShadowsEnableOptions",
|
|
232
|
+
"resultType": "boolean"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"path": "analysis.shadows.getDateTime",
|
|
236
|
+
"namespace": "analysis.shadows",
|
|
237
|
+
"summary": "Get the sun's current date and time.",
|
|
238
|
+
"examplePrompts": [
|
|
239
|
+
"What date and time are the shadows set to?",
|
|
240
|
+
"Get the current sun position date",
|
|
241
|
+
"Which time of day is the shadow study showing?\n\n# Example\n```ts\nconst dateTime = await snaptrude.analysis.shadows.getDateTime()\n```"
|
|
242
|
+
],
|
|
243
|
+
"argsType": null,
|
|
244
|
+
"resultType": "PluginAnalysisShadowsDateTimeResult"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"path": "analysis.shadows.isEnabled",
|
|
248
|
+
"namespace": "analysis.shadows",
|
|
249
|
+
"summary": "Whether real-time sun shadows are currently enabled.",
|
|
250
|
+
"examplePrompts": [
|
|
251
|
+
"Are shadows on?",
|
|
252
|
+
"Check whether sun shadows are enabled",
|
|
253
|
+
"Is the scene showing shadows right now?\n\n# Example\n```ts\nconst on = await snaptrude.analysis.shadows.isEnabled()\n```"
|
|
254
|
+
],
|
|
255
|
+
"argsType": null,
|
|
256
|
+
"resultType": "boolean"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"path": "analysis.shadows.setDateTime",
|
|
260
|
+
"namespace": "analysis.shadows",
|
|
261
|
+
"summary": "Move the sun to a specific date and time.",
|
|
262
|
+
"examplePrompts": [
|
|
263
|
+
"Set the shadow time to 9:30 am on the winter solstice",
|
|
264
|
+
"Move the sun to noon on March 1st",
|
|
265
|
+
"Change the shadow study date to December 21\n\n# Example\n```ts\nconst applied = await snaptrude.analysis.shadows.setDateTime(\"2026-12-21T09:30\")\nconsole.log(applied) // \"2026-12-21T09:30\" (snapped to the half-hour grid)\n```"
|
|
266
|
+
],
|
|
267
|
+
"argsType": "string",
|
|
268
|
+
"resultType": "PluginAnalysisShadowsDateTimeResult"
|
|
269
|
+
},
|
|
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
|
+
{
|
|
283
|
+
"path": "analysis.sunlightHours.cancel",
|
|
284
|
+
"namespace": "analysis.sunlightHours",
|
|
285
|
+
"summary": "Cancel the in-flight sunlight-hours run.",
|
|
286
|
+
"examplePrompts": [
|
|
287
|
+
"Cancel the sunlight analysis",
|
|
288
|
+
"Stop the running sunlight hours computation",
|
|
289
|
+
"Abort the sun study\n\n# Example\n```ts\nawait snaptrude.analysis.sunlightHours.cancel()\n```"
|
|
290
|
+
],
|
|
291
|
+
"argsType": null,
|
|
292
|
+
"resultType": "boolean"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"path": "analysis.sunlightHours.compute",
|
|
296
|
+
"namespace": "analysis.sunlightHours",
|
|
297
|
+
"summary": "Start a direct-sunlight-hours run for a date range.",
|
|
298
|
+
"examplePrompts": [
|
|
299
|
+
"Run a sunlight hours analysis for June",
|
|
300
|
+
"Compute direct sunlight hours between March and September",
|
|
301
|
+
"How much sun does my building get over the summer?\n\n# Example\n```ts\nconst { success } = await snaptrude.analysis.sunlightHours.compute(\n\"2026-06-01\",\n\"2026-06-30\",\n)\n// poll until the heatmap is rendered\nlet job = await snaptrude.analysis.sunlightHours.get()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.analysis.sunlightHours.get()\n}\n```"
|
|
302
|
+
],
|
|
303
|
+
"argsType": "string",
|
|
304
|
+
"resultType": "PluginAnalysisComputeResult"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"path": "analysis.sunlightHours.get",
|
|
308
|
+
"namespace": "analysis.sunlightHours",
|
|
309
|
+
"summary": "Get the state of the sunlight-hours study.",
|
|
310
|
+
"examplePrompts": [
|
|
311
|
+
"Is the sunlight analysis done?",
|
|
312
|
+
"Check the status of the sunlight hours run",
|
|
313
|
+
"What date range was the sunlight heatmap computed for?\n\n# Example\n```ts\nconst job = await snaptrude.analysis.sunlightHours.get()\nif (job?.status === \"active\") console.log(job.startDate, job.endDate)\n```"
|
|
314
|
+
],
|
|
315
|
+
"argsType": null,
|
|
316
|
+
"resultType": "PluginAnalysisJobStateResult"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"path": "analysis.sunlightHours.reset",
|
|
320
|
+
"namespace": "analysis.sunlightHours",
|
|
321
|
+
"summary": "Clear the sunlight-hours heatmap from the scene.",
|
|
322
|
+
"examplePrompts": [
|
|
323
|
+
"Clear the sunlight heatmap",
|
|
324
|
+
"Remove the sun hours colours from the model",
|
|
325
|
+
"Reset the sunlight analysis view\n\n# Example\n```ts\nawait snaptrude.analysis.sunlightHours.reset()\n```"
|
|
326
|
+
],
|
|
327
|
+
"argsType": null,
|
|
328
|
+
"resultType": "boolean"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"path": "analysis.sunpath.disable",
|
|
332
|
+
"namespace": "analysis.sunpath",
|
|
333
|
+
"summary": "Turn the sun-path diagram overlay OFF.",
|
|
334
|
+
"examplePrompts": [
|
|
335
|
+
"Hide the sun path diagram",
|
|
336
|
+
"Turn off the sunpath overlay",
|
|
337
|
+
"Remove the sun trajectory arcs from the scene\n\n# Example\n```ts\nawait snaptrude.analysis.sunpath.disable()\n```"
|
|
338
|
+
],
|
|
339
|
+
"argsType": null,
|
|
340
|
+
"resultType": "boolean"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"path": "analysis.sunpath.enable",
|
|
344
|
+
"namespace": "analysis.sunpath",
|
|
345
|
+
"summary": "Turn the sun-path diagram overlay ON.",
|
|
346
|
+
"examplePrompts": [
|
|
347
|
+
"Show the sun path diagram",
|
|
348
|
+
"Turn on the sunpath overlay",
|
|
349
|
+
"Visualize the sun's trajectory over my building\n\n# Example\n```ts\nawait snaptrude.analysis.sunpath.enable()\nconst active = await snaptrude.analysis.sunpath.isActive() // true\n```"
|
|
350
|
+
],
|
|
351
|
+
"argsType": null,
|
|
352
|
+
"resultType": "boolean"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"path": "analysis.sunpath.isActive",
|
|
356
|
+
"namespace": "analysis.sunpath",
|
|
357
|
+
"summary": "Whether the sun-path diagram overlay is currently active.",
|
|
358
|
+
"examplePrompts": [
|
|
359
|
+
"Is the sun path diagram on?",
|
|
360
|
+
"Check whether the sunpath overlay is active",
|
|
361
|
+
"Am I looking at the sun trajectory right now?\n\n# Example\n```ts\nif (!(await snaptrude.analysis.sunpath.isActive())) {\nawait snaptrude.analysis.sunpath.enable()\n}\n```"
|
|
362
|
+
],
|
|
363
|
+
"argsType": null,
|
|
364
|
+
"resultType": "boolean"
|
|
365
|
+
},
|
|
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
|
+
},
|
|
2
378
|
{
|
|
3
379
|
"path": "core.buildings.copy",
|
|
4
380
|
"namespace": "core.buildings",
|
|
@@ -107,6 +483,97 @@
|
|
|
107
483
|
"argsType": "string",
|
|
108
484
|
"resultType": "PluginCoreBuildingsUpdateResult"
|
|
109
485
|
},
|
|
486
|
+
{
|
|
487
|
+
"path": "core.camera.getProjection",
|
|
488
|
+
"namespace": "core.camera",
|
|
489
|
+
"summary": "Read the camera's current projection: `\"perspective\"` (the default 3D view) or `\"orthographic\"`. In 2D (plan) mode this always reports `\"orthographic\"` — a plan is an orthographic projection.",
|
|
490
|
+
"examplePrompts": [
|
|
491
|
+
"Is the camera in perspective or orthographic?",
|
|
492
|
+
"What projection is the 3D view using?",
|
|
493
|
+
"Check whether perspective is on\n\n# Example\n```ts\nconst projection = await snaptrude.core.camera.getProjection()\nconsole.log(projection) // \"perspective\" | \"orthographic\"\n```"
|
|
494
|
+
],
|
|
495
|
+
"argsType": null,
|
|
496
|
+
"resultType": "PluginCameraProjection"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"path": "core.camera.lookFrom",
|
|
500
|
+
"namespace": "core.camera",
|
|
501
|
+
"summary": "Point the camera: place its eye at `eye` looking toward `target` (world coordinates, internal `babylon` units). View-state only — not undoable.",
|
|
502
|
+
"examplePrompts": [
|
|
503
|
+
"Look at the model from above the north-east corner",
|
|
504
|
+
"Position the camera at (50, 30, 50) looking at the origin",
|
|
505
|
+
"Point the camera at the centre of the building from the side",
|
|
506
|
+
"Set the eye to this point and aim it at that point\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\nawait snaptrude.core.camera.lookFrom(vec3.new(50, 30, 50), vec3.new(0, 0, 0))\n```"
|
|
507
|
+
],
|
|
508
|
+
"argsType": "Vec3Handle",
|
|
509
|
+
"resultType": "boolean"
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"path": "core.camera.setMode",
|
|
513
|
+
"namespace": "core.camera",
|
|
514
|
+
"summary": "Toggle the modelling mode between `2d` (plan) and `3d`. Mirrors the canvas 2D/3D toggle: `3d` enters the isometric perspective view, `2d` drops to the orthographic plan of the active storey. View-state only — not undoable.",
|
|
515
|
+
"examplePrompts": [
|
|
516
|
+
"Switch to 3D view",
|
|
517
|
+
"Drop into 2D plan mode",
|
|
518
|
+
"Go back to 3D",
|
|
519
|
+
"Show the floor plan in 2D\n\n# Example\n```ts\nawait snaptrude.core.camera.setMode(\"3d\")\n```"
|
|
520
|
+
],
|
|
521
|
+
"argsType": "PluginCameraMode",
|
|
522
|
+
"resultType": "boolean"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"path": "core.camera.setProjection",
|
|
526
|
+
"namespace": "core.camera",
|
|
527
|
+
"summary": "Switch the 3D camera between `\"perspective\"` and `\"orthographic\"` projection — the Perspective/Orthographic control in the Design tab's View Settings panel. Like {@linkcode PluginCameraApi.setMode}, this is a transient view-state change: not write-gated, not undoable.",
|
|
528
|
+
"examplePrompts": [
|
|
529
|
+
"Switch the camera to orthographic",
|
|
530
|
+
"Turn perspective off",
|
|
531
|
+
"Give me a perspective view of the model",
|
|
532
|
+
"Make the 3D view orthographic like an axonometric drawing\n\n# Example\n```ts\nawait snaptrude.core.camera.setProjection(\"orthographic\")\nconst projection = await snaptrude.core.camera.getProjection() // \"orthographic\"\n```"
|
|
533
|
+
],
|
|
534
|
+
"argsType": "PluginCameraProjection",
|
|
535
|
+
"resultType": "boolean"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"path": "core.camera.setStandardView",
|
|
539
|
+
"namespace": "core.camera",
|
|
540
|
+
"summary": "Snap the camera to a standard view — the five orthographic elevations (`top` / `front` / `back` / `left` / `right`) or the 3D `iso` (isometric perspective) view. Mirrors the canvas view menu. View-state only — not undoable. The orthographic presets exit 2D mode first if needed.",
|
|
541
|
+
"examplePrompts": [
|
|
542
|
+
"Switch to the top view",
|
|
543
|
+
"Show me the front elevation",
|
|
544
|
+
"Go to the isometric view",
|
|
545
|
+
"Look at the model from the left",
|
|
546
|
+
"Give me a plan view from the top\n\n# Example\n```ts\nawait snaptrude.core.camera.setStandardView(\"top\")\n```"
|
|
547
|
+
],
|
|
548
|
+
"argsType": "PluginStandardView",
|
|
549
|
+
"resultType": "boolean"
|
|
550
|
+
},
|
|
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
|
+
},
|
|
110
577
|
{
|
|
111
578
|
"path": "core.comment.create",
|
|
112
579
|
"namespace": "core.comment",
|
|
@@ -133,6 +600,19 @@
|
|
|
133
600
|
"argsType": "CommentHandle",
|
|
134
601
|
"resultType": "boolean"
|
|
135
602
|
},
|
|
603
|
+
{
|
|
604
|
+
"path": "core.comment.get",
|
|
605
|
+
"namespace": "core.comment",
|
|
606
|
+
"summary": "Read a comment's full detail — its text, author, pin location, resolved state, and reply thread. Comments are otherwise write-only; this is the read side. Pass a top-level comment handle or a reply handle (a reply has an empty `thread`). Returns `null` if the handle doesn't match a live comment.",
|
|
607
|
+
"examplePrompts": [
|
|
608
|
+
"Read the comment on this wall and tell me what it says",
|
|
609
|
+
"Who left this comment and where is it pinned?",
|
|
610
|
+
"Show me the full thread for this comment",
|
|
611
|
+
"Get the text and author of the selected comment\n\n# Example\n```ts\nconst [first] = await snaptrude.core.comment.list()\nconst details = await snaptrude.core.comment.get(first)\nconsole.log(details?.content, \"by\", details?.author?.name)\nconsole.log(`${details?.thread.length ?? 0} replies`)\n```"
|
|
612
|
+
],
|
|
613
|
+
"argsType": "CommentHandle",
|
|
614
|
+
"resultType": "PluginCommentDetails | null"
|
|
615
|
+
},
|
|
136
616
|
{
|
|
137
617
|
"path": "core.comment.isResolved",
|
|
138
618
|
"namespace": "core.comment",
|
|
@@ -172,6 +652,19 @@
|
|
|
172
652
|
"argsType": "CommentHandle",
|
|
173
653
|
"resultType": "boolean"
|
|
174
654
|
},
|
|
655
|
+
{
|
|
656
|
+
"path": "core.comment.reply",
|
|
657
|
+
"namespace": "core.comment",
|
|
658
|
+
"summary": "Reply to a comment — posts a new comment threaded under `comment` (which must be a top-level comment, not itself a reply). Notifies the thread's participants, mirroring the sidebar Reply action.",
|
|
659
|
+
"examplePrompts": [
|
|
660
|
+
"Reply to this comment saying I fixed the wall height",
|
|
661
|
+
"Add a reply to the review note confirming it's done",
|
|
662
|
+
"Respond to the comment about the door with \"looks good now\"",
|
|
663
|
+
"Post a follow-up on the selected comment thread\n\n# Example\n```ts\nconst [thread] = await snaptrude.core.comment.list()\nconst reply = await snaptrude.core.comment.reply(thread, \"Fixed 👍\")\n```"
|
|
664
|
+
],
|
|
665
|
+
"argsType": "CommentHandle",
|
|
666
|
+
"resultType": "CommentHandle"
|
|
667
|
+
},
|
|
175
668
|
{
|
|
176
669
|
"path": "core.comment.resolve",
|
|
177
670
|
"namespace": "core.comment",
|
|
@@ -223,63 +716,147 @@
|
|
|
223
716
|
"resultType": "ArcHandle"
|
|
224
717
|
},
|
|
225
718
|
{
|
|
226
|
-
"path": "core.geom.create.
|
|
719
|
+
"path": "core.geom.create.brepFromExtrusion",
|
|
227
720
|
"namespace": "core.geom.create",
|
|
228
|
-
"summary": "Create a
|
|
721
|
+
"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).",
|
|
229
722
|
"examplePrompts": [
|
|
230
|
-
"
|
|
231
|
-
"
|
|
723
|
+
"Extrude this profile 3 metres up",
|
|
724
|
+
"Make a solid by extruding this outline",
|
|
725
|
+
"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```"
|
|
232
726
|
],
|
|
233
|
-
"argsType": "
|
|
234
|
-
"resultType": "
|
|
727
|
+
"argsType": "ContourHandle",
|
|
728
|
+
"resultType": "BrepHandle"
|
|
235
729
|
},
|
|
236
730
|
{
|
|
237
|
-
"path": "core.geom.create.
|
|
731
|
+
"path": "core.geom.create.brepFromFaces",
|
|
238
732
|
"namespace": "core.geom.create",
|
|
239
|
-
"summary": "Create a
|
|
240
|
-
"examplePrompts": [
|
|
241
|
-
|
|
242
|
-
|
|
733
|
+
"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.",
|
|
734
|
+
"examplePrompts": [
|
|
735
|
+
"Create a brep from faces",
|
|
736
|
+
"Build a custom solid from a set of faces",
|
|
737
|
+
"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```"
|
|
738
|
+
],
|
|
739
|
+
"argsType": "Vec3Components[][]",
|
|
740
|
+
"resultType": "BrepHandle"
|
|
243
741
|
},
|
|
244
742
|
{
|
|
245
|
-
"path": "core.geom.create.
|
|
743
|
+
"path": "core.geom.create.brepFromIntersection",
|
|
246
744
|
"namespace": "core.geom.create",
|
|
247
|
-
"summary": "Create a
|
|
745
|
+
"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.",
|
|
248
746
|
"examplePrompts": [
|
|
249
|
-
"
|
|
250
|
-
"
|
|
747
|
+
"Keep only the overlap of these two solids",
|
|
748
|
+
"Intersect these two masses",
|
|
749
|
+
"Clip the tower to the zoning envelope\n\n# Example\n```ts\nconst overlap = await snaptrude.core.geom.create.brepFromIntersection(towerBrep, envelopeBrep)\n```"
|
|
251
750
|
],
|
|
252
|
-
"argsType": "
|
|
253
|
-
"resultType": "
|
|
751
|
+
"argsType": "BrepHandle",
|
|
752
|
+
"resultType": "BrepHandle"
|
|
254
753
|
},
|
|
255
754
|
{
|
|
256
|
-
"path": "core.geom.create.
|
|
755
|
+
"path": "core.geom.create.brepFromLoft",
|
|
257
756
|
"namespace": "core.geom.create",
|
|
258
|
-
"summary": "Create a
|
|
757
|
+
"summary": "Create a closed solid **B-rep** by lofting between a bottom and a top contour. Host API call — returns a {@linkcode BrepHandle}. Both contours must have the same number of edges (and matching hole counts); side faces connect corresponding edges by authored index. Corresponding edges must stay coplanar — a twisted loft would produce non-planar side faces and is rejected. The contours are copied — the input handles are never mutated.",
|
|
259
758
|
"examplePrompts": [
|
|
260
|
-
"
|
|
261
|
-
"
|
|
759
|
+
"Make a tapered tower from these two outlines",
|
|
760
|
+
"Loft between a large base and a smaller top",
|
|
761
|
+
"Create a frustum from two squares\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```"
|
|
262
762
|
],
|
|
263
|
-
"argsType": "
|
|
264
|
-
"resultType": "
|
|
763
|
+
"argsType": "ContourHandle",
|
|
764
|
+
"resultType": "BrepHandle"
|
|
265
765
|
},
|
|
266
766
|
{
|
|
267
|
-
"path": "core.geom.create.
|
|
767
|
+
"path": "core.geom.create.brepFromMesh",
|
|
268
768
|
"namespace": "core.geom.create",
|
|
269
|
-
"summary": "Create a
|
|
769
|
+
"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.",
|
|
270
770
|
"examplePrompts": [
|
|
271
|
-
"
|
|
771
|
+
"Create a brep from mesh vertices and indices",
|
|
772
|
+
"Turn this indexed mesh into a solid",
|
|
773
|
+
"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```"
|
|
272
774
|
],
|
|
273
|
-
"argsType": "
|
|
274
|
-
"resultType": "
|
|
775
|
+
"argsType": "Vec3Components[]",
|
|
776
|
+
"resultType": "BrepHandle"
|
|
275
777
|
},
|
|
276
778
|
{
|
|
277
|
-
"path": "core.geom.create.
|
|
779
|
+
"path": "core.geom.create.brepFromSubtraction",
|
|
278
780
|
"namespace": "core.geom.create",
|
|
279
|
-
"summary": "Create a closed
|
|
781
|
+
"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.",
|
|
280
782
|
"examplePrompts": [
|
|
281
|
-
"
|
|
282
|
-
"
|
|
783
|
+
"Subtract the courtyard from the building mass",
|
|
784
|
+
"Cut this solid out of that one",
|
|
785
|
+
"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```"
|
|
786
|
+
],
|
|
787
|
+
"argsType": "BrepHandle",
|
|
788
|
+
"resultType": "BrepHandle"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
"path": "core.geom.create.brepFromUnion",
|
|
792
|
+
"namespace": "core.geom.create",
|
|
793
|
+
"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.",
|
|
794
|
+
"examplePrompts": [
|
|
795
|
+
"Union these two solids",
|
|
796
|
+
"Merge these breps into one mass",
|
|
797
|
+
"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```"
|
|
798
|
+
],
|
|
799
|
+
"argsType": "BrepHandle",
|
|
800
|
+
"resultType": "BrepHandle"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"path": "core.geom.create.circle",
|
|
804
|
+
"namespace": "core.geom.create",
|
|
805
|
+
"summary": "Create a circle from a centre point, an axis (plane normal), and a radius. Host API call — returns a handle. A circle is a closed curve; read it back via `snaptrude.core.geom.query.circle.*`.",
|
|
806
|
+
"examplePrompts": [
|
|
807
|
+
"Make a circle of radius 2 at this point",
|
|
808
|
+
"Draw a circular outline 5m across"
|
|
809
|
+
],
|
|
810
|
+
"argsType": "Vec3Handle",
|
|
811
|
+
"resultType": "CircleHandle"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"path": "core.geom.create.contourFromProfile",
|
|
815
|
+
"namespace": "core.geom.create",
|
|
816
|
+
"summary": "Create a contour (an outer profile loop, no holes). Host API call — returns a handle.",
|
|
817
|
+
"examplePrompts": [],
|
|
818
|
+
"argsType": "ProfileHandle",
|
|
819
|
+
"resultType": "ContourHandle"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"path": "core.geom.create.contourFromProfiles",
|
|
823
|
+
"namespace": "core.geom.create",
|
|
824
|
+
"summary": "Create a contour from an outer profile plus zero or more inner profiles (holes). Host API call — returns a handle.",
|
|
825
|
+
"examplePrompts": [
|
|
826
|
+
"Make a shape with a hole in the middle",
|
|
827
|
+
"Cut a courtyard opening out of this floor outline"
|
|
828
|
+
],
|
|
829
|
+
"argsType": "ProfileHandle",
|
|
830
|
+
"resultType": "ContourHandle"
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"path": "core.geom.create.line",
|
|
834
|
+
"namespace": "core.geom.create",
|
|
835
|
+
"summary": "Create a straight line segment between two point handles. Host API call — returns a handle.",
|
|
836
|
+
"examplePrompts": [
|
|
837
|
+
"Draw a line from point A to point B",
|
|
838
|
+
"Draw a straight edge between these two points"
|
|
839
|
+
],
|
|
840
|
+
"argsType": "Vec3Handle",
|
|
841
|
+
"resultType": "LineHandle"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"path": "core.geom.create.profileFromCurves",
|
|
845
|
+
"namespace": "core.geom.create",
|
|
846
|
+
"summary": "Create a profile from an ordered list of curve handles forming a closed loop. Host API call — returns a handle.",
|
|
847
|
+
"examplePrompts": [
|
|
848
|
+
"Join these lines and arcs into one closed shape"
|
|
849
|
+
],
|
|
850
|
+
"argsType": "CurveHandle[]",
|
|
851
|
+
"resultType": "ProfileHandle"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"path": "core.geom.create.profileFromLinePoints",
|
|
855
|
+
"namespace": "core.geom.create",
|
|
856
|
+
"summary": "Create a closed profile from an ordered list of point handles connected by line segments (last auto-connected to first). Host API call — returns a handle.",
|
|
857
|
+
"examplePrompts": [
|
|
858
|
+
"Draw a closed polygon through these corner points",
|
|
859
|
+
"Create an L-shaped outline from a list of points"
|
|
283
860
|
],
|
|
284
861
|
"argsType": "Vec3Handle[]",
|
|
285
862
|
"resultType": "ProfileHandle"
|
|
@@ -301,7 +878,8 @@
|
|
|
301
878
|
"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.",
|
|
302
879
|
"examplePrompts": [],
|
|
303
880
|
"argsType": "ContourHandle",
|
|
304
|
-
"resultType": "void"
|
|
881
|
+
"resultType": "void",
|
|
882
|
+
"deprecated": "core.handles.release"
|
|
305
883
|
},
|
|
306
884
|
{
|
|
307
885
|
"path": "core.geom.delete.profile",
|
|
@@ -309,7 +887,8 @@
|
|
|
309
887
|
"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.",
|
|
310
888
|
"examplePrompts": [],
|
|
311
889
|
"argsType": "ProfileHandle",
|
|
312
|
-
"resultType": "void"
|
|
890
|
+
"resultType": "void",
|
|
891
|
+
"deprecated": "core.handles.release"
|
|
313
892
|
},
|
|
314
893
|
{
|
|
315
894
|
"path": "core.geom.query.arc.getAxis",
|
|
@@ -1687,128 +2266,619 @@
|
|
|
1687
2266
|
"resultType": "PluginCoreGroupsCreateResult"
|
|
1688
2267
|
},
|
|
1689
2268
|
{
|
|
1690
|
-
"path": "core.groups.delete",
|
|
1691
|
-
"namespace": "core.groups",
|
|
1692
|
-
"summary": "Delete (dissolve) a group.",
|
|
2269
|
+
"path": "core.groups.delete",
|
|
2270
|
+
"namespace": "core.groups",
|
|
2271
|
+
"summary": "Delete (dissolve) a group.",
|
|
2272
|
+
"examplePrompts": [
|
|
2273
|
+
"Ungroup group-12",
|
|
2274
|
+
"Dissolve this group but keep its contents",
|
|
2275
|
+
"Delete the group without deleting its members\n\n# Example\n```ts\nawait snaptrude.core.groups.delete(\"group-12\")\n```"
|
|
2276
|
+
],
|
|
2277
|
+
"argsType": "string",
|
|
2278
|
+
"resultType": "PluginCoreGroupsDeleteResult"
|
|
2279
|
+
},
|
|
2280
|
+
{
|
|
2281
|
+
"path": "core.groups.get",
|
|
2282
|
+
"namespace": "core.groups",
|
|
2283
|
+
"summary": "Get a single group by id.",
|
|
2284
|
+
"examplePrompts": [
|
|
2285
|
+
"Get the group with id group-12",
|
|
2286
|
+
"Look up a single group by its id",
|
|
2287
|
+
"Is group-3 locked and how many members does it have?\n\n# Example\n```ts\nconst group = await snaptrude.core.groups.get(\"group-12\")\nif (group) console.log(group.name, group.memberCount)\n```"
|
|
2288
|
+
],
|
|
2289
|
+
"argsType": "string",
|
|
2290
|
+
"resultType": "PluginCoreGroupsGetResult"
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
"path": "core.groups.getBounds",
|
|
2294
|
+
"namespace": "core.groups",
|
|
2295
|
+
"summary": "Get the axis-aligned bounds of a group.",
|
|
2296
|
+
"examplePrompts": [
|
|
2297
|
+
"How big is this group?",
|
|
2298
|
+
"Get the bounding box of group-12",
|
|
2299
|
+
"Where is the center of this group?\n\n# Example\n```ts\nconst bounds = await snaptrude.core.groups.getBounds(\"group-12\")\nif (bounds) console.log(bounds.center.x, bounds.center.y, bounds.center.z)\n```"
|
|
2300
|
+
],
|
|
2301
|
+
"argsType": "string",
|
|
2302
|
+
"resultType": "PluginCoreGroupsGetBoundsResult"
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
"path": "core.groups.getForComponent",
|
|
2306
|
+
"namespace": "core.groups",
|
|
2307
|
+
"summary": "Get the group a component belongs to.",
|
|
2308
|
+
"examplePrompts": [
|
|
2309
|
+
"Which group is this wall in?",
|
|
2310
|
+
"Find the group that contains component cmp_42",
|
|
2311
|
+
"Is this element grouped, and if so which group?\n\n# Example\n```ts\nconst group = await snaptrude.core.groups.getForComponent(\"cmp_42\")\nconsole.log(group ? group.name : \"ungrouped\")\n```"
|
|
2312
|
+
],
|
|
2313
|
+
"argsType": "ComponentHandle",
|
|
2314
|
+
"resultType": "PluginCoreGroupsGetForComponentResult"
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
"path": "core.groups.isLocked",
|
|
2318
|
+
"namespace": "core.groups",
|
|
2319
|
+
"summary": "Report whether a group is locked.",
|
|
2320
|
+
"examplePrompts": [
|
|
2321
|
+
"Is group-12 locked?",
|
|
2322
|
+
"Check whether this group is locked before editing it",
|
|
2323
|
+
"Tell me if the group is locked\n\n# Example\n```ts\nif (await snaptrude.core.groups.isLocked(\"group-12\")) {\nconsole.log(\"locked — unlock it first\")\n}\n```"
|
|
2324
|
+
],
|
|
2325
|
+
"argsType": "string",
|
|
2326
|
+
"resultType": "PluginCoreGroupsIsLockedResult"
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
"path": "core.groups.list",
|
|
2330
|
+
"namespace": "core.groups",
|
|
2331
|
+
"summary": "List every group in the active project.",
|
|
2332
|
+
"examplePrompts": [
|
|
2333
|
+
"List all the groups in my project",
|
|
2334
|
+
"What groups do I have and how many things are in each?",
|
|
2335
|
+
"Show every group with its lock state",
|
|
2336
|
+
"How many groups are in this model?\n\n# Example\n```ts\nconst { groups } = await snaptrude.core.groups.list()\nfor (const g of groups) console.log(g.name, g.memberCount, g.isLocked)\n```"
|
|
2337
|
+
],
|
|
2338
|
+
"argsType": null,
|
|
2339
|
+
"resultType": "PluginCoreGroupsListResult"
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
"path": "core.groups.listMembers",
|
|
2343
|
+
"namespace": "core.groups",
|
|
2344
|
+
"summary": "List the direct members of a group.",
|
|
2345
|
+
"examplePrompts": [
|
|
2346
|
+
"What's inside group-12?",
|
|
2347
|
+
"List the members of this group",
|
|
2348
|
+
"Show the components and subgroups in group-3\n\n# Example\n```ts\nconst { members } = await snaptrude.core.groups.listMembers(\"group-12\")\nfor (const m of members) console.log(m.type, m.id)\n```"
|
|
2349
|
+
],
|
|
2350
|
+
"argsType": "string",
|
|
2351
|
+
"resultType": "PluginCoreGroupsListMembersResult"
|
|
2352
|
+
},
|
|
2353
|
+
{
|
|
2354
|
+
"path": "core.groups.update",
|
|
2355
|
+
"namespace": "core.groups",
|
|
2356
|
+
"summary": "Update a group's name and/or membership.",
|
|
2357
|
+
"examplePrompts": [
|
|
2358
|
+
"Rename group-12 to Kitchen",
|
|
2359
|
+
"Add these two walls to the group",
|
|
2360
|
+
"Remove cmp_7 from group-3\n\n# Example\n```ts\nconst group = await snaptrude.core.groups.update(\"group-12\", {\nname: \"Kitchen\",\naddComponentIds: [\"cmp_9\"],\n})\n```"
|
|
2361
|
+
],
|
|
2362
|
+
"argsType": "string",
|
|
2363
|
+
"resultType": "PluginCoreGroupsUpdateResult"
|
|
2364
|
+
},
|
|
2365
|
+
{
|
|
2366
|
+
"path": "core.handles.beginScope",
|
|
2367
|
+
"namespace": "core.handles",
|
|
2368
|
+
"summary": "Open a mint-recording scope: every arena handle MINTED after this call (fresh mints only — identity-deduped re-registrations of pre-existing objects are not captured) is freed when the matching {@linkcode endScope} runs. Scopes nest, up to 64 deep — always pair begin/end in try/finally.",
|
|
2369
|
+
"examplePrompts": [],
|
|
2370
|
+
"argsType": null,
|
|
2371
|
+
"resultType": "ScopeToken"
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
"path": "core.handles.endScope",
|
|
2375
|
+
"namespace": "core.handles",
|
|
2376
|
+
"summary": "Close a scope by its token and free every handle it recorded, except those listed in `retain`. Retained handles are promoted to the enclosing scope (if any), so nesting composes like block scopes. Closing is token-addressed: an out-of-order close (interleaved async tasks) frees only that scope's mints and leaves other open scopes intact. Always pair begin/end in try/finally so a thrown body cannot leak the scope.",
|
|
2377
|
+
"examplePrompts": [],
|
|
2378
|
+
"argsType": "ScopeToken",
|
|
2379
|
+
"resultType": "void"
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
"path": "core.handles.release",
|
|
2383
|
+
"namespace": "core.handles",
|
|
2384
|
+
"summary": "Free arena handles in bulk. Unknown, foreign, or already-released ids are silent no-ops — there is no per-id result and no count, so responses can never be used as an existence oracle.",
|
|
2385
|
+
"examplePrompts": [],
|
|
2386
|
+
"argsType": "ReadonlyArray<AnyArenaHandle>",
|
|
2387
|
+
"resultType": "void"
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
"path": "core.handles.releaseAll",
|
|
2391
|
+
"namespace": "core.handles",
|
|
2392
|
+
"summary": "Free every live arena handle of one kind, or ALL arena handles when the kind is omitted. Useful at batch boundaries — e.g. a poll loop that mints a fresh footprint contour per tick.",
|
|
2393
|
+
"examplePrompts": [],
|
|
2394
|
+
"argsType": "ArenaKind",
|
|
2395
|
+
"resultType": "void"
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
"path": "core.handles.stats",
|
|
2399
|
+
"namespace": "core.handles",
|
|
2400
|
+
"summary": "Live handle-registry statistics for the calling plugin, plus the host page's JS heap usage (when the browser exposes it). Diagnostic surface for verifying that releases actually shrink host memory.",
|
|
2401
|
+
"examplePrompts": [],
|
|
2402
|
+
"argsType": null,
|
|
2403
|
+
"resultType": "PluginHandlesStatsResult"
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
"path": "core.history.redo",
|
|
2407
|
+
"namespace": "core.history",
|
|
2408
|
+
"summary": "Step forward over previously undone entries. Symmetric with {@linkcode PluginHistoryApi.undo}.",
|
|
2409
|
+
"examplePrompts": [
|
|
2410
|
+
"Redo the change I just undid",
|
|
2411
|
+
"Redo the last two undone actions",
|
|
2412
|
+
"Bring back the edit I reverted",
|
|
2413
|
+
"Step forward again in the history\n\n# Example\n```ts\nawait snaptrude.core.history.redo()\nawait snaptrude.core.history.redo(2)\n```"
|
|
2414
|
+
],
|
|
2415
|
+
"argsType": "number",
|
|
2416
|
+
"resultType": "PluginHistoryStepResult"
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
"path": "core.history.undo",
|
|
2420
|
+
"namespace": "core.history",
|
|
2421
|
+
"summary": "Step back over committed history entries.",
|
|
2422
|
+
"examplePrompts": [
|
|
2423
|
+
"Undo my last change",
|
|
2424
|
+
"Undo the last 3 actions",
|
|
2425
|
+
"Revert what I just did to the model",
|
|
2426
|
+
"Step back one change",
|
|
2427
|
+
"Take back that last edit\n\n# Example\n```ts\nawait snaptrude.core.history.undo() // one step\nawait snaptrude.core.history.undo(3) // up to three steps\n```"
|
|
2428
|
+
],
|
|
2429
|
+
"argsType": "number",
|
|
2430
|
+
"resultType": "PluginHistoryStepResult"
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
"path": "core.io.export.model",
|
|
2434
|
+
"namespace": "core.io.export",
|
|
2435
|
+
"summary": "Export the model to a 3D file and return its bytes as base64.",
|
|
2436
|
+
"examplePrompts": [
|
|
2437
|
+
"Export the model as a GLB",
|
|
2438
|
+
"Give me the whole scene as an OBJ file",
|
|
2439
|
+
"Export just my selection to GLB",
|
|
2440
|
+
"Download the model as an FBX file",
|
|
2441
|
+
"Export the scene to 3DS for 3ds Max\n\n# Example\n```ts\nconst file = await snaptrude.core.io.export.model(\"glb\")\n// decode base64 → bytes and save/download in the plugin UI\nconst bytes = Uint8Array.from(atob(file.dataBase64), (c) => c.charCodeAt(0))\nconst blob = new Blob([bytes], { type: file.mimeType })\n// ...offer blob for download as file.fileName\n\n// Only the current selection, as OBJ text:\nconst obj = await snaptrude.core.io.export.model(\"obj\", \"selection\")\nconst text = atob(obj.dataBase64)\n```"
|
|
2442
|
+
],
|
|
2443
|
+
"argsType": "ExportModelFormat",
|
|
2444
|
+
"resultType": "ExportedFile"
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
"path": "core.io.import.cadJson",
|
|
2448
|
+
"namespace": "core.io.import",
|
|
2449
|
+
"summary": "Sketch a CAD underlay from **already-parsed CAD JSON** — synchronous, with no server round-trip. Use this when you hold parsed CAD data (e.g. produced by your own converter); use {@link PluginCoreIoImportApi.dwg} for raw `.dwg` files.",
|
|
2450
|
+
"examplePrompts": [
|
|
2451
|
+
"Sketch this parsed CAD JSON onto the active storey",
|
|
2452
|
+
"Draw these CAD curves as an underlay on storey 2",
|
|
2453
|
+
"Create a CAD sketch from this geometry data",
|
|
2454
|
+
"Import my converted CAD JSON onto the ground floor\n\n# Example\n```ts\nconst cad = await snaptrude.core.io.import.cadJson(\n{ unit: \"mm\", geometry: [{ type: \"line\", layer: \"WALLS\", ... }] },\n1,\n)\n```"
|
|
2455
|
+
],
|
|
2456
|
+
"argsType": "CadJsonInput",
|
|
2457
|
+
"resultType": "UnderlayHandle"
|
|
2458
|
+
},
|
|
2459
|
+
{
|
|
2460
|
+
"path": "core.io.import.dwg",
|
|
2461
|
+
"namespace": "core.io.import",
|
|
2462
|
+
"summary": "Import a **DWG** CAD drawing as a scene underlay. `.dwg` only (no DXF).",
|
|
2463
|
+
"examplePrompts": [
|
|
2464
|
+
"Import this DWG floor plan onto storey 1",
|
|
2465
|
+
"Bring in a CAD drawing as an underlay and tell me when it's ready",
|
|
2466
|
+
"Start importing this CAD file onto the ground floor\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(\"https://example.com/plan.dwg\", 1)\n// Poll until the server-side conversion finishes — always with a timeout\n// (a UI-cancelled import stays \"processing\" forever).\nconst deadline = Date.now() + 5 * 60_000\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n// The DWG lands as a CAD underlay. CAD scaling isn't supported; manage it\n// (list / fade / delete) via core.io.underlay.*.\nconst cad = await snaptrude.core.io.job.getResult(job)\nif (cad) console.log(\"DWG imported as CAD underlay:\", cad)\n```"
|
|
2467
|
+
],
|
|
2468
|
+
"argsType": "string",
|
|
2469
|
+
"resultType": "ImportJobHandle"
|
|
2470
|
+
},
|
|
2471
|
+
{
|
|
2472
|
+
"path": "core.io.import.epw",
|
|
2473
|
+
"namespace": "core.io.import",
|
|
2474
|
+
"summary": "Import an **EPW weather file** into the project's weather catalog.",
|
|
2475
|
+
"examplePrompts": [
|
|
2476
|
+
"Import this EPW weather file for the site",
|
|
2477
|
+
"Upload a custom weather file for the daylight analysis",
|
|
2478
|
+
"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```"
|
|
2479
|
+
],
|
|
2480
|
+
"argsType": "string",
|
|
2481
|
+
"resultType": "PluginImportEpwResult"
|
|
2482
|
+
},
|
|
2483
|
+
{
|
|
2484
|
+
"path": "core.io.import.image",
|
|
2485
|
+
"namespace": "core.io.import",
|
|
2486
|
+
"summary": "Import a raster image as a scene **underlay** — a flat, textured reference plane placed on a storey that you can trace over.",
|
|
2487
|
+
"examplePrompts": [
|
|
2488
|
+
"Import this floor plan image onto the ground floor to trace over",
|
|
2489
|
+
"Drop this survey PNG in as a reference underlay at 30% opacity",
|
|
2490
|
+
"Add a site plan image on storey 2",
|
|
2491
|
+
"Bring in a sketch to trace, faded to half opacity\n\n# Example\n```ts\n// Place a floor plan on storey 1, then calibrate it to a real-world size.\nconst plan = await snaptrude.core.io.import.image(\n\"https://example.com/floorplan.png\",\n1, // storey\nundefined, // scale\n0.4, // opacity\n\"Ground floor plan\",\n)\n// Make the plan's longest side exactly 40 project-units:\nawait snaptrude.core.io.underlay.setScale(plan, { planSize: 40 })\n```"
|
|
2492
|
+
],
|
|
2493
|
+
"argsType": "string",
|
|
2494
|
+
"resultType": "UnderlayHandle"
|
|
2495
|
+
},
|
|
2496
|
+
{
|
|
2497
|
+
"path": "core.io.import.model",
|
|
2498
|
+
"namespace": "core.io.import",
|
|
2499
|
+
"summary": "Import a **3D model** file and place it in the scene as a component.",
|
|
2500
|
+
"examplePrompts": [
|
|
2501
|
+
"Import this SketchUp model onto storey 1",
|
|
2502
|
+
"Bring in this OBJ file and place it at the origin",
|
|
2503
|
+
"Add this 3D model to the ground floor\n\n# Example\n```ts\nconst model = await snaptrude.core.io.import.model(\n\"https://example.com/tree.skp\",\n1, // storey\n\"skp\",\n)\n```"
|
|
2504
|
+
],
|
|
2505
|
+
"argsType": "string",
|
|
2506
|
+
"resultType": "ComponentHandle"
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
"path": "core.io.import.pdf",
|
|
2510
|
+
"namespace": "core.io.import",
|
|
2511
|
+
"summary": "Import one page of a PDF as a scene **underlay** (a traceable reference plane).",
|
|
2512
|
+
"examplePrompts": [
|
|
2513
|
+
"Import page 1 of this PDF floor plan onto storey 1",
|
|
2514
|
+
"Bring in the second page of this PDF as an underlay at 1:50",
|
|
2515
|
+
"Add this PDF plan to the ground floor to trace over",
|
|
2516
|
+
"Place page 3 of the drawing set on storey 3\n\n# Example\n```ts\nconst sheet = await snaptrude.core.io.import.pdf(\n\"https://example.com/plans.pdf\",\n1, // storey\n2, // page\n\"1:100\", // drawing scale\n)\n```"
|
|
2517
|
+
],
|
|
2518
|
+
"argsType": "string",
|
|
2519
|
+
"resultType": "UnderlayHandle"
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
"path": "core.io.import.terrain",
|
|
2523
|
+
"namespace": "core.io.import",
|
|
2524
|
+
"summary": "Import **site terrain** for a location — Mapbox topography (elevation + satellite/streets imagery, optional neighborhood buildings and parcels).",
|
|
2525
|
+
"examplePrompts": [
|
|
2526
|
+
"Import the site terrain for this location, about 500m across",
|
|
2527
|
+
"Load the topography at 40.7128, -74.0060 for a 300 by 300 meter site",
|
|
2528
|
+
"Bring in satellite terrain for the site with the surrounding buildings",
|
|
2529
|
+
"Add site elevation for a 1km by 1km area at these coordinates\n\n# Example\n```ts\n// 300m × 300m site with elevation + satellite imagery.\nconst terrain = await snaptrude.core.io.import.terrain(\n40.7128, // lat\n-74.006, // lng\n300, // width (metres)\n300, // length (metres)\ntrue, // elevation\ntrue, // satellite\n)\n```"
|
|
2530
|
+
],
|
|
2531
|
+
"argsType": "number",
|
|
2532
|
+
"resultType": "TerrainHandle"
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
"path": "core.io.job.getError",
|
|
2536
|
+
"namespace": "core.io.job",
|
|
2537
|
+
"summary": "The failure message if the job's status is `\"failed\"`; otherwise `null`.",
|
|
2538
|
+
"examplePrompts": [
|
|
2539
|
+
"Why did my DWG import fail?",
|
|
2540
|
+
"What went wrong with the CAD import?",
|
|
2541
|
+
"Show the error from the failed import job",
|
|
2542
|
+
"Did the import error out, and why?\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nif ((await snaptrude.core.io.job.getStatus(job)) === \"failed\") {\nconsole.error(await snaptrude.core.io.job.getError(job))\n}\n```"
|
|
2543
|
+
],
|
|
2544
|
+
"argsType": "ImportJobHandle",
|
|
2545
|
+
"resultType": "string | null"
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
"path": "core.io.job.getResult",
|
|
2549
|
+
"namespace": "core.io.job",
|
|
2550
|
+
"summary": "The imported result once the job is complete — the placed {@linkcode UnderlayHandle}. Returns `null` while the job is still pending/processing or if it failed (check {@link PluginCoreIoJobApi.getError}).",
|
|
2551
|
+
"examplePrompts": [
|
|
2552
|
+
"Get the underlay from my finished DWG import",
|
|
2553
|
+
"Give me the result of the CAD import job",
|
|
2554
|
+
"Fetch the imported CAD sketch once it's ready",
|
|
2555
|
+
"Return the handle for the completed import\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nconst deadline = Date.now() + 5 * 60_000\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n// DWG results are CAD underlays (CAD scaling isn't supported); manage them\n// via core.io.underlay.* (list / setOpacity / delete).\nconst cad = await snaptrude.core.io.job.getResult(job)\nif (cad) console.log(\"import complete:\", cad)\n```"
|
|
2556
|
+
],
|
|
2557
|
+
"argsType": "ImportJobHandle",
|
|
2558
|
+
"resultType": "UnderlayHandle | null"
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
"path": "core.io.job.getStatus",
|
|
2562
|
+
"namespace": "core.io.job",
|
|
2563
|
+
"summary": "Read a job's current status: `\"pending\"` (queued), `\"processing\"` (running), `\"complete\"` (result ready), or `\"failed\"`.",
|
|
2564
|
+
"examplePrompts": [
|
|
2565
|
+
"What's the status of my DWG import?",
|
|
2566
|
+
"Is the CAD import still processing?",
|
|
2567
|
+
"Check where the import job is up to",
|
|
2568
|
+
"Did the import job fail?\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nconsole.log(await snaptrude.core.io.job.getStatus(job)) // \"processing\"\n```"
|
|
2569
|
+
],
|
|
2570
|
+
"argsType": "ImportJobHandle",
|
|
2571
|
+
"resultType": "ImportJobStatus"
|
|
2572
|
+
},
|
|
2573
|
+
{
|
|
2574
|
+
"path": "core.io.job.isComplete",
|
|
2575
|
+
"namespace": "core.io.job",
|
|
2576
|
+
"summary": "Whether the job has finished successfully (status is `\"complete\"` and a result is ready). Returns `false` while pending/processing and on failure.",
|
|
2577
|
+
"examplePrompts": [
|
|
2578
|
+
"Is the DWG import done yet?",
|
|
2579
|
+
"Has the CAD import finished?",
|
|
2580
|
+
"Tell me when the import job completes",
|
|
2581
|
+
"Is my import ready?\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nconst deadline = Date.now() + 5 * 60_000 // cap the poll — see getStatus limitation\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n```"
|
|
2582
|
+
],
|
|
2583
|
+
"argsType": "ImportJobHandle",
|
|
2584
|
+
"resultType": "boolean"
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
"path": "core.io.query.getPdfPageCount",
|
|
2588
|
+
"namespace": "core.io.query",
|
|
2589
|
+
"summary": "Count the pages of a PDF without importing it. `null` if the source can't be read as a PDF.",
|
|
2590
|
+
"examplePrompts": [
|
|
2591
|
+
"How many pages does this PDF have?",
|
|
2592
|
+
"Count the pages in the drawing set before importing",
|
|
2593
|
+
"Get the PDF page count",
|
|
2594
|
+
"Is this a multi-page PDF, and how many?\n\n# Example\n```ts\nconst pages = await snaptrude.core.io.query.getPdfPageCount(url)\nfor (let p = 1; p <= (pages ?? 0); p++) {\nawait snaptrude.core.io.import.pdf(url, p, p) // one page per storey\n}\n```"
|
|
2595
|
+
],
|
|
2596
|
+
"argsType": "string",
|
|
2597
|
+
"resultType": "number | null"
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
"path": "core.io.query.listCadLayers",
|
|
2601
|
+
"namespace": "core.io.query",
|
|
2602
|
+
"summary": "List the distinct CAD layer names tagged on a parsed CAD JSON's entities. Read-only inspection: imports always bring in **every** layer (there is no layer filter on {@link core.io.import.dwg} / {@link core.io.import.cadJson}) — use the names to decide whether to import at all, or what to tell the user.",
|
|
2603
|
+
"examplePrompts": [
|
|
2604
|
+
"What CAD layers are in this drawing?",
|
|
2605
|
+
"List the layers before importing the CAD",
|
|
2606
|
+
"Show the DWG layer names so I can pick which to import",
|
|
2607
|
+
"Enumerate the CAD JSON layers\n\n# Example\n```ts\nconst layers = await snaptrude.core.io.query.listCadLayers(cad)\nif (layers.some((l) => l.toUpperCase().includes(\"WALL\"))) {\nawait snaptrude.core.io.import.cadJson(cad, 1) // all layers import together\n}\n```"
|
|
2608
|
+
],
|
|
2609
|
+
"argsType": "CadJsonInput",
|
|
2610
|
+
"resultType": "string[]"
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
"path": "core.io.terrain.delete",
|
|
2614
|
+
"namespace": "core.io.terrain",
|
|
2615
|
+
"summary": "Delete the site terrain. Undoable.",
|
|
2616
|
+
"examplePrompts": [
|
|
2617
|
+
"Delete the site terrain",
|
|
2618
|
+
"Remove the topography",
|
|
2619
|
+
"Clear the imported site",
|
|
2620
|
+
"Get rid of the terrain"
|
|
2621
|
+
],
|
|
2622
|
+
"argsType": null,
|
|
2623
|
+
"resultType": "void"
|
|
2624
|
+
},
|
|
2625
|
+
{
|
|
2626
|
+
"path": "core.io.terrain.disableElevation",
|
|
2627
|
+
"namespace": "core.io.terrain",
|
|
2628
|
+
"summary": "Turn terrain elevation OFF — flatten to a plane. Undoable.",
|
|
2629
|
+
"examplePrompts": [
|
|
2630
|
+
"Flatten the terrain",
|
|
2631
|
+
"Turn off site elevation",
|
|
2632
|
+
"Disable the heightmap",
|
|
2633
|
+
"Make the terrain flat"
|
|
2634
|
+
],
|
|
2635
|
+
"argsType": null,
|
|
2636
|
+
"resultType": "void"
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
"path": "core.io.terrain.disableSatellite",
|
|
2640
|
+
"namespace": "core.io.terrain",
|
|
2641
|
+
"summary": "Turn satellite imagery OFF. Undoable.",
|
|
2642
|
+
"examplePrompts": [
|
|
2643
|
+
"Hide the satellite imagery",
|
|
2644
|
+
"Turn off the aerial texture",
|
|
2645
|
+
"Disable satellite on the site",
|
|
2646
|
+
"Remove the satellite drape"
|
|
2647
|
+
],
|
|
2648
|
+
"argsType": null,
|
|
2649
|
+
"resultType": "void"
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
"path": "core.io.terrain.enableElevation",
|
|
2653
|
+
"namespace": "core.io.terrain",
|
|
2654
|
+
"summary": "Turn terrain elevation (DEM height) ON — a real 3D topography surface. Undoable.",
|
|
2655
|
+
"examplePrompts": [
|
|
2656
|
+
"Turn on terrain elevation",
|
|
2657
|
+
"Enable the site heightmap",
|
|
2658
|
+
"Make the terrain 3D",
|
|
2659
|
+
"Show the topography relief"
|
|
2660
|
+
],
|
|
2661
|
+
"argsType": null,
|
|
2662
|
+
"resultType": "void"
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
"path": "core.io.terrain.enableSatellite",
|
|
2666
|
+
"namespace": "core.io.terrain",
|
|
2667
|
+
"summary": "Turn satellite imagery ON. Undoable.",
|
|
2668
|
+
"examplePrompts": [
|
|
2669
|
+
"Show satellite imagery on the site",
|
|
2670
|
+
"Enable the satellite texture",
|
|
2671
|
+
"Turn on aerial imagery",
|
|
2672
|
+
"Drape satellite over the terrain"
|
|
2673
|
+
],
|
|
2674
|
+
"argsType": null,
|
|
2675
|
+
"resultType": "void"
|
|
2676
|
+
},
|
|
2677
|
+
{
|
|
2678
|
+
"path": "core.io.terrain.exists",
|
|
2679
|
+
"namespace": "core.io.terrain",
|
|
2680
|
+
"summary": "Whether the project has a site terrain.",
|
|
2681
|
+
"examplePrompts": [
|
|
2682
|
+
"Does this project have site terrain?",
|
|
2683
|
+
"Is there a terrain imported?",
|
|
2684
|
+
"Check if the site topography exists",
|
|
2685
|
+
"Has a terrain been added yet?\n\n# Example\n```ts\nif (!(await snaptrude.core.io.terrain.exists())) {\nawait snaptrude.core.io.import.terrain(40.7128, -74.006, 300, 300)\n}\n```"
|
|
2686
|
+
],
|
|
2687
|
+
"argsType": null,
|
|
2688
|
+
"resultType": "boolean"
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
"path": "core.io.terrain.get",
|
|
2692
|
+
"namespace": "core.io.terrain",
|
|
2693
|
+
"summary": "Resolve the project's terrain handle, or `null` if there is none. The same handle {@link core.io.import.terrain} returns — use it to obtain the handle without re-importing.",
|
|
2694
|
+
"examplePrompts": [
|
|
2695
|
+
"Get the terrain handle",
|
|
2696
|
+
"Give me the site terrain",
|
|
2697
|
+
"Fetch the current terrain",
|
|
2698
|
+
"Return the topography handle if it exists"
|
|
2699
|
+
],
|
|
2700
|
+
"argsType": null,
|
|
2701
|
+
"resultType": "TerrainHandle | null"
|
|
2702
|
+
},
|
|
2703
|
+
{
|
|
2704
|
+
"path": "core.io.terrain.getDatum",
|
|
2705
|
+
"namespace": "core.io.terrain",
|
|
2706
|
+
"summary": "Read the terrain's current vertical position (world Y, internal units). `null` if there is no terrain. Import places the terrain so its highest point sits at `y = 0`, so a never-shifted terrain reads a negative baseline, not `0`; each {@link PluginCoreIoTerrainApi.setDatum} shift moves this value.",
|
|
2707
|
+
"examplePrompts": [
|
|
2708
|
+
"What's the terrain's datum?",
|
|
2709
|
+
"Read the current site elevation reference",
|
|
2710
|
+
"Get the terrain vertical offset",
|
|
2711
|
+
"How far has the datum been shifted?"
|
|
2712
|
+
],
|
|
2713
|
+
"argsType": null,
|
|
2714
|
+
"resultType": "number | null"
|
|
2715
|
+
},
|
|
2716
|
+
{
|
|
2717
|
+
"path": "core.io.terrain.getOpacity",
|
|
2718
|
+
"namespace": "core.io.terrain",
|
|
2719
|
+
"summary": "Read the terrain opacity, `0`..`1`, or `null` if no terrain.",
|
|
2720
|
+
"examplePrompts": [],
|
|
2721
|
+
"argsType": null,
|
|
2722
|
+
"resultType": "number | null"
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
"path": "core.io.terrain.getReport",
|
|
2726
|
+
"namespace": "core.io.terrain",
|
|
2727
|
+
"summary": "The terrain cut/fill earthwork report — cut, fill, and net volumes — or `null` if there is no terrain.",
|
|
2728
|
+
"examplePrompts": [
|
|
2729
|
+
"What are the cut and fill volumes for the site?",
|
|
2730
|
+
"Get the terrain earthwork report",
|
|
2731
|
+
"How much cut and fill does the grading need?",
|
|
2732
|
+
"Show the net volume of the terrain edits\n\n# Example\n```ts\nconst r = await snaptrude.core.io.terrain.getReport()\nif (r) console.log(`cut ${r.cutVolume}, fill ${r.fillVolume}, net ${r.netVolume}`)\n```"
|
|
2733
|
+
],
|
|
2734
|
+
"argsType": null,
|
|
2735
|
+
"resultType": "TerrainReport | null"
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
"path": "core.io.terrain.isElevationEnabled",
|
|
2739
|
+
"namespace": "core.io.terrain",
|
|
2740
|
+
"summary": "Whether terrain elevation (DEM height) is on. `null` if no terrain.",
|
|
2741
|
+
"examplePrompts": [],
|
|
2742
|
+
"argsType": null,
|
|
2743
|
+
"resultType": "boolean | null"
|
|
2744
|
+
},
|
|
2745
|
+
{
|
|
2746
|
+
"path": "core.io.terrain.isSatelliteEnabled",
|
|
2747
|
+
"namespace": "core.io.terrain",
|
|
2748
|
+
"summary": "Whether satellite imagery is draped on the terrain. `null` if no terrain.",
|
|
2749
|
+
"examplePrompts": [],
|
|
2750
|
+
"argsType": null,
|
|
2751
|
+
"resultType": "boolean | null"
|
|
2752
|
+
},
|
|
2753
|
+
{
|
|
2754
|
+
"path": "core.io.terrain.setDatum",
|
|
2755
|
+
"namespace": "core.io.terrain",
|
|
2756
|
+
"summary": "Shift the terrain's **datum** — move the whole terrain vertically DOWN by `offset` (internal units) from its current position; pass a negative value to raise it. Undoable.",
|
|
1693
2757
|
"examplePrompts": [
|
|
1694
|
-
"
|
|
1695
|
-
"
|
|
1696
|
-
"
|
|
2758
|
+
"Shift the terrain datum down by 12",
|
|
2759
|
+
"Lower the site terrain by 10",
|
|
2760
|
+
"Raise the terrain a little",
|
|
2761
|
+
"Nudge the terrain datum down\n\n# Example\n```ts\nawait snaptrude.core.io.terrain.setDatum(12) // shift terrain down by 12 (relative)\n```"
|
|
1697
2762
|
],
|
|
1698
|
-
"argsType": "
|
|
1699
|
-
"resultType": "
|
|
2763
|
+
"argsType": "number",
|
|
2764
|
+
"resultType": "void"
|
|
1700
2765
|
},
|
|
1701
2766
|
{
|
|
1702
|
-
"path": "core.
|
|
1703
|
-
"namespace": "core.
|
|
1704
|
-
"summary": "
|
|
2767
|
+
"path": "core.io.terrain.setOpacity",
|
|
2768
|
+
"namespace": "core.io.terrain",
|
|
2769
|
+
"summary": "Set the terrain opacity (`0` transparent .. `1` opaque). Undoable.",
|
|
1705
2770
|
"examplePrompts": [
|
|
1706
|
-
"
|
|
1707
|
-
"
|
|
1708
|
-
"
|
|
2771
|
+
"Fade the terrain to 50%",
|
|
2772
|
+
"Make the site semi-transparent",
|
|
2773
|
+
"Set terrain opacity to 0.3",
|
|
2774
|
+
"Dim the topography\n\n# Example\n```ts\nawait snaptrude.core.io.terrain.setOpacity(0.5)\n```"
|
|
1709
2775
|
],
|
|
1710
|
-
"argsType": "
|
|
1711
|
-
"resultType": "
|
|
2776
|
+
"argsType": "number",
|
|
2777
|
+
"resultType": "void"
|
|
1712
2778
|
},
|
|
1713
2779
|
{
|
|
1714
|
-
"path": "core.
|
|
1715
|
-
"namespace": "core.
|
|
1716
|
-
"summary": "
|
|
2780
|
+
"path": "core.io.underlay.delete",
|
|
2781
|
+
"namespace": "core.io.underlay",
|
|
2782
|
+
"summary": "Delete an underlay from the scene (and its backend record). Applies to image, PDF, and CAD underlays.",
|
|
1717
2783
|
"examplePrompts": [
|
|
1718
|
-
"
|
|
1719
|
-
"
|
|
1720
|
-
"
|
|
2784
|
+
"Delete this floor plan underlay",
|
|
2785
|
+
"Remove the imported PDF from the scene",
|
|
2786
|
+
"Get rid of the CAD sketch I traced over",
|
|
2787
|
+
"Clear the reference image off storey 1\n\n# Example\n```ts\nconst [first] = await snaptrude.core.io.underlay.list(1)\nif (first) await snaptrude.core.io.underlay.delete(first)\n```"
|
|
1721
2788
|
],
|
|
1722
|
-
"argsType": "
|
|
1723
|
-
"resultType": "
|
|
2789
|
+
"argsType": "UnderlayHandle",
|
|
2790
|
+
"resultType": "void"
|
|
1724
2791
|
},
|
|
1725
2792
|
{
|
|
1726
|
-
"path": "core.
|
|
1727
|
-
"namespace": "core.
|
|
1728
|
-
"summary": "
|
|
2793
|
+
"path": "core.io.underlay.getBounds",
|
|
2794
|
+
"namespace": "core.io.underlay",
|
|
2795
|
+
"summary": "Read an underlay's world-space bounding box (image, PDF, or CAD). `null` if the underlay no longer resolves or has no measurable mesh. Useful for fitting drawn geometry to a reference, or computing a plan size before scaling.",
|
|
1729
2796
|
"examplePrompts": [
|
|
1730
|
-
"
|
|
1731
|
-
"
|
|
1732
|
-
"
|
|
2797
|
+
"How big is this floor plan in the scene?",
|
|
2798
|
+
"Get the bounding box of the underlay",
|
|
2799
|
+
"What's the extent of the imported PDF?",
|
|
2800
|
+
"Measure the CAD sketch's size\n\n# Example\n```ts\nconst bb = await snaptrude.core.io.underlay.getBounds(plan)\nif (bb) console.log(`width ${bb.max.x - bb.min.x}`)\n```"
|
|
1733
2801
|
],
|
|
1734
|
-
"argsType": "
|
|
1735
|
-
"resultType": "
|
|
2802
|
+
"argsType": "UnderlayHandle",
|
|
2803
|
+
"resultType": "BBoxComponents | null"
|
|
1736
2804
|
},
|
|
1737
2805
|
{
|
|
1738
|
-
"path": "core.
|
|
1739
|
-
"namespace": "core.
|
|
1740
|
-
"summary": "
|
|
2806
|
+
"path": "core.io.underlay.getOpacity",
|
|
2807
|
+
"namespace": "core.io.underlay",
|
|
2808
|
+
"summary": "Read an underlay's opacity (`0`..`1`), or `null` if it has no material.",
|
|
1741
2809
|
"examplePrompts": [
|
|
1742
|
-
"
|
|
1743
|
-
"
|
|
1744
|
-
"
|
|
2810
|
+
"How transparent is this underlay?",
|
|
2811
|
+
"Get the opacity of the floor plan",
|
|
2812
|
+
"What's the fade level on the reference image?",
|
|
2813
|
+
"Read the underlay's opacity\n\n# Example\n```ts\nconst o = await snaptrude.core.io.underlay.getOpacity(plan)\n```"
|
|
1745
2814
|
],
|
|
1746
|
-
"argsType": "
|
|
1747
|
-
"resultType": "
|
|
2815
|
+
"argsType": "UnderlayHandle",
|
|
2816
|
+
"resultType": "number | null"
|
|
1748
2817
|
},
|
|
1749
2818
|
{
|
|
1750
|
-
"path": "core.
|
|
1751
|
-
"namespace": "core.
|
|
1752
|
-
"summary": "
|
|
2819
|
+
"path": "core.io.underlay.getScale",
|
|
2820
|
+
"namespace": "core.io.underlay",
|
|
2821
|
+
"summary": "Read an underlay's scale. Works for **image and PDF** underlays. Returns `null` for CAD (scaling not supported) or if the handle no longer resolves.",
|
|
1753
2822
|
"examplePrompts": [
|
|
1754
|
-
"
|
|
1755
|
-
"
|
|
1756
|
-
"
|
|
1757
|
-
"
|
|
2823
|
+
"What scale is this floor plan set to?",
|
|
2824
|
+
"Get the current and original scale of the underlay",
|
|
2825
|
+
"How much has this image been scaled since import?",
|
|
2826
|
+
"Read the scale factor of the reference plan\n\n# Example\n```ts\nconst s = await snaptrude.core.io.underlay.getScale(plan)\nif (s) console.log(`scale ${s.scaleFactor} (was ${s.initialScaleFactor})`)\n```"
|
|
1758
2827
|
],
|
|
1759
|
-
"argsType":
|
|
1760
|
-
"resultType": "
|
|
2828
|
+
"argsType": "UnderlayHandle",
|
|
2829
|
+
"resultType": "{ scaleFactor: number; initialScaleFactor: number } | null"
|
|
1761
2830
|
},
|
|
1762
2831
|
{
|
|
1763
|
-
"path": "core.
|
|
1764
|
-
"namespace": "core.
|
|
1765
|
-
"summary": "List the
|
|
2832
|
+
"path": "core.io.underlay.list",
|
|
2833
|
+
"namespace": "core.io.underlay",
|
|
2834
|
+
"summary": "List the underlays in the scene, optionally limited to one storey.",
|
|
1766
2835
|
"examplePrompts": [
|
|
1767
|
-
"
|
|
1768
|
-
"
|
|
1769
|
-
"Show
|
|
2836
|
+
"List all the reference underlays in the model",
|
|
2837
|
+
"What underlays are on the ground floor?",
|
|
2838
|
+
"Show every imported floor plan and PDF",
|
|
2839
|
+
"How many trace-over images are on storey 2?\n\n# Example\n```ts\nconst underlays = await snaptrude.core.io.underlay.list(1)\nconsole.log(`${underlays.length} underlays on storey 1`)\n```"
|
|
1770
2840
|
],
|
|
1771
|
-
"argsType": "
|
|
1772
|
-
"resultType": "
|
|
2841
|
+
"argsType": "number",
|
|
2842
|
+
"resultType": "UnderlayHandle[]"
|
|
1773
2843
|
},
|
|
1774
2844
|
{
|
|
1775
|
-
"path": "core.
|
|
1776
|
-
"namespace": "core.
|
|
1777
|
-
"summary": "
|
|
2845
|
+
"path": "core.io.underlay.resetScale",
|
|
2846
|
+
"namespace": "core.io.underlay",
|
|
2847
|
+
"summary": "Reset an underlay's scale back to its import-time size (image or PDF; CAD scaling is not supported — throws). Equivalent to `setScale(underlay, 1)`.",
|
|
1778
2848
|
"examplePrompts": [
|
|
1779
|
-
"
|
|
1780
|
-
"
|
|
1781
|
-
"
|
|
2849
|
+
"Reset this floor plan's scale to how it was imported",
|
|
2850
|
+
"Undo the scaling on the underlay",
|
|
2851
|
+
"Put the reference image back to its original size",
|
|
2852
|
+
"Restore the plan's default scale\n\n# Example\n```ts\nawait snaptrude.core.io.underlay.resetScale(plan)\n```"
|
|
1782
2853
|
],
|
|
1783
|
-
"argsType": "
|
|
1784
|
-
"resultType": "
|
|
2854
|
+
"argsType": "UnderlayHandle",
|
|
2855
|
+
"resultType": "{ scaleFactor: number }"
|
|
1785
2856
|
},
|
|
1786
2857
|
{
|
|
1787
|
-
"path": "core.
|
|
1788
|
-
"namespace": "core.
|
|
1789
|
-
"summary": "
|
|
2858
|
+
"path": "core.io.underlay.setOpacity",
|
|
2859
|
+
"namespace": "core.io.underlay",
|
|
2860
|
+
"summary": "Set an underlay's opacity (`0` = transparent .. `1` = opaque). Undoable. The engine keeps underlays faintly visible: values below `0.01` clamp to `0.01`, so `setOpacity(u, 0)` reads back as `0.01`, not `0`.",
|
|
1790
2861
|
"examplePrompts": [
|
|
1791
|
-
"
|
|
1792
|
-
"
|
|
1793
|
-
"
|
|
1794
|
-
"
|
|
2862
|
+
"Fade this floor plan to 30% so I can see through it",
|
|
2863
|
+
"Make the underlay half transparent",
|
|
2864
|
+
"Set the reference image opacity to 0.2",
|
|
2865
|
+
"Dim the trace-over plan\n\n# Example\n```ts\nawait snaptrude.core.io.underlay.setOpacity(plan, 0.3)\n```"
|
|
1795
2866
|
],
|
|
1796
|
-
"argsType": "
|
|
1797
|
-
"resultType": "
|
|
2867
|
+
"argsType": "UnderlayHandle",
|
|
2868
|
+
"resultType": "void"
|
|
1798
2869
|
},
|
|
1799
2870
|
{
|
|
1800
|
-
"path": "core.
|
|
1801
|
-
"namespace": "core.
|
|
1802
|
-
"summary": "
|
|
2871
|
+
"path": "core.io.underlay.setScale",
|
|
2872
|
+
"namespace": "core.io.underlay",
|
|
2873
|
+
"summary": "Set an underlay's scale — the **calibration** step after import. Works for **image and PDF** underlays (CAD scaling is not supported — throws).",
|
|
1803
2874
|
"examplePrompts": [
|
|
1804
|
-
"
|
|
1805
|
-
"
|
|
1806
|
-
"
|
|
1807
|
-
"
|
|
1808
|
-
"Take back that last edit\n\n# Example\n```ts\nawait snaptrude.core.history.undo() // one step\nawait snaptrude.core.history.undo(3) // up to three steps\n```"
|
|
2875
|
+
"Scale this floor plan so it's 50 meters across",
|
|
2876
|
+
"Set the plan size to 30m — it's imported too small",
|
|
2877
|
+
"Make the reference image twice its imported size",
|
|
2878
|
+
"Calibrate the PDF: the site is 120 meters long\n\n# Example\n```ts\n// Absolute factor — set the underlay to 2× its imported size:\nawait snaptrude.core.io.underlay.setScale(plan, 2)\n\n// Fit to a real-world size — make the plan's longest side 50 project-units:\nawait snaptrude.core.io.underlay.setScale(plan, { planSize: 50 })\n```"
|
|
1809
2879
|
],
|
|
1810
|
-
"argsType": "
|
|
1811
|
-
"resultType": "
|
|
2880
|
+
"argsType": "UnderlayHandle",
|
|
2881
|
+
"resultType": "{ scaleFactor: number }"
|
|
1812
2882
|
},
|
|
1813
2883
|
{
|
|
1814
2884
|
"path": "core.layers.get",
|
|
@@ -2113,6 +3183,41 @@
|
|
|
2113
3183
|
"argsType": "Vec3Handle",
|
|
2114
3184
|
"resultType": "Vec3Handle"
|
|
2115
3185
|
},
|
|
3186
|
+
{
|
|
3187
|
+
"path": "core.mode.get",
|
|
3188
|
+
"namespace": "core.mode",
|
|
3189
|
+
"summary": "Get the currently active application mode.",
|
|
3190
|
+
"examplePrompts": [
|
|
3191
|
+
"Which mode am I in right now?",
|
|
3192
|
+
"Am I in present mode?",
|
|
3193
|
+
"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```"
|
|
3194
|
+
],
|
|
3195
|
+
"argsType": null,
|
|
3196
|
+
"resultType": "PluginAppMode"
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
"path": "core.mode.list",
|
|
3200
|
+
"namespace": "core.mode",
|
|
3201
|
+
"summary": "List every application mode the editor has.",
|
|
3202
|
+
"examplePrompts": [
|
|
3203
|
+
"What modes does Snaptrude have?",
|
|
3204
|
+
"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```"
|
|
3205
|
+
],
|
|
3206
|
+
"argsType": null,
|
|
3207
|
+
"resultType": "PluginCoreModeListResult"
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
"path": "core.mode.set",
|
|
3211
|
+
"namespace": "core.mode",
|
|
3212
|
+
"summary": "Switch the editor to another application mode — the same action as clicking that tab in the top menu bar.",
|
|
3213
|
+
"examplePrompts": [
|
|
3214
|
+
"Switch to present mode",
|
|
3215
|
+
"Open BIM mode",
|
|
3216
|
+
"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```"
|
|
3217
|
+
],
|
|
3218
|
+
"argsType": "PluginAppMode",
|
|
3219
|
+
"resultType": "PluginCoreModeSetResult"
|
|
3220
|
+
},
|
|
2116
3221
|
{
|
|
2117
3222
|
"path": "core.project.settings.getTolerance",
|
|
2118
3223
|
"namespace": "core.project.settings",
|
|
@@ -2266,112 +3371,313 @@
|
|
|
2266
3371
|
"Make my lines snap to set angles",
|
|
2267
3372
|
"Switch angle snap back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableAngle()\n```"
|
|
2268
3373
|
],
|
|
2269
|
-
"argsType": null,
|
|
2270
|
-
"resultType": "boolean"
|
|
3374
|
+
"argsType": null,
|
|
3375
|
+
"resultType": "boolean"
|
|
3376
|
+
},
|
|
3377
|
+
{
|
|
3378
|
+
"path": "core.project.settings.snaps.enableDimension",
|
|
3379
|
+
"namespace": "core.project.settings.snaps",
|
|
3380
|
+
"summary": "Turn dimension snapping on, so drawing and editing snap to the configured length increment.",
|
|
3381
|
+
"examplePrompts": [
|
|
3382
|
+
"Turn on dimension snapping",
|
|
3383
|
+
"Enable snapping to set lengths while I draw",
|
|
3384
|
+
"Make my walls snap to round dimensions",
|
|
3385
|
+
"Switch length snapping back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableDimension()\n```"
|
|
3386
|
+
],
|
|
3387
|
+
"argsType": null,
|
|
3388
|
+
"resultType": "boolean"
|
|
3389
|
+
},
|
|
3390
|
+
{
|
|
3391
|
+
"path": "core.project.settings.snaps.enableMagnetic",
|
|
3392
|
+
"namespace": "core.project.settings.snaps",
|
|
3393
|
+
"summary": "Turn magnetic snapping on, so the cursor is pulled to nearby geometry while drawing.",
|
|
3394
|
+
"examplePrompts": [
|
|
3395
|
+
"Turn on magnetic snapping",
|
|
3396
|
+
"Enable the magnet snap",
|
|
3397
|
+
"Make the cursor stick to nearby geometry when drawing",
|
|
3398
|
+
"Switch magnetic snap back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableMagnetic()\n```"
|
|
3399
|
+
],
|
|
3400
|
+
"argsType": null,
|
|
3401
|
+
"resultType": "boolean"
|
|
3402
|
+
},
|
|
3403
|
+
{
|
|
3404
|
+
"path": "core.project.settings.snaps.enableNormal",
|
|
3405
|
+
"namespace": "core.project.settings.snaps",
|
|
3406
|
+
"summary": "Turn normal (perpendicular) snapping on, so drawing snaps when the cursor is at a right angle to existing edges.",
|
|
3407
|
+
"examplePrompts": [
|
|
3408
|
+
"Turn on perpendicular snapping",
|
|
3409
|
+
"Enable the normal snap so lines snap at right angles",
|
|
3410
|
+
"Snap to perpendicular when I draw walls",
|
|
3411
|
+
"Help me draw at 90 degrees to existing edges\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableNormal()\n```"
|
|
3412
|
+
],
|
|
3413
|
+
"argsType": null,
|
|
3414
|
+
"resultType": "boolean"
|
|
3415
|
+
},
|
|
3416
|
+
{
|
|
3417
|
+
"path": "core.project.settings.snaps.enableParallel",
|
|
3418
|
+
"namespace": "core.project.settings.snaps",
|
|
3419
|
+
"summary": "Turn parallel snapping on, so drawing snaps when the cursor lines up parallel to existing edges.",
|
|
3420
|
+
"examplePrompts": [
|
|
3421
|
+
"Turn on parallel snapping",
|
|
3422
|
+
"Enable snapping to parallel lines",
|
|
3423
|
+
"Help me draw walls parallel to existing ones",
|
|
3424
|
+
"Snap to parallel edges when drawing\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableParallel()\n```"
|
|
3425
|
+
],
|
|
3426
|
+
"argsType": null,
|
|
3427
|
+
"resultType": "boolean"
|
|
3428
|
+
},
|
|
3429
|
+
{
|
|
3430
|
+
"path": "core.project.settings.snaps.getAngle",
|
|
3431
|
+
"namespace": "core.project.settings.snaps",
|
|
3432
|
+
"summary": "Get the current angle-snap threshold in degrees — the angular increment that drawing snaps to when angle snapping is on.",
|
|
3433
|
+
"examplePrompts": [
|
|
3434
|
+
"What angle does drawing snap to?",
|
|
3435
|
+
"Check the current angle snap in degrees",
|
|
3436
|
+
"Show me the angle snapping increment",
|
|
3437
|
+
"How many degrees is the angle snap set to?\n\n# Example\n```ts\nconst degrees = await snaptrude.core.project.settings.snaps.getAngle()\nconsole.log(degrees)\n```"
|
|
3438
|
+
],
|
|
3439
|
+
"argsType": null,
|
|
3440
|
+
"resultType": "number"
|
|
3441
|
+
},
|
|
3442
|
+
{
|
|
3443
|
+
"path": "core.project.settings.snaps.getDimension",
|
|
3444
|
+
"namespace": "core.project.settings.snaps",
|
|
3445
|
+
"summary": "Get the current dimension-snap threshold — the length increment that drawing and editing snap to when dimension snapping is on.",
|
|
3446
|
+
"examplePrompts": [
|
|
3447
|
+
"What is the dimension snap distance?",
|
|
3448
|
+
"Check the current snap increment for drawing",
|
|
3449
|
+
"How far apart are the length snaps set?",
|
|
3450
|
+
"Show me the snap spacing value\n\n# Example\n```ts\nconst increment = await snaptrude.core.project.settings.snaps.getDimension()\nconsole.log(increment)\n```"
|
|
3451
|
+
],
|
|
3452
|
+
"argsType": null,
|
|
3453
|
+
"resultType": "number"
|
|
3454
|
+
},
|
|
3455
|
+
{
|
|
3456
|
+
"path": "core.project.settings.snaps.setAngle",
|
|
3457
|
+
"namespace": "core.project.settings.snaps",
|
|
3458
|
+
"summary": "Set the angle-snap threshold in degrees — the angular increment that drawing snaps to when angle snapping is on.",
|
|
3459
|
+
"examplePrompts": [
|
|
3460
|
+
"Set the angle snap to 15 degrees",
|
|
3461
|
+
"Change angle snapping to every 45 degrees",
|
|
3462
|
+
"Make drawing snap at 30 degree increments",
|
|
3463
|
+
"Adjust the rotation snap angle\n\n# Example\n```ts\n// snap drawing to 15-degree increments (applies while angle snapping is on)\nawait snaptrude.core.project.settings.snaps.setAngle(15)\nawait snaptrude.core.project.settings.snaps.enableAngle()\n```"
|
|
3464
|
+
],
|
|
3465
|
+
"argsType": "number",
|
|
3466
|
+
"resultType": "boolean"
|
|
3467
|
+
},
|
|
3468
|
+
{
|
|
3469
|
+
"path": "core.project.settings.snaps.setDimension",
|
|
3470
|
+
"namespace": "core.project.settings.snaps",
|
|
3471
|
+
"summary": "Set the dimension-snap threshold — the length increment that drawing and editing snap to when dimension snapping is on.",
|
|
3472
|
+
"examplePrompts": [
|
|
3473
|
+
"Set the dimension snap to 100mm",
|
|
3474
|
+
"Change the snap distance to half a metre",
|
|
3475
|
+
"Make the cursor snap every 6 inches when drawing",
|
|
3476
|
+
"Adjust the snapping increment for lengths\n\n# Example\n```ts\n// the threshold only applies while dimension snapping is on\nawait snaptrude.core.project.settings.snaps.setDimension(100)\nawait snaptrude.core.project.settings.snaps.enableDimension()\n```"
|
|
3477
|
+
],
|
|
3478
|
+
"argsType": "number",
|
|
3479
|
+
"resultType": "boolean"
|
|
3480
|
+
},
|
|
3481
|
+
{
|
|
3482
|
+
"path": "core.proposals.create",
|
|
3483
|
+
"namespace": "core.proposals",
|
|
3484
|
+
"summary": "Create a new design option (proposal) — blank, or configured from a base proposal (the New Proposal modal's two paths).",
|
|
3485
|
+
"examplePrompts": [
|
|
3486
|
+
"Create a design option called Scheme B",
|
|
3487
|
+
"Add a new proposal named Option 2",
|
|
3488
|
+
"Duplicate the current proposal as Scheme C",
|
|
3489
|
+
"Create a design option based on Proposal 1 that shares its site layer\n\n# Example\n```ts\n// blank design option\nconst { id } = await snaptrude.core.proposals.create(\"Scheme B\")\n\n// configured from the active proposal: duplicate every layer\nconst base = await snaptrude.core.proposals.getActive()\nif (base) {\nconst { id: dup } = await snaptrude.core.proposals.create(\"Scheme C\", {\nbaseProposalId: base.id,\n})\n// …or share one layer and leave the rest behind\nconst { id: shared } = await snaptrude.core.proposals.create(\"Scheme D\", {\nbaseProposalId: base.id,\nlayers: [{ bucketId: base.defaultBucketId, action: \"share\" }],\n})\n}\n```"
|
|
3490
|
+
],
|
|
3491
|
+
"argsType": "string",
|
|
3492
|
+
"resultType": "PluginCoreProposalsCreateResult"
|
|
3493
|
+
},
|
|
3494
|
+
{
|
|
3495
|
+
"path": "core.proposals.delete",
|
|
3496
|
+
"namespace": "core.proposals",
|
|
3497
|
+
"summary": "Delete a proposal.",
|
|
3498
|
+
"examplePrompts": [
|
|
3499
|
+
"Delete proposal prop_2 and everything in it",
|
|
3500
|
+
"Remove this design option and destroy its geometry",
|
|
3501
|
+
"Merge prop_2's layers into prop_1 and delete prop_2\n\n# Example\n```ts\n// destroy the proposal and its exclusive geometry\nawait snaptrude.core.proposals.delete(\"prop_2\", { deleteObjects: true })\n// …or keep the geometry by transferring its buckets to prop_1 first\nawait snaptrude.core.proposals.delete(\"prop_2\", { targetProposalId: \"prop_1\" })\n```"
|
|
3502
|
+
],
|
|
3503
|
+
"argsType": "string",
|
|
3504
|
+
"resultType": "PluginCoreProposalsDeleteResult"
|
|
3505
|
+
},
|
|
3506
|
+
{
|
|
3507
|
+
"path": "core.proposals.get",
|
|
3508
|
+
"namespace": "core.proposals",
|
|
3509
|
+
"summary": "Get a single proposal by id.",
|
|
3510
|
+
"examplePrompts": [
|
|
3511
|
+
"Get the proposal with id prop_1",
|
|
3512
|
+
"Look up a single design option by its id",
|
|
3513
|
+
"Which buckets belong to proposal prop_2?\n\n# Example\n```ts\nconst proposal = await snaptrude.core.proposals.get(\"prop_1\")\nif (proposal) console.log(proposal.name, proposal.bucketIds)\n```"
|
|
3514
|
+
],
|
|
3515
|
+
"argsType": "string",
|
|
3516
|
+
"resultType": "PluginCoreProposalsGetResult"
|
|
3517
|
+
},
|
|
3518
|
+
{
|
|
3519
|
+
"path": "core.proposals.getActive",
|
|
3520
|
+
"namespace": "core.proposals",
|
|
3521
|
+
"summary": "Get the active proposal.",
|
|
3522
|
+
"examplePrompts": [
|
|
3523
|
+
"Which design option is active?",
|
|
3524
|
+
"Get the current proposal",
|
|
3525
|
+
"What proposal am I working in?\n\n# Example\n```ts\nconst active = await snaptrude.core.proposals.getActive()\nif (active) console.log(active.id, active.name)\n```"
|
|
3526
|
+
],
|
|
3527
|
+
"argsType": null,
|
|
3528
|
+
"resultType": "PluginCoreProposalsGetActiveResult"
|
|
3529
|
+
},
|
|
3530
|
+
{
|
|
3531
|
+
"path": "core.proposals.isActive",
|
|
3532
|
+
"namespace": "core.proposals",
|
|
3533
|
+
"summary": "Test whether a proposal is the active one.",
|
|
3534
|
+
"examplePrompts": [
|
|
3535
|
+
"Is proposal prop_2 the active one?",
|
|
3536
|
+
"Check whether this design option is currently shown",
|
|
3537
|
+
"Am I working in proposal prop_1?\n\n# Example\n```ts\nif (await snaptrude.core.proposals.isActive(\"prop_1\")) {\nconsole.log(\"prop_1 is active\")\n}\n```"
|
|
3538
|
+
],
|
|
3539
|
+
"argsType": "string",
|
|
3540
|
+
"resultType": "boolean"
|
|
3541
|
+
},
|
|
3542
|
+
{
|
|
3543
|
+
"path": "core.proposals.list",
|
|
3544
|
+
"namespace": "core.proposals",
|
|
3545
|
+
"summary": "List the design options (proposals) in the active project.",
|
|
3546
|
+
"examplePrompts": [
|
|
3547
|
+
"List all the design options in this project",
|
|
3548
|
+
"How many proposals does this project have?",
|
|
3549
|
+
"Show every design variant with its name\n\n# Example\n```ts\nconst { proposals } = await snaptrude.core.proposals.list()\nfor (const p of proposals) console.log(p.id, p.name, p.isActive)\n```"
|
|
3550
|
+
],
|
|
3551
|
+
"argsType": null,
|
|
3552
|
+
"resultType": "PluginCoreProposalsListResult"
|
|
3553
|
+
},
|
|
3554
|
+
{
|
|
3555
|
+
"path": "core.proposals.listForComponent",
|
|
3556
|
+
"namespace": "core.proposals",
|
|
3557
|
+
"summary": "List the proposals a component belongs to.",
|
|
3558
|
+
"examplePrompts": [
|
|
3559
|
+
"Which design options is this component part of?",
|
|
3560
|
+
"List the proposals that contain this wall",
|
|
3561
|
+
"Is this element shared across multiple design variants?\n\n# Example\n```ts\nconst { proposals } = await snaptrude.core.proposals.listForComponent(wall)\nconsole.log(`shared across ${proposals.length} proposals`)\n```"
|
|
3562
|
+
],
|
|
3563
|
+
"argsType": "ComponentHandle",
|
|
3564
|
+
"resultType": "PluginCoreProposalsListForComponentResult"
|
|
3565
|
+
},
|
|
3566
|
+
{
|
|
3567
|
+
"path": "core.proposals.rename",
|
|
3568
|
+
"namespace": "core.proposals",
|
|
3569
|
+
"summary": "Rename a proposal.",
|
|
3570
|
+
"examplePrompts": [
|
|
3571
|
+
"Rename proposal prop_1 to Final Scheme",
|
|
3572
|
+
"Change the name of this design option",
|
|
3573
|
+
"Call proposal prop_2 \"Option A\"\n\n# Example\n```ts\nconst proposal = await snaptrude.core.proposals.rename(\"prop_1\", \"Final Scheme\")\n```"
|
|
3574
|
+
],
|
|
3575
|
+
"argsType": "string",
|
|
3576
|
+
"resultType": "PluginCoreProposalsRenameResult"
|
|
2271
3577
|
},
|
|
2272
3578
|
{
|
|
2273
|
-
"path": "core.
|
|
2274
|
-
"namespace": "core.
|
|
2275
|
-
"summary": "
|
|
3579
|
+
"path": "core.proposals.setActive",
|
|
3580
|
+
"namespace": "core.proposals",
|
|
3581
|
+
"summary": "Switch the active proposal.",
|
|
2276
3582
|
"examplePrompts": [
|
|
2277
|
-
"
|
|
2278
|
-
"
|
|
2279
|
-
"
|
|
2280
|
-
"Switch length snapping back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableDimension()\n```"
|
|
3583
|
+
"Switch to proposal prop_2",
|
|
3584
|
+
"Make Scheme B the active design option",
|
|
3585
|
+
"Show me the other proposal\n\n# Example\n```ts\nawait snaptrude.core.proposals.setActive(\"prop_2\")\n```"
|
|
2281
3586
|
],
|
|
2282
|
-
"argsType":
|
|
2283
|
-
"resultType": "
|
|
3587
|
+
"argsType": "string",
|
|
3588
|
+
"resultType": "PluginCoreProposalsSetActiveResult"
|
|
2284
3589
|
},
|
|
2285
3590
|
{
|
|
2286
|
-
"path": "core.
|
|
2287
|
-
"namespace": "core.
|
|
2288
|
-
"summary": "
|
|
3591
|
+
"path": "core.storeys.copy",
|
|
3592
|
+
"namespace": "core.storeys",
|
|
3593
|
+
"summary": "Copy a storey into the adjacent level, up or down.",
|
|
2289
3594
|
"examplePrompts": [
|
|
2290
|
-
"
|
|
2291
|
-
"
|
|
2292
|
-
"
|
|
2293
|
-
"
|
|
3595
|
+
"Copy this floor to the storey above",
|
|
3596
|
+
"Copy the ground floor down into a new basement",
|
|
3597
|
+
"Repeat this level upwards with its own independent geometry",
|
|
3598
|
+
"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```"
|
|
2294
3599
|
],
|
|
2295
|
-
"argsType":
|
|
2296
|
-
"resultType": "
|
|
3600
|
+
"argsType": "\"up\" | \"down\"",
|
|
3601
|
+
"resultType": "PluginStoryDuplicateResult"
|
|
2297
3602
|
},
|
|
2298
3603
|
{
|
|
2299
|
-
"path": "core.
|
|
2300
|
-
"namespace": "core.
|
|
2301
|
-
"summary": "
|
|
3604
|
+
"path": "core.storeys.create",
|
|
3605
|
+
"namespace": "core.storeys",
|
|
3606
|
+
"summary": "Create a new storey (floor) in the project.",
|
|
2302
3607
|
"examplePrompts": [
|
|
2303
|
-
"
|
|
2304
|
-
"
|
|
2305
|
-
"
|
|
2306
|
-
"
|
|
3608
|
+
"Add a third floor to the building",
|
|
3609
|
+
"Create a new storey above the second floor",
|
|
3610
|
+
"Add a basement level to this project",
|
|
3611
|
+
"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```"
|
|
2307
3612
|
],
|
|
2308
|
-
"argsType":
|
|
2309
|
-
"resultType": "
|
|
3613
|
+
"argsType": "number",
|
|
3614
|
+
"resultType": "PluginStoryCreateResult"
|
|
2310
3615
|
},
|
|
2311
3616
|
{
|
|
2312
|
-
"path": "core.
|
|
2313
|
-
"namespace": "core.
|
|
2314
|
-
"summary": "
|
|
3617
|
+
"path": "core.storeys.delete",
|
|
3618
|
+
"namespace": "core.storeys",
|
|
3619
|
+
"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.",
|
|
2315
3620
|
"examplePrompts": [
|
|
2316
|
-
"
|
|
2317
|
-
"
|
|
2318
|
-
"
|
|
2319
|
-
"
|
|
3621
|
+
"Delete the top floor",
|
|
3622
|
+
"Remove the basement level",
|
|
3623
|
+
"Get rid of storey 3",
|
|
3624
|
+
"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```"
|
|
2320
3625
|
],
|
|
2321
|
-
"argsType":
|
|
2322
|
-
"resultType": "
|
|
3626
|
+
"argsType": "number",
|
|
3627
|
+
"resultType": "PluginStoryDeleteResult"
|
|
2323
3628
|
},
|
|
2324
3629
|
{
|
|
2325
|
-
"path": "core.
|
|
2326
|
-
"namespace": "core.
|
|
2327
|
-
"summary": "Get
|
|
3630
|
+
"path": "core.storeys.get",
|
|
3631
|
+
"namespace": "core.storeys",
|
|
3632
|
+
"summary": "Get properties of a storey by its storey number.",
|
|
2328
3633
|
"examplePrompts": [
|
|
2329
|
-
"What
|
|
2330
|
-
"
|
|
2331
|
-
"
|
|
2332
|
-
"
|
|
3634
|
+
"What is the height of the ground floor?",
|
|
3635
|
+
"How many rooms are on the second storey?",
|
|
3636
|
+
"Get the total floor area of level 3",
|
|
3637
|
+
"Is the first floor hidden in the viewport?",
|
|
3638
|
+
"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```"
|
|
2333
3639
|
],
|
|
2334
|
-
"argsType":
|
|
2335
|
-
"resultType": "
|
|
3640
|
+
"argsType": "number",
|
|
3641
|
+
"resultType": "PluginStoryGetResult"
|
|
2336
3642
|
},
|
|
2337
3643
|
{
|
|
2338
|
-
"path": "core.
|
|
2339
|
-
"namespace": "core.
|
|
2340
|
-
"summary": "
|
|
3644
|
+
"path": "core.storeys.list",
|
|
3645
|
+
"namespace": "core.storeys",
|
|
3646
|
+
"summary": "List all storeys in the current project.",
|
|
2341
3647
|
"examplePrompts": [
|
|
2342
|
-
"
|
|
2343
|
-
"
|
|
2344
|
-
"
|
|
2345
|
-
"
|
|
3648
|
+
"How many floors does this building have?",
|
|
3649
|
+
"List all the storeys in the project",
|
|
3650
|
+
"Show me every level with its name",
|
|
3651
|
+
"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```"
|
|
2346
3652
|
],
|
|
2347
3653
|
"argsType": null,
|
|
2348
|
-
"resultType": "
|
|
3654
|
+
"resultType": "PluginCoreStoreysListResult"
|
|
2349
3655
|
},
|
|
2350
3656
|
{
|
|
2351
|
-
"path": "core.
|
|
2352
|
-
"namespace": "core.
|
|
2353
|
-
"summary": "
|
|
3657
|
+
"path": "core.storeys.setActive",
|
|
3658
|
+
"namespace": "core.storeys",
|
|
3659
|
+
"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.",
|
|
2354
3660
|
"examplePrompts": [
|
|
2355
|
-
"
|
|
2356
|
-
"
|
|
2357
|
-
"
|
|
2358
|
-
"
|
|
3661
|
+
"Switch to the second floor",
|
|
3662
|
+
"Make the ground storey active",
|
|
3663
|
+
"Go to the basement level",
|
|
3664
|
+
"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```"
|
|
2359
3665
|
],
|
|
2360
3666
|
"argsType": "number",
|
|
2361
|
-
"resultType": "
|
|
3667
|
+
"resultType": "PluginStorySetActiveResult"
|
|
2362
3668
|
},
|
|
2363
3669
|
{
|
|
2364
|
-
"path": "core.
|
|
2365
|
-
"namespace": "core.
|
|
2366
|
-
"summary": "
|
|
3670
|
+
"path": "core.storeys.update",
|
|
3671
|
+
"namespace": "core.storeys",
|
|
3672
|
+
"summary": "Update a storey's floor-to-floor `height` and/or `name`.",
|
|
2367
3673
|
"examplePrompts": [
|
|
2368
|
-
"
|
|
2369
|
-
"
|
|
2370
|
-
"
|
|
2371
|
-
"
|
|
3674
|
+
"Change the ground floor height to 3.5 metres",
|
|
3675
|
+
"Make the second storey taller",
|
|
3676
|
+
"Rename the ground floor to \"Lobby\"",
|
|
3677
|
+
"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```"
|
|
2372
3678
|
],
|
|
2373
3679
|
"argsType": "number",
|
|
2374
|
-
"resultType": "
|
|
3680
|
+
"resultType": "PluginStoryUpdateResult"
|
|
2375
3681
|
},
|
|
2376
3682
|
{
|
|
2377
3683
|
"path": "core.tags.assign",
|
|
@@ -2467,7 +3773,8 @@
|
|
|
2467
3773
|
"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```"
|
|
2468
3774
|
],
|
|
2469
3775
|
"argsType": "ComponentHandle",
|
|
2470
|
-
"resultType": "PluginCoreTagsGetTagsForComponentResult"
|
|
3776
|
+
"resultType": "PluginCoreTagsGetTagsForComponentResult",
|
|
3777
|
+
"deprecated": "core.tags.listForComponent"
|
|
2471
3778
|
},
|
|
2472
3779
|
{
|
|
2473
3780
|
"path": "core.tags.list",
|
|
@@ -2505,6 +3812,18 @@
|
|
|
2505
3812
|
"argsType": "{ tagId?: string; categoryId?: string; untagged?: boolean }",
|
|
2506
3813
|
"resultType": "PluginCoreTagsListComponentsResult"
|
|
2507
3814
|
},
|
|
3815
|
+
{
|
|
3816
|
+
"path": "core.tags.listForComponent",
|
|
3817
|
+
"namespace": "core.tags",
|
|
3818
|
+
"summary": "List the tags carried by a component.",
|
|
3819
|
+
"examplePrompts": [
|
|
3820
|
+
"What tags does this space have?",
|
|
3821
|
+
"List the tags on component cmp_42",
|
|
3822
|
+
"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```"
|
|
3823
|
+
],
|
|
3824
|
+
"argsType": "ComponentHandle",
|
|
3825
|
+
"resultType": "PluginCoreTagsGetTagsForComponentResult"
|
|
3826
|
+
},
|
|
2508
3827
|
{
|
|
2509
3828
|
"path": "core.tags.unassign",
|
|
2510
3829
|
"namespace": "core.tags",
|
|
@@ -2606,6 +3925,19 @@
|
|
|
2606
3925
|
"argsType": "PUnitType",
|
|
2607
3926
|
"resultType": "boolean"
|
|
2608
3927
|
},
|
|
3928
|
+
{
|
|
3929
|
+
"path": "core.user.getLocale",
|
|
3930
|
+
"namespace": "core.user",
|
|
3931
|
+
"summary": "Get the viewer's locale: IANA timezone and BCP-47 language tag, resolved from the browser (`Intl.DateTimeFormat().resolvedOptions().timeZone` and `navigator.language`). Locale only — no precise location.",
|
|
3932
|
+
"examplePrompts": [
|
|
3933
|
+
"What timezone is the user in?",
|
|
3934
|
+
"Get the viewer's language for localized labels",
|
|
3935
|
+
"Format the report date in the user's local timezone",
|
|
3936
|
+
"Which locale should I use for this plugin's UI?\n\n# Example\n```ts\nconst { timezone, language } = await snaptrude.core.user.getLocale()\n```"
|
|
3937
|
+
],
|
|
3938
|
+
"argsType": null,
|
|
3939
|
+
"resultType": "PluginUserLocale"
|
|
3940
|
+
},
|
|
2609
3941
|
{
|
|
2610
3942
|
"path": "core.zoom.extents",
|
|
2611
3943
|
"namespace": "core.zoom",
|
|
@@ -2618,7 +3950,8 @@
|
|
|
2618
3950
|
"Show me the full scene\n\n# Example\n```ts\nawait snaptrude.core.zoom.extents()\n```"
|
|
2619
3951
|
],
|
|
2620
3952
|
"argsType": null,
|
|
2621
|
-
"resultType": "boolean"
|
|
3953
|
+
"resultType": "boolean",
|
|
3954
|
+
"deprecated": "core.camera.zoomExtents"
|
|
2622
3955
|
},
|
|
2623
3956
|
{
|
|
2624
3957
|
"path": "core.zoom.selection",
|
|
@@ -2631,7 +3964,8 @@
|
|
|
2631
3964
|
"Fit the view to the selected room\n\n# Example\n```ts\nawait snaptrude.core.zoom.selection()\n```"
|
|
2632
3965
|
],
|
|
2633
3966
|
"argsType": null,
|
|
2634
|
-
"resultType": "boolean"
|
|
3967
|
+
"resultType": "boolean",
|
|
3968
|
+
"deprecated": "core.camera.zoomSelection"
|
|
2635
3969
|
},
|
|
2636
3970
|
{
|
|
2637
3971
|
"path": "design.boolean.intersect",
|
|
@@ -2677,7 +4011,7 @@
|
|
|
2677
4011
|
{
|
|
2678
4012
|
"path": "design.create.beam",
|
|
2679
4013
|
"namespace": "design.create",
|
|
2680
|
-
"summary": "Create a **beam** by extruding a cross-section contour along `direction` by `length`.",
|
|
4014
|
+
"summary": "Create a **beam** by extruding a cross-section contour along `direction` by `length`. Matches the Snaptrude beam tool's semantics: the beam body hangs BELOW the plane the section is authored on.",
|
|
2681
4015
|
"examplePrompts": [
|
|
2682
4016
|
"Add a beam spanning 6 metres between the columns",
|
|
2683
4017
|
"Create a horizontal beam along the X axis",
|
|
@@ -2687,6 +4021,19 @@
|
|
|
2687
4021
|
"argsType": "ContourHandle",
|
|
2688
4022
|
"resultType": "ComponentHandle"
|
|
2689
4023
|
},
|
|
4024
|
+
{
|
|
4025
|
+
"path": "design.create.buildableEnvelope",
|
|
4026
|
+
"namespace": "design.create",
|
|
4027
|
+
"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).",
|
|
4028
|
+
"examplePrompts": [
|
|
4029
|
+
"Create a buildable envelope for my site",
|
|
4030
|
+
"Generate the zoning envelope with 10ft front setbacks",
|
|
4031
|
+
"Show the maximum buildable volume with a 150ft height limit",
|
|
4032
|
+
"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```"
|
|
4033
|
+
],
|
|
4034
|
+
"argsType": "PluginBuildableEnvelopePolygonVertex[]",
|
|
4035
|
+
"resultType": "PluginBuildableEnvelopeCreateResult"
|
|
4036
|
+
},
|
|
2690
4037
|
{
|
|
2691
4038
|
"path": "design.create.ceiling",
|
|
2692
4039
|
"namespace": "design.create",
|
|
@@ -2703,7 +4050,7 @@
|
|
|
2703
4050
|
{
|
|
2704
4051
|
"path": "design.create.column",
|
|
2705
4052
|
"namespace": "design.create",
|
|
2706
|
-
"summary": "Create a **column** by extruding a cross-section contour upward by `height` from a base `position`.",
|
|
4053
|
+
"summary": "Create a **column** by extruding a cross-section contour upward by `height` from a base `position`. The column is built to EXACTLY `height` — unlike the interactive draw tool, no slab-thickness deduction is applied.",
|
|
2707
4054
|
"examplePrompts": [
|
|
2708
4055
|
"Add a 3m tall column at this point",
|
|
2709
4056
|
"Place a column at the grid intersection",
|
|
@@ -2722,10 +4069,26 @@
|
|
|
2722
4069
|
"Duplicate the selected furniture along the X axis",
|
|
2723
4070
|
"Make 5 copies of this column at 4 metre intervals",
|
|
2724
4071
|
"Array these walls with a 3m offset",
|
|
2725
|
-
"Clone the desk as a unique copy, not an instance
|
|
4072
|
+
"Clone the desk as a unique copy, not an instance"
|
|
2726
4073
|
],
|
|
2727
4074
|
"argsType": "ComponentHandle[]",
|
|
2728
|
-
"resultType": "ComponentHandle[]"
|
|
4075
|
+
"resultType": "ComponentHandle[]",
|
|
4076
|
+
"performance": "To place N repeats of the same geometry, bulk-create the seed(s) once then call this ONCE with `{ count: N - 1 }` — one host round-trip for all copies. Never reproduce geometry by looping `design.create.*` N times. Copy only after the create that mints the seed ids. # Example ```ts const { vec3 } = snaptrude.core.math const copies = await snaptrude.design.create.copy([\"space-id\"], vec3.new(6, 0, 0), { count: 3 }) ```"
|
|
4077
|
+
},
|
|
4078
|
+
{
|
|
4079
|
+
"path": "design.create.door",
|
|
4080
|
+
"namespace": "design.create",
|
|
4081
|
+
"summary": "Place a **door** from the catalog into a host wall.",
|
|
4082
|
+
"examplePrompts": [
|
|
4083
|
+
"Add a door to this wall here",
|
|
4084
|
+
"Place a sliding door on the selected wall",
|
|
4085
|
+
"Put a door from the catalog at this point on the wall",
|
|
4086
|
+
"Insert the entrance door into this wall",
|
|
4087
|
+
"Add a door to the wall and call it Entry-01",
|
|
4088
|
+
"Add a door that opens into the living room\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst door = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Entry-01\" },\n)\n// …facing a specific side of the wall (pass a point inside that room):\nconst intoKitchen = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\nawait snaptrude.core.math.vec3.new(3, 0, 9),\n)\n```"
|
|
4089
|
+
],
|
|
4090
|
+
"argsType": "string",
|
|
4091
|
+
"resultType": "ComponentHandle"
|
|
2729
4092
|
},
|
|
2730
4093
|
{
|
|
2731
4094
|
"path": "design.create.floor",
|
|
@@ -2749,7 +4112,8 @@
|
|
|
2749
4112
|
"Add a sofa from the furniture catalog to the living room",
|
|
2750
4113
|
"Drop a desk into the scene at 3, 0, 5",
|
|
2751
4114
|
"Insert the uploaded bed model in the bedroom",
|
|
2752
|
-
"Put a table from my project library here and name it Table-01
|
|
4115
|
+
"Put a table from my project library here and name it Table-01",
|
|
4116
|
+
"Place a chair here rotated 90 degrees\n\n# Example\n```ts\nconst chair = await snaptrude.design.create.furniture(\n\"6620f1a…\", // from design.furniture.listCatalog()\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Chair-01\" },\n)\n// …placed already turned 90° about the vertical axis:\nconst turned = await snaptrude.design.create.furniture(\n\"6620f1a…\",\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\n90,\n)\n```"
|
|
2753
4117
|
],
|
|
2754
4118
|
"argsType": "string",
|
|
2755
4119
|
"resultType": "ComponentHandle"
|
|
@@ -2767,6 +4131,18 @@
|
|
|
2767
4131
|
"argsType": "ContourHandle",
|
|
2768
4132
|
"resultType": "ComponentHandle"
|
|
2769
4133
|
},
|
|
4134
|
+
{
|
|
4135
|
+
"path": "design.create.massFromBrep",
|
|
4136
|
+
"namespace": "design.create",
|
|
4137
|
+
"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).",
|
|
4138
|
+
"examplePrompts": [
|
|
4139
|
+
"Create a mass from these faces",
|
|
4140
|
+
"Turn this custom brep into a scene mass",
|
|
4141
|
+
"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```"
|
|
4142
|
+
],
|
|
4143
|
+
"argsType": "BrepHandle",
|
|
4144
|
+
"resultType": "ComponentHandle"
|
|
4145
|
+
},
|
|
2770
4146
|
{
|
|
2771
4147
|
"path": "design.create.referenceLines",
|
|
2772
4148
|
"namespace": "design.create",
|
|
@@ -2808,6 +4184,20 @@
|
|
|
2808
4184
|
"argsType": "ContourHandle",
|
|
2809
4185
|
"resultType": "ComponentHandle"
|
|
2810
4186
|
},
|
|
4187
|
+
{
|
|
4188
|
+
"path": "design.create.smartLayout",
|
|
4189
|
+
"namespace": "design.create",
|
|
4190
|
+
"summary": "Place a **smart layout** — clone an in-scene template cluster (walls, furniture, doors, windows, floors) into one or more target ROOM/DEPARTMENT spaces, adapting orientation and fit to each target.",
|
|
4191
|
+
"examplePrompts": [
|
|
4192
|
+
"Copy this room's layout into the selected rooms",
|
|
4193
|
+
"Apply this furniture arrangement to the other offices",
|
|
4194
|
+
"Replicate this template into these two spaces",
|
|
4195
|
+
"Place this desk cluster into every meeting room",
|
|
4196
|
+
"Use this room as a template for the rooms I selected but keep them visible\n\n# Example\n```ts\nconst [templateRoom, ...targets] = await snaptrude.design.query.listSpaces({ isSelected: true })\nconst result = await snaptrude.design.create.smartLayout({\ntemplateComponents: [templateRoom],\ntargets,\n})\nconsole.log(\"placed walls:\", result.created.walls.length, \"skipped:\", result.skippedWalls)\n\n// …or clone a saved group by its id (from core.groups.list)\nconst { groups } = await snaptrude.core.groups.list()\nawait snaptrude.design.create.smartLayout({ templateGroup: groups[0].id, targets })\n```"
|
|
4197
|
+
],
|
|
4198
|
+
"argsType": "PluginSmartLayoutArgs",
|
|
4199
|
+
"resultType": "PluginSmartLayoutResult"
|
|
4200
|
+
},
|
|
2811
4201
|
{
|
|
2812
4202
|
"path": "design.create.space",
|
|
2813
4203
|
"namespace": "design.create",
|
|
@@ -2817,23 +4207,27 @@
|
|
|
2817
4207
|
"Add a new space on the current storey using this footprint",
|
|
2818
4208
|
"Make a bedroom here and assign it to the Residential department",
|
|
2819
4209
|
"Extrude this closed outline into a 10 foot high room",
|
|
2820
|
-
"Can you create a Kitchen space from the sketch I just drew
|
|
4210
|
+
"Can you create a Kitchen space from the sketch I just drew?",
|
|
4211
|
+
"Create a bedroom on the second floor from this outline"
|
|
2821
4212
|
],
|
|
2822
4213
|
"argsType": "ContourHandle",
|
|
2823
|
-
"resultType": "ComponentHandle"
|
|
4214
|
+
"resultType": "ComponentHandle",
|
|
4215
|
+
"performance": "For MORE THAN ONE space, call `design.create.spaces(items[])` — the whole batch is one host round-trip. Looping this single-space creator is N round-trips (slow, and a large loop can trip the plugin rate limit). # Example ```ts const v = snaptrude.core.math.vec3 const outer = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(10, 0, 0), await v.new(10, 0, 8), await v.new(0, 0, 8), ]) const contour = await snaptrude.core.geom.create.contourFromProfile(outer) const space = await snaptrude.design.create.space(contour, 3, \"Living\") // …place one directly on the second floor (no setActive dance): const upstairs = await snaptrude.design.create.space( contour, 3, \"Bedroom\", undefined, undefined, undefined, undefined, 2, ) ```"
|
|
2824
4216
|
},
|
|
2825
4217
|
{
|
|
2826
4218
|
"path": "design.create.spaces",
|
|
2827
4219
|
"namespace": "design.create",
|
|
2828
|
-
"summary": "Create **many spaces** in one undoable operation (bulk plural of {@linkcode space}). Migrated from the removed `entity.space.bulkCreate`. Each item extrudes a contour footprint up `height`. Validate-all-or-throw; one command. For a rectangular (box) space, build the footprint with `core.geom.create.profileRect` → `contourFromProfile`, then pass it as an item.",
|
|
4220
|
+
"summary": "Create **many spaces** in one undoable operation (bulk plural of {@linkcode space}). Migrated from the removed `entity.space.bulkCreate`. Each item extrudes a contour footprint up `height`. Validate-all-or-throw; one command. For a rectangular (box) space, build the footprint with `core.geom.create.profileRect` → `contourFromProfile`, then pass it as an item. Each item may carry its own `storey` (see {@linkcode PluginCreateSpaceItem}) so a single call can populate several floors at once.",
|
|
2829
4221
|
"examplePrompts": [
|
|
2830
4222
|
"Create several rooms at once from these footprints",
|
|
2831
4223
|
"Generate all the bedrooms in one operation",
|
|
2832
4224
|
"Bulk create the spaces for this floor plan",
|
|
2833
|
-
"Add three rooms with different heights in a single undo step
|
|
4225
|
+
"Add three rooms with different heights in a single undo step",
|
|
4226
|
+
"Create one room on the ground floor and one on the first floor"
|
|
2834
4227
|
],
|
|
2835
4228
|
"argsType": "PluginCreateSpaceItem[]",
|
|
2836
|
-
"resultType": "ComponentHandle[]"
|
|
4229
|
+
"resultType": "ComponentHandle[]",
|
|
4230
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip. Always prefer this over calling `design.create.space` in a loop: build the full `items[]` array first (all per-item math and geometry up front), then make one call. # Example ```ts const rect = await snaptrude.core.geom.create.profileRect(4, 3) const contour = await snaptrude.core.geom.create.contourFromProfile(rect) const [a, b] = await snaptrude.design.create.spaces([ { contour, height: 3, label: \"R1\" }, { contour, height: 4, label: \"R2\", position: await vec3.new(10, 0, 0) }, ]) ```"
|
|
2837
4231
|
},
|
|
2838
4232
|
{
|
|
2839
4233
|
"path": "design.create.staircase",
|
|
@@ -2858,11 +4252,28 @@
|
|
|
2858
4252
|
"Create 3m high, 200mm thick walls from these points",
|
|
2859
4253
|
"Build a wall run around the room outline",
|
|
2860
4254
|
"Turn this polyline sketch into walls",
|
|
2861
|
-
"Add walls with mitred corners along the path
|
|
4255
|
+
"Add walls with mitred corners along the path",
|
|
4256
|
+
"Draw brick walls with plaster along this outline",
|
|
4257
|
+
"Build the perimeter in exposed concrete walls\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst centerlines = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(8, 0, 0),\nawait v.new(8, 0, 6),\n])\nconst walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)\n// …built as a specific wall type (layers/material/thickness from the type):\nconst [brick] = await snaptrude.design.types.list(\"wall\")\nconst brickWalls = await snaptrude.design.create.walls(\ncenterlines, 3, undefined, brick.label,\n)\n```"
|
|
2862
4258
|
],
|
|
2863
4259
|
"argsType": "ProfileHandle",
|
|
2864
4260
|
"resultType": "ComponentHandle[]"
|
|
2865
4261
|
},
|
|
4262
|
+
{
|
|
4263
|
+
"path": "design.create.window",
|
|
4264
|
+
"namespace": "design.create",
|
|
4265
|
+
"summary": "Place a **window** from the catalog into a host wall.",
|
|
4266
|
+
"examplePrompts": [
|
|
4267
|
+
"Add a window to this wall here",
|
|
4268
|
+
"Place a casement window on the selected wall",
|
|
4269
|
+
"Put a window from the catalog at this point on the wall",
|
|
4270
|
+
"Insert a window into the living room wall",
|
|
4271
|
+
"Add a window to the wall and name it Win-01",
|
|
4272
|
+
"Add a casement window opening toward the garden side\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.windows.listCatalog()\nconst window = await snaptrude.design.create.window(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Win-01\" },\n)\n```"
|
|
4273
|
+
],
|
|
4274
|
+
"argsType": "string",
|
|
4275
|
+
"resultType": "ComponentHandle"
|
|
4276
|
+
},
|
|
2866
4277
|
{
|
|
2867
4278
|
"path": "design.delete.entities",
|
|
2868
4279
|
"namespace": "design.delete",
|
|
@@ -2872,10 +4283,50 @@
|
|
|
2872
4283
|
"Remove these walls from the model",
|
|
2873
4284
|
"Get rid of this mass entirely",
|
|
2874
4285
|
"Delete all the furniture I picked",
|
|
2875
|
-
"Remove the door and window I just created
|
|
4286
|
+
"Remove the door and window I just created"
|
|
2876
4287
|
],
|
|
2877
4288
|
"argsType": "ComponentHandle[]",
|
|
2878
|
-
"resultType": "PluginDesignChangeResult"
|
|
4289
|
+
"resultType": "PluginDesignChangeResult",
|
|
4290
|
+
"performance": "Array delete — pass every target in one call (one host round-trip). There is no per-item delete; collect the whole set and never loop this per entity. # Example ```ts // Hard-delete every furniture item on storey 2 (a single undo entry) const furniture = await snaptrude.design.query.listFurniture({ storeys: [2] }) if (furniture.length > 0) { const { affected } = await snaptrude.design.delete.entities(furniture) } ```"
|
|
4291
|
+
},
|
|
4292
|
+
{
|
|
4293
|
+
"path": "design.doors.exists",
|
|
4294
|
+
"namespace": "design.doors",
|
|
4295
|
+
"summary": "Test whether a door catalog item exists for the given library id.",
|
|
4296
|
+
"examplePrompts": [
|
|
4297
|
+
"Is this door still in the library?",
|
|
4298
|
+
"Check whether a door catalog item with this id exists",
|
|
4299
|
+
"Does my team library have this door?",
|
|
4300
|
+
"Verify the door is available before placing it\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst stillAvailable = await snaptrude.design.doors.exists(entry.id)\nconsole.log(stillAvailable ? \"safe to place\" : \"removed from library\")\n```"
|
|
4301
|
+
],
|
|
4302
|
+
"argsType": "string",
|
|
4303
|
+
"resultType": "boolean"
|
|
4304
|
+
},
|
|
4305
|
+
{
|
|
4306
|
+
"path": "design.doors.getCatalogItem",
|
|
4307
|
+
"namespace": "design.doors",
|
|
4308
|
+
"summary": "Get a single door catalog item by its library id.",
|
|
4309
|
+
"examplePrompts": [
|
|
4310
|
+
"Get the details of this door from the library",
|
|
4311
|
+
"Look up the catalog entry for this door id",
|
|
4312
|
+
"What is the cost of this door item?",
|
|
4313
|
+
"Show me the family name of this door in the catalog\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst item = await snaptrude.design.doors.getCatalogItem(entry.id)\nif (item) console.log(item.name, item.source, item.dbType)\n```"
|
|
4314
|
+
],
|
|
4315
|
+
"argsType": "string",
|
|
4316
|
+
"resultType": "PluginObjectCatalogItem | null"
|
|
4317
|
+
},
|
|
4318
|
+
{
|
|
4319
|
+
"path": "design.doors.getDimensions",
|
|
4320
|
+
"namespace": "design.doors",
|
|
4321
|
+
"summary": "Get a door's full dimensions in one call — width along the wall, vertical height, and thickness through the wall — measured in the door's local oriented space. Parity with {@linkcode PluginDesignWindowsApi.getDimensions}.",
|
|
4322
|
+
"examplePrompts": [
|
|
4323
|
+
"What are the dimensions of this door?",
|
|
4324
|
+
"How big is the selected door?",
|
|
4325
|
+
"Give me the width, height and depth of this door",
|
|
4326
|
+
"Measure the entrance door including its thickness through the wall\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst dims = await snaptrude.design.doors.getDimensions(door)\nif (dims) console.log(dims.width, dims.height, dims.thickness)\n```"
|
|
4327
|
+
],
|
|
4328
|
+
"argsType": "ComponentHandle",
|
|
4329
|
+
"resultType": "PluginDoorDimensions | null"
|
|
2879
4330
|
},
|
|
2880
4331
|
{
|
|
2881
4332
|
"path": "design.doors.getFamily",
|
|
@@ -2955,6 +4406,32 @@
|
|
|
2955
4406
|
"argsType": "ComponentHandle",
|
|
2956
4407
|
"resultType": "number | null"
|
|
2957
4408
|
},
|
|
4409
|
+
{
|
|
4410
|
+
"path": "design.doors.listCatalog",
|
|
4411
|
+
"namespace": "design.doors",
|
|
4412
|
+
"summary": "List the placeable door catalog (team + general libraries), optionally restricted to one group by its `dbType` token.",
|
|
4413
|
+
"examplePrompts": [
|
|
4414
|
+
"What doors can I place in this project?",
|
|
4415
|
+
"List every door in the library",
|
|
4416
|
+
"Show me the sliding doors I can add",
|
|
4417
|
+
"Browse the door catalog\n\n# Example\n```ts\nconst [group] = await snaptrude.design.doors.listCatalogGroups()\nconst items = await snaptrude.design.doors.listCatalog(group?.dbType)\nfor (const item of items) console.log(item.id, item.name, item.thumbnailUrl)\n```"
|
|
4418
|
+
],
|
|
4419
|
+
"argsType": "string",
|
|
4420
|
+
"resultType": "PluginObjectCatalogItem[]"
|
|
4421
|
+
},
|
|
4422
|
+
{
|
|
4423
|
+
"path": "design.doors.listCatalogGroups",
|
|
4424
|
+
"namespace": "design.doors",
|
|
4425
|
+
"summary": "List the door catalog **groups** — the placement families (Swing, Sliding, Folding, Pivot, …), built-in groups merged with any team-custom types.",
|
|
4426
|
+
"examplePrompts": [
|
|
4427
|
+
"What kinds of doors can I place?",
|
|
4428
|
+
"List the door groups in the catalog",
|
|
4429
|
+
"Show me the door families available in this project",
|
|
4430
|
+
"Which door types does this project support?\n\n# Example\n```ts\nconst groups = await snaptrude.design.doors.listCatalogGroups()\nfor (const g of groups) console.log(g.dbType, g.label, g.source)\n```"
|
|
4431
|
+
],
|
|
4432
|
+
"argsType": null,
|
|
4433
|
+
"resultType": "PluginObjectCatalogGroup[]"
|
|
4434
|
+
},
|
|
2958
4435
|
{
|
|
2959
4436
|
"path": "design.doors.mirror",
|
|
2960
4437
|
"namespace": "design.doors",
|
|
@@ -3062,20 +4539,71 @@
|
|
|
3062
4539
|
"argsType": "string",
|
|
3063
4540
|
"resultType": "PluginFurnitureCatalogItem | null"
|
|
3064
4541
|
},
|
|
4542
|
+
{
|
|
4543
|
+
"path": "design.furniture.getDimensions",
|
|
4544
|
+
"namespace": "design.furniture",
|
|
4545
|
+
"summary": "Get the dimensions of a PLACED furniture item — `length` (along the object), `width` (across it) and `height` (vertical), in engine units. Mirrors the Length/Width/Height fields of the furniture properties panel.",
|
|
4546
|
+
"examplePrompts": [
|
|
4547
|
+
"How big is this sofa?",
|
|
4548
|
+
"What are the dimensions of the selected furniture?",
|
|
4549
|
+
"Measure the length, width and height of this table",
|
|
4550
|
+
"Get the size of the chair I just placed\n\n# Example\n```ts\nconst [item] = await snaptrude.design.query.listFurniture({ isSelected: true })\nconst dims = await snaptrude.design.furniture.getDimensions(item)\nif (dims) console.log(dims.length, dims.width, dims.height)\n```"
|
|
4551
|
+
],
|
|
4552
|
+
"argsType": "ComponentHandle",
|
|
4553
|
+
"resultType": "PluginFurnitureDimensions | null"
|
|
4554
|
+
},
|
|
3065
4555
|
{
|
|
3066
4556
|
"path": "design.furniture.listCatalog",
|
|
3067
4557
|
"namespace": "design.furniture",
|
|
3068
|
-
"summary": "List the placeable furniture catalog (team + general libraries)
|
|
4558
|
+
"summary": "List the placeable furniture catalog (team + general libraries), optionally filtered by library `source` and/or `category`.",
|
|
3069
4559
|
"examplePrompts": [
|
|
3070
4560
|
"What furniture can I place in this project?",
|
|
3071
4561
|
"Show me all the furniture available in the library",
|
|
3072
4562
|
"List the chairs and tables I can add to the model",
|
|
3073
4563
|
"Which furniture items are in my team's library?",
|
|
3074
|
-
"
|
|
4564
|
+
"Show me the bedroom furniture I can place\n\n# Example\n```ts\nconst bedroom = await snaptrude.design.furniture.listCatalog(\"team\", \"bedroom\")\nfor (const item of bedroom) console.log(item.id, item.name, item.thumbnailUrl)\n```"
|
|
3075
4565
|
],
|
|
3076
4566
|
"argsType": "\"team\" | \"general\"",
|
|
3077
4567
|
"resultType": "PluginFurnitureCatalogItem[]"
|
|
3078
4568
|
},
|
|
4569
|
+
{
|
|
4570
|
+
"path": "design.furniture.listCategories",
|
|
4571
|
+
"namespace": "design.furniture",
|
|
4572
|
+
"summary": "List the categories (Living, Bedroom, Kitchen, …) that organize the furniture catalog — the picker taxonomy, merged from built-in categories, team types, and backend user types. Pass a value to {@linkcode PluginDesignFurnitureApi.listCatalog}'s `category` filter.",
|
|
4573
|
+
"examplePrompts": [
|
|
4574
|
+
"What furniture categories are available?",
|
|
4575
|
+
"List the furniture categories",
|
|
4576
|
+
"Show me the furniture groups like living and bedroom",
|
|
4577
|
+
"Which furniture categories can I filter by?\n\n# Example\n```ts\nconst categories = await snaptrude.design.furniture.listCategories()\nconst [first] = categories\nconst items = await snaptrude.design.furniture.listCatalog(undefined, first)\nconsole.log(first, \"→\", items.length, \"items\")\n```"
|
|
4578
|
+
],
|
|
4579
|
+
"argsType": null,
|
|
4580
|
+
"resultType": "string[]"
|
|
4581
|
+
},
|
|
4582
|
+
{
|
|
4583
|
+
"path": "design.furniture.setDimensions",
|
|
4584
|
+
"namespace": "design.furniture",
|
|
4585
|
+
"summary": "Resize a PLACED furniture item along one or more axes — `length`, `width` and/or `height` (engine units). Omitted axes are left unchanged. Each supplied axis is an undoable command, mirroring editing the furniture properties panel.",
|
|
4586
|
+
"examplePrompts": [
|
|
4587
|
+
"Make this table 1.8m long",
|
|
4588
|
+
"Resize the selected sofa to 2000 wide",
|
|
4589
|
+
"Set this furniture to 800mm tall",
|
|
4590
|
+
"Change the desk to 1500 long and 700 deep\n\n# Example\n```ts\nconst [item] = await snaptrude.design.query.listFurniture({ isSelected: true })\nconst { affected } = await snaptrude.design.furniture.setDimensions(item, {\nlength: 1800,\nheight: 750\n})\n```"
|
|
4591
|
+
],
|
|
4592
|
+
"argsType": "ComponentHandle",
|
|
4593
|
+
"resultType": "PluginDesignChangeResult"
|
|
4594
|
+
},
|
|
4595
|
+
{
|
|
4596
|
+
"path": "design.isAreaLocked",
|
|
4597
|
+
"namespace": "design",
|
|
4598
|
+
"summary": "Test whether a space's footprint area is locked. A read — never throws; returns `false` for non-space handles and when the `area_lock` feature is off.",
|
|
4599
|
+
"examplePrompts": [
|
|
4600
|
+
"Is the area of this room locked?",
|
|
4601
|
+
"Check whether this department's footprint is pinned",
|
|
4602
|
+
"Tell me if the selected space has its area locked\n\n# Example\n```ts\nconst [room] = await snaptrude.design.selection.get()\nconst locked = await snaptrude.design.isAreaLocked(room)\nconsole.log(locked ? \"area is locked\" : \"area is free\")\n```"
|
|
4603
|
+
],
|
|
4604
|
+
"argsType": "ComponentHandle",
|
|
4605
|
+
"resultType": "boolean"
|
|
4606
|
+
},
|
|
3079
4607
|
{
|
|
3080
4608
|
"path": "design.isLocked",
|
|
3081
4609
|
"namespace": "design",
|
|
@@ -3089,6 +4617,18 @@
|
|
|
3089
4617
|
"argsType": "ComponentHandle",
|
|
3090
4618
|
"resultType": "boolean"
|
|
3091
4619
|
},
|
|
4620
|
+
{
|
|
4621
|
+
"path": "design.listAreaLocked",
|
|
4622
|
+
"namespace": "design",
|
|
4623
|
+
"summary": "List the spaces whose footprint area is locked. A read — never throws; returns `[]` when the `area_lock` feature is off.",
|
|
4624
|
+
"examplePrompts": [
|
|
4625
|
+
"Which spaces have their area locked?",
|
|
4626
|
+
"List every room with a locked footprint",
|
|
4627
|
+
"Show me all the area-locked departments\n\n# Example\n```ts\nconst locked = await snaptrude.design.listAreaLocked()\nconsole.log(locked.length, \"area-locked spaces\")\n```"
|
|
4628
|
+
],
|
|
4629
|
+
"argsType": null,
|
|
4630
|
+
"resultType": "ComponentHandle[]"
|
|
4631
|
+
},
|
|
3092
4632
|
{
|
|
3093
4633
|
"path": "design.listLocked",
|
|
3094
4634
|
"namespace": "design",
|
|
@@ -3115,6 +4655,19 @@
|
|
|
3115
4655
|
"argsType": "ComponentHandle[]",
|
|
3116
4656
|
"resultType": "PluginDesignChangeResult"
|
|
3117
4657
|
},
|
|
4658
|
+
{
|
|
4659
|
+
"path": "design.lockArea",
|
|
4660
|
+
"namespace": "design",
|
|
4661
|
+
"summary": "Lock the **footprint area** of one or more Room / Department mass spaces — geometry edits that would change the bottom-face area are then refused or auto-resized to preserve it. Distinct from {@linkcode PluginDesignApi.lock} (which freezes the whole object): this locks only the area. Cascades to the space's instances and its source mass. Undoable.",
|
|
4662
|
+
"examplePrompts": [
|
|
4663
|
+
"Lock the floor area of the selected rooms",
|
|
4664
|
+
"Freeze the footprint area of this department so its size can't drift",
|
|
4665
|
+
"Area-lock every room on this storey",
|
|
4666
|
+
"Pin the area of this space while I edit its walls\n\n# Example\n```ts\nconst rooms = await snaptrude.design.selection.get()\nconst { affected } = await snaptrude.design.lockArea(rooms)\nconsole.log(\"area-locked\", affected.length, \"spaces\")\n```"
|
|
4667
|
+
],
|
|
4668
|
+
"argsType": "ComponentHandle[]",
|
|
4669
|
+
"resultType": "PluginDesignChangeResult"
|
|
4670
|
+
},
|
|
3118
4671
|
{
|
|
3119
4672
|
"path": "design.materials.apply",
|
|
3120
4673
|
"namespace": "design.materials",
|
|
@@ -3129,6 +4682,19 @@
|
|
|
3129
4682
|
"argsType": "ComponentHandle[]",
|
|
3130
4683
|
"resultType": "PluginMaterialResult"
|
|
3131
4684
|
},
|
|
4685
|
+
{
|
|
4686
|
+
"path": "design.materials.applyToFaces",
|
|
4687
|
+
"namespace": "design.materials",
|
|
4688
|
+
"summary": "Paint specific **BREP faces** of a component with a material — an existing project material by handle, or a new one described inline as a {@linkcode PluginMaterialSpec}. Faces are addressed by **durable BREP face index** (their 0-based position in the component's BREP face list). Undoable when `save` is true (the default).",
|
|
4689
|
+
"examplePrompts": [
|
|
4690
|
+
"Paint the top face of this slab red",
|
|
4691
|
+
"Apply the brick material to faces 0 and 2 of this wall",
|
|
4692
|
+
"Put a wood finish on just the front face of this column",
|
|
4693
|
+
"Colour face 4 of the selected mass with #ff8800\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ storeys: [1] })\n// faces are addressed by durable 0-based BREP face index\nconst { count } = await snaptrude.design.materials.applyToFaces(wall, [0, 1], { name: \"Accent\", color: \"#b04a3a\" })\nconsole.log(\"painted\", count, \"faces\")\n```"
|
|
4694
|
+
],
|
|
4695
|
+
"argsType": "ComponentHandle",
|
|
4696
|
+
"resultType": "PluginMaterialResult"
|
|
4697
|
+
},
|
|
3132
4698
|
{
|
|
3133
4699
|
"path": "design.materials.create",
|
|
3134
4700
|
"namespace": "design.materials",
|
|
@@ -3142,6 +4708,32 @@
|
|
|
3142
4708
|
"argsType": "PluginMaterialSpec",
|
|
3143
4709
|
"resultType": "MaterialHandle"
|
|
3144
4710
|
},
|
|
4711
|
+
{
|
|
4712
|
+
"path": "design.materials.get",
|
|
4713
|
+
"namespace": "design.materials",
|
|
4714
|
+
"summary": "Read the material applied to a component **as a whole** — the eyedropper. For a uniformly-painted component this is that single material; for a per-face-painted component it is the material on the component's base/first face. Use {@linkcode PluginDesignMaterialsApi.getByFace} / {@linkcode PluginDesignMaterialsApi.listByFace} for the per-face breakdown.",
|
|
4715
|
+
"examplePrompts": [
|
|
4716
|
+
"What material is on this wall?",
|
|
4717
|
+
"Eyedrop the finish of the selected object",
|
|
4718
|
+
"Which material does this slab use?",
|
|
4719
|
+
"Read the material on this column so I can paint others with it",
|
|
4720
|
+
"Is this component painted, and with what?\n\n# Example\n```ts\nconst [component] = await snaptrude.design.selection.get()\nconst sampled = await snaptrude.design.materials.get(component)\nif (sampled) {\nconsole.log(sampled.name, sampled.source) // e.g. \"Brick Red\" \"applied\"\nconst info = await snaptrude.design.materials.getInfo(sampled.material)\nconsole.log(info?.colorHex)\n}\n```"
|
|
4721
|
+
],
|
|
4722
|
+
"argsType": "ComponentHandle",
|
|
4723
|
+
"resultType": "PluginComponentMaterial | null"
|
|
4724
|
+
},
|
|
4725
|
+
{
|
|
4726
|
+
"path": "design.materials.getByFace",
|
|
4727
|
+
"namespace": "design.materials",
|
|
4728
|
+
"summary": "Read the material applied to a single BREP face.",
|
|
4729
|
+
"examplePrompts": [
|
|
4730
|
+
"What material is on the top face of this slab?",
|
|
4731
|
+
"Get the finish applied to face 2 of this wall",
|
|
4732
|
+
"Which material is painted on the front face of this column?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst material = await snaptrude.design.materials.getByFace(wall, 0)\nif (material) console.log(await snaptrude.design.materials.getInfo(material))\n```"
|
|
4733
|
+
],
|
|
4734
|
+
"argsType": "ComponentHandle",
|
|
4735
|
+
"resultType": "MaterialHandle | null"
|
|
4736
|
+
},
|
|
3145
4737
|
{
|
|
3146
4738
|
"path": "design.materials.getDefault",
|
|
3147
4739
|
"namespace": "design.materials",
|
|
@@ -3205,21 +4797,45 @@
|
|
|
3205
4797
|
"Are any faces of the selected object painted differently?\n\n# Example\n```ts\nconst [selected] = await snaptrude.design.selection.get()\nconst uniform = await snaptrude.design.materials.isUniform(selected)\nconsole.log(uniform ? \"one material all over\" : \"painted per face\")\n```"
|
|
3206
4798
|
],
|
|
3207
4799
|
"argsType": "ComponentHandle",
|
|
3208
|
-
"resultType": "boolean"
|
|
4800
|
+
"resultType": "boolean"
|
|
4801
|
+
},
|
|
4802
|
+
{
|
|
4803
|
+
"path": "design.materials.list",
|
|
4804
|
+
"namespace": "design.materials",
|
|
4805
|
+
"summary": "List the materials loaded in the project — every named material in the live scene (applied finishes, plugin-created materials, and type defaults in use). For the browsable preset/library catalog (finishes not yet in the project), use {@linkcode PluginDesignMaterialsApi.listPresets}.",
|
|
4806
|
+
"examplePrompts": [
|
|
4807
|
+
"List all the materials in this project",
|
|
4808
|
+
"What materials do I have available to apply?",
|
|
4809
|
+
"Which finishes exist in this model?",
|
|
4810
|
+
"Get every material in the project palette\n\n# Example\n```ts\nconst materials = await snaptrude.design.materials.list()\nconsole.log(materials.length, \"materials in the project\")\n```"
|
|
4811
|
+
],
|
|
4812
|
+
"argsType": null,
|
|
4813
|
+
"resultType": "MaterialHandle[]"
|
|
4814
|
+
},
|
|
4815
|
+
{
|
|
4816
|
+
"path": "design.materials.listByFace",
|
|
4817
|
+
"namespace": "design.materials",
|
|
4818
|
+
"summary": "List the per-face materials of a component — one entry per BREP face, in face index order. A face carrying no explicit per-face material reports `null`.",
|
|
4819
|
+
"examplePrompts": [
|
|
4820
|
+
"List the material on every face of this wall",
|
|
4821
|
+
"Show me which faces of this slab are painted and with what",
|
|
4822
|
+
"Break down the per-face finishes of the selected mass\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst faces = await snaptrude.design.materials.listByFace(wall)\nfor (const f of faces) console.log(f.faceIndex, f.material ?? \"(default)\")\n```"
|
|
4823
|
+
],
|
|
4824
|
+
"argsType": "ComponentHandle",
|
|
4825
|
+
"resultType": "PluginFaceMaterial[]"
|
|
3209
4826
|
},
|
|
3210
4827
|
{
|
|
3211
|
-
"path": "design.materials.
|
|
4828
|
+
"path": "design.materials.listPresets",
|
|
3212
4829
|
"namespace": "design.materials",
|
|
3213
|
-
"summary": "List the
|
|
4830
|
+
"summary": "List the preset material library — the catalog the app's material browser shows (the built-in finishes plus the workspace's uploaded materials), fetched from the material library service. Library entries are **not** scene materials and carry no {@linkcode MaterialHandle}; each is a named texture record. To use one, feed it to {@linkcode PluginDesignMaterialsApi.create} / {@linkcode PluginDesignMaterialsApi.apply} as a {@linkcode PluginMaterialSpec}: `{ name, textureUrl, materialType: category }`.",
|
|
3214
4831
|
"examplePrompts": [
|
|
3215
|
-
"List all the materials in this project",
|
|
3216
|
-
"What materials do I have available to apply?",
|
|
3217
4832
|
"Show me the preset materials library",
|
|
3218
|
-
"
|
|
3219
|
-
"
|
|
4833
|
+
"What wood finishes are available in the material library?",
|
|
4834
|
+
"Browse the material catalog and apply a brick texture",
|
|
4835
|
+
"Which preset materials can I choose from?\n\n# Example\n```ts\nconst presets = await snaptrude.design.materials.listPresets()\nconst brick = presets.find((p) => p.category.toLowerCase().includes(\"brick\"))\nif (brick) {\nconst walls = await snaptrude.design.query.listWalls()\nawait snaptrude.design.materials.apply(walls, {\nname: brick.name,\ntextureUrl: brick.textureUrl,\nmaterialType: brick.category,\n})\n}\n```"
|
|
3220
4836
|
],
|
|
3221
|
-
"argsType":
|
|
3222
|
-
"resultType": "
|
|
4837
|
+
"argsType": null,
|
|
4838
|
+
"resultType": "PluginPresetMaterial[]"
|
|
3223
4839
|
},
|
|
3224
4840
|
{
|
|
3225
4841
|
"path": "design.materials.reset",
|
|
@@ -3234,6 +4850,18 @@
|
|
|
3234
4850
|
"argsType": "ComponentHandle[]",
|
|
3235
4851
|
"resultType": "PluginMaterialResult"
|
|
3236
4852
|
},
|
|
4853
|
+
{
|
|
4854
|
+
"path": "design.materials.resetFaces",
|
|
4855
|
+
"namespace": "design.materials",
|
|
4856
|
+
"summary": "Reset specific BREP faces of a component back to the component/type default, removing any per-face finish. The inverse of {@linkcode PluginDesignMaterialsApi.applyToFaces}; undoable when `save` is true (the default). BREP-only (see `applyToFaces`).",
|
|
4857
|
+
"examplePrompts": [
|
|
4858
|
+
"Remove the paint from the top face of this slab",
|
|
4859
|
+
"Reset faces 0 and 2 of this wall to their default material",
|
|
4860
|
+
"Clear the custom finish on the front face of this column\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ storeys: [1] })\nconst { count } = await snaptrude.design.materials.resetFaces(wall, [0, 1])\nconsole.log(\"reset\", count, \"faces\")\n```"
|
|
4861
|
+
],
|
|
4862
|
+
"argsType": "ComponentHandle",
|
|
4863
|
+
"resultType": "PluginMaterialResult"
|
|
4864
|
+
},
|
|
3237
4865
|
{
|
|
3238
4866
|
"path": "design.query.exists",
|
|
3239
4867
|
"namespace": "design.query",
|
|
@@ -3288,6 +4916,19 @@
|
|
|
3288
4916
|
"argsType": "ComponentHandle",
|
|
3289
4917
|
"resultType": "CurveHandle | null"
|
|
3290
4918
|
},
|
|
4919
|
+
{
|
|
4920
|
+
"path": "design.query.geometry.getTriangulatedMeshes",
|
|
4921
|
+
"namespace": "design.query.geometry",
|
|
4922
|
+
"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.",
|
|
4923
|
+
"examplePrompts": [
|
|
4924
|
+
"Export the selected masses as a triangle mesh",
|
|
4925
|
+
"Get the raw vertices and triangles of this wall in world coordinates",
|
|
4926
|
+
"Give me the triangulated geometry of every space with its materials",
|
|
4927
|
+
"Compute the surface area of this roof from its triangles"
|
|
4928
|
+
],
|
|
4929
|
+
"argsType": "ComponentHandle[]",
|
|
4930
|
+
"resultType": "PluginDesignQueryGeometryGetTriangulatedMeshesResult"
|
|
4931
|
+
},
|
|
3291
4932
|
{
|
|
3292
4933
|
"path": "design.query.getBoundingBox",
|
|
3293
4934
|
"namespace": "design.query",
|
|
@@ -3368,10 +5009,11 @@
|
|
|
3368
5009
|
{
|
|
3369
5010
|
"path": "design.query.getProperties",
|
|
3370
5011
|
"namespace": "design.query",
|
|
3371
|
-
"summary": "Read an entity's common properties as a {@linkcode PluginEntityProperties} record (only applicable fields are present). For spaces/masses this includes `adjacency` — the per-entity adjacency read (bulk form: `program.adjacency.getMatrix`).",
|
|
5012
|
+
"summary": "Read an entity's common properties as a {@linkcode PluginEntityProperties} record (only applicable fields are present). For spaces/masses this includes `adjacency` — the per-entity adjacency read (bulk form: `program.adjacency.getMatrix`). For walls and the slab family (slab / floor / roof / ceiling) this includes `buildingType` — the assigned building type NAME the panel's type dropdown shows, matching `design.types.list(kind)`.",
|
|
3372
5013
|
"examplePrompts": [
|
|
3373
5014
|
"Show me all the details of the selected object",
|
|
3374
5015
|
"What storey is this wall on?",
|
|
5016
|
+
"Which wall type is assigned to this wall?",
|
|
3375
5017
|
"Which department does this room belong to?",
|
|
3376
5018
|
"Is this element locked or hidden?",
|
|
3377
5019
|
"Get the adjacencies of this space\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst props = await snaptrude.design.query.getProperties(wall)\nconsole.log(props.type, props.storey, props.boundingBox)\n\n// The record is partial — type-specific fields exist only where they apply\nconst [room] = await snaptrude.design.query.listSpaces()\nconst p = await snaptrude.design.query.getProperties(room)\nif (p.spaceType === \"Room\" && p.areaClass === \"NET\") {\nfor (const adj of p.adjacency ?? []) {\n// adj.value: 2 = direct, 1 = indirect/contact, -1 = restricted\nconsole.log(adj.spaceId, adj.value)\n}\n}\n```"
|
|
@@ -3379,6 +5021,19 @@
|
|
|
3379
5021
|
"argsType": "ComponentHandle",
|
|
3380
5022
|
"resultType": "PluginEntityProperties"
|
|
3381
5023
|
},
|
|
5024
|
+
{
|
|
5025
|
+
"path": "design.query.getStaircaseParams",
|
|
5026
|
+
"namespace": "design.query",
|
|
5027
|
+
"summary": "Read a staircase's parametric properties — its preset, dimensions, step count, base offset, and height-lock state — as a {@linkcode PluginStaircaseParams} record. The paired write is `design.update.staircase`.",
|
|
5028
|
+
"examplePrompts": [
|
|
5029
|
+
"What's the riser height of this staircase?",
|
|
5030
|
+
"How many steps does the selected stair have?",
|
|
5031
|
+
"Show me the tread and width of this staircase",
|
|
5032
|
+
"Read all the parameters of the stairs on level 1\n\n# Example\n```ts\nconst [stair] = await snaptrude.design.query.listStaircases({ isSelected: true })\nconst params = stair ? await snaptrude.design.query.getStaircaseParams(stair) : null\nif (params) console.log(params.steps, params.riser, params.tread)\n```"
|
|
5033
|
+
],
|
|
5034
|
+
"argsType": "ComponentHandle",
|
|
5035
|
+
"resultType": "PluginStaircaseParams | null"
|
|
5036
|
+
},
|
|
3382
5037
|
{
|
|
3383
5038
|
"path": "design.query.listBeams",
|
|
3384
5039
|
"namespace": "design.query",
|
|
@@ -3623,13 +5278,28 @@
|
|
|
3623
5278
|
"examplePrompts": [
|
|
3624
5279
|
"What's the area of this room?",
|
|
3625
5280
|
"How long is the selected wall?",
|
|
5281
|
+
"How thick is this wall?",
|
|
5282
|
+
"Get the thickness of the slab on level 2",
|
|
3626
5283
|
"Get the volume of this mass",
|
|
3627
5284
|
"Give me the dimensions of the selected element",
|
|
3628
|
-
"What's the floor area of the kitchen?\n\n# Example\n```ts\nconst [space] = await snaptrude.design.query.listSpaces()\nconst m = await snaptrude.design.query.measure(space)\nconsole.log(m?.area, m?.volume)\n```"
|
|
5285
|
+
"What's the floor area of the kitchen?\n\n# Example\n```ts\nconst [space] = await snaptrude.design.query.listSpaces()\nconst m = await snaptrude.design.query.measure(space)\nconsole.log(m?.area, m?.volume)\n\n// wall dimensions — the panel's Thickness / Height, in engine units\nconst [wall] = await snaptrude.design.query.listWalls()\nconst wm = await snaptrude.design.query.measure(wall)\nconsole.log(wm?.thickness, wm?.height)\n```"
|
|
3629
5286
|
],
|
|
3630
5287
|
"argsType": "ComponentHandle",
|
|
3631
5288
|
"resultType": "PluginEntityMeasurements | null"
|
|
3632
5289
|
},
|
|
5290
|
+
{
|
|
5291
|
+
"path": "design.query.referenceLines.get",
|
|
5292
|
+
"namespace": "design.query.referenceLines",
|
|
5293
|
+
"summary": "Get properties of a reference line by its ID.",
|
|
5294
|
+
"examplePrompts": [
|
|
5295
|
+
"Get the curve geometry of this reference line",
|
|
5296
|
+
"Where does this grid line run?",
|
|
5297
|
+
"Read the geometry of a guide line by its id",
|
|
5298
|
+
"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```"
|
|
5299
|
+
],
|
|
5300
|
+
"argsType": "string",
|
|
5301
|
+
"resultType": "PluginReferenceLineGetResult"
|
|
5302
|
+
},
|
|
3633
5303
|
{
|
|
3634
5304
|
"path": "design.query.spaces.get",
|
|
3635
5305
|
"namespace": "design.query.spaces",
|
|
@@ -3644,6 +5314,19 @@
|
|
|
3644
5314
|
"argsType": "ComponentHandle",
|
|
3645
5315
|
"resultType": "PluginDesignQuerySpacesGetResult"
|
|
3646
5316
|
},
|
|
5317
|
+
{
|
|
5318
|
+
"path": "design.query.spaces.getEnclosure",
|
|
5319
|
+
"namespace": "design.query.spaces",
|
|
5320
|
+
"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.",
|
|
5321
|
+
"examplePrompts": [
|
|
5322
|
+
"What walls, floor and ceiling enclose this room?",
|
|
5323
|
+
"Which of this room's walls are external?",
|
|
5324
|
+
"List the doors and windows around the selected space",
|
|
5325
|
+
"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```"
|
|
5326
|
+
],
|
|
5327
|
+
"argsType": "ComponentHandle",
|
|
5328
|
+
"resultType": "PluginSpaceEnclosure | null"
|
|
5329
|
+
},
|
|
3647
5330
|
{
|
|
3648
5331
|
"path": "design.query.spaces.getFootprint",
|
|
3649
5332
|
"namespace": "design.query.spaces",
|
|
@@ -3723,6 +5406,51 @@
|
|
|
3723
5406
|
"argsType": "ComponentHandle[]",
|
|
3724
5407
|
"resultType": "PluginDesignChangeResult"
|
|
3725
5408
|
},
|
|
5409
|
+
{
|
|
5410
|
+
"path": "design.selection.setByFilter",
|
|
5411
|
+
"namespace": "design.selection",
|
|
5412
|
+
"summary": "Replace the selection with every visible entity of the active building that matches the filter — the programmatic equivalent of the editor's **Story selection** (`storeys`) and **Filter selection** (`types`) menus under the select tool, including their combination (fields AND, values within a field OR). Reaches selection-only kinds the query surface cannot (sites, terrain, CAD/PDF/image imports, dimension lines, 3D models, neighborhood buildings) and selects whole groups the way the editor does.",
|
|
5413
|
+
"examplePrompts": [
|
|
5414
|
+
"Select everything on storey 2",
|
|
5415
|
+
"Select all the walls and doors",
|
|
5416
|
+
"Story selection: select the ground floor and first floor",
|
|
5417
|
+
"Filter selection: select all furniture in the model",
|
|
5418
|
+
"Select only the furniture on the second storey",
|
|
5419
|
+
"Select all the spaces so I can recolor them\n\n# Example\n```ts\n// \"Story selection\": everything on storeys 1 and 2\nawait snaptrude.design.selection.setByFilter({ storeys: [1, 2] })\n\n// \"Filter selection\": all walls and doors\nawait snaptrude.design.selection.setByFilter({ types: [\"wall\", \"door\"] })\n\n// Combined: only the furniture on storey 2\nconst { affected } = await snaptrude.design.selection.setByFilter({\nstoreys: [2],\ntypes: [\"furniture\"],\n})\n```"
|
|
5420
|
+
],
|
|
5421
|
+
"argsType": "PluginSelectionFilter",
|
|
5422
|
+
"resultType": "PluginDesignChangeResult"
|
|
5423
|
+
},
|
|
5424
|
+
{
|
|
5425
|
+
"path": "design.transform.align",
|
|
5426
|
+
"namespace": "design.transform",
|
|
5427
|
+
"summary": "Align a set of components by snapping one bounding-box edge to a common value — the classic Left/Center/Right/Top/Middle/Bottom align. Purely **world-axis** (deterministic and headless — the UI's camera-relative remap is bypassed):",
|
|
5428
|
+
"examplePrompts": [
|
|
5429
|
+
"Align the selected rooms to the left",
|
|
5430
|
+
"Line up these masses along their top edges",
|
|
5431
|
+
"Center these columns horizontally",
|
|
5432
|
+
"Align all the walls to the left edge of this reference wall",
|
|
5433
|
+
"Snap the bottom edges of these spaces together"
|
|
5434
|
+
],
|
|
5435
|
+
"argsType": "ComponentHandle[]",
|
|
5436
|
+
"resultType": "PluginDesignChangeResult",
|
|
5437
|
+
"performance": "Array API — one host round-trip for the whole set. Pass every target in a single call; never loop `design.transform.align` per entity. # Example ```ts const rooms = await snaptrude.design.selection.get() // align every room's left (world -X) edge to a common minimum await snaptrude.design.transform.align(rooms, \"left\") // …or align them to a fixed reference component's left edge const [anchor] = await snaptrude.design.query.listWalls({ storeys: [1] }) await snaptrude.design.transform.align(rooms, \"left\", { reference: anchor }) ```"
|
|
5438
|
+
},
|
|
5439
|
+
{
|
|
5440
|
+
"path": "design.transform.mirror",
|
|
5441
|
+
"namespace": "design.transform",
|
|
5442
|
+
"summary": "Mirror components **in place** about a horizontal axis, flipping their geometry across that axis through the combined bounding-box centre (the mesh's world-matrix flip + brep inversion + CAD/dimension-line/parametric handling commit atomically). Nothing moves off-centre — this is the toolbar \"flip\", not a translate-and-reflect. Undoable.",
|
|
5443
|
+
"examplePrompts": [
|
|
5444
|
+
"Mirror the selected building across the x axis",
|
|
5445
|
+
"Flip these rooms left to right",
|
|
5446
|
+
"Mirror this furniture block horizontally",
|
|
5447
|
+
"Flip the selected walls front to back",
|
|
5448
|
+
"Create a mirror image of these masses about the z axis"
|
|
5449
|
+
],
|
|
5450
|
+
"argsType": "ComponentHandle[]",
|
|
5451
|
+
"resultType": "PluginDesignChangeResult",
|
|
5452
|
+
"performance": "Array API — one host round-trip for the whole set. Pass every target in a single call; never loop `design.transform.mirror` per entity. # Example ```ts const rooms = await snaptrude.design.selection.get() await snaptrude.design.transform.mirror(rooms, \"x\") ```"
|
|
5453
|
+
},
|
|
3726
5454
|
{
|
|
3727
5455
|
"path": "design.transform.move",
|
|
3728
5456
|
"namespace": "design.transform",
|
|
@@ -3732,23 +5460,52 @@
|
|
|
3732
5460
|
"Shift these walls 3m along the x axis",
|
|
3733
5461
|
"Nudge this space 500mm north",
|
|
3734
5462
|
"Translate the furniture block by (10, 0, 5)",
|
|
3735
|
-
"Move these masses up one storey
|
|
5463
|
+
"Move these masses up one storey"
|
|
3736
5464
|
],
|
|
3737
5465
|
"argsType": "ComponentHandle[]",
|
|
3738
|
-
"resultType": "PluginDesignChangeResult"
|
|
5466
|
+
"resultType": "PluginDesignChangeResult",
|
|
5467
|
+
"performance": "Array API — one host round-trip for the whole set. Pass every target in a single call; never loop `design.transform.move` per entity. # Example ```ts const { vec3 } = snaptrude.core.math await snaptrude.design.transform.move([\"space-id\"], vec3.new(10, 0, 0)) ```"
|
|
3739
5468
|
},
|
|
3740
5469
|
{
|
|
3741
5470
|
"path": "design.transform.rotate",
|
|
3742
5471
|
"namespace": "design.transform",
|
|
3743
|
-
"summary": "Rotate entities by a **signed angle in DEGREES
|
|
5472
|
+
"summary": "Rotate entities by a **signed angle in DEGREES** (positive = CCW about +Y). The pivot defaults to the combined bounding-box centre; pass `options.pivot` to rotate about an explicit world-space point instead. NOTE: unlike the removed `tools.transform.rotate` (radians), this canonical form takes DEGREES. Undoable.",
|
|
3744
5473
|
"examplePrompts": [
|
|
3745
5474
|
"Rotate the selected building 90 degrees",
|
|
3746
5475
|
"Turn this room 45 degrees clockwise",
|
|
3747
5476
|
"Spin the furniture block 180 degrees about its centre",
|
|
3748
|
-
"Rotate these masses 30 degrees around the vertical axis
|
|
5477
|
+
"Rotate these masses 30 degrees around the vertical axis",
|
|
5478
|
+
"Rotate these walls 90 degrees about the origin"
|
|
3749
5479
|
],
|
|
3750
5480
|
"argsType": "ComponentHandle[]",
|
|
3751
|
-
"resultType": "PluginDesignChangeResult"
|
|
5481
|
+
"resultType": "PluginDesignChangeResult",
|
|
5482
|
+
"performance": "Array API — one host round-trip for the whole set. Pass every target in a single call; never loop `design.transform.rotate` per entity. # Example ```ts await snaptrude.design.transform.rotate([\"space-id\"], 90) // …or rotate about an explicit pivot point const { vec3 } = snaptrude.core.math await snaptrude.design.transform.rotate([\"space-id\"], 90, { pivot: vec3.new(0, 0, 0) }) ```"
|
|
5483
|
+
},
|
|
5484
|
+
{
|
|
5485
|
+
"path": "design.types.get",
|
|
5486
|
+
"namespace": "design.types",
|
|
5487
|
+
"summary": "Get one building type by its `\"<kind>:<name>\"` id — its labelled layer stack (each layer's role, thickness and material) plus the summed total thickness.",
|
|
5488
|
+
"examplePrompts": [
|
|
5489
|
+
"What layers make up this wall type?",
|
|
5490
|
+
"Show the construction of the exposed-concrete wall",
|
|
5491
|
+
"What's the total thickness of this slab type?",
|
|
5492
|
+
"Which materials are in this roof assembly?\n\n# Example\n```ts\nconst [first] = await snaptrude.design.types.list(\"wall\")\nconst type = await snaptrude.design.types.get(first.id)\nif (type) for (const layer of type.layers) console.log(layer.name, layer.thickness)\n```"
|
|
5493
|
+
],
|
|
5494
|
+
"argsType": "string",
|
|
5495
|
+
"resultType": "PluginBuildingType | null"
|
|
5496
|
+
},
|
|
5497
|
+
{
|
|
5498
|
+
"path": "design.types.list",
|
|
5499
|
+
"namespace": "design.types",
|
|
5500
|
+
"summary": "List the building types of one `kind` (wall / slab / floor / ceiling / roof) — the built-in defaults plus any team/user-added types. Returns lightweight summaries; call {@linkcode PluginDesignTypesApi.get} for the full layer stack.",
|
|
5501
|
+
"examplePrompts": [
|
|
5502
|
+
"What wall types does this project have?",
|
|
5503
|
+
"List the available slab assemblies",
|
|
5504
|
+
"Show me every roof type in the project",
|
|
5505
|
+
"Which floor types can I use?\n\n# Example\n```ts\nconst wallTypes = await snaptrude.design.types.list(\"wall\")\nfor (const t of wallTypes) console.log(t.id, t.label, t.thickness)\n```"
|
|
5506
|
+
],
|
|
5507
|
+
"argsType": "PluginBuildingTypeKind",
|
|
5508
|
+
"resultType": "PluginBuildingTypeSummary[]"
|
|
3752
5509
|
},
|
|
3753
5510
|
{
|
|
3754
5511
|
"path": "design.unlock",
|
|
@@ -3763,6 +5520,134 @@
|
|
|
3763
5520
|
"argsType": "ComponentHandle[]",
|
|
3764
5521
|
"resultType": "PluginDesignChangeResult"
|
|
3765
5522
|
},
|
|
5523
|
+
{
|
|
5524
|
+
"path": "design.unlockArea",
|
|
5525
|
+
"namespace": "design",
|
|
5526
|
+
"summary": "Unlock the footprint area of previously area-locked spaces so their area can change again. Paired with {@linkcode PluginDesignApi.lockArea}; cascades to instances + source; undoable. Requires the `area_lock` feature (throws if off).",
|
|
5527
|
+
"examplePrompts": [
|
|
5528
|
+
"Unlock the area of the selected rooms",
|
|
5529
|
+
"Remove the footprint-area lock from this department",
|
|
5530
|
+
"Let me resize this space again by unlocking its area",
|
|
5531
|
+
"Area-unlock everything I locked earlier\n\n# Example\n```ts\nconst locked = await snaptrude.design.listAreaLocked()\nconst { affected } = await snaptrude.design.unlockArea(locked)\n```"
|
|
5532
|
+
],
|
|
5533
|
+
"argsType": "ComponentHandle[]",
|
|
5534
|
+
"resultType": "PluginDesignChangeResult"
|
|
5535
|
+
},
|
|
5536
|
+
{
|
|
5537
|
+
"path": "design.update.buildableEnvelope",
|
|
5538
|
+
"namespace": "design.update",
|
|
5539
|
+
"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).",
|
|
5540
|
+
"examplePrompts": [
|
|
5541
|
+
"Change the envelope's height limit to 175 feet",
|
|
5542
|
+
"Update the setbacks on the buildable envelope",
|
|
5543
|
+
"Regenerate the zoning envelope with a new site boundary",
|
|
5544
|
+
"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```"
|
|
5545
|
+
],
|
|
5546
|
+
"argsType": "string",
|
|
5547
|
+
"resultType": "PluginBuildableEnvelopeUpdateResult"
|
|
5548
|
+
},
|
|
5549
|
+
{
|
|
5550
|
+
"path": "design.update.ceiling",
|
|
5551
|
+
"namespace": "design.update",
|
|
5552
|
+
"summary": "Edit a **ceiling's** thickness — the slab-family updater for ceilings (shares the slab thickness command). Undoable. Thickness is in **engine units** (the `design.doors.setWidth` convention) and must be `> 0`. Ceilings have no Overhang control, so `overhang` is rejected with `PRECONDITION_FAILED`.",
|
|
5553
|
+
"examplePrompts": [
|
|
5554
|
+
"Make this ceiling 150mm thick",
|
|
5555
|
+
"Set every ceiling to a 100 thickness",
|
|
5556
|
+
"Thicken the ceiling to 200\n\n# Example\n```ts\nconst [ceiling] = await snaptrude.design.query.listCeilings()\nawait snaptrude.design.update.ceiling(ceiling, { thickness: 150 })\n```"
|
|
5557
|
+
],
|
|
5558
|
+
"argsType": "ComponentHandle",
|
|
5559
|
+
"resultType": "PluginDesignChangeResult"
|
|
5560
|
+
},
|
|
5561
|
+
{
|
|
5562
|
+
"path": "design.update.floor",
|
|
5563
|
+
"namespace": "design.update",
|
|
5564
|
+
"summary": "Edit a **floor's** thickness — the slab-family updater for floors (shares the slab thickness command). Undoable. Thickness is in **engine units** (the `design.doors.setWidth` convention) and must be `> 0`. Floors have no Overhang control, so `overhang` is rejected with `PRECONDITION_FAILED`.",
|
|
5565
|
+
"examplePrompts": [
|
|
5566
|
+
"Make this floor 200mm thick",
|
|
5567
|
+
"Set every floor to a 250 thickness",
|
|
5568
|
+
"Thicken the ground floor slab to 300\n\n# Example\n```ts\nconst [floor] = await snaptrude.design.query.listFloors()\nawait snaptrude.design.update.floor(floor, { thickness: 200 })\n```"
|
|
5569
|
+
],
|
|
5570
|
+
"argsType": "ComponentHandle",
|
|
5571
|
+
"resultType": "PluginDesignChangeResult"
|
|
5572
|
+
},
|
|
5573
|
+
{
|
|
5574
|
+
"path": "design.update.roof",
|
|
5575
|
+
"namespace": "design.update",
|
|
5576
|
+
"summary": "Edit a **roof's** thickness and/or overhang — the same commands the roof panel's Thickness field and Overhang slider drive (shares the slab-family machinery). Sparse: only the fields you provide change. Undoable. Both values are in **engine units** (the `design.doors.setWidth` convention); thickness must be `> 0`, overhang is an absolute offset (negative insets the roof) and re-applying the current overhang is a no-op.",
|
|
5577
|
+
"examplePrompts": [
|
|
5578
|
+
"Make this roof 300mm thick",
|
|
5579
|
+
"Set the roof slab thickness to 250",
|
|
5580
|
+
"Give the roof a 600 overhang",
|
|
5581
|
+
"Pull the roof overhang back to 0\n\n# Example\n```ts\nconst [roof] = await snaptrude.design.query.listRoofs()\nawait snaptrude.design.update.roof(roof, { overhang: 600 })\n```"
|
|
5582
|
+
],
|
|
5583
|
+
"argsType": "ComponentHandle",
|
|
5584
|
+
"resultType": "PluginDesignChangeResult"
|
|
5585
|
+
},
|
|
5586
|
+
{
|
|
5587
|
+
"path": "design.update.setBaseOffset",
|
|
5588
|
+
"namespace": "design.update",
|
|
5589
|
+
"summary": "Set a component's **base offset** — its vertical distance above its own storey's base level. Moves the component so its base lands at `storeyBase + offset`, composed over the same command-backed move machinery as {@linkcode setElevation} (undoable, persisted, per-type invariants kept in sync). Use this instead of {@linkcode setElevation} when you want an offset relative to the storey rather than an absolute world height. `offset` is in **engine units** (the `design.doors.setWidth` convention); `0` sits the base flush with the storey base. Re-applying the current offset is a no-op.",
|
|
5590
|
+
"examplePrompts": [
|
|
5591
|
+
"Lift this element 300 above its floor",
|
|
5592
|
+
"Set this staircase's base offset to 0",
|
|
5593
|
+
"Raise the selected mass 500 off the storey base",
|
|
5594
|
+
"Offset this slab 150 above the floor level\n\n# Example\n```ts\nconst [stair] = await snaptrude.design.query.listStaircases()\nawait snaptrude.design.update.setBaseOffset(stair, 0)\n```"
|
|
5595
|
+
],
|
|
5596
|
+
"argsType": "ComponentHandle",
|
|
5597
|
+
"resultType": "PluginDesignChangeResult"
|
|
5598
|
+
},
|
|
5599
|
+
{
|
|
5600
|
+
"path": "design.update.setElevation",
|
|
5601
|
+
"namespace": "design.update",
|
|
5602
|
+
"summary": "Set a component's **absolute world elevation** — moves it vertically so its base (the bounding-box bottom, world Y) lands at `elevation`. Composed over the canonical command-backed move machinery, so it is undoable and persisted exactly like dragging the element up or down; per-type invariants (e.g. a staircase's base offset) stay in sync. `elevation` is in **engine units** (the `design.doors.setWidth` convention). Re-applying the current elevation is a no-op.",
|
|
5603
|
+
"examplePrompts": [
|
|
5604
|
+
"Set this element's elevation to 3000",
|
|
5605
|
+
"Raise this mass so its base sits at 3 metres",
|
|
5606
|
+
"Drop the selected slab to elevation 0",
|
|
5607
|
+
"Put this staircase's base at 3200\n\n# Example\n```ts\n// Sit the roof slab exactly at the top of a 3m storey\nconst [roof] = await snaptrude.design.query.listRoofs()\nawait snaptrude.design.update.setElevation(roof, 3000)\n```"
|
|
5608
|
+
],
|
|
5609
|
+
"argsType": "ComponentHandle",
|
|
5610
|
+
"resultType": "PluginDesignChangeResult"
|
|
5611
|
+
},
|
|
5612
|
+
{
|
|
5613
|
+
"path": "design.update.setLabel",
|
|
5614
|
+
"namespace": "design.update",
|
|
5615
|
+
"summary": "Set a component's **Label** — the same editable Label field the properties panel shows (doors, windows, furniture, spaces, and every other labelled component). The paired read is `design.query.getLabel`. Undoable; the canvas label text updates immediately.",
|
|
5616
|
+
"examplePrompts": [
|
|
5617
|
+
"Rename this door to D-101",
|
|
5618
|
+
"Number all doors on storey 2 with a D-2-XX tag",
|
|
5619
|
+
"Set the selected window's label to W-04",
|
|
5620
|
+
"Tag every door with its fire rating\n\n# Example\n```ts\n// Door tag numbering: label every door as D-<storey>-<n>, numbered per storey\nawait snaptrude.design.selection.setByFilter({ types: [\"door\"] })\nconst doors = await snaptrude.design.selection.get()\nconst counts = {}\nfor (const door of doors) {\nconst { storey = 0 } = await snaptrude.design.query.getProperties(door)\ncounts[storey] = (counts[storey] ?? 0) + 1\nawait snaptrude.design.update.setLabel(door, `D-${storey}-${String(counts[storey]).padStart(2, \"0\")}`)\n}\n```"
|
|
5621
|
+
],
|
|
5622
|
+
"argsType": "ComponentHandle",
|
|
5623
|
+
"resultType": "boolean"
|
|
5624
|
+
},
|
|
5625
|
+
{
|
|
5626
|
+
"path": "design.update.setStorey",
|
|
5627
|
+
"namespace": "design.update",
|
|
5628
|
+
"summary": "Reassign one or more components to another **storey** — the same operation as the properties panel's Story dropdown, and it works across element kinds exactly like the panel (walls, slabs, masses, furniture, staircases, ...). Each component is moved vertically to the target storey's level (per-kind placement rules — e.g. a slab sits at the storey base, a wall on it) and its storey assignment, children, and dimension lines update together as **one undoable operation**.",
|
|
5629
|
+
"examplePrompts": [
|
|
5630
|
+
"Move this sofa to storey 2",
|
|
5631
|
+
"Put the selected walls on the first basement level",
|
|
5632
|
+
"Send everything on this storey up one level",
|
|
5633
|
+
"Reassign these slabs to storey 3\n\n# Example\n```ts\n// Move the current selection up to storey 2\nconst selection = await snaptrude.design.selection.get()\nconst { affected } = await snaptrude.design.update.setStorey(selection, 2)\nconsole.log(\"moved\", affected.length, \"components\")\n```"
|
|
5634
|
+
],
|
|
5635
|
+
"argsType": "ComponentHandle[]",
|
|
5636
|
+
"resultType": "PluginDesignChangeResult"
|
|
5637
|
+
},
|
|
5638
|
+
{
|
|
5639
|
+
"path": "design.update.slab",
|
|
5640
|
+
"namespace": "design.update",
|
|
5641
|
+
"summary": "Edit a **slab's** thickness and/or overhang — the same commands the properties panel's Thickness field and Overhang slider drive. Sparse: only the fields you provide change. Undoable; the slab rebuilds and dimension lines refresh. Both values are in **engine units** (the same convention as `design.doors.setWidth`); thickness must be `> 0`, overhang is an absolute offset (negative insets the slab) and re-applying the current overhang is a no-op.",
|
|
5642
|
+
"examplePrompts": [
|
|
5643
|
+
"Set this slab's thickness to 250mm",
|
|
5644
|
+
"Make the floor slab 300 thick",
|
|
5645
|
+
"Give this slab a 200 overhang",
|
|
5646
|
+
"Remove the overhang on every slab on level 2\n\n# Example\n```ts\nconst [slab] = await snaptrude.design.query.listSlabs()\nawait snaptrude.design.update.slab(slab, { thickness: 250, overhang: 200 })\n```"
|
|
5647
|
+
],
|
|
5648
|
+
"argsType": "ComponentHandle",
|
|
5649
|
+
"resultType": "PluginDesignChangeResult"
|
|
5650
|
+
},
|
|
3766
5651
|
{
|
|
3767
5652
|
"path": "design.update.space",
|
|
3768
5653
|
"namespace": "design.update",
|
|
@@ -3772,10 +5657,11 @@
|
|
|
3772
5657
|
"Change this space's room type to Meeting Room",
|
|
3773
5658
|
"Set the height of this room to 3 metres",
|
|
3774
5659
|
"Move this space into the Circulation department",
|
|
3775
|
-
"Exclude this room from the area calculations
|
|
5660
|
+
"Exclude this room from the area calculations"
|
|
3776
5661
|
],
|
|
3777
5662
|
"argsType": "ComponentHandle",
|
|
3778
|
-
"resultType": "PluginSpaceUpdateResult"
|
|
5663
|
+
"resultType": "PluginSpaceUpdateResult",
|
|
5664
|
+
"performance": "For MORE THAN ONE space, call `design.update.spaces(items[])` — the whole batch is one host round-trip. Looping this single-space updater is N round-trips. # Example ```ts await snaptrude.design.update.space(\"space-id\", { properties: { room_type: \"Office\" } }) ```"
|
|
3779
5665
|
},
|
|
3780
5666
|
{
|
|
3781
5667
|
"path": "design.update.spaces",
|
|
@@ -3786,10 +5672,104 @@
|
|
|
3786
5672
|
"Change the room type of these five spaces at once",
|
|
3787
5673
|
"Set every room on this floor to a 3m height in one go",
|
|
3788
5674
|
"Bulk-assign these spaces to the Service department",
|
|
3789
|
-
"Mark all of these rooms as excluded from area in one update
|
|
5675
|
+
"Mark all of these rooms as excluded from area in one update"
|
|
3790
5676
|
],
|
|
3791
5677
|
"argsType": "PluginUpdateSpaceItem[]",
|
|
3792
|
-
"resultType": "PluginSpaceUpdateResult[]"
|
|
5678
|
+
"resultType": "PluginSpaceUpdateResult[]",
|
|
5679
|
+
"performance": "Bulk update — the whole batch is ONE host round-trip. Prefer over looping `design.update.space`: build the `items[]` array first, then make one call. # Example ```ts // Re-label every selected room and mark it NET area — one undoable bulk update const rooms = await snaptrude.design.query.listSpaces({ isSelected: true }) const results = await snaptrude.design.update.spaces( rooms.map((space) => ({ space, properties: { room_type: \"Bedroom\", areaClass: \"NET\" }, })), ) // One result per item, in input order console.log(results.map((r) => r.spaceId)) ```"
|
|
5680
|
+
},
|
|
5681
|
+
{
|
|
5682
|
+
"path": "design.update.staircase",
|
|
5683
|
+
"namespace": "design.update",
|
|
5684
|
+
"summary": "Update the parameters of one or more staircases — riser, tread, width, depth, step count, total height, well size, landing depth, base offset, and the two height locks — in one undoable operation. Sparse: only the fields you provide change. The paired read is `design.query.getStaircaseParams`.",
|
|
5685
|
+
"examplePrompts": [
|
|
5686
|
+
"Set the riser of this staircase to 165mm",
|
|
5687
|
+
"Change all the stairs to 14 steps",
|
|
5688
|
+
"Make the selected staircase 1200 wide with a 280 tread",
|
|
5689
|
+
"Widen every staircase on level 1 to 1 metre",
|
|
5690
|
+
"Unlock the height and set this stair to 3200 tall\n\n# Example\n```ts\n// Give every ground-floor staircase a common riser + tread (engine units)\nconst stairs = await snaptrude.design.query.listStaircases({ storeys: [1] })\nconst { affected } = await snaptrude.design.update.staircase(stairs, {\nriser: 165,\ntread: 280,\n})\nconsole.log(\"updated\", affected.length, \"staircases\")\n```"
|
|
5691
|
+
],
|
|
5692
|
+
"argsType": "ComponentHandle[]",
|
|
5693
|
+
"resultType": "PluginDesignChangeResult"
|
|
5694
|
+
},
|
|
5695
|
+
{
|
|
5696
|
+
"path": "design.update.wall",
|
|
5697
|
+
"namespace": "design.update",
|
|
5698
|
+
"summary": "Edit a **wall** — its thickness and/or height (the same command the properties panel's Thickness/Height fields drive) and/or its **wall type** (the panel's Wall Types dropdown: converts the wall to another type, rebuilding its layer stack and materials). Sparse: only the fields you provide change. Undoable; the geometry rebuilds and any dimension lines refresh. Stacked-wall companions and hosted fenestration are handled exactly as the panel does.",
|
|
5699
|
+
"examplePrompts": [
|
|
5700
|
+
"Make this wall 230mm thick",
|
|
5701
|
+
"Set the selected wall's height to 3 metres",
|
|
5702
|
+
"Thicken every exterior wall to 300",
|
|
5703
|
+
"Change this wall to a Glass Wall",
|
|
5704
|
+
"Convert all the partitions on this floor to Brick Wall\n\n# Example\n```ts\n// Convert every wall on storey 1 to the first listed wall type\nconst [wallType] = await snaptrude.design.types.list(\"wall\")\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\nfor (const wall of walls) {\nawait snaptrude.design.update.wall(wall, { type: wallType.id })\n}\n```"
|
|
5705
|
+
],
|
|
5706
|
+
"argsType": "ComponentHandle",
|
|
5707
|
+
"resultType": "PluginDesignChangeResult"
|
|
5708
|
+
},
|
|
5709
|
+
{
|
|
5710
|
+
"path": "design.visibility.hide",
|
|
5711
|
+
"namespace": "design.visibility",
|
|
5712
|
+
"summary": "Hide entities from the viewport — the same as the \"Hide\" action. Undoable. Hosted door/window/void children ride along with their wall. Already-hidden entities stay hidden.",
|
|
5713
|
+
"examplePrompts": [
|
|
5714
|
+
"Hide the selected walls",
|
|
5715
|
+
"Conceal these masses so I can see behind them",
|
|
5716
|
+
"Hide every column on this floor",
|
|
5717
|
+
"Make this furniture disappear from view\n\n# Example\n```ts\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\nconst { affected } = await snaptrude.design.visibility.hide(walls)\n```"
|
|
5718
|
+
],
|
|
5719
|
+
"argsType": "ComponentHandle[]",
|
|
5720
|
+
"resultType": "PluginDesignChangeResult"
|
|
5721
|
+
},
|
|
5722
|
+
{
|
|
5723
|
+
"path": "design.visibility.isolate",
|
|
5724
|
+
"namespace": "design.visibility",
|
|
5725
|
+
"summary": "Isolate entities — hide everything else so only the given entities remain visible (the \"Isolate\" / solo action). Undoable. Reverse it with {@linkcode PluginDesignVisibilityApi.showAll}.",
|
|
5726
|
+
"examplePrompts": [
|
|
5727
|
+
"Isolate the selected room so I can focus on it",
|
|
5728
|
+
"Show only these walls and hide the rest",
|
|
5729
|
+
"Solo this mass",
|
|
5730
|
+
"Hide everything except the staircase\n\n# Example\n```ts\nconst [room] = await snaptrude.design.selection.get()\nawait snaptrude.design.visibility.isolate([room])\n```"
|
|
5731
|
+
],
|
|
5732
|
+
"argsType": "ComponentHandle[]",
|
|
5733
|
+
"resultType": "PluginDesignChangeResult"
|
|
5734
|
+
},
|
|
5735
|
+
{
|
|
5736
|
+
"path": "design.visibility.showAll",
|
|
5737
|
+
"namespace": "design.visibility",
|
|
5738
|
+
"summary": "Reveal everything hidden on the active story — the \"Show All\" action, which also exits an isolate. Undoable.",
|
|
5739
|
+
"examplePrompts": [
|
|
5740
|
+
"Show everything again",
|
|
5741
|
+
"Unhide all the hidden objects",
|
|
5742
|
+
"Exit isolate mode",
|
|
5743
|
+
"Reveal everything I hid earlier\n\n# Example\n```ts\nconst { affected } = await snaptrude.design.visibility.showAll()\nconsole.log(`Revealed ${affected.length} entities`)\n```"
|
|
5744
|
+
],
|
|
5745
|
+
"argsType": null,
|
|
5746
|
+
"resultType": "PluginDesignChangeResult"
|
|
5747
|
+
},
|
|
5748
|
+
{
|
|
5749
|
+
"path": "design.windows.exists",
|
|
5750
|
+
"namespace": "design.windows",
|
|
5751
|
+
"summary": "Test whether a window catalog item exists for the given library id.",
|
|
5752
|
+
"examplePrompts": [
|
|
5753
|
+
"Is this window still in the library?",
|
|
5754
|
+
"Check whether a window catalog item with this id exists",
|
|
5755
|
+
"Does my team library have this window?",
|
|
5756
|
+
"Verify the window is available before placing it\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.windows.listCatalog()\nconst stillAvailable = await snaptrude.design.windows.exists(entry.id)\nconsole.log(stillAvailable ? \"safe to place\" : \"removed from library\")\n```"
|
|
5757
|
+
],
|
|
5758
|
+
"argsType": "string",
|
|
5759
|
+
"resultType": "boolean"
|
|
5760
|
+
},
|
|
5761
|
+
{
|
|
5762
|
+
"path": "design.windows.getCatalogItem",
|
|
5763
|
+
"namespace": "design.windows",
|
|
5764
|
+
"summary": "Get a single window catalog item by its library id.",
|
|
5765
|
+
"examplePrompts": [
|
|
5766
|
+
"Get the details of this window from the library",
|
|
5767
|
+
"Look up the catalog entry for this window id",
|
|
5768
|
+
"What is the cost of this window item?",
|
|
5769
|
+
"Show me the family name of this window in the catalog\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.windows.listCatalog()\nconst item = await snaptrude.design.windows.getCatalogItem(entry.id)\nif (item) console.log(item.name, item.source, item.dbType)\n```"
|
|
5770
|
+
],
|
|
5771
|
+
"argsType": "string",
|
|
5772
|
+
"resultType": "PluginObjectCatalogItem | null"
|
|
3793
5773
|
},
|
|
3794
5774
|
{
|
|
3795
5775
|
"path": "design.windows.getDimensions",
|
|
@@ -3844,6 +5824,32 @@
|
|
|
3844
5824
|
"argsType": "ComponentHandle",
|
|
3845
5825
|
"resultType": "number | null"
|
|
3846
5826
|
},
|
|
5827
|
+
{
|
|
5828
|
+
"path": "design.windows.listCatalog",
|
|
5829
|
+
"namespace": "design.windows",
|
|
5830
|
+
"summary": "List the placeable window catalog (team + general libraries), optionally restricted to one group by its `dbType` token.",
|
|
5831
|
+
"examplePrompts": [
|
|
5832
|
+
"What windows can I place in this project?",
|
|
5833
|
+
"List every window in the library",
|
|
5834
|
+
"Show me the casement windows I can add",
|
|
5835
|
+
"Browse the window catalog\n\n# Example\n```ts\nconst [group] = await snaptrude.design.windows.listCatalogGroups()\nconst items = await snaptrude.design.windows.listCatalog(group?.dbType)\nfor (const item of items) console.log(item.id, item.name, item.thumbnailUrl)\n```"
|
|
5836
|
+
],
|
|
5837
|
+
"argsType": "string",
|
|
5838
|
+
"resultType": "PluginObjectCatalogItem[]"
|
|
5839
|
+
},
|
|
5840
|
+
{
|
|
5841
|
+
"path": "design.windows.listCatalogGroups",
|
|
5842
|
+
"namespace": "design.windows",
|
|
5843
|
+
"summary": "List the window catalog **groups** — the placement families (Fixed, Casement, Sliding, Folding, …), built-in groups merged with any team-custom types.",
|
|
5844
|
+
"examplePrompts": [
|
|
5845
|
+
"What kinds of windows can I place?",
|
|
5846
|
+
"List the window groups in the catalog",
|
|
5847
|
+
"Show me the window families available in this project",
|
|
5848
|
+
"Which window types does this project support?\n\n# Example\n```ts\nconst groups = await snaptrude.design.windows.listCatalogGroups()\nfor (const g of groups) console.log(g.dbType, g.label, g.source)\n```"
|
|
5849
|
+
],
|
|
5850
|
+
"argsType": null,
|
|
5851
|
+
"resultType": "PluginObjectCatalogGroup[]"
|
|
5852
|
+
},
|
|
3847
5853
|
{
|
|
3848
5854
|
"path": "design.windows.setHeight",
|
|
3849
5855
|
"namespace": "design.windows",
|
|
@@ -3882,7 +5888,8 @@
|
|
|
3882
5888
|
"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```"
|
|
3883
5889
|
],
|
|
3884
5890
|
"argsType": "PluginBuildableEnvelopePolygonVertex[]",
|
|
3885
|
-
"resultType": "PluginBuildableEnvelopeCreateResult"
|
|
5891
|
+
"resultType": "PluginBuildableEnvelopeCreateResult",
|
|
5892
|
+
"deprecated": "design.create.buildableEnvelope"
|
|
3886
5893
|
},
|
|
3887
5894
|
{
|
|
3888
5895
|
"path": "entity.buildableEnvelope.update",
|
|
@@ -3896,7 +5903,8 @@
|
|
|
3896
5903
|
"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```"
|
|
3897
5904
|
],
|
|
3898
5905
|
"argsType": "string",
|
|
3899
|
-
"resultType": "PluginBuildableEnvelopeUpdateResult"
|
|
5906
|
+
"resultType": "PluginBuildableEnvelopeUpdateResult",
|
|
5907
|
+
"deprecated": "design.update.buildableEnvelope"
|
|
3900
5908
|
},
|
|
3901
5909
|
{
|
|
3902
5910
|
"path": "entity.referenceLine.createMulti",
|
|
@@ -3910,7 +5918,8 @@
|
|
|
3910
5918
|
"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```"
|
|
3911
5919
|
],
|
|
3912
5920
|
"argsType": "ProfileHandle",
|
|
3913
|
-
"resultType": "PluginReferenceLineCreateMultiResult"
|
|
5921
|
+
"resultType": "PluginReferenceLineCreateMultiResult",
|
|
5922
|
+
"deprecated": "design.create.referenceLines"
|
|
3914
5923
|
},
|
|
3915
5924
|
{
|
|
3916
5925
|
"path": "entity.referenceLine.delete",
|
|
@@ -3923,7 +5932,8 @@
|
|
|
3923
5932
|
"Erase a reference line by its id\n\n# Example\n```ts\nawait snaptrude.entity.referenceLine.delete(\"some-ref-line-id\")\n```"
|
|
3924
5933
|
],
|
|
3925
5934
|
"argsType": "string",
|
|
3926
|
-
"resultType": "PluginReferenceLineDeleteResult"
|
|
5935
|
+
"resultType": "PluginReferenceLineDeleteResult",
|
|
5936
|
+
"deprecated": "design.delete.entities"
|
|
3927
5937
|
},
|
|
3928
5938
|
{
|
|
3929
5939
|
"path": "entity.referenceLine.get",
|
|
@@ -3936,7 +5946,8 @@
|
|
|
3936
5946
|
"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```"
|
|
3937
5947
|
],
|
|
3938
5948
|
"argsType": "string",
|
|
3939
|
-
"resultType": "PluginReferenceLineGetResult"
|
|
5949
|
+
"resultType": "PluginReferenceLineGetResult",
|
|
5950
|
+
"deprecated": "design.query.referenceLines.get"
|
|
3940
5951
|
},
|
|
3941
5952
|
{
|
|
3942
5953
|
"path": "entity.referenceLine.getAll",
|
|
@@ -3949,7 +5960,8 @@
|
|
|
3949
5960
|
"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```"
|
|
3950
5961
|
],
|
|
3951
5962
|
"argsType": null,
|
|
3952
|
-
"resultType": "PluginReferenceLineGetAllResult"
|
|
5963
|
+
"resultType": "PluginReferenceLineGetAllResult",
|
|
5964
|
+
"deprecated": "design.query.listReferenceLines"
|
|
3953
5965
|
},
|
|
3954
5966
|
{
|
|
3955
5967
|
"path": "entity.story.create",
|
|
@@ -3963,7 +5975,37 @@
|
|
|
3963
5975
|
"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```"
|
|
3964
5976
|
],
|
|
3965
5977
|
"argsType": "number",
|
|
3966
|
-
"resultType": "PluginStoryCreateResult"
|
|
5978
|
+
"resultType": "PluginStoryCreateResult",
|
|
5979
|
+
"deprecated": "core.storeys.create"
|
|
5980
|
+
},
|
|
5981
|
+
{
|
|
5982
|
+
"path": "entity.story.delete",
|
|
5983
|
+
"namespace": "entity.story",
|
|
5984
|
+
"summary": "Delete a story and everything on it — the same as removing it from the storey panel. Every element placed on the story (walls, floors, masses, …) is deleted with it, the remaining stories are re-stacked, and the active story falls back to an adjacent one. Committed as a single undo step.",
|
|
5985
|
+
"examplePrompts": [
|
|
5986
|
+
"Delete the top floor",
|
|
5987
|
+
"Remove the basement level",
|
|
5988
|
+
"Get rid of storey 3",
|
|
5989
|
+
"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```"
|
|
5990
|
+
],
|
|
5991
|
+
"argsType": "number",
|
|
5992
|
+
"resultType": "PluginStoryDeleteResult",
|
|
5993
|
+
"deprecated": "core.storeys.delete"
|
|
5994
|
+
},
|
|
5995
|
+
{
|
|
5996
|
+
"path": "entity.story.duplicate",
|
|
5997
|
+
"namespace": "entity.story",
|
|
5998
|
+
"summary": "Duplicate a story into the adjacent level, up or down.",
|
|
5999
|
+
"examplePrompts": [
|
|
6000
|
+
"Duplicate this floor to the storey above",
|
|
6001
|
+
"Copy the ground floor down into a new basement",
|
|
6002
|
+
"Repeat this level upwards with its own independent geometry",
|
|
6003
|
+
"Duplicate just the selected walls onto the next floor up"
|
|
6004
|
+
],
|
|
6005
|
+
"argsType": "\"up\" | \"down\"",
|
|
6006
|
+
"resultType": "PluginStoryDuplicateResult",
|
|
6007
|
+
"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`) ```",
|
|
6008
|
+
"deprecated": "core.storeys.copy"
|
|
3967
6009
|
},
|
|
3968
6010
|
{
|
|
3969
6011
|
"path": "entity.story.get",
|
|
@@ -3977,7 +6019,8 @@
|
|
|
3977
6019
|
"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```"
|
|
3978
6020
|
],
|
|
3979
6021
|
"argsType": "number",
|
|
3980
|
-
"resultType": "PluginStoryGetResult"
|
|
6022
|
+
"resultType": "PluginStoryGetResult",
|
|
6023
|
+
"deprecated": "core.storeys.get"
|
|
3981
6024
|
},
|
|
3982
6025
|
{
|
|
3983
6026
|
"path": "entity.story.getAll",
|
|
@@ -3990,20 +6033,37 @@
|
|
|
3990
6033
|
"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```"
|
|
3991
6034
|
],
|
|
3992
6035
|
"argsType": null,
|
|
3993
|
-
"resultType": "PluginStoryGetAllResult"
|
|
6036
|
+
"resultType": "PluginStoryGetAllResult",
|
|
6037
|
+
"deprecated": "core.storeys.list"
|
|
6038
|
+
},
|
|
6039
|
+
{
|
|
6040
|
+
"path": "entity.story.setActive",
|
|
6041
|
+
"namespace": "entity.story",
|
|
6042
|
+
"summary": "Make a story the active story — the same as clicking it in the storey/layer panel. Subsequent draws and creates target this story, and in 2D the viewport switches to it. This is a view/navigation change: it is **not** undoable and commits nothing to the model.",
|
|
6043
|
+
"examplePrompts": [
|
|
6044
|
+
"Switch to the second floor",
|
|
6045
|
+
"Make the ground storey active",
|
|
6046
|
+
"Go to the basement level",
|
|
6047
|
+
"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```"
|
|
6048
|
+
],
|
|
6049
|
+
"argsType": "number",
|
|
6050
|
+
"resultType": "PluginStorySetActiveResult",
|
|
6051
|
+
"deprecated": "core.storeys.setActive"
|
|
3994
6052
|
},
|
|
3995
6053
|
{
|
|
3996
6054
|
"path": "entity.story.update",
|
|
3997
6055
|
"namespace": "entity.story",
|
|
3998
|
-
"summary": "Update a story's height
|
|
6056
|
+
"summary": "Update a story's floor-to-floor `height` and/or `name`.",
|
|
3999
6057
|
"examplePrompts": [
|
|
4000
6058
|
"Change the ground floor height to 3.5 metres",
|
|
4001
6059
|
"Make the second storey taller",
|
|
6060
|
+
"Rename the ground floor to \"Lobby\"",
|
|
4002
6061
|
"Set the floor-to-floor height of level 1",
|
|
4003
|
-
"
|
|
6062
|
+
"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```"
|
|
4004
6063
|
],
|
|
4005
6064
|
"argsType": "number",
|
|
4006
|
-
"resultType": "PluginStoryUpdateResult"
|
|
6065
|
+
"resultType": "PluginStoryUpdateResult",
|
|
6066
|
+
"deprecated": "core.storeys.update"
|
|
4007
6067
|
},
|
|
4008
6068
|
{
|
|
4009
6069
|
"path": "presentation.aiInspiration.cancelJob",
|
|
@@ -4201,15 +6261,76 @@
|
|
|
4201
6261
|
"resultType": "PluginAIInspirationRunResult"
|
|
4202
6262
|
},
|
|
4203
6263
|
{
|
|
4204
|
-
"path": "presentation.aiInspiration.saveRecipe",
|
|
4205
|
-
"namespace": "presentation.aiInspiration",
|
|
4206
|
-
"summary": "Save a project-level AI Inspiration recipe.",
|
|
6264
|
+
"path": "presentation.aiInspiration.saveRecipe",
|
|
6265
|
+
"namespace": "presentation.aiInspiration",
|
|
6266
|
+
"summary": "Save a project-level AI Inspiration recipe.",
|
|
6267
|
+
"examplePrompts": [
|
|
6268
|
+
"Save this recipe as \"Dusk facade render\"",
|
|
6269
|
+
"Store these generation steps for reuse\n\n# Example\n```ts\nconst extraction = await snaptrude.presentation.aiInspiration.extractRecipeFromShape({\nshapeId: selected.shapeId,\n})\nif (extraction.status === \"ready\") {\nconst saved = await snaptrude.presentation.aiInspiration.saveRecipe({\ndraft: extraction.draft,\nname: \"Dusk facade render\",\n})\nconsole.log(saved.status, saved.recipe?.id)\n}\n```"
|
|
6270
|
+
],
|
|
6271
|
+
"argsType": "PluginAIInspirationSaveRecipeArgs",
|
|
6272
|
+
"resultType": "PluginAIInspirationSaveRecipeResult"
|
|
6273
|
+
},
|
|
6274
|
+
{
|
|
6275
|
+
"path": "presentation.annotate.arrow",
|
|
6276
|
+
"namespace": "presentation.annotate",
|
|
6277
|
+
"summary": "Draw an arrow on a sheet.",
|
|
6278
|
+
"examplePrompts": [
|
|
6279
|
+
"Draw an arrow pointing at the entrance on Sheet 1",
|
|
6280
|
+
"Add a red arrow from the title to the plan view",
|
|
6281
|
+
"Point an arrow at the top-left view on the cover sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.arrow(\n\"sheet_1\",\n{ x: 100, y: 200 },\n{ x: 300, y: 250 },\n{ color: \"red\" },\n)\n```"
|
|
6282
|
+
],
|
|
6283
|
+
"argsType": "string",
|
|
6284
|
+
"resultType": "PluginPresentationAnnotateResult"
|
|
6285
|
+
},
|
|
6286
|
+
{
|
|
6287
|
+
"path": "presentation.annotate.note",
|
|
6288
|
+
"namespace": "presentation.annotate",
|
|
6289
|
+
"summary": "Add a sticky note to a sheet.",
|
|
6290
|
+
"examplePrompts": [
|
|
6291
|
+
"Add a sticky note \"Review this wall\" to Sheet 1",
|
|
6292
|
+
"Put a yellow note on the cover sheet",
|
|
6293
|
+
"Leave a note next to the ground floor plan\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.note(\n\"sheet_1\",\n\"Review this wall\",\n{ position: { x: 60, y: 120 }, color: \"yellow\" },\n)\n```"
|
|
6294
|
+
],
|
|
6295
|
+
"argsType": "string",
|
|
6296
|
+
"resultType": "PluginPresentationAnnotateResult"
|
|
6297
|
+
},
|
|
6298
|
+
{
|
|
6299
|
+
"path": "presentation.annotate.shape",
|
|
6300
|
+
"namespace": "presentation.annotate",
|
|
6301
|
+
"summary": "Draw a geo shape (rectangle, ellipse, cloud, …) on a sheet.",
|
|
6302
|
+
"examplePrompts": [
|
|
6303
|
+
"Draw a revision cloud around the kitchen on Sheet 2",
|
|
6304
|
+
"Add a red rectangle highlight to the sheet",
|
|
6305
|
+
"Draw an ellipse around the entrance on the cover sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.shape(\n\"sheet_1\",\n\"cloud\",\n{ x: 80, y: 80, w: 240, h: 160 },\n{ color: \"red\" },\n)\n```"
|
|
6306
|
+
],
|
|
6307
|
+
"argsType": "string",
|
|
6308
|
+
"resultType": "PluginPresentationAnnotateResult"
|
|
6309
|
+
},
|
|
6310
|
+
{
|
|
6311
|
+
"path": "presentation.annotate.text",
|
|
6312
|
+
"namespace": "presentation.annotate",
|
|
6313
|
+
"summary": "Add a text label to a sheet.",
|
|
6314
|
+
"examplePrompts": [
|
|
6315
|
+
"Add a title \"Ground Floor\" to Sheet 1",
|
|
6316
|
+
"Label the cover sheet with the project name",
|
|
6317
|
+
"Caption this view with \"Proposed layout\"",
|
|
6318
|
+
"Put a red note on the sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.text(\n\"sheet_1\",\n\"Ground Floor\",\n{ position: { x: 40, y: 40 }, size: \"xl\", color: \"blue\" },\n)\n```"
|
|
6319
|
+
],
|
|
6320
|
+
"argsType": "string",
|
|
6321
|
+
"resultType": "PluginPresentationAnnotateTextResult"
|
|
6322
|
+
},
|
|
6323
|
+
{
|
|
6324
|
+
"path": "presentation.diagrams.generateProgram",
|
|
6325
|
+
"namespace": "presentation.diagrams",
|
|
6326
|
+
"summary": "Generate the program (space + department) diagrams for the current model, creating new layout sheets.",
|
|
4207
6327
|
"examplePrompts": [
|
|
4208
|
-
"
|
|
4209
|
-
"
|
|
6328
|
+
"Generate the program diagrams for this project",
|
|
6329
|
+
"Auto-generate the space and department diagram sheets",
|
|
6330
|
+
"Create the program layout sheets from the model\n\n# Example\n```ts\nconst { sheetIds } = await snaptrude.presentation.diagrams.generateProgram()\n```"
|
|
4210
6331
|
],
|
|
4211
|
-
"argsType":
|
|
4212
|
-
"resultType": "
|
|
6332
|
+
"argsType": null,
|
|
6333
|
+
"resultType": "PluginPresentationDiagramsGenerateResult"
|
|
4213
6334
|
},
|
|
4214
6335
|
{
|
|
4215
6336
|
"path": "presentation.diagrams.place",
|
|
@@ -4223,6 +6344,20 @@
|
|
|
4223
6344
|
"argsType": "string",
|
|
4224
6345
|
"resultType": "PluginPresentationDiagramsPlaceResult"
|
|
4225
6346
|
},
|
|
6347
|
+
{
|
|
6348
|
+
"path": "presentation.export",
|
|
6349
|
+
"namespace": "presentation",
|
|
6350
|
+
"summary": "Export the presentation's layout sheets to a downloadable file (PDF / PNG / JPG) and return the encoded bytes as base64. Wraps the Present-mode Export dialog pipeline headlessly. Requires Present mode to be open.",
|
|
6351
|
+
"examplePrompts": [
|
|
6352
|
+
"Export the presentation as a PDF",
|
|
6353
|
+
"Download all sheets as a single PDF",
|
|
6354
|
+
"Export sheet 1 as a PNG",
|
|
6355
|
+
"Save the presentation sheets as JPG images",
|
|
6356
|
+
"Export these sheets to PDF at high resolution\n\n# Example\n```ts\nconst { files } = await snaptrude.presentation.export(\"pdf\")\n```"
|
|
6357
|
+
],
|
|
6358
|
+
"argsType": "PluginPresentationExportFormat",
|
|
6359
|
+
"resultType": "PluginPresentationExportResult"
|
|
6360
|
+
},
|
|
4226
6361
|
{
|
|
4227
6362
|
"path": "presentation.import.image",
|
|
4228
6363
|
"namespace": "presentation.import",
|
|
@@ -4249,18 +6384,166 @@
|
|
|
4249
6384
|
"argsType": "{ url?: string; dataUrl?: string }",
|
|
4250
6385
|
"resultType": "PluginPresentationImportResult"
|
|
4251
6386
|
},
|
|
6387
|
+
{
|
|
6388
|
+
"path": "presentation.import.svg",
|
|
6389
|
+
"namespace": "presentation.import",
|
|
6390
|
+
"summary": "Import an SVG onto the current Present sheet as a vector asset.",
|
|
6391
|
+
"examplePrompts": [
|
|
6392
|
+
"Import this SVG diagram onto the present canvas",
|
|
6393
|
+
"Add a vector logo to my presentation board",
|
|
6394
|
+
"Place this SVG floor plan on the current sheet as vectors",
|
|
6395
|
+
"Bring a crisp vector graphic into Present mode\n\n# Example\n```ts\nconst { shapeIds } = await snaptrude.presentation.import.svg({\nurl: \"https://example.com/diagram.svg\",\n})\n```"
|
|
6396
|
+
],
|
|
6397
|
+
"argsType": "{ url?: string; dataUrl?: string }",
|
|
6398
|
+
"resultType": "PluginPresentationImportResult"
|
|
6399
|
+
},
|
|
6400
|
+
{
|
|
6401
|
+
"path": "presentation.placedViews.get",
|
|
6402
|
+
"namespace": "presentation.placedViews",
|
|
6403
|
+
"summary": "Get a single placed view by its shape id.",
|
|
6404
|
+
"examplePrompts": [
|
|
6405
|
+
"Get the placed view I just dropped on the sheet",
|
|
6406
|
+
"Read the position and scale of this placed view",
|
|
6407
|
+
"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```"
|
|
6408
|
+
],
|
|
6409
|
+
"argsType": "string",
|
|
6410
|
+
"resultType": "PluginPlacedView"
|
|
6411
|
+
},
|
|
6412
|
+
{
|
|
6413
|
+
"path": "presentation.placedViews.list",
|
|
6414
|
+
"namespace": "presentation.placedViews",
|
|
6415
|
+
"summary": "List the placed views in the presentation.",
|
|
6416
|
+
"examplePrompts": [
|
|
6417
|
+
"Which views are placed on this sheet?",
|
|
6418
|
+
"List all the placed views in the presentation",
|
|
6419
|
+
"What's laid out on sheet 2?",
|
|
6420
|
+
"Show me every view on the Present canvas\n\n# Example\n```ts\nconst { placedViews } = await snaptrude.presentation.placedViews.list(\"sheet_1\")\n```"
|
|
6421
|
+
],
|
|
6422
|
+
"argsType": "string",
|
|
6423
|
+
"resultType": "PluginPresentationPlacedViewsListResult"
|
|
6424
|
+
},
|
|
6425
|
+
{
|
|
6426
|
+
"path": "presentation.placedViews.move",
|
|
6427
|
+
"namespace": "presentation.placedViews",
|
|
6428
|
+
"summary": "Move a placed view.",
|
|
6429
|
+
"examplePrompts": [
|
|
6430
|
+
"Move the site plan view to the top-left of sheet 2",
|
|
6431
|
+
"Reposition this placed view to 100, 200",
|
|
6432
|
+
"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```"
|
|
6433
|
+
],
|
|
6434
|
+
"argsType": "string",
|
|
6435
|
+
"resultType": "PluginPlacedView"
|
|
6436
|
+
},
|
|
6437
|
+
{
|
|
6438
|
+
"path": "presentation.placedViews.scale",
|
|
6439
|
+
"namespace": "presentation.placedViews",
|
|
6440
|
+
"summary": "Resize a placed view by a uniform factor.",
|
|
6441
|
+
"examplePrompts": [
|
|
6442
|
+
"Make this placed view twice as big",
|
|
6443
|
+
"Shrink the placed 3D view to half its size",
|
|
6444
|
+
"Scale the placed plan up by 50%\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.scale(shapeId, 2)\n```"
|
|
6445
|
+
],
|
|
6446
|
+
"argsType": "string",
|
|
6447
|
+
"resultType": "PluginPlacedView"
|
|
6448
|
+
},
|
|
6449
|
+
{
|
|
6450
|
+
"path": "presentation.placedViews.setCrop",
|
|
6451
|
+
"namespace": "presentation.placedViews",
|
|
6452
|
+
"summary": "Crop a placed view, or clear its crop.",
|
|
6453
|
+
"examplePrompts": [
|
|
6454
|
+
"Crop the placed view to its left half",
|
|
6455
|
+
"Crop this view to the top-right quarter",
|
|
6456
|
+
"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```"
|
|
6457
|
+
],
|
|
6458
|
+
"argsType": "string",
|
|
6459
|
+
"resultType": "PluginPlacedView"
|
|
6460
|
+
},
|
|
6461
|
+
{
|
|
6462
|
+
"path": "presentation.placedViews.setScale",
|
|
6463
|
+
"namespace": "presentation.placedViews",
|
|
6464
|
+
"summary": "Set a placed view's architectural scale.",
|
|
6465
|
+
"examplePrompts": [
|
|
6466
|
+
"Set the plan to 1:100",
|
|
6467
|
+
"Change the placed floor plan to 1:50 scale",
|
|
6468
|
+
"Make this view print at quarter-inch scale\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.setScale(shapeId, 100) // 1:100\n```"
|
|
6469
|
+
],
|
|
6470
|
+
"argsType": "string",
|
|
6471
|
+
"resultType": "PluginPlacedView"
|
|
6472
|
+
},
|
|
6473
|
+
{
|
|
6474
|
+
"path": "presentation.shapes.list",
|
|
6475
|
+
"namespace": "presentation.shapes",
|
|
6476
|
+
"summary": "List the calling plugin's shapes.",
|
|
6477
|
+
"examplePrompts": [
|
|
6478
|
+
"Which annotations has my plugin placed on the sheets?",
|
|
6479
|
+
"List the plugin's shapes before refreshing them",
|
|
6480
|
+
"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```"
|
|
6481
|
+
],
|
|
6482
|
+
"argsType": null,
|
|
6483
|
+
"resultType": "PluginPresentationShapesListResult"
|
|
6484
|
+
},
|
|
6485
|
+
{
|
|
6486
|
+
"path": "presentation.shapes.remove",
|
|
6487
|
+
"namespace": "presentation.shapes",
|
|
6488
|
+
"summary": "Delete the shape for a key.",
|
|
6489
|
+
"examplePrompts": [
|
|
6490
|
+
"Remove the FAR label from the sheet",
|
|
6491
|
+
"Delete the highlight the plugin added earlier",
|
|
6492
|
+
"Clear the \"far-label\" annotation\n\n# Example\n```ts\nconst removed = await snaptrude.presentation.shapes.remove(\"far-label\")\n```"
|
|
6493
|
+
],
|
|
6494
|
+
"argsType": "string",
|
|
6495
|
+
"resultType": "boolean"
|
|
6496
|
+
},
|
|
6497
|
+
{
|
|
6498
|
+
"path": "presentation.shapes.removeAll",
|
|
6499
|
+
"namespace": "presentation.shapes",
|
|
6500
|
+
"summary": "Delete every shape owned by the calling plugin.",
|
|
6501
|
+
"examplePrompts": [
|
|
6502
|
+
"Clear all annotations my plugin added",
|
|
6503
|
+
"Reset the sheet output before rerunning the analysis",
|
|
6504
|
+
"Remove every plugin-drawn shape\n\n# Example\n```ts\nconst deleted = await snaptrude.presentation.shapes.removeAll()\n```"
|
|
6505
|
+
],
|
|
6506
|
+
"argsType": null,
|
|
6507
|
+
"resultType": "number"
|
|
6508
|
+
},
|
|
6509
|
+
{
|
|
6510
|
+
"path": "presentation.shapes.upsert",
|
|
6511
|
+
"namespace": "presentation.shapes",
|
|
6512
|
+
"summary": "Create or update the shape for a key.",
|
|
6513
|
+
"examplePrompts": [
|
|
6514
|
+
"Update the analysis label on the sheet instead of adding another one",
|
|
6515
|
+
"Rerun the daylight report and refresh its annotations",
|
|
6516
|
+
"Keep one \"FAR: 2.4\" text on Sheet 1 that updates on each run",
|
|
6517
|
+
"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```"
|
|
6518
|
+
],
|
|
6519
|
+
"argsType": "string",
|
|
6520
|
+
"resultType": "PluginPresentationShapesUpsertResult"
|
|
6521
|
+
},
|
|
4252
6522
|
{
|
|
4253
6523
|
"path": "presentation.sheets.create",
|
|
4254
6524
|
"namespace": "presentation.sheets",
|
|
4255
6525
|
"summary": "Create a new layout sheet.",
|
|
4256
6526
|
"examplePrompts": [
|
|
4257
6527
|
"Create a new sheet called Cover",
|
|
4258
|
-
"Add
|
|
4259
|
-
"Make a new presentation sheet named Floor Plans
|
|
6528
|
+
"Add an A3 landscape layout sheet",
|
|
6529
|
+
"Make a new ANSI D presentation sheet named Floor Plans",
|
|
6530
|
+
"Create a portrait A4 sheet\n\n# Example\n```ts\nconst sheet = await snaptrude.presentation.sheets.create(\"Cover\", {\nsize: \"ISO_A3\",\norientation: \"landscape\",\n})\n```"
|
|
4260
6531
|
],
|
|
4261
6532
|
"argsType": "string",
|
|
4262
6533
|
"resultType": "PluginPresentationSheet"
|
|
4263
6534
|
},
|
|
6535
|
+
{
|
|
6536
|
+
"path": "presentation.sheets.delete",
|
|
6537
|
+
"namespace": "presentation.sheets",
|
|
6538
|
+
"summary": "Delete a layout sheet.",
|
|
6539
|
+
"examplePrompts": [
|
|
6540
|
+
"Delete sheet_2",
|
|
6541
|
+
"Remove the Cover sheet",
|
|
6542
|
+
"Get rid of the last layout sheet\n\n# Example\n```ts\nconst { id } = await snaptrude.presentation.sheets.delete(\"sheet_2\")\n```"
|
|
6543
|
+
],
|
|
6544
|
+
"argsType": "string",
|
|
6545
|
+
"resultType": "PluginPresentationSheetsDeleteResult"
|
|
6546
|
+
},
|
|
4264
6547
|
{
|
|
4265
6548
|
"path": "presentation.sheets.get",
|
|
4266
6549
|
"namespace": "presentation.sheets",
|
|
@@ -4294,11 +6577,73 @@
|
|
|
4294
6577
|
"Place the floor plan on Sheet 1",
|
|
4295
6578
|
"Add this 3D view to the cover sheet",
|
|
4296
6579
|
"Drop the site plan onto the layout sheet at 100, 200",
|
|
4297
|
-
"Put the Ground Floor view on sheet_1
|
|
6580
|
+
"Put the Ground Floor view on sheet_1 at 1:100 scale",
|
|
6581
|
+
"Place the plan on the cover sheet at quarter-inch scale\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.sheets.place(\"sheet_1\", \"view_123\", {\nscale: 100, // 1:100 (metric project)\n})\n```"
|
|
4298
6582
|
],
|
|
4299
6583
|
"argsType": "string",
|
|
4300
6584
|
"resultType": "PluginPresentationSheetsPlaceResult"
|
|
4301
6585
|
},
|
|
6586
|
+
{
|
|
6587
|
+
"path": "presentation.sheets.rename",
|
|
6588
|
+
"namespace": "presentation.sheets",
|
|
6589
|
+
"summary": "Rename a layout sheet.",
|
|
6590
|
+
"examplePrompts": [
|
|
6591
|
+
"Rename sheet_1 to Cover",
|
|
6592
|
+
"Call the first sheet Ground Floor",
|
|
6593
|
+
"Change this sheet's name to Site Plan\n\n# Example\n```ts\nconst sheet = await snaptrude.presentation.sheets.rename(\"sheet_1\", \"Cover\")\n```"
|
|
6594
|
+
],
|
|
6595
|
+
"argsType": "string",
|
|
6596
|
+
"resultType": "PluginPresentationSheet"
|
|
6597
|
+
},
|
|
6598
|
+
{
|
|
6599
|
+
"path": "presentation.sheets.reorder",
|
|
6600
|
+
"namespace": "presentation.sheets",
|
|
6601
|
+
"summary": "Move a sheet to a new position in the sheet order.",
|
|
6602
|
+
"examplePrompts": [
|
|
6603
|
+
"Move sheet_3 to the front",
|
|
6604
|
+
"Make the Cover sheet the first sheet",
|
|
6605
|
+
"Reorder this sheet to position 2\n\n# Example\n```ts\nconst { sheets } = await snaptrude.presentation.sheets.reorder(\"sheet_3\", 0)\n```"
|
|
6606
|
+
],
|
|
6607
|
+
"argsType": "string",
|
|
6608
|
+
"resultType": "PluginPresentationSheetsListResult"
|
|
6609
|
+
},
|
|
6610
|
+
{
|
|
6611
|
+
"path": "presentation.sheets.setActive",
|
|
6612
|
+
"namespace": "presentation.sheets",
|
|
6613
|
+
"summary": "Make a sheet the active sheet.",
|
|
6614
|
+
"examplePrompts": [
|
|
6615
|
+
"Go to sheet_1",
|
|
6616
|
+
"Open the Cover sheet",
|
|
6617
|
+
"Switch to the Site Plan sheet\n\n# Example\n```ts\nawait snaptrude.presentation.sheets.setActive(\"sheet_1\")\n```"
|
|
6618
|
+
],
|
|
6619
|
+
"argsType": "string",
|
|
6620
|
+
"resultType": "PluginPresentationSheet"
|
|
6621
|
+
},
|
|
6622
|
+
{
|
|
6623
|
+
"path": "presentation.sheets.setSize",
|
|
6624
|
+
"namespace": "presentation.sheets",
|
|
6625
|
+
"summary": "Set a sheet's paper size and/or orientation.",
|
|
6626
|
+
"examplePrompts": [
|
|
6627
|
+
"Resize sheet_1 to A1",
|
|
6628
|
+
"Make the cover sheet ANSI B portrait",
|
|
6629
|
+
"Change this sheet to Arch D landscape",
|
|
6630
|
+
"Set the sheet size to A3\n\n# Example\n```ts\nconst sheet = await snaptrude.presentation.sheets.setSize(\"sheet_1\", \"ISO_A1\", \"portrait\")\n```"
|
|
6631
|
+
],
|
|
6632
|
+
"argsType": "string",
|
|
6633
|
+
"resultType": "PluginPresentationSheet"
|
|
6634
|
+
},
|
|
6635
|
+
{
|
|
6636
|
+
"path": "presentation.sheets.updatePlacedView",
|
|
6637
|
+
"namespace": "presentation.sheets",
|
|
6638
|
+
"summary": "Refresh placed views to the current model state.",
|
|
6639
|
+
"examplePrompts": [
|
|
6640
|
+
"Update all the placed views to the latest model",
|
|
6641
|
+
"Refresh the views on sheet_1",
|
|
6642
|
+
"Re-render the placed views after my edits\n\n# Example\n```ts\nconst { shapeIds } = await snaptrude.presentation.sheets.updatePlacedView()\n```"
|
|
6643
|
+
],
|
|
6644
|
+
"argsType": "{\n sheetId?: string\n }",
|
|
6645
|
+
"resultType": "PluginPresentationSheetsUpdatePlacedViewResult"
|
|
6646
|
+
},
|
|
4302
6647
|
{
|
|
4303
6648
|
"path": "presentation.views.capture",
|
|
4304
6649
|
"namespace": "presentation.views",
|
|
@@ -4320,11 +6665,24 @@
|
|
|
4320
6665
|
"Save the current view as Lobby Perspective",
|
|
4321
6666
|
"Create a new saved view from where I'm looking",
|
|
4322
6667
|
"Bookmark this camera angle",
|
|
4323
|
-
"Save the current 2D plan as a view
|
|
6668
|
+
"Save the current 2D plan as a view",
|
|
6669
|
+
"Save a view on the second storey\n\n# Example\n```ts\nconst view = await snaptrude.presentation.views.create(\"Lobby\")\n// …or capture the view on a specific storey\nconst level2 = await snaptrude.presentation.views.create(\"Level 2\", { storey: 2 })\n```"
|
|
4324
6670
|
],
|
|
4325
6671
|
"argsType": "string",
|
|
4326
6672
|
"resultType": "PluginPresentationViewsCreateResult"
|
|
4327
6673
|
},
|
|
6674
|
+
{
|
|
6675
|
+
"path": "presentation.views.delete",
|
|
6676
|
+
"namespace": "presentation.views",
|
|
6677
|
+
"summary": "Delete a saved view.",
|
|
6678
|
+
"examplePrompts": [
|
|
6679
|
+
"Delete the view named Old Draft",
|
|
6680
|
+
"Remove this saved view",
|
|
6681
|
+
"Get rid of the Lobby camera bookmark\n\n# Example\n```ts\nconst { id } = await snaptrude.presentation.views.delete(\"view_123\")\n```"
|
|
6682
|
+
],
|
|
6683
|
+
"argsType": "string",
|
|
6684
|
+
"resultType": "PluginPresentationViewsDeleteResult"
|
|
6685
|
+
},
|
|
4328
6686
|
{
|
|
4329
6687
|
"path": "presentation.views.get",
|
|
4330
6688
|
"namespace": "presentation.views",
|
|
@@ -4349,6 +6707,19 @@
|
|
|
4349
6707
|
"argsType": null,
|
|
4350
6708
|
"resultType": "PluginPresentationViewsGetResult"
|
|
4351
6709
|
},
|
|
6710
|
+
{
|
|
6711
|
+
"path": "presentation.views.getSettings",
|
|
6712
|
+
"namespace": "presentation.views",
|
|
6713
|
+
"summary": "Read a saved view's display settings (background, color mode, view mode, axis, edges, labels).",
|
|
6714
|
+
"examplePrompts": [
|
|
6715
|
+
"What color mode is the Ground Floor view using?",
|
|
6716
|
+
"Get the display settings for this view",
|
|
6717
|
+
"Does the site plan view show axes and labels?",
|
|
6718
|
+
"Read the background color of the active view\n\n# Example\n```ts\nconst settings = await snaptrude.presentation.views.getSettings(\"view_123\")\nif (settings) console.log(settings.colorMode, settings.backgroundColor)\n```"
|
|
6719
|
+
],
|
|
6720
|
+
"argsType": "string",
|
|
6721
|
+
"resultType": "PluginPresentationViewsGetSettingsResult"
|
|
6722
|
+
},
|
|
4352
6723
|
{
|
|
4353
6724
|
"path": "presentation.views.list",
|
|
4354
6725
|
"namespace": "presentation.views",
|
|
@@ -4363,6 +6734,18 @@
|
|
|
4363
6734
|
"argsType": null,
|
|
4364
6735
|
"resultType": "PluginPresentationViewsListResult"
|
|
4365
6736
|
},
|
|
6737
|
+
{
|
|
6738
|
+
"path": "presentation.views.rename",
|
|
6739
|
+
"namespace": "presentation.views",
|
|
6740
|
+
"summary": "Rename a saved view.",
|
|
6741
|
+
"examplePrompts": [
|
|
6742
|
+
"Rename the view Lobby to Entrance Lobby",
|
|
6743
|
+
"Call this view Ground Floor Plan",
|
|
6744
|
+
"Change the active view's name to Final\n\n# Example\n```ts\nconst view = await snaptrude.presentation.views.rename(\"view_123\", \"Entrance\")\n```"
|
|
6745
|
+
],
|
|
6746
|
+
"argsType": "string",
|
|
6747
|
+
"resultType": "PluginPresentationViewsRenameResult"
|
|
6748
|
+
},
|
|
4366
6749
|
{
|
|
4367
6750
|
"path": "presentation.views.setActive",
|
|
4368
6751
|
"namespace": "presentation.views",
|
|
@@ -4376,6 +6759,21 @@
|
|
|
4376
6759
|
"argsType": "string",
|
|
4377
6760
|
"resultType": "PluginPresentationViewsSetActiveResult"
|
|
4378
6761
|
},
|
|
6762
|
+
{
|
|
6763
|
+
"path": "presentation.views.updateSettings",
|
|
6764
|
+
"namespace": "presentation.views",
|
|
6765
|
+
"summary": "Update a saved view's display settings (partial patch — only the fields you pass change).",
|
|
6766
|
+
"examplePrompts": [
|
|
6767
|
+
"Switch this view to monochrome color mode",
|
|
6768
|
+
"Turn off the axis in the Ground Floor view",
|
|
6769
|
+
"Set the background of the active view to white",
|
|
6770
|
+
"Show area labels on this view",
|
|
6771
|
+
"Enable hidden-line mode for the section view",
|
|
6772
|
+
"Make the 3D view orthographic instead of perspective\n\n# Example\n```ts\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\ncolorMode: \"monochrome\",\nshowAxis: false,\n})\n// switch a 3D view to an isometric (orthographic) projection\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\nviewMode: \"isometric\",\n})\n```"
|
|
6773
|
+
],
|
|
6774
|
+
"argsType": "string",
|
|
6775
|
+
"resultType": "PluginPresentationViewsUpdateSettingsResult"
|
|
6776
|
+
},
|
|
4379
6777
|
{
|
|
4380
6778
|
"path": "program.adjacency.compute",
|
|
4381
6779
|
"namespace": "program.adjacency",
|
|
@@ -4409,6 +6807,8 @@
|
|
|
4409
6807
|
"examplePrompts": [
|
|
4410
6808
|
"What's my FAR right now?",
|
|
4411
6809
|
"Give me the program area summary",
|
|
6810
|
+
"What is my net internal area vs gross external area?",
|
|
6811
|
+
"How much net and gross area do I have?",
|
|
4412
6812
|
"How much built-up area have I used against the site area?",
|
|
4413
6813
|
"Am I within my FAR target?\n\n# Example\n```ts\nconst s = await snaptrude.program.areas.get()\nconsole.log(s.builtUp, s.siteArea, s.achievedFar, s.targetFar, s.areaUnit)\n```"
|
|
4414
6814
|
],
|
|
@@ -4421,6 +6821,7 @@
|
|
|
4421
6821
|
"summary": "List the program area rollup grouped by a facet.",
|
|
4422
6822
|
"examplePrompts": [
|
|
4423
6823
|
"Break down the area by storey",
|
|
6824
|
+
"Break down net vs gross area by storey",
|
|
4424
6825
|
"Show the area rollup per department",
|
|
4425
6826
|
"Group the built-up area by building\n\n# Example\n```ts\nconst { groups } = await snaptrude.program.areas.list(\"storeys\")\nfor (const g of groups) console.log(g.name, g.builtUp, g.count)\n```"
|
|
4426
6827
|
],
|
|
@@ -4433,12 +6834,25 @@
|
|
|
4433
6834
|
"summary": "List the spaces that make up one area group.",
|
|
4434
6835
|
"examplePrompts": [
|
|
4435
6836
|
"List the spaces on this storey with their areas",
|
|
6837
|
+
"Which spaces are net and which are gross on this storey?",
|
|
4436
6838
|
"What rooms are in the Bedrooms department bucket?",
|
|
4437
6839
|
"Break the storey area down into individual spaces\n\n# Example\n```ts\nconst { members } = await snaptrude.program.areas.listMembers(\"storeys\", \"st_2\")\nfor (const m of members) console.log(m.label, m.carpet)\n```"
|
|
4438
6840
|
],
|
|
4439
6841
|
"argsType": "PluginProgramAreaGroupBy",
|
|
4440
6842
|
"resultType": "PluginProgramAreasListMembersResult"
|
|
4441
6843
|
},
|
|
6844
|
+
{
|
|
6845
|
+
"path": "program.areas.refresh",
|
|
6846
|
+
"namespace": "program.areas",
|
|
6847
|
+
"summary": "Force the area breakdown to recompute, then return the fresh summary.",
|
|
6848
|
+
"examplePrompts": [
|
|
6849
|
+
"Recompute the area totals before I read them",
|
|
6850
|
+
"Refresh the FAR numbers",
|
|
6851
|
+
"Make sure the area breakdown is up to date\n\n# Example\n```ts\nconst s = await snaptrude.program.areas.refresh()\nconst { groups } = await snaptrude.program.areas.list(\"storeys\") // now fresh\nconsole.log(s.builtUp, groups.length)\n```"
|
|
6852
|
+
],
|
|
6853
|
+
"argsType": null,
|
|
6854
|
+
"resultType": "PluginProgramAreasRefreshResult"
|
|
6855
|
+
},
|
|
4442
6856
|
{
|
|
4443
6857
|
"path": "program.areas.update",
|
|
4444
6858
|
"namespace": "program.areas",
|
|
@@ -4448,7 +6862,7 @@
|
|
|
4448
6862
|
"Override the site area to 5000",
|
|
4449
6863
|
"Allow a 10 percent FAR deviation\n\n# Example\n```ts\nconst s = await snaptrude.program.areas.update({ targetFar: 2.5 })\nconsole.log(s.achievedFar, s.targetFar)\n```"
|
|
4450
6864
|
],
|
|
4451
|
-
"argsType": "{
|
|
6865
|
+
"argsType": "{\n targetFar?: number\n siteArea?: number\n deviation?: number\n }",
|
|
4452
6866
|
"resultType": "PluginProgramAreasUpdateResult"
|
|
4453
6867
|
},
|
|
4454
6868
|
{
|
|
@@ -4593,6 +7007,79 @@
|
|
|
4593
7007
|
"argsType": "string",
|
|
4594
7008
|
"resultType": "PluginProgramDepartmentsUpdateResult"
|
|
4595
7009
|
},
|
|
7010
|
+
{
|
|
7011
|
+
"path": "program.layout.applySolution",
|
|
7012
|
+
"namespace": "program.layout",
|
|
7013
|
+
"summary": "Apply one of the pending arrange solutions.",
|
|
7014
|
+
"examplePrompts": [
|
|
7015
|
+
"Apply the second arrange solution",
|
|
7016
|
+
"Pick layout solution 3 and commit it",
|
|
7017
|
+
"Apply the arrange solution I chose\n\n# Example\n```ts\nawait snaptrude.program.layout.arrange({ autoCommit: false })\nlet job = await snaptrude.program.layout.getState()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.program.layout.getState()\n}\nif (job?.status === \"pendingReview\") {\nconsole.log(`${job.totalSolutions} candidate layouts`)\nawait snaptrude.program.layout.applySolution(1) // commit the second one\n}\n```"
|
|
7018
|
+
],
|
|
7019
|
+
"argsType": "number",
|
|
7020
|
+
"resultType": "PluginProgramLayoutApplyResult"
|
|
7021
|
+
},
|
|
7022
|
+
{
|
|
7023
|
+
"path": "program.layout.arrange",
|
|
7024
|
+
"namespace": "program.layout",
|
|
7025
|
+
"summary": "Arrange the spaces inside the envelope using the computed adjacency data.",
|
|
7026
|
+
"examplePrompts": [
|
|
7027
|
+
"Arrange the rooms in the envelope",
|
|
7028
|
+
"Lay out the departments inside the building envelope",
|
|
7029
|
+
"Auto-arrange the program spaces",
|
|
7030
|
+
"Arrange the rooms but let me pick the solution\n\n# Example\n```ts\nconst { success, error } = await snaptrude.program.layout.arrange()\nif (!success) throw new Error(error)\n// poll until the layout is applied\nlet job = await snaptrude.program.layout.getState()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.program.layout.getState()\n}\n```"
|
|
7031
|
+
],
|
|
7032
|
+
"argsType": "PluginProgramLayoutRunArgs",
|
|
7033
|
+
"resultType": "PluginProgramLayoutRunResult"
|
|
7034
|
+
},
|
|
7035
|
+
{
|
|
7036
|
+
"path": "program.layout.cancel",
|
|
7037
|
+
"namespace": "program.layout",
|
|
7038
|
+
"summary": "Cancel the in-flight layout run.",
|
|
7039
|
+
"examplePrompts": [
|
|
7040
|
+
"Cancel the arrange",
|
|
7041
|
+
"Stop the running layout job",
|
|
7042
|
+
"Abort the pack in envelope\n\n# Example\n```ts\nawait snaptrude.program.layout.cancel()\n```"
|
|
7043
|
+
],
|
|
7044
|
+
"argsType": null,
|
|
7045
|
+
"resultType": "boolean"
|
|
7046
|
+
},
|
|
7047
|
+
{
|
|
7048
|
+
"path": "program.layout.getState",
|
|
7049
|
+
"namespace": "program.layout",
|
|
7050
|
+
"summary": "Get the state of the layout run.",
|
|
7051
|
+
"examplePrompts": [
|
|
7052
|
+
"Is the arrange done?",
|
|
7053
|
+
"Check the status of the layout run",
|
|
7054
|
+
"Did the pack finish?\n\n# Example\n```ts\nconst job = await snaptrude.program.layout.getState()\nif (job?.status === \"active\") console.log(\"layout applied\")\n```"
|
|
7055
|
+
],
|
|
7056
|
+
"argsType": null,
|
|
7057
|
+
"resultType": "PluginProgramLayoutStateResult"
|
|
7058
|
+
},
|
|
7059
|
+
{
|
|
7060
|
+
"path": "program.layout.pack",
|
|
7061
|
+
"namespace": "program.layout",
|
|
7062
|
+
"summary": "Pack the spaces into the envelope (a tighter fit than arrange).",
|
|
7063
|
+
"examplePrompts": [
|
|
7064
|
+
"Pack the rooms into the envelope",
|
|
7065
|
+
"Fit the program spaces tightly into the building",
|
|
7066
|
+
"Run pack-in-envelope on this storey\n\n# Example\n```ts\nconst { success } = await snaptrude.program.layout.pack({ envelopeId: \"be_...\" })\nlet job = await snaptrude.program.layout.getState()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.program.layout.getState()\n}\n```"
|
|
7067
|
+
],
|
|
7068
|
+
"argsType": "PluginProgramLayoutRunArgs",
|
|
7069
|
+
"resultType": "PluginProgramLayoutRunResult"
|
|
7070
|
+
},
|
|
7071
|
+
{
|
|
7072
|
+
"path": "program.layout.stack",
|
|
7073
|
+
"namespace": "program.layout",
|
|
7074
|
+
"summary": "Stack the program across **every storey** of the building — the product's *Pack in envelope* / auto-stack.",
|
|
7075
|
+
"examplePrompts": [
|
|
7076
|
+
"Stack the program across all floors",
|
|
7077
|
+
"Auto-stack the departments into the envelope on every storey",
|
|
7078
|
+
"Pack the whole building's program into its envelope\n\n# Example\n```ts\nconst { success, skippedStoreys, error } = await snaptrude.program.layout.stack()\nif (!success) throw new Error(error)\nif (skippedStoreys.length)\nconsole.warn(`No envelope on storeys: ${skippedStoreys.join(\", \")}`)\n```"
|
|
7079
|
+
],
|
|
7080
|
+
"argsType": null,
|
|
7081
|
+
"resultType": "PluginProgramLayoutStackResult"
|
|
7082
|
+
},
|
|
4596
7083
|
{
|
|
4597
7084
|
"path": "program.metrics.get",
|
|
4598
7085
|
"namespace": "program.metrics",
|
|
@@ -4647,6 +7134,55 @@
|
|
|
4647
7134
|
"argsType": null,
|
|
4648
7135
|
"resultType": "PluginProgramSiteContextResult"
|
|
4649
7136
|
},
|
|
7137
|
+
{
|
|
7138
|
+
"path": "program.site.getLocation",
|
|
7139
|
+
"namespace": "program.site",
|
|
7140
|
+
"summary": "Get the project's geographic location.",
|
|
7141
|
+
"examplePrompts": [
|
|
7142
|
+
"What's the project's latitude and longitude?",
|
|
7143
|
+
"Where is this site located?",
|
|
7144
|
+
"Get the geographic coordinates of the project\n\n# Example\n```ts\nconst location = await snaptrude.program.site.getLocation()\nif (location) console.log(location.latitude, location.longitude)\n```"
|
|
7145
|
+
],
|
|
7146
|
+
"argsType": null,
|
|
7147
|
+
"resultType": "PluginProgramSiteLocationResult"
|
|
7148
|
+
},
|
|
7149
|
+
{
|
|
7150
|
+
"path": "program.site.getNorthAngle",
|
|
7151
|
+
"namespace": "program.site",
|
|
7152
|
+
"summary": "Get the site's true-north angle.",
|
|
7153
|
+
"examplePrompts": [
|
|
7154
|
+
"What's the north angle of the site?",
|
|
7155
|
+
"How far is the model rotated from true north?",
|
|
7156
|
+
"Get the project's true north direction\n\n# Example\n```ts\nconst northAngle = await snaptrude.program.site.getNorthAngle()\nif (northAngle !== null) console.log(`${northAngle}° from true north`)\n```"
|
|
7157
|
+
],
|
|
7158
|
+
"argsType": null,
|
|
7159
|
+
"resultType": "PluginProgramSiteNorthAngleResult"
|
|
7160
|
+
},
|
|
7161
|
+
{
|
|
7162
|
+
"path": "program.site.getTimezone",
|
|
7163
|
+
"namespace": "program.site",
|
|
7164
|
+
"summary": "Get the IANA timezone of the project's geographic location.",
|
|
7165
|
+
"examplePrompts": [
|
|
7166
|
+
"What timezone is this project in?",
|
|
7167
|
+
"Get the site's IANA timezone",
|
|
7168
|
+
"What's the local time zone at the project location?",
|
|
7169
|
+
"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```"
|
|
7170
|
+
],
|
|
7171
|
+
"argsType": null,
|
|
7172
|
+
"resultType": "PluginProgramSiteTimezoneResult"
|
|
7173
|
+
},
|
|
7174
|
+
{
|
|
7175
|
+
"path": "program.site.getWeather",
|
|
7176
|
+
"namespace": "program.site",
|
|
7177
|
+
"summary": "Get the weather file resolved for the project site.",
|
|
7178
|
+
"examplePrompts": [
|
|
7179
|
+
"Which weather file is my project using?",
|
|
7180
|
+
"What EPW station was resolved for this site?",
|
|
7181
|
+
"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```"
|
|
7182
|
+
],
|
|
7183
|
+
"argsType": null,
|
|
7184
|
+
"resultType": "PluginProgramSiteWeatherResult"
|
|
7185
|
+
},
|
|
4650
7186
|
{
|
|
4651
7187
|
"path": "program.site.listGeoPolygons",
|
|
4652
7188
|
"namespace": "program.site",
|
|
@@ -4663,7 +7199,7 @@
|
|
|
4663
7199
|
{
|
|
4664
7200
|
"path": "program.site.listPolygons",
|
|
4665
7201
|
"namespace": "program.site",
|
|
4666
|
-
"summary": "List the site parcels with their footprints (
|
|
7202
|
+
"summary": "List the site parcels with their footprints (world XZ plan coordinates, Snaptrude units).",
|
|
4667
7203
|
"examplePrompts": [
|
|
4668
7204
|
"List every site parcel",
|
|
4669
7205
|
"Show me each plot's footprint",
|
|
@@ -4698,6 +7234,19 @@
|
|
|
4698
7234
|
"argsType": "string",
|
|
4699
7235
|
"resultType": "PluginProgramSpreadsheetAddConditionalFormattingResult"
|
|
4700
7236
|
},
|
|
7237
|
+
{
|
|
7238
|
+
"path": "program.spreadsheet.addImage",
|
|
7239
|
+
"namespace": "program.spreadsheet",
|
|
7240
|
+
"summary": "Place a floating image on a workbook sheet from a base64 data URI.",
|
|
7241
|
+
"examplePrompts": [
|
|
7242
|
+
"Add my logo image to the report sheet",
|
|
7243
|
+
"Place a PNG at cell B2 on the Takeoff sheet",
|
|
7244
|
+
"Put an SVG diagram on a spreadsheet sheet",
|
|
7245
|
+
"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```"
|
|
7246
|
+
],
|
|
7247
|
+
"argsType": "string",
|
|
7248
|
+
"resultType": "PluginProgramSpreadsheetAddImageResult"
|
|
7249
|
+
},
|
|
4701
7250
|
{
|
|
4702
7251
|
"path": "program.spreadsheet.bindings.create",
|
|
4703
7252
|
"namespace": "program.spreadsheet.bindings",
|
|
@@ -4731,7 +7280,7 @@
|
|
|
4731
7280
|
"Re-pull all my data bindings",
|
|
4732
7281
|
"Refresh every binding on the sheets\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.bindings.refresh({ name: \"takeoff\" })\n```"
|
|
4733
7282
|
],
|
|
4734
|
-
"argsType": "{
|
|
7283
|
+
"argsType": "{\n name?: string\n }",
|
|
4735
7284
|
"resultType": "PluginProgramSpreadsheetBindingsRefreshResult"
|
|
4736
7285
|
},
|
|
4737
7286
|
{
|
|
@@ -4747,15 +7296,41 @@
|
|
|
4747
7296
|
"argsType": "string",
|
|
4748
7297
|
"resultType": "PluginProgramSpreadsheetCreateSheetResult"
|
|
4749
7298
|
},
|
|
7299
|
+
{
|
|
7300
|
+
"path": "program.spreadsheet.datasets.list",
|
|
7301
|
+
"namespace": "program.spreadsheet.datasets",
|
|
7302
|
+
"summary": "List the stored plugin datasets.",
|
|
7303
|
+
"examplePrompts": [
|
|
7304
|
+
"List my plugin datasets",
|
|
7305
|
+
"What datasets are stored for the sheets?",
|
|
7306
|
+
"Show the data sets bindings can use\n\n# Example\n```ts\nconst { datasets } = await snaptrude.program.spreadsheet.datasets.list()\n```"
|
|
7307
|
+
],
|
|
7308
|
+
"argsType": null,
|
|
7309
|
+
"resultType": "PluginProgramSpreadsheetDatasetsListResult"
|
|
7310
|
+
},
|
|
7311
|
+
{
|
|
7312
|
+
"path": "program.spreadsheet.datasets.set",
|
|
7313
|
+
"namespace": "program.spreadsheet.datasets",
|
|
7314
|
+
"summary": "Store (upsert) a named plugin dataset.",
|
|
7315
|
+
"examplePrompts": [
|
|
7316
|
+
"Store my plugin's rows as a named dataset",
|
|
7317
|
+
"Upload data the sheets can bind to and refresh",
|
|
7318
|
+
"Save a dataset for a live sheet binding",
|
|
7319
|
+
"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```"
|
|
7320
|
+
],
|
|
7321
|
+
"argsType": "string",
|
|
7322
|
+
"resultType": "PluginProgramSpreadsheetDatasetsSetResult"
|
|
7323
|
+
},
|
|
4750
7324
|
{
|
|
4751
7325
|
"path": "program.spreadsheet.export",
|
|
4752
7326
|
"namespace": "program.spreadsheet",
|
|
4753
|
-
"summary": "Export the
|
|
7327
|
+
"summary": "Export the report workbook to a file (xlsx, pdf, or csv).",
|
|
4754
7328
|
"examplePrompts": [
|
|
4755
7329
|
"Export the report as an Excel file",
|
|
4756
7330
|
"Download the whole workbook as a PDF",
|
|
4757
7331
|
"Export the program workbook to xlsx",
|
|
4758
|
-
"Save the report as a csv file
|
|
7332
|
+
"Save the report as a csv file",
|
|
7333
|
+
"Export the Takeoff sheet as CSV\n\n# Example\n```ts\nconst file = await snaptrude.program.spreadsheet.export(\"xlsx\")\n// file.fileName, file.mimeType, file.dataBase64\n\n// CSV of a specific sheet:\nconst csv = await snaptrude.program.spreadsheet.export(\"csv\", { sheetName: \"Takeoff\" })\n```"
|
|
4759
7334
|
],
|
|
4760
7335
|
"argsType": "PluginSpreadsheetExportFormat",
|
|
4761
7336
|
"resultType": "PluginProgramSpreadsheetExportResult"
|
|
@@ -4770,9 +7345,23 @@
|
|
|
4770
7345
|
"Get the last 10 audit log entries",
|
|
4771
7346
|
"Read the program spreadsheet audit log\n\n# Example\n```ts\nconst { entries } = await snaptrude.program.spreadsheet.getAuditLog({ limit: 10 })\n```"
|
|
4772
7347
|
],
|
|
4773
|
-
"argsType": "{
|
|
7348
|
+
"argsType": "{\n limit?: number\n }",
|
|
4774
7349
|
"resultType": "PluginProgramSpreadsheetGetAuditLogResult"
|
|
4775
7350
|
},
|
|
7351
|
+
{
|
|
7352
|
+
"path": "program.spreadsheet.getMaterialTakeoff",
|
|
7353
|
+
"namespace": "program.spreadsheet",
|
|
7354
|
+
"summary": "Read the material take-off dataset (surface area per material, per element type).",
|
|
7355
|
+
"examplePrompts": [
|
|
7356
|
+
"Get the material take-off",
|
|
7357
|
+
"How much of each material is used?",
|
|
7358
|
+
"Read the surface area by material",
|
|
7359
|
+
"Give me the material quantities before I render them",
|
|
7360
|
+
"What's in the material take-off right now?\n\n# Example\n```ts\nconst mto = await snaptrude.program.spreadsheet.getMaterialTakeoff()\nfor (const row of mto.rows) {\nconsole.log(row.objectType, row.family, row.material, row.quantity, row.unit)\n}\n```"
|
|
7361
|
+
],
|
|
7362
|
+
"argsType": null,
|
|
7363
|
+
"resultType": "PluginProgramSpreadsheetGetMaterialTakeoffResult"
|
|
7364
|
+
},
|
|
4776
7365
|
{
|
|
4777
7366
|
"path": "program.spreadsheet.getProgram",
|
|
4778
7367
|
"namespace": "program.spreadsheet",
|
|
@@ -4871,7 +7460,7 @@
|
|
|
4871
7460
|
"Recompute all the formulas",
|
|
4872
7461
|
"Recalculate the Summary sheet\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.recalculate()\n```"
|
|
4873
7462
|
],
|
|
4874
|
-
"argsType": "{
|
|
7463
|
+
"argsType": "{\n sheetName?: string\n }",
|
|
4875
7464
|
"resultType": "PluginProgramSpreadsheetRecalculateResult"
|
|
4876
7465
|
},
|
|
4877
7466
|
{
|
|
@@ -4898,7 +7487,7 @@
|
|
|
4898
7487
|
"Generate the program schedule sheet titled Program",
|
|
4899
7488
|
"Render the program filtered to the residential departments\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.renderProgram({ sheetName: \"Program\" })\n```"
|
|
4900
7489
|
],
|
|
4901
|
-
"argsType": "{
|
|
7490
|
+
"argsType": "{\n sheetName?: string\n title?: string\n filter?: string\n }",
|
|
4902
7491
|
"resultType": "PluginProgramSpreadsheetRenderResult"
|
|
4903
7492
|
},
|
|
4904
7493
|
{
|
|
@@ -4911,7 +7500,7 @@
|
|
|
4911
7500
|
"Generate the takeoff schedule sheet titled Takeoff",
|
|
4912
7501
|
"Render the material takeoff filtered to the walls\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.renderTakeoff({ sheetName: \"Takeoff\" })\n```"
|
|
4913
7502
|
],
|
|
4914
|
-
"argsType": "{
|
|
7503
|
+
"argsType": "{\n sheetName?: string\n title?: string\n filter?: string\n }",
|
|
4915
7504
|
"resultType": "PluginProgramSpreadsheetRenderResult"
|
|
4916
7505
|
},
|
|
4917
7506
|
{
|
|
@@ -5000,5 +7589,103 @@
|
|
|
5000
7589
|
],
|
|
5001
7590
|
"argsType": "PluginSpreadsheetTransactionOp[]",
|
|
5002
7591
|
"resultType": "PluginProgramSpreadsheetTransactionResult"
|
|
7592
|
+
},
|
|
7593
|
+
{
|
|
7594
|
+
"path": "workspace.projects.copy",
|
|
7595
|
+
"namespace": "workspace.projects",
|
|
7596
|
+
"summary": "Copy the **current** project into a new project — the dashboard's \"Save As\".",
|
|
7597
|
+
"examplePrompts": [
|
|
7598
|
+
"Save this project as a new copy called Tower Study v2",
|
|
7599
|
+
"Duplicate the current project into the Acme team",
|
|
7600
|
+
"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```"
|
|
7601
|
+
],
|
|
7602
|
+
"argsType": "string",
|
|
7603
|
+
"resultType": "PluginWorkspaceProjectsCopyResult"
|
|
7604
|
+
},
|
|
7605
|
+
{
|
|
7606
|
+
"path": "workspace.projects.create",
|
|
7607
|
+
"namespace": "workspace.projects",
|
|
7608
|
+
"summary": "Create a new, empty BIM project.",
|
|
7609
|
+
"examplePrompts": [
|
|
7610
|
+
"Create a new project called Tower Study",
|
|
7611
|
+
"Start a new project in the Acme team",
|
|
7612
|
+
"Make a fresh project using millimeters",
|
|
7613
|
+
"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```"
|
|
7614
|
+
],
|
|
7615
|
+
"argsType": "string",
|
|
7616
|
+
"resultType": "PluginWorkspaceProjectsCreateResult"
|
|
7617
|
+
},
|
|
7618
|
+
{
|
|
7619
|
+
"path": "workspace.projects.get",
|
|
7620
|
+
"namespace": "workspace.projects",
|
|
7621
|
+
"summary": "Get a single project by id.",
|
|
7622
|
+
"examplePrompts": [
|
|
7623
|
+
"Get the project with this id",
|
|
7624
|
+
"Look up a project by its floorkey",
|
|
7625
|
+
"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```"
|
|
7626
|
+
],
|
|
7627
|
+
"argsType": "string",
|
|
7628
|
+
"resultType": "PluginWorkspaceProjectsGetResult"
|
|
7629
|
+
},
|
|
7630
|
+
{
|
|
7631
|
+
"path": "workspace.projects.list",
|
|
7632
|
+
"namespace": "workspace.projects",
|
|
7633
|
+
"summary": "List the projects the user can access.",
|
|
7634
|
+
"examplePrompts": [
|
|
7635
|
+
"List all my projects",
|
|
7636
|
+
"Show the projects in the Acme team",
|
|
7637
|
+
"How many projects do I have?",
|
|
7638
|
+
"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```"
|
|
7639
|
+
],
|
|
7640
|
+
"argsType": "{ teamId?: string }",
|
|
7641
|
+
"resultType": "PluginWorkspaceProjectsListResult"
|
|
7642
|
+
},
|
|
7643
|
+
{
|
|
7644
|
+
"path": "workspace.projects.rename",
|
|
7645
|
+
"namespace": "workspace.projects",
|
|
7646
|
+
"summary": "Rename a project.",
|
|
7647
|
+
"examplePrompts": [
|
|
7648
|
+
"Rename this project to Tower Study Final",
|
|
7649
|
+
"Change the name of project floorkey_123",
|
|
7650
|
+
"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```"
|
|
7651
|
+
],
|
|
7652
|
+
"argsType": "string",
|
|
7653
|
+
"resultType": "PluginWorkspaceProjectsRenameResult"
|
|
7654
|
+
},
|
|
7655
|
+
{
|
|
7656
|
+
"path": "workspace.teams.get",
|
|
7657
|
+
"namespace": "workspace.teams",
|
|
7658
|
+
"summary": "Get a single team by id.",
|
|
7659
|
+
"examplePrompts": [
|
|
7660
|
+
"Get the team with id team_1",
|
|
7661
|
+
"Look up a team by its id",
|
|
7662
|
+
"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```"
|
|
7663
|
+
],
|
|
7664
|
+
"argsType": "string",
|
|
7665
|
+
"resultType": "PluginWorkspaceTeamsGetResult"
|
|
7666
|
+
},
|
|
7667
|
+
{
|
|
7668
|
+
"path": "workspace.teams.list",
|
|
7669
|
+
"namespace": "workspace.teams",
|
|
7670
|
+
"summary": "List the teams the user belongs to.",
|
|
7671
|
+
"examplePrompts": [
|
|
7672
|
+
"List all my teams",
|
|
7673
|
+
"Which teams am I a member of?",
|
|
7674
|
+
"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```"
|
|
7675
|
+
],
|
|
7676
|
+
"argsType": null,
|
|
7677
|
+
"resultType": "PluginWorkspaceTeamsListResult"
|
|
7678
|
+
},
|
|
7679
|
+
{
|
|
7680
|
+
"path": "workspace.teams.listMembers",
|
|
7681
|
+
"namespace": "workspace.teams",
|
|
7682
|
+
"summary": "List the members of a team.",
|
|
7683
|
+
"examplePrompts": [
|
|
7684
|
+
"List the members of the Acme team",
|
|
7685
|
+
"Who is on team_1?",
|
|
7686
|
+
"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```"
|
|
7687
|
+
],
|
|
7688
|
+
"argsType": "string",
|
|
7689
|
+
"resultType": "PluginWorkspaceTeamsListMembersResult"
|
|
5003
7690
|
}
|
|
5004
7691
|
]
|