@snaptrude/plugin-core 0.7.0 → 0.7.1
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 +8 -0
- package/api-manifest.json +320 -1343
- package/dist/api/presentation/aiInspiration.d.ts +1967 -7
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +2 -3
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/index.cjs +367 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +326 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/presentation/aiInspiration.ts +761 -7
- package/src/api/presentation/index.ts +2 -3
- package/api-manifest.full.json +0 -6101
package/api-manifest.json
CHANGED
|
@@ -1,244 +1,4 @@
|
|
|
1
1
|
[
|
|
2
|
-
{
|
|
3
|
-
"path": "analysis.heatmaps.isActive",
|
|
4
|
-
"namespace": "analysis.heatmaps",
|
|
5
|
-
"summary": "Is a plugin heatmap currently showing?",
|
|
6
|
-
"examplePrompts": [
|
|
7
|
-
"Is my heatmap still showing?",
|
|
8
|
-
"Check whether the custom heatmap is active",
|
|
9
|
-
"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```"
|
|
10
|
-
],
|
|
11
|
-
"argsType": null,
|
|
12
|
-
"resultType": "boolean"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"path": "analysis.heatmaps.renderGrid",
|
|
16
|
-
"namespace": "analysis.heatmaps",
|
|
17
|
-
"summary": "Render a grid heatmap — a coloured mesh from point samples.",
|
|
18
|
-
"examplePrompts": [
|
|
19
|
-
"Overlay my CFD wind simulation results on the site",
|
|
20
|
-
"Render a noise-level grid around the building",
|
|
21
|
-
"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```"
|
|
22
|
-
],
|
|
23
|
-
"argsType": "PluginAnalysisHeatmapGridCell[]",
|
|
24
|
-
"resultType": "PluginAnalysisHeatmapsRenderResult"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"path": "analysis.heatmaps.renderSpaces",
|
|
28
|
-
"namespace": "analysis.heatmaps",
|
|
29
|
-
"summary": "Render a per-space heatmap — one flat colour per space's top face.",
|
|
30
|
-
"examplePrompts": [
|
|
31
|
-
"Color each room by its occupancy count",
|
|
32
|
-
"Show my energy simulation results as a heatmap per space",
|
|
33
|
-
"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```"
|
|
34
|
-
],
|
|
35
|
-
"argsType": "PluginAnalysisHeatmapSpaceEntry[]",
|
|
36
|
-
"resultType": "PluginAnalysisHeatmapsRenderResult"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"path": "analysis.heatmaps.reset",
|
|
40
|
-
"namespace": "analysis.heatmaps",
|
|
41
|
-
"summary": "Clear the plugin heatmap from the scene.",
|
|
42
|
-
"examplePrompts": [
|
|
43
|
-
"Clear my custom heatmap",
|
|
44
|
-
"Remove the wind overlay from the model",
|
|
45
|
-
"Reset the plugin heatmap view\n\n# Example\n```ts\nawait snaptrude.analysis.heatmaps.reset()\n```"
|
|
46
|
-
],
|
|
47
|
-
"argsType": null,
|
|
48
|
-
"resultType": "boolean"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "analysis.illuminance.cancel",
|
|
52
|
-
"namespace": "analysis.illuminance",
|
|
53
|
-
"summary": "Cancel the in-flight illuminance run.",
|
|
54
|
-
"examplePrompts": [
|
|
55
|
-
"Cancel the illuminance analysis",
|
|
56
|
-
"Stop the running daylight computation",
|
|
57
|
-
"Abort the lux study\n\n# Example\n```ts\nawait snaptrude.analysis.illuminance.cancel()\n```"
|
|
58
|
-
],
|
|
59
|
-
"argsType": null,
|
|
60
|
-
"resultType": "boolean"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"path": "analysis.illuminance.compute",
|
|
64
|
-
"namespace": "analysis.illuminance",
|
|
65
|
-
"summary": "Start a daylight-illuminance run for a date range.",
|
|
66
|
-
"examplePrompts": [
|
|
67
|
-
"Run a daylight illuminance analysis for December",
|
|
68
|
-
"Compute the lux levels inside the building for winter",
|
|
69
|
-
"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```"
|
|
70
|
-
],
|
|
71
|
-
"argsType": "string",
|
|
72
|
-
"resultType": "PluginAnalysisComputeResult"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"path": "analysis.illuminance.get",
|
|
76
|
-
"namespace": "analysis.illuminance",
|
|
77
|
-
"summary": "Get the state of the illuminance study.",
|
|
78
|
-
"examplePrompts": [
|
|
79
|
-
"Is the illuminance analysis done?",
|
|
80
|
-
"Check the status of the daylight lux run",
|
|
81
|
-
"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```"
|
|
82
|
-
],
|
|
83
|
-
"argsType": null,
|
|
84
|
-
"resultType": "PluginAnalysisJobStateResult"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"path": "analysis.illuminance.reset",
|
|
88
|
-
"namespace": "analysis.illuminance",
|
|
89
|
-
"summary": "Clear the illuminance heatmap from the scene.",
|
|
90
|
-
"examplePrompts": [
|
|
91
|
-
"Clear the illuminance heatmap",
|
|
92
|
-
"Remove the daylight lux colours from the model",
|
|
93
|
-
"Reset the illuminance analysis view\n\n# Example\n```ts\nawait snaptrude.analysis.illuminance.reset()\n```"
|
|
94
|
-
],
|
|
95
|
-
"argsType": null,
|
|
96
|
-
"resultType": "boolean"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"path": "analysis.shadows.disable",
|
|
100
|
-
"namespace": "analysis.shadows",
|
|
101
|
-
"summary": "Turn real-time sun shadows OFF.",
|
|
102
|
-
"examplePrompts": [
|
|
103
|
-
"Turn off shadows",
|
|
104
|
-
"Hide the sun shadows",
|
|
105
|
-
"Disable shadow rendering in the scene\n\n# Example\n```ts\nawait snaptrude.analysis.shadows.disable()\n```"
|
|
106
|
-
],
|
|
107
|
-
"argsType": null,
|
|
108
|
-
"resultType": "boolean"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"path": "analysis.shadows.enable",
|
|
112
|
-
"namespace": "analysis.shadows",
|
|
113
|
-
"summary": "Turn real-time sun shadows ON, optionally at a specific date and time.",
|
|
114
|
-
"examplePrompts": [
|
|
115
|
-
"Turn on shadows",
|
|
116
|
-
"Show the shadows at 3pm on June 21st",
|
|
117
|
-
"Enable sun shadows for the summer solstice afternoon\n\n# Example\n```ts\nawait snaptrude.analysis.shadows.enable({ dateTime: \"2026-06-21T15:00\" })\n```"
|
|
118
|
-
],
|
|
119
|
-
"argsType": "PluginAnalysisShadowsEnableOptions",
|
|
120
|
-
"resultType": "boolean"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"path": "analysis.shadows.getDateTime",
|
|
124
|
-
"namespace": "analysis.shadows",
|
|
125
|
-
"summary": "Get the sun's current date and time.",
|
|
126
|
-
"examplePrompts": [
|
|
127
|
-
"What date and time are the shadows set to?",
|
|
128
|
-
"Get the current sun position date",
|
|
129
|
-
"Which time of day is the shadow study showing?\n\n# Example\n```ts\nconst dateTime = await snaptrude.analysis.shadows.getDateTime()\n```"
|
|
130
|
-
],
|
|
131
|
-
"argsType": null,
|
|
132
|
-
"resultType": "PluginAnalysisShadowsDateTimeResult"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"path": "analysis.shadows.isEnabled",
|
|
136
|
-
"namespace": "analysis.shadows",
|
|
137
|
-
"summary": "Whether real-time sun shadows are currently enabled.",
|
|
138
|
-
"examplePrompts": [
|
|
139
|
-
"Are shadows on?",
|
|
140
|
-
"Check whether sun shadows are enabled",
|
|
141
|
-
"Is the scene showing shadows right now?\n\n# Example\n```ts\nconst on = await snaptrude.analysis.shadows.isEnabled()\n```"
|
|
142
|
-
],
|
|
143
|
-
"argsType": null,
|
|
144
|
-
"resultType": "boolean"
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"path": "analysis.shadows.setDateTime",
|
|
148
|
-
"namespace": "analysis.shadows",
|
|
149
|
-
"summary": "Move the sun to a specific date and time.",
|
|
150
|
-
"examplePrompts": [
|
|
151
|
-
"Set the shadow time to 9:30 am on the winter solstice",
|
|
152
|
-
"Move the sun to noon on March 1st",
|
|
153
|
-
"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```"
|
|
154
|
-
],
|
|
155
|
-
"argsType": "string",
|
|
156
|
-
"resultType": "PluginAnalysisShadowsDateTimeResult"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"path": "analysis.sunlightHours.cancel",
|
|
160
|
-
"namespace": "analysis.sunlightHours",
|
|
161
|
-
"summary": "Cancel the in-flight sunlight-hours run.",
|
|
162
|
-
"examplePrompts": [
|
|
163
|
-
"Cancel the sunlight analysis",
|
|
164
|
-
"Stop the running sunlight hours computation",
|
|
165
|
-
"Abort the sun study\n\n# Example\n```ts\nawait snaptrude.analysis.sunlightHours.cancel()\n```"
|
|
166
|
-
],
|
|
167
|
-
"argsType": null,
|
|
168
|
-
"resultType": "boolean"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"path": "analysis.sunlightHours.compute",
|
|
172
|
-
"namespace": "analysis.sunlightHours",
|
|
173
|
-
"summary": "Start a direct-sunlight-hours run for a date range.",
|
|
174
|
-
"examplePrompts": [
|
|
175
|
-
"Run a sunlight hours analysis for June",
|
|
176
|
-
"Compute direct sunlight hours between March and September",
|
|
177
|
-
"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```"
|
|
178
|
-
],
|
|
179
|
-
"argsType": "string",
|
|
180
|
-
"resultType": "PluginAnalysisComputeResult"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"path": "analysis.sunlightHours.get",
|
|
184
|
-
"namespace": "analysis.sunlightHours",
|
|
185
|
-
"summary": "Get the state of the sunlight-hours study.",
|
|
186
|
-
"examplePrompts": [
|
|
187
|
-
"Is the sunlight analysis done?",
|
|
188
|
-
"Check the status of the sunlight hours run",
|
|
189
|
-
"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```"
|
|
190
|
-
],
|
|
191
|
-
"argsType": null,
|
|
192
|
-
"resultType": "PluginAnalysisJobStateResult"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"path": "analysis.sunlightHours.reset",
|
|
196
|
-
"namespace": "analysis.sunlightHours",
|
|
197
|
-
"summary": "Clear the sunlight-hours heatmap from the scene.",
|
|
198
|
-
"examplePrompts": [
|
|
199
|
-
"Clear the sunlight heatmap",
|
|
200
|
-
"Remove the sun hours colours from the model",
|
|
201
|
-
"Reset the sunlight analysis view\n\n# Example\n```ts\nawait snaptrude.analysis.sunlightHours.reset()\n```"
|
|
202
|
-
],
|
|
203
|
-
"argsType": null,
|
|
204
|
-
"resultType": "boolean"
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
"path": "analysis.sunpath.disable",
|
|
208
|
-
"namespace": "analysis.sunpath",
|
|
209
|
-
"summary": "Turn the sun-path diagram overlay OFF.",
|
|
210
|
-
"examplePrompts": [
|
|
211
|
-
"Hide the sun path diagram",
|
|
212
|
-
"Turn off the sunpath overlay",
|
|
213
|
-
"Remove the sun trajectory arcs from the scene\n\n# Example\n```ts\nawait snaptrude.analysis.sunpath.disable()\n```"
|
|
214
|
-
],
|
|
215
|
-
"argsType": null,
|
|
216
|
-
"resultType": "boolean"
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
"path": "analysis.sunpath.enable",
|
|
220
|
-
"namespace": "analysis.sunpath",
|
|
221
|
-
"summary": "Turn the sun-path diagram overlay ON.",
|
|
222
|
-
"examplePrompts": [
|
|
223
|
-
"Show the sun path diagram",
|
|
224
|
-
"Turn on the sunpath overlay",
|
|
225
|
-
"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```"
|
|
226
|
-
],
|
|
227
|
-
"argsType": null,
|
|
228
|
-
"resultType": "boolean"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"path": "analysis.sunpath.isActive",
|
|
232
|
-
"namespace": "analysis.sunpath",
|
|
233
|
-
"summary": "Whether the sun-path diagram overlay is currently active.",
|
|
234
|
-
"examplePrompts": [
|
|
235
|
-
"Is the sun path diagram on?",
|
|
236
|
-
"Check whether the sunpath overlay is active",
|
|
237
|
-
"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```"
|
|
238
|
-
],
|
|
239
|
-
"argsType": null,
|
|
240
|
-
"resultType": "boolean"
|
|
241
|
-
},
|
|
242
2
|
{
|
|
243
3
|
"path": "core.buildings.copy",
|
|
244
4
|
"namespace": "core.buildings",
|
|
@@ -2051,585 +1811,160 @@
|
|
|
2051
1811
|
"resultType": "PluginHistoryStepResult"
|
|
2052
1812
|
},
|
|
2053
1813
|
{
|
|
2054
|
-
"path": "core.
|
|
2055
|
-
"namespace": "core.
|
|
2056
|
-
"summary": "
|
|
1814
|
+
"path": "core.layers.get",
|
|
1815
|
+
"namespace": "core.layers",
|
|
1816
|
+
"summary": "Get a single drawing layer by id.",
|
|
2057
1817
|
"examplePrompts": [
|
|
2058
|
-
"
|
|
2059
|
-
"
|
|
2060
|
-
"
|
|
2061
|
-
"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```"
|
|
1818
|
+
"Get the drawing layer with id ly_5",
|
|
1819
|
+
"Is layer ly_5 hidden or locked?",
|
|
1820
|
+
"Look up a single drawing layer by its id\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.get(\"ly_5\")\nif (layer) console.log(layer.name, layer.hidden, layer.locked)\n```"
|
|
2062
1821
|
],
|
|
2063
|
-
"argsType": "
|
|
2064
|
-
"resultType": "
|
|
1822
|
+
"argsType": "string",
|
|
1823
|
+
"resultType": "PluginCoreLayersGetResult"
|
|
2065
1824
|
},
|
|
2066
1825
|
{
|
|
2067
|
-
"path": "core.
|
|
2068
|
-
"namespace": "core.
|
|
2069
|
-
"summary": "
|
|
1826
|
+
"path": "core.layers.getActive",
|
|
1827
|
+
"namespace": "core.layers",
|
|
1828
|
+
"summary": "Get the active drawing layer of a storey.",
|
|
2070
1829
|
"examplePrompts": [
|
|
2071
|
-
"
|
|
2072
|
-
"
|
|
2073
|
-
"
|
|
1830
|
+
"Which drawing layer is active on this storey?",
|
|
1831
|
+
"Get the current layer on storey st_2",
|
|
1832
|
+
"What layer am I drawing on?\n\n# Example\n```ts\nconst active = await snaptrude.core.layers.getActive(\"st_2\")\nif (active) console.log(active.name)\n```"
|
|
2074
1833
|
],
|
|
2075
1834
|
"argsType": "string",
|
|
2076
|
-
"resultType": "
|
|
1835
|
+
"resultType": "PluginCoreLayersGetActiveResult"
|
|
2077
1836
|
},
|
|
2078
1837
|
{
|
|
2079
|
-
"path": "core.
|
|
2080
|
-
"namespace": "core.
|
|
2081
|
-
"summary": "
|
|
1838
|
+
"path": "core.layers.list",
|
|
1839
|
+
"namespace": "core.layers",
|
|
1840
|
+
"summary": "List the drawing layers of a storey.",
|
|
2082
1841
|
"examplePrompts": [
|
|
2083
|
-
"
|
|
2084
|
-
"
|
|
2085
|
-
"
|
|
2086
|
-
"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```"
|
|
1842
|
+
"List the drawing layers on this storey",
|
|
1843
|
+
"Show all the PDF underlays on storey st_2",
|
|
1844
|
+
"What CAD layers are on the ground floor?\n\n# Example\n```ts\nconst { layers } = await snaptrude.core.layers.list(\"st_2\")\nfor (const l of layers) console.log(l.name, l.layerType, l.hidden)\n```"
|
|
2087
1845
|
],
|
|
2088
1846
|
"argsType": "string",
|
|
2089
|
-
"resultType": "
|
|
1847
|
+
"resultType": "PluginCoreLayersListResult"
|
|
2090
1848
|
},
|
|
2091
1849
|
{
|
|
2092
|
-
"path": "core.
|
|
2093
|
-
"namespace": "core.
|
|
2094
|
-
"summary": "
|
|
1850
|
+
"path": "core.layers.setActive",
|
|
1851
|
+
"namespace": "core.layers",
|
|
1852
|
+
"summary": "Make a drawing layer the active layer of its storey.",
|
|
2095
1853
|
"examplePrompts": [
|
|
2096
|
-
"
|
|
2097
|
-
"
|
|
2098
|
-
"
|
|
1854
|
+
"Draw on layer ly_5",
|
|
1855
|
+
"Make this the active layer",
|
|
1856
|
+
"Switch the active layer to the CAD underlay\n\n# Example\n```ts\nawait snaptrude.core.layers.setActive(\"ly_5\")\n```"
|
|
2099
1857
|
],
|
|
2100
1858
|
"argsType": "string",
|
|
2101
|
-
"resultType": "
|
|
1859
|
+
"resultType": "PluginCoreLayersSetActiveResult"
|
|
2102
1860
|
},
|
|
2103
1861
|
{
|
|
2104
|
-
"path": "core.
|
|
2105
|
-
"namespace": "core.
|
|
2106
|
-
"summary": "
|
|
1862
|
+
"path": "core.layers.update",
|
|
1863
|
+
"namespace": "core.layers",
|
|
1864
|
+
"summary": "Update a drawing layer's visibility.",
|
|
2107
1865
|
"examplePrompts": [
|
|
2108
|
-
"
|
|
2109
|
-
"
|
|
2110
|
-
"
|
|
2111
|
-
"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```"
|
|
1866
|
+
"Hide the PDF underlay layer",
|
|
1867
|
+
"Show the CAD layer again",
|
|
1868
|
+
"Hide layer ly_5\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.update(\"ly_5\", true)\n```"
|
|
2112
1869
|
],
|
|
2113
1870
|
"argsType": "string",
|
|
2114
|
-
"resultType": "
|
|
1871
|
+
"resultType": "PluginCoreLayersUpdateResult"
|
|
2115
1872
|
},
|
|
2116
1873
|
{
|
|
2117
|
-
"path": "core.
|
|
2118
|
-
"namespace": "core.
|
|
2119
|
-
"summary": "
|
|
2120
|
-
"examplePrompts": [
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
"Bring in satellite terrain for the site with the surrounding buildings",
|
|
2124
|
-
"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```"
|
|
2125
|
-
],
|
|
2126
|
-
"argsType": "number",
|
|
2127
|
-
"resultType": "TerrainHandle"
|
|
1874
|
+
"path": "core.math.quat.components",
|
|
1875
|
+
"namespace": "core.math.quat",
|
|
1876
|
+
"summary": "Read the primitive `{ x, y, z, w }` components of a quaternion handle.",
|
|
1877
|
+
"examplePrompts": [],
|
|
1878
|
+
"argsType": "QuatHandle",
|
|
1879
|
+
"resultType": "QuatComponents"
|
|
2128
1880
|
},
|
|
2129
1881
|
{
|
|
2130
|
-
"path": "core.
|
|
2131
|
-
"namespace": "core.
|
|
2132
|
-
"summary": "
|
|
2133
|
-
"examplePrompts": [
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
"Show the error from the failed import job",
|
|
2137
|
-
"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```"
|
|
2138
|
-
],
|
|
2139
|
-
"argsType": "ImportJobHandle",
|
|
2140
|
-
"resultType": "string | null"
|
|
1882
|
+
"path": "core.math.quat.conjugate",
|
|
1883
|
+
"namespace": "core.math.quat",
|
|
1884
|
+
"summary": "Compute the conjugate of a quaternion (negated vector part).",
|
|
1885
|
+
"examplePrompts": [],
|
|
1886
|
+
"argsType": "QuatHandle",
|
|
1887
|
+
"resultType": "QuatHandle"
|
|
2141
1888
|
},
|
|
2142
1889
|
{
|
|
2143
|
-
"path": "core.
|
|
2144
|
-
"namespace": "core.
|
|
2145
|
-
"summary": "
|
|
2146
|
-
"examplePrompts": [
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
"Fetch the imported CAD sketch once it's ready",
|
|
2150
|
-
"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```"
|
|
2151
|
-
],
|
|
2152
|
-
"argsType": "ImportJobHandle",
|
|
2153
|
-
"resultType": "UnderlayHandle | null"
|
|
1890
|
+
"path": "core.math.quat.dot",
|
|
1891
|
+
"namespace": "core.math.quat",
|
|
1892
|
+
"summary": "Compute the dot product of two quaternions.",
|
|
1893
|
+
"examplePrompts": [],
|
|
1894
|
+
"argsType": "QuatHandle",
|
|
1895
|
+
"resultType": "number"
|
|
2154
1896
|
},
|
|
2155
1897
|
{
|
|
2156
|
-
"path": "core.
|
|
2157
|
-
"namespace": "core.
|
|
2158
|
-
"summary": "
|
|
2159
|
-
"examplePrompts": [
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
"Check where the import job is up to",
|
|
2163
|
-
"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```"
|
|
2164
|
-
],
|
|
2165
|
-
"argsType": "ImportJobHandle",
|
|
2166
|
-
"resultType": "ImportJobStatus"
|
|
1898
|
+
"path": "core.math.quat.equals",
|
|
1899
|
+
"namespace": "core.math.quat",
|
|
1900
|
+
"summary": "Test whether two quaternions have exactly equal components.",
|
|
1901
|
+
"examplePrompts": [],
|
|
1902
|
+
"argsType": "QuatHandle",
|
|
1903
|
+
"resultType": "boolean"
|
|
2167
1904
|
},
|
|
2168
1905
|
{
|
|
2169
|
-
"path": "core.
|
|
2170
|
-
"namespace": "core.
|
|
2171
|
-
"summary": "
|
|
2172
|
-
"examplePrompts": [
|
|
2173
|
-
|
|
2174
|
-
"Has the CAD import finished?",
|
|
2175
|
-
"Tell me when the import job completes",
|
|
2176
|
-
"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```"
|
|
2177
|
-
],
|
|
2178
|
-
"argsType": "ImportJobHandle",
|
|
1906
|
+
"path": "core.math.quat.equalsApprox",
|
|
1907
|
+
"namespace": "core.math.quat",
|
|
1908
|
+
"summary": "Test whether two quaternions are equal within a tolerance `epsilon` (default `1e-6`).",
|
|
1909
|
+
"examplePrompts": [],
|
|
1910
|
+
"argsType": "QuatHandle",
|
|
2179
1911
|
"resultType": "boolean"
|
|
2180
1912
|
},
|
|
2181
1913
|
{
|
|
2182
|
-
"path": "core.
|
|
2183
|
-
"namespace": "core.
|
|
2184
|
-
"summary": "
|
|
2185
|
-
"examplePrompts": [
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
"Get the PDF page count",
|
|
2189
|
-
"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```"
|
|
2190
|
-
],
|
|
2191
|
-
"argsType": "string",
|
|
2192
|
-
"resultType": "number | null"
|
|
1914
|
+
"path": "core.math.quat.fromAxisAngle",
|
|
1915
|
+
"namespace": "core.math.quat",
|
|
1916
|
+
"summary": "Build a quaternion from a rotation axis and an angle in radians.",
|
|
1917
|
+
"examplePrompts": [],
|
|
1918
|
+
"argsType": "Vec3Handle",
|
|
1919
|
+
"resultType": "QuatHandle"
|
|
2193
1920
|
},
|
|
2194
1921
|
{
|
|
2195
|
-
"path": "core.
|
|
2196
|
-
"namespace": "core.
|
|
2197
|
-
"summary": "
|
|
2198
|
-
"examplePrompts": [
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
"Show the DWG layer names so I can pick which to import",
|
|
2202
|
-
"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```"
|
|
2203
|
-
],
|
|
2204
|
-
"argsType": "CadJsonInput",
|
|
2205
|
-
"resultType": "string[]"
|
|
1922
|
+
"path": "core.math.quat.fromEuler",
|
|
1923
|
+
"namespace": "core.math.quat",
|
|
1924
|
+
"summary": "Build a quaternion from Euler angles in radians.",
|
|
1925
|
+
"examplePrompts": [],
|
|
1926
|
+
"argsType": "number",
|
|
1927
|
+
"resultType": "QuatHandle"
|
|
2206
1928
|
},
|
|
2207
1929
|
{
|
|
2208
|
-
"path": "core.
|
|
2209
|
-
"namespace": "core.
|
|
2210
|
-
"summary": "
|
|
2211
|
-
"examplePrompts": [
|
|
2212
|
-
"Delete the site terrain",
|
|
2213
|
-
"Remove the topography",
|
|
2214
|
-
"Clear the imported site",
|
|
2215
|
-
"Get rid of the terrain"
|
|
2216
|
-
],
|
|
1930
|
+
"path": "core.math.quat.identity",
|
|
1931
|
+
"namespace": "core.math.quat",
|
|
1932
|
+
"summary": "Return the identity quaternion (no rotation).",
|
|
1933
|
+
"examplePrompts": [],
|
|
2217
1934
|
"argsType": null,
|
|
2218
|
-
"resultType": "
|
|
1935
|
+
"resultType": "QuatHandle"
|
|
2219
1936
|
},
|
|
2220
1937
|
{
|
|
2221
|
-
"path": "core.
|
|
2222
|
-
"namespace": "core.
|
|
2223
|
-
"summary": "
|
|
2224
|
-
"examplePrompts": [
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
"Disable the heightmap",
|
|
2228
|
-
"Make the terrain flat"
|
|
2229
|
-
],
|
|
2230
|
-
"argsType": null,
|
|
2231
|
-
"resultType": "void"
|
|
1938
|
+
"path": "core.math.quat.inverse",
|
|
1939
|
+
"namespace": "core.math.quat",
|
|
1940
|
+
"summary": "Compute the inverse quaternion — the rotation that undoes `q`.",
|
|
1941
|
+
"examplePrompts": [],
|
|
1942
|
+
"argsType": "QuatHandle",
|
|
1943
|
+
"resultType": "QuatHandle"
|
|
2232
1944
|
},
|
|
2233
1945
|
{
|
|
2234
|
-
"path": "core.
|
|
2235
|
-
"namespace": "core.
|
|
2236
|
-
"summary": "
|
|
2237
|
-
"examplePrompts": [
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
"Disable satellite on the site",
|
|
2241
|
-
"Remove the satellite drape"
|
|
2242
|
-
],
|
|
2243
|
-
"argsType": null,
|
|
2244
|
-
"resultType": "void"
|
|
1946
|
+
"path": "core.math.quat.length",
|
|
1947
|
+
"namespace": "core.math.quat",
|
|
1948
|
+
"summary": "Compute the magnitude (norm) of a quaternion.",
|
|
1949
|
+
"examplePrompts": [],
|
|
1950
|
+
"argsType": "QuatHandle",
|
|
1951
|
+
"resultType": "number"
|
|
2245
1952
|
},
|
|
2246
1953
|
{
|
|
2247
|
-
"path": "core.
|
|
2248
|
-
"namespace": "core.
|
|
2249
|
-
"summary": "
|
|
2250
|
-
"examplePrompts": [
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
"Make the terrain 3D",
|
|
2254
|
-
"Show the topography relief"
|
|
2255
|
-
],
|
|
2256
|
-
"argsType": null,
|
|
2257
|
-
"resultType": "void"
|
|
1954
|
+
"path": "core.math.quat.multiply",
|
|
1955
|
+
"namespace": "core.math.quat",
|
|
1956
|
+
"summary": "Compose two rotations with the Hamilton product `a * b` (apply `b` then `a`).",
|
|
1957
|
+
"examplePrompts": [],
|
|
1958
|
+
"argsType": "QuatHandle",
|
|
1959
|
+
"resultType": "QuatHandle"
|
|
2258
1960
|
},
|
|
2259
1961
|
{
|
|
2260
|
-
"path": "core.
|
|
2261
|
-
"namespace": "core.
|
|
2262
|
-
"summary": "
|
|
2263
|
-
"examplePrompts": [
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
"Turn on aerial imagery",
|
|
2267
|
-
"Drape satellite over the terrain"
|
|
2268
|
-
],
|
|
2269
|
-
"argsType": null,
|
|
2270
|
-
"resultType": "void"
|
|
2271
|
-
},
|
|
2272
|
-
{
|
|
2273
|
-
"path": "core.io.terrain.exists",
|
|
2274
|
-
"namespace": "core.io.terrain",
|
|
2275
|
-
"summary": "Whether the project has a site terrain.",
|
|
2276
|
-
"examplePrompts": [
|
|
2277
|
-
"Does this project have site terrain?",
|
|
2278
|
-
"Is there a terrain imported?",
|
|
2279
|
-
"Check if the site topography exists",
|
|
2280
|
-
"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```"
|
|
2281
|
-
],
|
|
2282
|
-
"argsType": null,
|
|
2283
|
-
"resultType": "boolean"
|
|
2284
|
-
},
|
|
2285
|
-
{
|
|
2286
|
-
"path": "core.io.terrain.get",
|
|
2287
|
-
"namespace": "core.io.terrain",
|
|
2288
|
-
"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.",
|
|
2289
|
-
"examplePrompts": [
|
|
2290
|
-
"Get the terrain handle",
|
|
2291
|
-
"Give me the site terrain",
|
|
2292
|
-
"Fetch the current terrain",
|
|
2293
|
-
"Return the topography handle if it exists"
|
|
2294
|
-
],
|
|
2295
|
-
"argsType": null,
|
|
2296
|
-
"resultType": "TerrainHandle | null"
|
|
2297
|
-
},
|
|
2298
|
-
{
|
|
2299
|
-
"path": "core.io.terrain.getDatum",
|
|
2300
|
-
"namespace": "core.io.terrain",
|
|
2301
|
-
"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.",
|
|
2302
|
-
"examplePrompts": [
|
|
2303
|
-
"What's the terrain's datum?",
|
|
2304
|
-
"Read the current site elevation reference",
|
|
2305
|
-
"Get the terrain vertical offset",
|
|
2306
|
-
"How far has the datum been shifted?"
|
|
2307
|
-
],
|
|
2308
|
-
"argsType": null,
|
|
2309
|
-
"resultType": "number | null"
|
|
2310
|
-
},
|
|
2311
|
-
{
|
|
2312
|
-
"path": "core.io.terrain.getOpacity",
|
|
2313
|
-
"namespace": "core.io.terrain",
|
|
2314
|
-
"summary": "Read the terrain opacity, `0`..`1`, or `null` if no terrain.",
|
|
2315
|
-
"examplePrompts": [],
|
|
2316
|
-
"argsType": null,
|
|
2317
|
-
"resultType": "number | null"
|
|
2318
|
-
},
|
|
2319
|
-
{
|
|
2320
|
-
"path": "core.io.terrain.getReport",
|
|
2321
|
-
"namespace": "core.io.terrain",
|
|
2322
|
-
"summary": "The terrain cut/fill earthwork report — cut, fill, and net volumes — or `null` if there is no terrain.",
|
|
2323
|
-
"examplePrompts": [
|
|
2324
|
-
"What are the cut and fill volumes for the site?",
|
|
2325
|
-
"Get the terrain earthwork report",
|
|
2326
|
-
"How much cut and fill does the grading need?",
|
|
2327
|
-
"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```"
|
|
2328
|
-
],
|
|
2329
|
-
"argsType": null,
|
|
2330
|
-
"resultType": "TerrainReport | null"
|
|
2331
|
-
},
|
|
2332
|
-
{
|
|
2333
|
-
"path": "core.io.terrain.isElevationEnabled",
|
|
2334
|
-
"namespace": "core.io.terrain",
|
|
2335
|
-
"summary": "Whether terrain elevation (DEM height) is on. `null` if no terrain.",
|
|
2336
|
-
"examplePrompts": [],
|
|
2337
|
-
"argsType": null,
|
|
2338
|
-
"resultType": "boolean | null"
|
|
2339
|
-
},
|
|
2340
|
-
{
|
|
2341
|
-
"path": "core.io.terrain.isSatelliteEnabled",
|
|
2342
|
-
"namespace": "core.io.terrain",
|
|
2343
|
-
"summary": "Whether satellite imagery is draped on the terrain. `null` if no terrain.",
|
|
2344
|
-
"examplePrompts": [],
|
|
2345
|
-
"argsType": null,
|
|
2346
|
-
"resultType": "boolean | null"
|
|
2347
|
-
},
|
|
2348
|
-
{
|
|
2349
|
-
"path": "core.io.terrain.setDatum",
|
|
2350
|
-
"namespace": "core.io.terrain",
|
|
2351
|
-
"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.",
|
|
2352
|
-
"examplePrompts": [
|
|
2353
|
-
"Shift the terrain datum down by 12",
|
|
2354
|
-
"Lower the site terrain by 10",
|
|
2355
|
-
"Raise the terrain a little",
|
|
2356
|
-
"Nudge the terrain datum down\n\n# Example\n```ts\nawait snaptrude.core.io.terrain.setDatum(12) // shift terrain down by 12 (relative)\n```"
|
|
2357
|
-
],
|
|
2358
|
-
"argsType": "number",
|
|
2359
|
-
"resultType": "void"
|
|
2360
|
-
},
|
|
2361
|
-
{
|
|
2362
|
-
"path": "core.io.terrain.setOpacity",
|
|
2363
|
-
"namespace": "core.io.terrain",
|
|
2364
|
-
"summary": "Set the terrain opacity (`0` transparent .. `1` opaque). Undoable.",
|
|
2365
|
-
"examplePrompts": [
|
|
2366
|
-
"Fade the terrain to 50%",
|
|
2367
|
-
"Make the site semi-transparent",
|
|
2368
|
-
"Set terrain opacity to 0.3",
|
|
2369
|
-
"Dim the topography\n\n# Example\n```ts\nawait snaptrude.core.io.terrain.setOpacity(0.5)\n```"
|
|
2370
|
-
],
|
|
2371
|
-
"argsType": "number",
|
|
2372
|
-
"resultType": "void"
|
|
2373
|
-
},
|
|
2374
|
-
{
|
|
2375
|
-
"path": "core.io.underlay.delete",
|
|
2376
|
-
"namespace": "core.io.underlay",
|
|
2377
|
-
"summary": "Delete an underlay from the scene (and its backend record). Applies to image, PDF, and CAD underlays.",
|
|
2378
|
-
"examplePrompts": [
|
|
2379
|
-
"Delete this floor plan underlay",
|
|
2380
|
-
"Remove the imported PDF from the scene",
|
|
2381
|
-
"Get rid of the CAD sketch I traced over",
|
|
2382
|
-
"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```"
|
|
2383
|
-
],
|
|
2384
|
-
"argsType": "UnderlayHandle",
|
|
2385
|
-
"resultType": "void"
|
|
2386
|
-
},
|
|
2387
|
-
{
|
|
2388
|
-
"path": "core.io.underlay.getBounds",
|
|
2389
|
-
"namespace": "core.io.underlay",
|
|
2390
|
-
"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.",
|
|
2391
|
-
"examplePrompts": [
|
|
2392
|
-
"How big is this floor plan in the scene?",
|
|
2393
|
-
"Get the bounding box of the underlay",
|
|
2394
|
-
"What's the extent of the imported PDF?",
|
|
2395
|
-
"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```"
|
|
2396
|
-
],
|
|
2397
|
-
"argsType": "UnderlayHandle",
|
|
2398
|
-
"resultType": "BBoxComponents | null"
|
|
2399
|
-
},
|
|
2400
|
-
{
|
|
2401
|
-
"path": "core.io.underlay.getOpacity",
|
|
2402
|
-
"namespace": "core.io.underlay",
|
|
2403
|
-
"summary": "Read an underlay's opacity (`0`..`1`), or `null` if it has no material.",
|
|
2404
|
-
"examplePrompts": [
|
|
2405
|
-
"How transparent is this underlay?",
|
|
2406
|
-
"Get the opacity of the floor plan",
|
|
2407
|
-
"What's the fade level on the reference image?",
|
|
2408
|
-
"Read the underlay's opacity\n\n# Example\n```ts\nconst o = await snaptrude.core.io.underlay.getOpacity(plan)\n```"
|
|
2409
|
-
],
|
|
2410
|
-
"argsType": "UnderlayHandle",
|
|
2411
|
-
"resultType": "number | null"
|
|
2412
|
-
},
|
|
2413
|
-
{
|
|
2414
|
-
"path": "core.io.underlay.getScale",
|
|
2415
|
-
"namespace": "core.io.underlay",
|
|
2416
|
-
"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.",
|
|
2417
|
-
"examplePrompts": [
|
|
2418
|
-
"What scale is this floor plan set to?",
|
|
2419
|
-
"Get the current and original scale of the underlay",
|
|
2420
|
-
"How much has this image been scaled since import?",
|
|
2421
|
-
"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```"
|
|
2422
|
-
],
|
|
2423
|
-
"argsType": "UnderlayHandle",
|
|
2424
|
-
"resultType": "{ scaleFactor: number; initialScaleFactor: number } | null"
|
|
2425
|
-
},
|
|
2426
|
-
{
|
|
2427
|
-
"path": "core.io.underlay.list",
|
|
2428
|
-
"namespace": "core.io.underlay",
|
|
2429
|
-
"summary": "List the underlays in the scene, optionally limited to one storey.",
|
|
2430
|
-
"examplePrompts": [
|
|
2431
|
-
"List all the reference underlays in the model",
|
|
2432
|
-
"What underlays are on the ground floor?",
|
|
2433
|
-
"Show every imported floor plan and PDF",
|
|
2434
|
-
"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```"
|
|
2435
|
-
],
|
|
2436
|
-
"argsType": "number",
|
|
2437
|
-
"resultType": "UnderlayHandle[]"
|
|
2438
|
-
},
|
|
2439
|
-
{
|
|
2440
|
-
"path": "core.io.underlay.resetScale",
|
|
2441
|
-
"namespace": "core.io.underlay",
|
|
2442
|
-
"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)`.",
|
|
2443
|
-
"examplePrompts": [
|
|
2444
|
-
"Reset this floor plan's scale to how it was imported",
|
|
2445
|
-
"Undo the scaling on the underlay",
|
|
2446
|
-
"Put the reference image back to its original size",
|
|
2447
|
-
"Restore the plan's default scale\n\n# Example\n```ts\nawait snaptrude.core.io.underlay.resetScale(plan)\n```"
|
|
2448
|
-
],
|
|
2449
|
-
"argsType": "UnderlayHandle",
|
|
2450
|
-
"resultType": "{ scaleFactor: number }"
|
|
2451
|
-
},
|
|
2452
|
-
{
|
|
2453
|
-
"path": "core.io.underlay.setOpacity",
|
|
2454
|
-
"namespace": "core.io.underlay",
|
|
2455
|
-
"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`.",
|
|
2456
|
-
"examplePrompts": [
|
|
2457
|
-
"Fade this floor plan to 30% so I can see through it",
|
|
2458
|
-
"Make the underlay half transparent",
|
|
2459
|
-
"Set the reference image opacity to 0.2",
|
|
2460
|
-
"Dim the trace-over plan\n\n# Example\n```ts\nawait snaptrude.core.io.underlay.setOpacity(plan, 0.3)\n```"
|
|
2461
|
-
],
|
|
2462
|
-
"argsType": "UnderlayHandle",
|
|
2463
|
-
"resultType": "void"
|
|
2464
|
-
},
|
|
2465
|
-
{
|
|
2466
|
-
"path": "core.io.underlay.setScale",
|
|
2467
|
-
"namespace": "core.io.underlay",
|
|
2468
|
-
"summary": "Set an underlay's scale — the **calibration** step after import. Works for **image and PDF** underlays (CAD scaling is not supported — throws).",
|
|
2469
|
-
"examplePrompts": [
|
|
2470
|
-
"Scale this floor plan so it's 50 meters across",
|
|
2471
|
-
"Set the plan size to 30m — it's imported too small",
|
|
2472
|
-
"Make the reference image twice its imported size",
|
|
2473
|
-
"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```"
|
|
2474
|
-
],
|
|
2475
|
-
"argsType": "UnderlayHandle",
|
|
2476
|
-
"resultType": "{ scaleFactor: number }"
|
|
2477
|
-
},
|
|
2478
|
-
{
|
|
2479
|
-
"path": "core.layers.get",
|
|
2480
|
-
"namespace": "core.layers",
|
|
2481
|
-
"summary": "Get a single drawing layer by id.",
|
|
2482
|
-
"examplePrompts": [
|
|
2483
|
-
"Get the drawing layer with id ly_5",
|
|
2484
|
-
"Is layer ly_5 hidden or locked?",
|
|
2485
|
-
"Look up a single drawing layer by its id\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.get(\"ly_5\")\nif (layer) console.log(layer.name, layer.hidden, layer.locked)\n```"
|
|
2486
|
-
],
|
|
2487
|
-
"argsType": "string",
|
|
2488
|
-
"resultType": "PluginCoreLayersGetResult"
|
|
2489
|
-
},
|
|
2490
|
-
{
|
|
2491
|
-
"path": "core.layers.getActive",
|
|
2492
|
-
"namespace": "core.layers",
|
|
2493
|
-
"summary": "Get the active drawing layer of a storey.",
|
|
2494
|
-
"examplePrompts": [
|
|
2495
|
-
"Which drawing layer is active on this storey?",
|
|
2496
|
-
"Get the current layer on storey st_2",
|
|
2497
|
-
"What layer am I drawing on?\n\n# Example\n```ts\nconst active = await snaptrude.core.layers.getActive(\"st_2\")\nif (active) console.log(active.name)\n```"
|
|
2498
|
-
],
|
|
2499
|
-
"argsType": "string",
|
|
2500
|
-
"resultType": "PluginCoreLayersGetActiveResult"
|
|
2501
|
-
},
|
|
2502
|
-
{
|
|
2503
|
-
"path": "core.layers.list",
|
|
2504
|
-
"namespace": "core.layers",
|
|
2505
|
-
"summary": "List the drawing layers of a storey.",
|
|
2506
|
-
"examplePrompts": [
|
|
2507
|
-
"List the drawing layers on this storey",
|
|
2508
|
-
"Show all the PDF underlays on storey st_2",
|
|
2509
|
-
"What CAD layers are on the ground floor?\n\n# Example\n```ts\nconst { layers } = await snaptrude.core.layers.list(\"st_2\")\nfor (const l of layers) console.log(l.name, l.layerType, l.hidden)\n```"
|
|
2510
|
-
],
|
|
2511
|
-
"argsType": "string",
|
|
2512
|
-
"resultType": "PluginCoreLayersListResult"
|
|
2513
|
-
},
|
|
2514
|
-
{
|
|
2515
|
-
"path": "core.layers.setActive",
|
|
2516
|
-
"namespace": "core.layers",
|
|
2517
|
-
"summary": "Make a drawing layer the active layer of its storey.",
|
|
2518
|
-
"examplePrompts": [
|
|
2519
|
-
"Draw on layer ly_5",
|
|
2520
|
-
"Make this the active layer",
|
|
2521
|
-
"Switch the active layer to the CAD underlay\n\n# Example\n```ts\nawait snaptrude.core.layers.setActive(\"ly_5\")\n```"
|
|
2522
|
-
],
|
|
2523
|
-
"argsType": "string",
|
|
2524
|
-
"resultType": "PluginCoreLayersSetActiveResult"
|
|
2525
|
-
},
|
|
2526
|
-
{
|
|
2527
|
-
"path": "core.layers.update",
|
|
2528
|
-
"namespace": "core.layers",
|
|
2529
|
-
"summary": "Update a drawing layer's visibility.",
|
|
2530
|
-
"examplePrompts": [
|
|
2531
|
-
"Hide the PDF underlay layer",
|
|
2532
|
-
"Show the CAD layer again",
|
|
2533
|
-
"Hide layer ly_5\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.update(\"ly_5\", true)\n```"
|
|
2534
|
-
],
|
|
2535
|
-
"argsType": "string",
|
|
2536
|
-
"resultType": "PluginCoreLayersUpdateResult"
|
|
2537
|
-
},
|
|
2538
|
-
{
|
|
2539
|
-
"path": "core.math.quat.components",
|
|
2540
|
-
"namespace": "core.math.quat",
|
|
2541
|
-
"summary": "Read the primitive `{ x, y, z, w }` components of a quaternion handle.",
|
|
2542
|
-
"examplePrompts": [],
|
|
2543
|
-
"argsType": "QuatHandle",
|
|
2544
|
-
"resultType": "QuatComponents"
|
|
2545
|
-
},
|
|
2546
|
-
{
|
|
2547
|
-
"path": "core.math.quat.conjugate",
|
|
2548
|
-
"namespace": "core.math.quat",
|
|
2549
|
-
"summary": "Compute the conjugate of a quaternion (negated vector part).",
|
|
2550
|
-
"examplePrompts": [],
|
|
2551
|
-
"argsType": "QuatHandle",
|
|
2552
|
-
"resultType": "QuatHandle"
|
|
2553
|
-
},
|
|
2554
|
-
{
|
|
2555
|
-
"path": "core.math.quat.dot",
|
|
2556
|
-
"namespace": "core.math.quat",
|
|
2557
|
-
"summary": "Compute the dot product of two quaternions.",
|
|
2558
|
-
"examplePrompts": [],
|
|
2559
|
-
"argsType": "QuatHandle",
|
|
2560
|
-
"resultType": "number"
|
|
2561
|
-
},
|
|
2562
|
-
{
|
|
2563
|
-
"path": "core.math.quat.equals",
|
|
2564
|
-
"namespace": "core.math.quat",
|
|
2565
|
-
"summary": "Test whether two quaternions have exactly equal components.",
|
|
2566
|
-
"examplePrompts": [],
|
|
2567
|
-
"argsType": "QuatHandle",
|
|
2568
|
-
"resultType": "boolean"
|
|
2569
|
-
},
|
|
2570
|
-
{
|
|
2571
|
-
"path": "core.math.quat.equalsApprox",
|
|
2572
|
-
"namespace": "core.math.quat",
|
|
2573
|
-
"summary": "Test whether two quaternions are equal within a tolerance `epsilon` (default `1e-6`).",
|
|
2574
|
-
"examplePrompts": [],
|
|
2575
|
-
"argsType": "QuatHandle",
|
|
2576
|
-
"resultType": "boolean"
|
|
2577
|
-
},
|
|
2578
|
-
{
|
|
2579
|
-
"path": "core.math.quat.fromAxisAngle",
|
|
2580
|
-
"namespace": "core.math.quat",
|
|
2581
|
-
"summary": "Build a quaternion from a rotation axis and an angle in radians.",
|
|
2582
|
-
"examplePrompts": [],
|
|
2583
|
-
"argsType": "Vec3Handle",
|
|
2584
|
-
"resultType": "QuatHandle"
|
|
2585
|
-
},
|
|
2586
|
-
{
|
|
2587
|
-
"path": "core.math.quat.fromEuler",
|
|
2588
|
-
"namespace": "core.math.quat",
|
|
2589
|
-
"summary": "Build a quaternion from Euler angles in radians.",
|
|
2590
|
-
"examplePrompts": [],
|
|
2591
|
-
"argsType": "number",
|
|
2592
|
-
"resultType": "QuatHandle"
|
|
2593
|
-
},
|
|
2594
|
-
{
|
|
2595
|
-
"path": "core.math.quat.identity",
|
|
2596
|
-
"namespace": "core.math.quat",
|
|
2597
|
-
"summary": "Return the identity quaternion (no rotation).",
|
|
2598
|
-
"examplePrompts": [],
|
|
2599
|
-
"argsType": null,
|
|
2600
|
-
"resultType": "QuatHandle"
|
|
2601
|
-
},
|
|
2602
|
-
{
|
|
2603
|
-
"path": "core.math.quat.inverse",
|
|
2604
|
-
"namespace": "core.math.quat",
|
|
2605
|
-
"summary": "Compute the inverse quaternion — the rotation that undoes `q`.",
|
|
2606
|
-
"examplePrompts": [],
|
|
2607
|
-
"argsType": "QuatHandle",
|
|
2608
|
-
"resultType": "QuatHandle"
|
|
2609
|
-
},
|
|
2610
|
-
{
|
|
2611
|
-
"path": "core.math.quat.length",
|
|
2612
|
-
"namespace": "core.math.quat",
|
|
2613
|
-
"summary": "Compute the magnitude (norm) of a quaternion.",
|
|
2614
|
-
"examplePrompts": [],
|
|
2615
|
-
"argsType": "QuatHandle",
|
|
2616
|
-
"resultType": "number"
|
|
2617
|
-
},
|
|
2618
|
-
{
|
|
2619
|
-
"path": "core.math.quat.multiply",
|
|
2620
|
-
"namespace": "core.math.quat",
|
|
2621
|
-
"summary": "Compose two rotations with the Hamilton product `a * b` (apply `b` then `a`).",
|
|
2622
|
-
"examplePrompts": [],
|
|
2623
|
-
"argsType": "QuatHandle",
|
|
2624
|
-
"resultType": "QuatHandle"
|
|
2625
|
-
},
|
|
2626
|
-
{
|
|
2627
|
-
"path": "core.math.quat.new",
|
|
2628
|
-
"namespace": "core.math.quat",
|
|
2629
|
-
"summary": "Create a quaternion from primitive components.",
|
|
2630
|
-
"examplePrompts": [],
|
|
2631
|
-
"argsType": "number",
|
|
2632
|
-
"resultType": "QuatHandle"
|
|
1962
|
+
"path": "core.math.quat.new",
|
|
1963
|
+
"namespace": "core.math.quat",
|
|
1964
|
+
"summary": "Create a quaternion from primitive components.",
|
|
1965
|
+
"examplePrompts": [],
|
|
1966
|
+
"argsType": "number",
|
|
1967
|
+
"resultType": "QuatHandle"
|
|
2633
1968
|
},
|
|
2634
1969
|
{
|
|
2635
1970
|
"path": "core.math.quat.normalize",
|
|
@@ -3038,114 +2373,6 @@
|
|
|
3038
2373
|
"argsType": "number",
|
|
3039
2374
|
"resultType": "boolean"
|
|
3040
2375
|
},
|
|
3041
|
-
{
|
|
3042
|
-
"path": "core.proposals.create",
|
|
3043
|
-
"namespace": "core.proposals",
|
|
3044
|
-
"summary": "Create a new design option (proposal).",
|
|
3045
|
-
"examplePrompts": [
|
|
3046
|
-
"Create a design option called Scheme B",
|
|
3047
|
-
"Add a new proposal named Option 2",
|
|
3048
|
-
"Make a fresh design variant to explore\n\n# Example\n```ts\nconst { id } = await snaptrude.core.proposals.create(\"Scheme B\")\n```"
|
|
3049
|
-
],
|
|
3050
|
-
"argsType": "string",
|
|
3051
|
-
"resultType": "PluginCoreProposalsCreateResult"
|
|
3052
|
-
},
|
|
3053
|
-
{
|
|
3054
|
-
"path": "core.proposals.delete",
|
|
3055
|
-
"namespace": "core.proposals",
|
|
3056
|
-
"summary": "Delete a proposal.",
|
|
3057
|
-
"examplePrompts": [
|
|
3058
|
-
"Delete proposal prop_2 and everything in it",
|
|
3059
|
-
"Remove this design option and destroy its geometry",
|
|
3060
|
-
"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```"
|
|
3061
|
-
],
|
|
3062
|
-
"argsType": "string",
|
|
3063
|
-
"resultType": "PluginCoreProposalsDeleteResult"
|
|
3064
|
-
},
|
|
3065
|
-
{
|
|
3066
|
-
"path": "core.proposals.get",
|
|
3067
|
-
"namespace": "core.proposals",
|
|
3068
|
-
"summary": "Get a single proposal by id.",
|
|
3069
|
-
"examplePrompts": [
|
|
3070
|
-
"Get the proposal with id prop_1",
|
|
3071
|
-
"Look up a single design option by its id",
|
|
3072
|
-
"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```"
|
|
3073
|
-
],
|
|
3074
|
-
"argsType": "string",
|
|
3075
|
-
"resultType": "PluginCoreProposalsGetResult"
|
|
3076
|
-
},
|
|
3077
|
-
{
|
|
3078
|
-
"path": "core.proposals.getActive",
|
|
3079
|
-
"namespace": "core.proposals",
|
|
3080
|
-
"summary": "Get the active proposal.",
|
|
3081
|
-
"examplePrompts": [
|
|
3082
|
-
"Which design option is active?",
|
|
3083
|
-
"Get the current proposal",
|
|
3084
|
-
"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```"
|
|
3085
|
-
],
|
|
3086
|
-
"argsType": null,
|
|
3087
|
-
"resultType": "PluginCoreProposalsGetActiveResult"
|
|
3088
|
-
},
|
|
3089
|
-
{
|
|
3090
|
-
"path": "core.proposals.isActive",
|
|
3091
|
-
"namespace": "core.proposals",
|
|
3092
|
-
"summary": "Test whether a proposal is the active one.",
|
|
3093
|
-
"examplePrompts": [
|
|
3094
|
-
"Is proposal prop_2 the active one?",
|
|
3095
|
-
"Check whether this design option is currently shown",
|
|
3096
|
-
"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```"
|
|
3097
|
-
],
|
|
3098
|
-
"argsType": "string",
|
|
3099
|
-
"resultType": "boolean"
|
|
3100
|
-
},
|
|
3101
|
-
{
|
|
3102
|
-
"path": "core.proposals.list",
|
|
3103
|
-
"namespace": "core.proposals",
|
|
3104
|
-
"summary": "List the design options (proposals) in the active project.",
|
|
3105
|
-
"examplePrompts": [
|
|
3106
|
-
"List all the design options in this project",
|
|
3107
|
-
"How many proposals does this project have?",
|
|
3108
|
-
"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```"
|
|
3109
|
-
],
|
|
3110
|
-
"argsType": null,
|
|
3111
|
-
"resultType": "PluginCoreProposalsListResult"
|
|
3112
|
-
},
|
|
3113
|
-
{
|
|
3114
|
-
"path": "core.proposals.listForComponent",
|
|
3115
|
-
"namespace": "core.proposals",
|
|
3116
|
-
"summary": "List the proposals a component belongs to.",
|
|
3117
|
-
"examplePrompts": [
|
|
3118
|
-
"Which design options is this component part of?",
|
|
3119
|
-
"List the proposals that contain this wall",
|
|
3120
|
-
"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```"
|
|
3121
|
-
],
|
|
3122
|
-
"argsType": "ComponentHandle",
|
|
3123
|
-
"resultType": "PluginCoreProposalsListForComponentResult"
|
|
3124
|
-
},
|
|
3125
|
-
{
|
|
3126
|
-
"path": "core.proposals.rename",
|
|
3127
|
-
"namespace": "core.proposals",
|
|
3128
|
-
"summary": "Rename a proposal.",
|
|
3129
|
-
"examplePrompts": [
|
|
3130
|
-
"Rename proposal prop_1 to Final Scheme",
|
|
3131
|
-
"Change the name of this design option",
|
|
3132
|
-
"Call proposal prop_2 \"Option A\"\n\n# Example\n```ts\nconst proposal = await snaptrude.core.proposals.rename(\"prop_1\", \"Final Scheme\")\n```"
|
|
3133
|
-
],
|
|
3134
|
-
"argsType": "string",
|
|
3135
|
-
"resultType": "PluginCoreProposalsRenameResult"
|
|
3136
|
-
},
|
|
3137
|
-
{
|
|
3138
|
-
"path": "core.proposals.setActive",
|
|
3139
|
-
"namespace": "core.proposals",
|
|
3140
|
-
"summary": "Switch the active proposal.",
|
|
3141
|
-
"examplePrompts": [
|
|
3142
|
-
"Switch to proposal prop_2",
|
|
3143
|
-
"Make Scheme B the active design option",
|
|
3144
|
-
"Show me the other proposal\n\n# Example\n```ts\nawait snaptrude.core.proposals.setActive(\"prop_2\")\n```"
|
|
3145
|
-
],
|
|
3146
|
-
"argsType": "string",
|
|
3147
|
-
"resultType": "PluginCoreProposalsSetActiveResult"
|
|
3148
|
-
},
|
|
3149
2376
|
{
|
|
3150
2377
|
"path": "core.tags.assign",
|
|
3151
2378
|
"namespace": "core.tags",
|
|
@@ -3500,20 +2727,6 @@
|
|
|
3500
2727
|
"argsType": "ComponentHandle[]",
|
|
3501
2728
|
"resultType": "ComponentHandle[]"
|
|
3502
2729
|
},
|
|
3503
|
-
{
|
|
3504
|
-
"path": "design.create.door",
|
|
3505
|
-
"namespace": "design.create",
|
|
3506
|
-
"summary": "Place a **door** from the catalog into a host wall.",
|
|
3507
|
-
"examplePrompts": [
|
|
3508
|
-
"Add a door to this wall here",
|
|
3509
|
-
"Place a sliding door on the selected wall",
|
|
3510
|
-
"Put a door from the catalog at this point on the wall",
|
|
3511
|
-
"Insert the entrance door into this wall",
|
|
3512
|
-
"Add a door to the wall and call it Entry-01\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```"
|
|
3513
|
-
],
|
|
3514
|
-
"argsType": "string",
|
|
3515
|
-
"resultType": "ComponentHandle"
|
|
3516
|
-
},
|
|
3517
2730
|
{
|
|
3518
2731
|
"path": "design.create.floor",
|
|
3519
2732
|
"namespace": "design.create",
|
|
@@ -3595,20 +2808,6 @@
|
|
|
3595
2808
|
"argsType": "ContourHandle",
|
|
3596
2809
|
"resultType": "ComponentHandle"
|
|
3597
2810
|
},
|
|
3598
|
-
{
|
|
3599
|
-
"path": "design.create.smartLayout",
|
|
3600
|
-
"namespace": "design.create",
|
|
3601
|
-
"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.",
|
|
3602
|
-
"examplePrompts": [
|
|
3603
|
-
"Copy this room's layout into the selected rooms",
|
|
3604
|
-
"Apply this furniture arrangement to the other offices",
|
|
3605
|
-
"Replicate this template into these two spaces",
|
|
3606
|
-
"Place this desk cluster into every meeting room",
|
|
3607
|
-
"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```"
|
|
3608
|
-
],
|
|
3609
|
-
"argsType": "PluginSmartLayoutArgs",
|
|
3610
|
-
"resultType": "PluginSmartLayoutResult"
|
|
3611
|
-
},
|
|
3612
2811
|
{
|
|
3613
2812
|
"path": "design.create.space",
|
|
3614
2813
|
"namespace": "design.create",
|
|
@@ -3664,20 +2863,6 @@
|
|
|
3664
2863
|
"argsType": "ProfileHandle",
|
|
3665
2864
|
"resultType": "ComponentHandle[]"
|
|
3666
2865
|
},
|
|
3667
|
-
{
|
|
3668
|
-
"path": "design.create.window",
|
|
3669
|
-
"namespace": "design.create",
|
|
3670
|
-
"summary": "Place a **window** from the catalog into a host wall.",
|
|
3671
|
-
"examplePrompts": [
|
|
3672
|
-
"Add a window to this wall here",
|
|
3673
|
-
"Place a casement window on the selected wall",
|
|
3674
|
-
"Put a window from the catalog at this point on the wall",
|
|
3675
|
-
"Insert a window into the living room wall",
|
|
3676
|
-
"Add a window to the wall and name it Win-01\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```"
|
|
3677
|
-
],
|
|
3678
|
-
"argsType": "string",
|
|
3679
|
-
"resultType": "ComponentHandle"
|
|
3680
|
-
},
|
|
3681
2866
|
{
|
|
3682
2867
|
"path": "design.delete.entities",
|
|
3683
2868
|
"namespace": "design.delete",
|
|
@@ -3692,32 +2877,6 @@
|
|
|
3692
2877
|
"argsType": "ComponentHandle[]",
|
|
3693
2878
|
"resultType": "PluginDesignChangeResult"
|
|
3694
2879
|
},
|
|
3695
|
-
{
|
|
3696
|
-
"path": "design.doors.exists",
|
|
3697
|
-
"namespace": "design.doors",
|
|
3698
|
-
"summary": "Test whether a door catalog item exists for the given library id.",
|
|
3699
|
-
"examplePrompts": [
|
|
3700
|
-
"Is this door still in the library?",
|
|
3701
|
-
"Check whether a door catalog item with this id exists",
|
|
3702
|
-
"Does my team library have this door?",
|
|
3703
|
-
"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```"
|
|
3704
|
-
],
|
|
3705
|
-
"argsType": "string",
|
|
3706
|
-
"resultType": "boolean"
|
|
3707
|
-
},
|
|
3708
|
-
{
|
|
3709
|
-
"path": "design.doors.getCatalogItem",
|
|
3710
|
-
"namespace": "design.doors",
|
|
3711
|
-
"summary": "Get a single door catalog item by its library id.",
|
|
3712
|
-
"examplePrompts": [
|
|
3713
|
-
"Get the details of this door from the library",
|
|
3714
|
-
"Look up the catalog entry for this door id",
|
|
3715
|
-
"What is the cost of this door item?",
|
|
3716
|
-
"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```"
|
|
3717
|
-
],
|
|
3718
|
-
"argsType": "string",
|
|
3719
|
-
"resultType": "PluginObjectCatalogItem | null"
|
|
3720
|
-
},
|
|
3721
2880
|
{
|
|
3722
2881
|
"path": "design.doors.getFamily",
|
|
3723
2882
|
"namespace": "design.doors",
|
|
@@ -3790,37 +2949,11 @@
|
|
|
3790
2949
|
"examplePrompts": [
|
|
3791
2950
|
"How wide is this door?",
|
|
3792
2951
|
"What's the width of the selected door?",
|
|
3793
|
-
"Measure the width of the entrance door",
|
|
3794
|
-
"Check whether this door is 900mm wide\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst width = await snaptrude.design.doors.getWidth(door)\nif (width !== null) console.log(\"door width:\", width)\n```"
|
|
3795
|
-
],
|
|
3796
|
-
"argsType": "ComponentHandle",
|
|
3797
|
-
"resultType": "number | null"
|
|
3798
|
-
},
|
|
3799
|
-
{
|
|
3800
|
-
"path": "design.doors.listCatalog",
|
|
3801
|
-
"namespace": "design.doors",
|
|
3802
|
-
"summary": "List the placeable door catalog (team + general libraries), optionally restricted to one group by its `dbType` token.",
|
|
3803
|
-
"examplePrompts": [
|
|
3804
|
-
"What doors can I place in this project?",
|
|
3805
|
-
"List every door in the library",
|
|
3806
|
-
"Show me the sliding doors I can add",
|
|
3807
|
-
"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```"
|
|
3808
|
-
],
|
|
3809
|
-
"argsType": "string",
|
|
3810
|
-
"resultType": "PluginObjectCatalogItem[]"
|
|
3811
|
-
},
|
|
3812
|
-
{
|
|
3813
|
-
"path": "design.doors.listCatalogGroups",
|
|
3814
|
-
"namespace": "design.doors",
|
|
3815
|
-
"summary": "List the door catalog **groups** — the placement families (Swing, Sliding, Folding, Pivot, …), built-in groups merged with any team-custom types.",
|
|
3816
|
-
"examplePrompts": [
|
|
3817
|
-
"What kinds of doors can I place?",
|
|
3818
|
-
"List the door groups in the catalog",
|
|
3819
|
-
"Show me the door families available in this project",
|
|
3820
|
-
"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```"
|
|
2952
|
+
"Measure the width of the entrance door",
|
|
2953
|
+
"Check whether this door is 900mm wide\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst width = await snaptrude.design.doors.getWidth(door)\nif (width !== null) console.log(\"door width:\", width)\n```"
|
|
3821
2954
|
],
|
|
3822
|
-
"argsType":
|
|
3823
|
-
"resultType": "
|
|
2955
|
+
"argsType": "ComponentHandle",
|
|
2956
|
+
"resultType": "number | null"
|
|
3824
2957
|
},
|
|
3825
2958
|
{
|
|
3826
2959
|
"path": "design.doors.mirror",
|
|
@@ -3932,42 +3065,17 @@
|
|
|
3932
3065
|
{
|
|
3933
3066
|
"path": "design.furniture.listCatalog",
|
|
3934
3067
|
"namespace": "design.furniture",
|
|
3935
|
-
"summary": "List the placeable furniture catalog (team + general libraries)
|
|
3068
|
+
"summary": "List the placeable furniture catalog (team + general libraries).",
|
|
3936
3069
|
"examplePrompts": [
|
|
3937
3070
|
"What furniture can I place in this project?",
|
|
3938
3071
|
"Show me all the furniture available in the library",
|
|
3939
3072
|
"List the chairs and tables I can add to the model",
|
|
3940
3073
|
"Which furniture items are in my team's library?",
|
|
3941
|
-
"
|
|
3074
|
+
"Browse the furniture catalog\n\n# Example\n```ts\nconst teamItems = await snaptrude.design.furniture.listCatalog(\"team\")\nfor (const item of teamItems) console.log(item.id, item.name, item.cost)\n```"
|
|
3942
3075
|
],
|
|
3943
3076
|
"argsType": "\"team\" | \"general\"",
|
|
3944
3077
|
"resultType": "PluginFurnitureCatalogItem[]"
|
|
3945
3078
|
},
|
|
3946
|
-
{
|
|
3947
|
-
"path": "design.furniture.listCategories",
|
|
3948
|
-
"namespace": "design.furniture",
|
|
3949
|
-
"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.",
|
|
3950
|
-
"examplePrompts": [
|
|
3951
|
-
"What furniture categories are available?",
|
|
3952
|
-
"List the furniture categories",
|
|
3953
|
-
"Show me the furniture groups like living and bedroom",
|
|
3954
|
-
"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```"
|
|
3955
|
-
],
|
|
3956
|
-
"argsType": null,
|
|
3957
|
-
"resultType": "string[]"
|
|
3958
|
-
},
|
|
3959
|
-
{
|
|
3960
|
-
"path": "design.isAreaLocked",
|
|
3961
|
-
"namespace": "design",
|
|
3962
|
-
"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.",
|
|
3963
|
-
"examplePrompts": [
|
|
3964
|
-
"Is the area of this room locked?",
|
|
3965
|
-
"Check whether this department's footprint is pinned",
|
|
3966
|
-
"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```"
|
|
3967
|
-
],
|
|
3968
|
-
"argsType": "ComponentHandle",
|
|
3969
|
-
"resultType": "boolean"
|
|
3970
|
-
},
|
|
3971
3079
|
{
|
|
3972
3080
|
"path": "design.isLocked",
|
|
3973
3081
|
"namespace": "design",
|
|
@@ -3981,18 +3089,6 @@
|
|
|
3981
3089
|
"argsType": "ComponentHandle",
|
|
3982
3090
|
"resultType": "boolean"
|
|
3983
3091
|
},
|
|
3984
|
-
{
|
|
3985
|
-
"path": "design.listAreaLocked",
|
|
3986
|
-
"namespace": "design",
|
|
3987
|
-
"summary": "List the spaces whose footprint area is locked. A read — never throws; returns `[]` when the `area_lock` feature is off.",
|
|
3988
|
-
"examplePrompts": [
|
|
3989
|
-
"Which spaces have their area locked?",
|
|
3990
|
-
"List every room with a locked footprint",
|
|
3991
|
-
"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```"
|
|
3992
|
-
],
|
|
3993
|
-
"argsType": null,
|
|
3994
|
-
"resultType": "ComponentHandle[]"
|
|
3995
|
-
},
|
|
3996
3092
|
{
|
|
3997
3093
|
"path": "design.listLocked",
|
|
3998
3094
|
"namespace": "design",
|
|
@@ -4019,19 +3115,6 @@
|
|
|
4019
3115
|
"argsType": "ComponentHandle[]",
|
|
4020
3116
|
"resultType": "PluginDesignChangeResult"
|
|
4021
3117
|
},
|
|
4022
|
-
{
|
|
4023
|
-
"path": "design.lockArea",
|
|
4024
|
-
"namespace": "design",
|
|
4025
|
-
"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.",
|
|
4026
|
-
"examplePrompts": [
|
|
4027
|
-
"Lock the floor area of the selected rooms",
|
|
4028
|
-
"Freeze the footprint area of this department so its size can't drift",
|
|
4029
|
-
"Area-lock every room on this storey",
|
|
4030
|
-
"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```"
|
|
4031
|
-
],
|
|
4032
|
-
"argsType": "ComponentHandle[]",
|
|
4033
|
-
"resultType": "PluginDesignChangeResult"
|
|
4034
|
-
},
|
|
4035
3118
|
{
|
|
4036
3119
|
"path": "design.materials.apply",
|
|
4037
3120
|
"namespace": "design.materials",
|
|
@@ -4046,19 +3129,6 @@
|
|
|
4046
3129
|
"argsType": "ComponentHandle[]",
|
|
4047
3130
|
"resultType": "PluginMaterialResult"
|
|
4048
3131
|
},
|
|
4049
|
-
{
|
|
4050
|
-
"path": "design.materials.applyToFaces",
|
|
4051
|
-
"namespace": "design.materials",
|
|
4052
|
-
"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).",
|
|
4053
|
-
"examplePrompts": [
|
|
4054
|
-
"Paint the top face of this slab red",
|
|
4055
|
-
"Apply the brick material to faces 0 and 2 of this wall",
|
|
4056
|
-
"Put a wood finish on just the front face of this column",
|
|
4057
|
-
"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```"
|
|
4058
|
-
],
|
|
4059
|
-
"argsType": "ComponentHandle",
|
|
4060
|
-
"resultType": "PluginMaterialResult"
|
|
4061
|
-
},
|
|
4062
3132
|
{
|
|
4063
3133
|
"path": "design.materials.create",
|
|
4064
3134
|
"namespace": "design.materials",
|
|
@@ -4072,18 +3142,6 @@
|
|
|
4072
3142
|
"argsType": "PluginMaterialSpec",
|
|
4073
3143
|
"resultType": "MaterialHandle"
|
|
4074
3144
|
},
|
|
4075
|
-
{
|
|
4076
|
-
"path": "design.materials.getByFace",
|
|
4077
|
-
"namespace": "design.materials",
|
|
4078
|
-
"summary": "Read the material applied to a single BREP face.",
|
|
4079
|
-
"examplePrompts": [
|
|
4080
|
-
"What material is on the top face of this slab?",
|
|
4081
|
-
"Get the finish applied to face 2 of this wall",
|
|
4082
|
-
"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```"
|
|
4083
|
-
],
|
|
4084
|
-
"argsType": "ComponentHandle",
|
|
4085
|
-
"resultType": "MaterialHandle | null"
|
|
4086
|
-
},
|
|
4087
3145
|
{
|
|
4088
3146
|
"path": "design.materials.getDefault",
|
|
4089
3147
|
"namespace": "design.materials",
|
|
@@ -4163,18 +3221,6 @@
|
|
|
4163
3221
|
"argsType": "\"project\" | \"preset\"",
|
|
4164
3222
|
"resultType": "MaterialHandle[]"
|
|
4165
3223
|
},
|
|
4166
|
-
{
|
|
4167
|
-
"path": "design.materials.listByFace",
|
|
4168
|
-
"namespace": "design.materials",
|
|
4169
|
-
"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`.",
|
|
4170
|
-
"examplePrompts": [
|
|
4171
|
-
"List the material on every face of this wall",
|
|
4172
|
-
"Show me which faces of this slab are painted and with what",
|
|
4173
|
-
"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```"
|
|
4174
|
-
],
|
|
4175
|
-
"argsType": "ComponentHandle",
|
|
4176
|
-
"resultType": "PluginFaceMaterial[]"
|
|
4177
|
-
},
|
|
4178
3224
|
{
|
|
4179
3225
|
"path": "design.materials.reset",
|
|
4180
3226
|
"namespace": "design.materials",
|
|
@@ -4188,18 +3234,6 @@
|
|
|
4188
3234
|
"argsType": "ComponentHandle[]",
|
|
4189
3235
|
"resultType": "PluginMaterialResult"
|
|
4190
3236
|
},
|
|
4191
|
-
{
|
|
4192
|
-
"path": "design.materials.resetFaces",
|
|
4193
|
-
"namespace": "design.materials",
|
|
4194
|
-
"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`).",
|
|
4195
|
-
"examplePrompts": [
|
|
4196
|
-
"Remove the paint from the top face of this slab",
|
|
4197
|
-
"Reset faces 0 and 2 of this wall to their default material",
|
|
4198
|
-
"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```"
|
|
4199
|
-
],
|
|
4200
|
-
"argsType": "ComponentHandle",
|
|
4201
|
-
"resultType": "PluginMaterialResult"
|
|
4202
|
-
},
|
|
4203
3237
|
{
|
|
4204
3238
|
"path": "design.query.exists",
|
|
4205
3239
|
"namespace": "design.query",
|
|
@@ -4345,19 +3379,6 @@
|
|
|
4345
3379
|
"argsType": "ComponentHandle",
|
|
4346
3380
|
"resultType": "PluginEntityProperties"
|
|
4347
3381
|
},
|
|
4348
|
-
{
|
|
4349
|
-
"path": "design.query.getStaircaseParams",
|
|
4350
|
-
"namespace": "design.query",
|
|
4351
|
-
"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`.",
|
|
4352
|
-
"examplePrompts": [
|
|
4353
|
-
"What's the riser height of this staircase?",
|
|
4354
|
-
"How many steps does the selected stair have?",
|
|
4355
|
-
"Show me the tread and width of this staircase",
|
|
4356
|
-
"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```"
|
|
4357
|
-
],
|
|
4358
|
-
"argsType": "ComponentHandle",
|
|
4359
|
-
"resultType": "PluginStaircaseParams | null"
|
|
4360
|
-
},
|
|
4361
3382
|
{
|
|
4362
3383
|
"path": "design.query.listBeams",
|
|
4363
3384
|
"namespace": "design.query",
|
|
@@ -4702,35 +3723,6 @@
|
|
|
4702
3723
|
"argsType": "ComponentHandle[]",
|
|
4703
3724
|
"resultType": "PluginDesignChangeResult"
|
|
4704
3725
|
},
|
|
4705
|
-
{
|
|
4706
|
-
"path": "design.selection.setByFilter",
|
|
4707
|
-
"namespace": "design.selection",
|
|
4708
|
-
"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.",
|
|
4709
|
-
"examplePrompts": [
|
|
4710
|
-
"Select everything on storey 2",
|
|
4711
|
-
"Select all the walls and doors",
|
|
4712
|
-
"Story selection: select the ground floor and first floor",
|
|
4713
|
-
"Filter selection: select all furniture in the model",
|
|
4714
|
-
"Select only the furniture on the second storey",
|
|
4715
|
-
"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```"
|
|
4716
|
-
],
|
|
4717
|
-
"argsType": "PluginSelectionFilter",
|
|
4718
|
-
"resultType": "PluginDesignChangeResult"
|
|
4719
|
-
},
|
|
4720
|
-
{
|
|
4721
|
-
"path": "design.transform.align",
|
|
4722
|
-
"namespace": "design.transform",
|
|
4723
|
-
"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):",
|
|
4724
|
-
"examplePrompts": [
|
|
4725
|
-
"Align the selected rooms to the left",
|
|
4726
|
-
"Line up these masses along their top edges",
|
|
4727
|
-
"Center these columns horizontally",
|
|
4728
|
-
"Align all the walls to the left edge of this reference wall",
|
|
4729
|
-
"Snap the bottom edges of these spaces together\n\n# Example\n```ts\nconst rooms = await snaptrude.design.selection.get()\n// align every room's left (world -X) edge to a common minimum\nawait snaptrude.design.transform.align(rooms, \"left\")\n// …or align them to a fixed reference component's left edge\nconst [anchor] = await snaptrude.design.query.listWalls({ storeys: [1] })\nawait snaptrude.design.transform.align(rooms, \"left\", { reference: anchor })\n```"
|
|
4730
|
-
],
|
|
4731
|
-
"argsType": "ComponentHandle[]",
|
|
4732
|
-
"resultType": "PluginDesignChangeResult"
|
|
4733
|
-
},
|
|
4734
3726
|
{
|
|
4735
3727
|
"path": "design.transform.move",
|
|
4736
3728
|
"namespace": "design.transform",
|
|
@@ -4771,32 +3763,6 @@
|
|
|
4771
3763
|
"argsType": "ComponentHandle[]",
|
|
4772
3764
|
"resultType": "PluginDesignChangeResult"
|
|
4773
3765
|
},
|
|
4774
|
-
{
|
|
4775
|
-
"path": "design.unlockArea",
|
|
4776
|
-
"namespace": "design",
|
|
4777
|
-
"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).",
|
|
4778
|
-
"examplePrompts": [
|
|
4779
|
-
"Unlock the area of the selected rooms",
|
|
4780
|
-
"Remove the footprint-area lock from this department",
|
|
4781
|
-
"Let me resize this space again by unlocking its area",
|
|
4782
|
-
"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```"
|
|
4783
|
-
],
|
|
4784
|
-
"argsType": "ComponentHandle[]",
|
|
4785
|
-
"resultType": "PluginDesignChangeResult"
|
|
4786
|
-
},
|
|
4787
|
-
{
|
|
4788
|
-
"path": "design.update.setLabel",
|
|
4789
|
-
"namespace": "design.update",
|
|
4790
|
-
"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.",
|
|
4791
|
-
"examplePrompts": [
|
|
4792
|
-
"Rename this door to D-101",
|
|
4793
|
-
"Number all doors on storey 2 with a D-2-XX tag",
|
|
4794
|
-
"Set the selected window's label to W-04",
|
|
4795
|
-
"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```"
|
|
4796
|
-
],
|
|
4797
|
-
"argsType": "ComponentHandle",
|
|
4798
|
-
"resultType": "boolean"
|
|
4799
|
-
},
|
|
4800
3766
|
{
|
|
4801
3767
|
"path": "design.update.space",
|
|
4802
3768
|
"namespace": "design.update",
|
|
@@ -4825,46 +3791,6 @@
|
|
|
4825
3791
|
"argsType": "PluginUpdateSpaceItem[]",
|
|
4826
3792
|
"resultType": "PluginSpaceUpdateResult[]"
|
|
4827
3793
|
},
|
|
4828
|
-
{
|
|
4829
|
-
"path": "design.update.staircase",
|
|
4830
|
-
"namespace": "design.update",
|
|
4831
|
-
"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`.",
|
|
4832
|
-
"examplePrompts": [
|
|
4833
|
-
"Set the riser of this staircase to 165mm",
|
|
4834
|
-
"Change all the stairs to 14 steps",
|
|
4835
|
-
"Make the selected staircase 1200 wide with a 280 tread",
|
|
4836
|
-
"Widen every staircase on level 1 to 1 metre",
|
|
4837
|
-
"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```"
|
|
4838
|
-
],
|
|
4839
|
-
"argsType": "ComponentHandle[]",
|
|
4840
|
-
"resultType": "PluginDesignChangeResult"
|
|
4841
|
-
},
|
|
4842
|
-
{
|
|
4843
|
-
"path": "design.windows.exists",
|
|
4844
|
-
"namespace": "design.windows",
|
|
4845
|
-
"summary": "Test whether a window catalog item exists for the given library id.",
|
|
4846
|
-
"examplePrompts": [
|
|
4847
|
-
"Is this window still in the library?",
|
|
4848
|
-
"Check whether a window catalog item with this id exists",
|
|
4849
|
-
"Does my team library have this window?",
|
|
4850
|
-
"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```"
|
|
4851
|
-
],
|
|
4852
|
-
"argsType": "string",
|
|
4853
|
-
"resultType": "boolean"
|
|
4854
|
-
},
|
|
4855
|
-
{
|
|
4856
|
-
"path": "design.windows.getCatalogItem",
|
|
4857
|
-
"namespace": "design.windows",
|
|
4858
|
-
"summary": "Get a single window catalog item by its library id.",
|
|
4859
|
-
"examplePrompts": [
|
|
4860
|
-
"Get the details of this window from the library",
|
|
4861
|
-
"Look up the catalog entry for this window id",
|
|
4862
|
-
"What is the cost of this window item?",
|
|
4863
|
-
"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```"
|
|
4864
|
-
],
|
|
4865
|
-
"argsType": "string",
|
|
4866
|
-
"resultType": "PluginObjectCatalogItem | null"
|
|
4867
|
-
},
|
|
4868
3794
|
{
|
|
4869
3795
|
"path": "design.windows.getDimensions",
|
|
4870
3796
|
"namespace": "design.windows",
|
|
@@ -4918,32 +3844,6 @@
|
|
|
4918
3844
|
"argsType": "ComponentHandle",
|
|
4919
3845
|
"resultType": "number | null"
|
|
4920
3846
|
},
|
|
4921
|
-
{
|
|
4922
|
-
"path": "design.windows.listCatalog",
|
|
4923
|
-
"namespace": "design.windows",
|
|
4924
|
-
"summary": "List the placeable window catalog (team + general libraries), optionally restricted to one group by its `dbType` token.",
|
|
4925
|
-
"examplePrompts": [
|
|
4926
|
-
"What windows can I place in this project?",
|
|
4927
|
-
"List every window in the library",
|
|
4928
|
-
"Show me the casement windows I can add",
|
|
4929
|
-
"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```"
|
|
4930
|
-
],
|
|
4931
|
-
"argsType": "string",
|
|
4932
|
-
"resultType": "PluginObjectCatalogItem[]"
|
|
4933
|
-
},
|
|
4934
|
-
{
|
|
4935
|
-
"path": "design.windows.listCatalogGroups",
|
|
4936
|
-
"namespace": "design.windows",
|
|
4937
|
-
"summary": "List the window catalog **groups** — the placement families (Fixed, Casement, Sliding, Folding, …), built-in groups merged with any team-custom types.",
|
|
4938
|
-
"examplePrompts": [
|
|
4939
|
-
"What kinds of windows can I place?",
|
|
4940
|
-
"List the window groups in the catalog",
|
|
4941
|
-
"Show me the window families available in this project",
|
|
4942
|
-
"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```"
|
|
4943
|
-
],
|
|
4944
|
-
"argsType": null,
|
|
4945
|
-
"resultType": "PluginObjectCatalogGroup[]"
|
|
4946
|
-
},
|
|
4947
3847
|
{
|
|
4948
3848
|
"path": "design.windows.setHeight",
|
|
4949
3849
|
"namespace": "design.windows",
|
|
@@ -5065,19 +3965,6 @@
|
|
|
5065
3965
|
"argsType": "number",
|
|
5066
3966
|
"resultType": "PluginStoryCreateResult"
|
|
5067
3967
|
},
|
|
5068
|
-
{
|
|
5069
|
-
"path": "entity.story.duplicate",
|
|
5070
|
-
"namespace": "entity.story",
|
|
5071
|
-
"summary": "Duplicate a story into the adjacent level, up or down.",
|
|
5072
|
-
"examplePrompts": [
|
|
5073
|
-
"Duplicate this floor to the storey above",
|
|
5074
|
-
"Copy the ground floor down into a new basement",
|
|
5075
|
-
"Repeat this level upwards with its own independent geometry",
|
|
5076
|
-
"Duplicate just the selected walls onto the next floor up\n\n# Example\n```ts\n// Duplicate the whole active story one level up (instanced copies).\nconst { targetStories, created, skipped } =\nawait snaptrude.entity.story.duplicate(\"up\")\nconsole.log(`Copied ${created.length} elements onto story ${targetStories}`)\nif (skipped) console.log(`${skipped} elements were skipped`)\n```"
|
|
5077
|
-
],
|
|
5078
|
-
"argsType": "\"up\" | \"down\"",
|
|
5079
|
-
"resultType": "PluginStoryDuplicateResult"
|
|
5080
|
-
},
|
|
5081
3968
|
{
|
|
5082
3969
|
"path": "entity.story.get",
|
|
5083
3970
|
"namespace": "entity.story",
|
|
@@ -5108,16 +3995,222 @@
|
|
|
5108
3995
|
{
|
|
5109
3996
|
"path": "entity.story.update",
|
|
5110
3997
|
"namespace": "entity.story",
|
|
5111
|
-
"summary": "Update a story's
|
|
3998
|
+
"summary": "Update a story's height.",
|
|
5112
3999
|
"examplePrompts": [
|
|
5113
4000
|
"Change the ground floor height to 3.5 metres",
|
|
5114
4001
|
"Make the second storey taller",
|
|
5115
4002
|
"Set the floor-to-floor height of level 1",
|
|
5116
|
-
"Increase the height of the third floor\n\n# Example\n```ts\n// Set ground floor height to 5 Babylon units
|
|
4003
|
+
"Increase the height of the third floor\n\n# Example\n```ts\n// Set ground floor height to 5 Babylon units\nconst result = await snaptrude.entity.story.update(1, 5)\n```"
|
|
5117
4004
|
],
|
|
5118
4005
|
"argsType": "number",
|
|
5119
4006
|
"resultType": "PluginStoryUpdateResult"
|
|
5120
4007
|
},
|
|
4008
|
+
{
|
|
4009
|
+
"path": "presentation.aiInspiration.cancelJob",
|
|
4010
|
+
"namespace": "presentation.aiInspiration",
|
|
4011
|
+
"summary": "Cancel a transient AI Inspiration job.",
|
|
4012
|
+
"examplePrompts": [
|
|
4013
|
+
"Cancel the running generation",
|
|
4014
|
+
"Stop that AI job\n\n# Example\n```ts\nconst { job } = await snaptrude.presentation.aiInspiration.cancelJob({ jobId })\nconsole.log(job.status) // \"cancelled\" (or a terminal state it already reached)\n```"
|
|
4015
|
+
],
|
|
4016
|
+
"argsType": "PluginAIInspirationJobArgs",
|
|
4017
|
+
"resultType": "PluginAIInspirationCancelJobResult"
|
|
4018
|
+
},
|
|
4019
|
+
{
|
|
4020
|
+
"path": "presentation.aiInspiration.deleteRecipe",
|
|
4021
|
+
"namespace": "presentation.aiInspiration",
|
|
4022
|
+
"summary": "Delete a project-level AI Inspiration recipe.",
|
|
4023
|
+
"examplePrompts": [
|
|
4024
|
+
"Delete the facade render recipe",
|
|
4025
|
+
"Remove that saved AI recipe\n\n# Example\n```ts\nconst { recipes } = await snaptrude.presentation.aiInspiration.listRecipes()\nconst stale = recipes.find((r) => r.name === \"Old style test\")\nif (stale) {\nconst { deleted } = await snaptrude.presentation.aiInspiration.deleteRecipe({ recipeId: stale.id })\nconsole.log(deleted)\n}\n```"
|
|
4026
|
+
],
|
|
4027
|
+
"argsType": "PluginAIInspirationDeleteRecipeArgs",
|
|
4028
|
+
"resultType": "PluginAIInspirationDeleteRecipeResult"
|
|
4029
|
+
},
|
|
4030
|
+
{
|
|
4031
|
+
"path": "presentation.aiInspiration.extractRecipeFromShape",
|
|
4032
|
+
"namespace": "presentation.aiInspiration",
|
|
4033
|
+
"summary": "Extract a reusable recipe draft from the workflow path ending at a shape.",
|
|
4034
|
+
"examplePrompts": [
|
|
4035
|
+
"Turn this workflow into a reusable recipe",
|
|
4036
|
+
"Save the generation steps behind this image\n\n# Example\n```ts\nconst extraction = await snaptrude.presentation.aiInspiration.extractRecipeFromShape({\nshapeId: selected.shapeId,\n})\nif (extraction.status === \"ready\") console.log(extraction.draft.summary)\n```"
|
|
4037
|
+
],
|
|
4038
|
+
"argsType": "PluginAIInspirationExtractRecipeFromShapeArgs",
|
|
4039
|
+
"resultType": "PluginAIInspirationExtractionResult"
|
|
4040
|
+
},
|
|
4041
|
+
{
|
|
4042
|
+
"path": "presentation.aiInspiration.generate",
|
|
4043
|
+
"namespace": "presentation.aiInspiration",
|
|
4044
|
+
"summary": "Generate an image or video from a Present canvas source.",
|
|
4045
|
+
"examplePrompts": [
|
|
4046
|
+
"Generate an image from this sketch",
|
|
4047
|
+
"Render the selected view as a photorealistic image",
|
|
4048
|
+
"Make an AI image of a modern facade from this source",
|
|
4049
|
+
"Generate a video from this image",
|
|
4050
|
+
"Turn this massing into a rendered street view\n\n# Example\n```ts\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({})\nconst [source, ...refs] = sources\nconst { outputs } = await snaptrude.presentation.aiInspiration.generate({\nsourceShapeId: source.shapeId,\nprompt: \"Photorealistic render of a modern timber facade at dusk\",\nreferenceShapeIds: refs.slice(0, 2).map((r) => r.shapeId),\nreferenceStrength: \"medium\",\n})\nfor (const out of outputs ?? []) console.log(out.outputType, out.shapeId, out.outputUrl)\n```"
|
|
4051
|
+
],
|
|
4052
|
+
"argsType": "PluginAIInspirationGenerateArgs",
|
|
4053
|
+
"resultType": "PluginAIInspirationRunResult"
|
|
4054
|
+
},
|
|
4055
|
+
{
|
|
4056
|
+
"path": "presentation.aiInspiration.getJob",
|
|
4057
|
+
"namespace": "presentation.aiInspiration",
|
|
4058
|
+
"summary": "Get a transient AI Inspiration job by ID.",
|
|
4059
|
+
"examplePrompts": [
|
|
4060
|
+
"Is my render finished?",
|
|
4061
|
+
"Check on the generation job\n\n# Example\n```ts\nconst { jobId } = await snaptrude.presentation.aiInspiration.generate({\nsourceShapeId: source.shapeId,\nprompt: \"Aerial dusk render\",\nrunMode: \"job\",\n})\nconst { job } = await snaptrude.presentation.aiInspiration.getJob({ jobId })\nconsole.log(job.status, job.progress?.message)\n```"
|
|
4062
|
+
],
|
|
4063
|
+
"argsType": "PluginAIInspirationJobArgs",
|
|
4064
|
+
"resultType": "PluginAIInspirationGetJobResult"
|
|
4065
|
+
},
|
|
4066
|
+
{
|
|
4067
|
+
"path": "presentation.aiInspiration.getModelCapabilities",
|
|
4068
|
+
"namespace": "presentation.aiInspiration",
|
|
4069
|
+
"summary": "Get capability flags for a model.",
|
|
4070
|
+
"examplePrompts": [
|
|
4071
|
+
"What can this model do?",
|
|
4072
|
+
"Does the default model support reference images?",
|
|
4073
|
+
"Check if the video model supports keyframes\n\n# Example\n```ts\nconst { defaultModelId } = await snaptrude.presentation.aiInspiration.listModels()\nconst { capability } = await snaptrude.presentation.aiInspiration.getModelCapabilities({\nmodelId: defaultModelId,\n})\nconsole.log(capability.supportsReferenceImages, capability.maxExtraImages)\n```"
|
|
4074
|
+
],
|
|
4075
|
+
"argsType": "PluginAIInspirationGetModelCapabilitiesArgs",
|
|
4076
|
+
"resultType": "PluginAIInspirationGetModelCapabilitiesResult"
|
|
4077
|
+
},
|
|
4078
|
+
{
|
|
4079
|
+
"path": "presentation.aiInspiration.getPresetCatalog",
|
|
4080
|
+
"namespace": "presentation.aiInspiration",
|
|
4081
|
+
"summary": "Get the curated AI Inspiration preset catalog.",
|
|
4082
|
+
"examplePrompts": [
|
|
4083
|
+
"What style presets are available?",
|
|
4084
|
+
"List the curated AI generation presets",
|
|
4085
|
+
"Show me the exterior render styles\n\n# Example\n```ts\nconst { categories, presets } = await snaptrude.presentation.aiInspiration.getPresetCatalog()\nconst exterior = presets.filter((p) => p.categoryLabel === \"Exterior\")\nconsole.log(categories.map((c) => c.label), exterior.map((p) => p.name))\n```"
|
|
4086
|
+
],
|
|
4087
|
+
"argsType": null,
|
|
4088
|
+
"resultType": "PluginAIInspirationGetPresetCatalogResult"
|
|
4089
|
+
},
|
|
4090
|
+
{
|
|
4091
|
+
"path": "presentation.aiInspiration.getSelectedBranchRerunPlan",
|
|
4092
|
+
"namespace": "presentation.aiInspiration",
|
|
4093
|
+
"summary": "Build a rerun plan for the selected workflow branch ending at a shape.",
|
|
4094
|
+
"examplePrompts": [
|
|
4095
|
+
"Can I rerun the steps that produced this output?",
|
|
4096
|
+
"Preview the rerun for this generated image\n\n# Example\n```ts\nconst plan = await snaptrude.presentation.aiInspiration.getSelectedBranchRerunPlan({\nshapeId: selected.shapeId,\n})\nif (plan.status === \"ready\") console.log(plan.edges.map((e) => e.operation.label))\nelse console.log(\"Cannot rerun:\", plan.reason)\n```"
|
|
4097
|
+
],
|
|
4098
|
+
"argsType": "PluginAIInspirationGetWorkflowForShapeArgs",
|
|
4099
|
+
"resultType": "PluginAIInspirationRerunPlanResult"
|
|
4100
|
+
},
|
|
4101
|
+
{
|
|
4102
|
+
"path": "presentation.aiInspiration.getSelection",
|
|
4103
|
+
"namespace": "presentation.aiInspiration",
|
|
4104
|
+
"summary": "Get selected Present canvas shapes that AI Inspiration can use.",
|
|
4105
|
+
"examplePrompts": [
|
|
4106
|
+
"Generate from what I have selected",
|
|
4107
|
+
"Which of my selected shapes can be used as AI sources?\n\n# Example\n```ts\nconst { selectedShapeIds, sources } = await snaptrude.presentation.aiInspiration.getSelection()\nconsole.log(selectedShapeIds.length, \"selected,\", sources.length, \"usable\")\n```"
|
|
4108
|
+
],
|
|
4109
|
+
"argsType": null,
|
|
4110
|
+
"resultType": "PluginAIInspirationGetSelectionResult"
|
|
4111
|
+
},
|
|
4112
|
+
{
|
|
4113
|
+
"path": "presentation.aiInspiration.getWorkflowForShape",
|
|
4114
|
+
"namespace": "presentation.aiInspiration",
|
|
4115
|
+
"summary": "Get the sanitized workflow graph containing a Present shape.",
|
|
4116
|
+
"examplePrompts": [
|
|
4117
|
+
"Show the generation history of this image",
|
|
4118
|
+
"What workflow produced this shape?\n\n# Example\n```ts\nconst { workflow, node } = await snaptrude.presentation.aiInspiration.getWorkflowForShape({\nshapeId: selected.shapeId,\n})\nif (workflow && node) console.log(node.id, workflow.edgeIds.length, \"edges\")\n```"
|
|
4119
|
+
],
|
|
4120
|
+
"argsType": "PluginAIInspirationGetWorkflowForShapeArgs",
|
|
4121
|
+
"resultType": "PluginAIInspirationGetWorkflowForShapeResult"
|
|
4122
|
+
},
|
|
4123
|
+
{
|
|
4124
|
+
"path": "presentation.aiInspiration.listJobs",
|
|
4125
|
+
"namespace": "presentation.aiInspiration",
|
|
4126
|
+
"summary": "List transient AI Inspiration jobs created in the current host session.",
|
|
4127
|
+
"examplePrompts": [
|
|
4128
|
+
"What AI jobs are running?",
|
|
4129
|
+
"Show my generation queue\n\n# Example\n```ts\nconst { jobs } = await snaptrude.presentation.aiInspiration.listJobs()\nconst running = jobs.filter((j) => j.status === \"running\" || j.status === \"queued\")\nconsole.log(running.map((j) => `${j.jobId}: ${j.method}`))\n```"
|
|
4130
|
+
],
|
|
4131
|
+
"argsType": null,
|
|
4132
|
+
"resultType": "PluginAIInspirationListJobsResult"
|
|
4133
|
+
},
|
|
4134
|
+
{
|
|
4135
|
+
"path": "presentation.aiInspiration.listModels",
|
|
4136
|
+
"namespace": "presentation.aiInspiration",
|
|
4137
|
+
"summary": "List AI Inspiration models that can be used for generation.",
|
|
4138
|
+
"examplePrompts": [
|
|
4139
|
+
"What AI inspiration models can I use?",
|
|
4140
|
+
"List the available image and video models",
|
|
4141
|
+
"Which generation model is the default?\n\n# Example\n```ts\nconst { defaultModelId, models } = await snaptrude.presentation.aiInspiration.listModels()\nconst videoModels = models.filter((m) => m.output === \"video\")\nconsole.log(defaultModelId, videoModels.map((m) => m.id))\n```"
|
|
4142
|
+
],
|
|
4143
|
+
"argsType": null,
|
|
4144
|
+
"resultType": "PluginAIInspirationListModelsResult"
|
|
4145
|
+
},
|
|
4146
|
+
{
|
|
4147
|
+
"path": "presentation.aiInspiration.listRecipes",
|
|
4148
|
+
"namespace": "presentation.aiInspiration",
|
|
4149
|
+
"summary": "List project-level AI Inspiration recipes stored in Present document metadata.",
|
|
4150
|
+
"examplePrompts": [
|
|
4151
|
+
"What AI recipes are saved in this project?",
|
|
4152
|
+
"List my generation recipes\n\n# Example\n```ts\nconst { recipes } = await snaptrude.presentation.aiInspiration.listRecipes()\nconsole.log(recipes.map((r) => `${r.name} → ${r.outputKind}`))\n```"
|
|
4153
|
+
],
|
|
4154
|
+
"argsType": null,
|
|
4155
|
+
"resultType": "PluginAIInspirationListRecipesResult"
|
|
4156
|
+
},
|
|
4157
|
+
{
|
|
4158
|
+
"path": "presentation.aiInspiration.listSources",
|
|
4159
|
+
"namespace": "presentation.aiInspiration",
|
|
4160
|
+
"summary": "List image/view/video sources on the current Present page.",
|
|
4161
|
+
"examplePrompts": [
|
|
4162
|
+
"List the images I can generate from on this page",
|
|
4163
|
+
"What source shapes are on the present canvas?",
|
|
4164
|
+
"Show me the reference images available for AI generation\n\n# Example\n```ts\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({ includeGenerated: true })\nfor (const s of sources) console.log(s.kind, s.shapeId, s.name)\n```"
|
|
4165
|
+
],
|
|
4166
|
+
"argsType": "PluginAIInspirationListSourcesArgs",
|
|
4167
|
+
"resultType": "PluginAIInspirationListSourcesResult"
|
|
4168
|
+
},
|
|
4169
|
+
{
|
|
4170
|
+
"path": "presentation.aiInspiration.refine",
|
|
4171
|
+
"namespace": "presentation.aiInspiration",
|
|
4172
|
+
"summary": "Refine/upscale an AI Inspiration source image.",
|
|
4173
|
+
"examplePrompts": [
|
|
4174
|
+
"Upscale this AI image",
|
|
4175
|
+
"Refine and sharpen the selected render",
|
|
4176
|
+
"Make this generated image higher resolution\n\n# Example\n```ts\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({ includeGenerated: true })\nconst image = sources.find((s) => s.kind === \"image\")\nif (image) {\nconst { outputs } = await snaptrude.presentation.aiInspiration.refine({\nsourceShapeId: image.shapeId,\nupscaleFactor: 2,\n})\nconsole.log(outputs?.[0]?.shapeId)\n}\n```"
|
|
4177
|
+
],
|
|
4178
|
+
"argsType": "PluginAIInspirationRefineArgs",
|
|
4179
|
+
"resultType": "PluginAIInspirationRunResult"
|
|
4180
|
+
},
|
|
4181
|
+
{
|
|
4182
|
+
"path": "presentation.aiInspiration.rerunSelectedBranch",
|
|
4183
|
+
"namespace": "presentation.aiInspiration",
|
|
4184
|
+
"summary": "Rerun the selected workflow branch and supersede the previous branch.",
|
|
4185
|
+
"examplePrompts": [
|
|
4186
|
+
"Rerun this generation branch",
|
|
4187
|
+
"Regenerate this output with the same steps\n\n# Example\n```ts\nconst { outputs } = await snaptrude.presentation.aiInspiration.rerunSelectedBranch({\nshapeId: selected.shapeId,\n})\nconsole.log(outputs?.map((o) => o.shapeId))\n```"
|
|
4188
|
+
],
|
|
4189
|
+
"argsType": "PluginAIInspirationRerunSelectedBranchArgs",
|
|
4190
|
+
"resultType": "PluginAIInspirationRunResult"
|
|
4191
|
+
},
|
|
4192
|
+
{
|
|
4193
|
+
"path": "presentation.aiInspiration.runRecipe",
|
|
4194
|
+
"namespace": "presentation.aiInspiration",
|
|
4195
|
+
"summary": "Run a saved or inline recipe against Present canvas slot shapes.",
|
|
4196
|
+
"examplePrompts": [
|
|
4197
|
+
"Apply my saved recipe to this image",
|
|
4198
|
+
"Run the dusk-render recipe on the selected view\n\n# Example\n```ts\nconst { recipes } = await snaptrude.presentation.aiInspiration.listRecipes()\nconst recipe = recipes[0]\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({})\nconst { outputs } = await snaptrude.presentation.aiInspiration.runRecipe({\nrecipeId: recipe.id,\nslotShapeIds: { [recipe.slots[0].id]: sources[0].shapeId },\n})\nconsole.log(outputs?.map((o) => o.outputUrl))\n```"
|
|
4199
|
+
],
|
|
4200
|
+
"argsType": "PluginAIInspirationRunRecipeArgs",
|
|
4201
|
+
"resultType": "PluginAIInspirationRunResult"
|
|
4202
|
+
},
|
|
4203
|
+
{
|
|
4204
|
+
"path": "presentation.aiInspiration.saveRecipe",
|
|
4205
|
+
"namespace": "presentation.aiInspiration",
|
|
4206
|
+
"summary": "Save a project-level AI Inspiration recipe.",
|
|
4207
|
+
"examplePrompts": [
|
|
4208
|
+
"Save this recipe as \"Dusk facade render\"",
|
|
4209
|
+
"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```"
|
|
4210
|
+
],
|
|
4211
|
+
"argsType": "PluginAIInspirationSaveRecipeArgs",
|
|
4212
|
+
"resultType": "PluginAIInspirationSaveRecipeResult"
|
|
4213
|
+
},
|
|
5121
4214
|
{
|
|
5122
4215
|
"path": "presentation.diagrams.place",
|
|
5123
4216
|
"namespace": "presentation.diagrams",
|
|
@@ -5156,19 +4249,6 @@
|
|
|
5156
4249
|
"argsType": "{ url?: string; dataUrl?: string }",
|
|
5157
4250
|
"resultType": "PluginPresentationImportResult"
|
|
5158
4251
|
},
|
|
5159
|
-
{
|
|
5160
|
-
"path": "presentation.import.svg",
|
|
5161
|
-
"namespace": "presentation.import",
|
|
5162
|
-
"summary": "Import an SVG onto the current Present sheet as a vector asset.",
|
|
5163
|
-
"examplePrompts": [
|
|
5164
|
-
"Import this SVG diagram onto the present canvas",
|
|
5165
|
-
"Add a vector logo to my presentation board",
|
|
5166
|
-
"Place this SVG floor plan on the current sheet as vectors",
|
|
5167
|
-
"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```"
|
|
5168
|
-
],
|
|
5169
|
-
"argsType": "{ url?: string; dataUrl?: string }",
|
|
5170
|
-
"resultType": "PluginPresentationImportResult"
|
|
5171
|
-
},
|
|
5172
4252
|
{
|
|
5173
4253
|
"path": "presentation.sheets.create",
|
|
5174
4254
|
"namespace": "presentation.sheets",
|
|
@@ -5269,19 +4349,6 @@
|
|
|
5269
4349
|
"argsType": null,
|
|
5270
4350
|
"resultType": "PluginPresentationViewsGetResult"
|
|
5271
4351
|
},
|
|
5272
|
-
{
|
|
5273
|
-
"path": "presentation.views.getSettings",
|
|
5274
|
-
"namespace": "presentation.views",
|
|
5275
|
-
"summary": "Read a saved view's display settings (background, color mode, axis, edges, labels).",
|
|
5276
|
-
"examplePrompts": [
|
|
5277
|
-
"What color mode is the Ground Floor view using?",
|
|
5278
|
-
"Get the display settings for this view",
|
|
5279
|
-
"Does the site plan view show axes and labels?",
|
|
5280
|
-
"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```"
|
|
5281
|
-
],
|
|
5282
|
-
"argsType": "string",
|
|
5283
|
-
"resultType": "PluginPresentationViewsGetSettingsResult"
|
|
5284
|
-
},
|
|
5285
4352
|
{
|
|
5286
4353
|
"path": "presentation.views.list",
|
|
5287
4354
|
"namespace": "presentation.views",
|
|
@@ -5309,20 +4376,6 @@
|
|
|
5309
4376
|
"argsType": "string",
|
|
5310
4377
|
"resultType": "PluginPresentationViewsSetActiveResult"
|
|
5311
4378
|
},
|
|
5312
|
-
{
|
|
5313
|
-
"path": "presentation.views.updateSettings",
|
|
5314
|
-
"namespace": "presentation.views",
|
|
5315
|
-
"summary": "Update a saved view's display settings (partial patch — only the fields you pass change).",
|
|
5316
|
-
"examplePrompts": [
|
|
5317
|
-
"Switch this view to monochrome color mode",
|
|
5318
|
-
"Turn off the axis in the Ground Floor view",
|
|
5319
|
-
"Set the background of the active view to white",
|
|
5320
|
-
"Show area labels on this view",
|
|
5321
|
-
"Enable hidden-line mode for the section view\n\n# Example\n```ts\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\ncolorMode: \"monochrome\",\nshowAxis: false,\n})\n```"
|
|
5322
|
-
],
|
|
5323
|
-
"argsType": "string",
|
|
5324
|
-
"resultType": "PluginPresentationViewsUpdateSettingsResult"
|
|
5325
|
-
},
|
|
5326
4379
|
{
|
|
5327
4380
|
"path": "program.adjacency.compute",
|
|
5328
4381
|
"namespace": "program.adjacency",
|
|
@@ -5356,8 +4409,6 @@
|
|
|
5356
4409
|
"examplePrompts": [
|
|
5357
4410
|
"What's my FAR right now?",
|
|
5358
4411
|
"Give me the program area summary",
|
|
5359
|
-
"What is my net internal area vs gross external area?",
|
|
5360
|
-
"How much net and gross area do I have?",
|
|
5361
4412
|
"How much built-up area have I used against the site area?",
|
|
5362
4413
|
"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```"
|
|
5363
4414
|
],
|
|
@@ -5370,7 +4421,6 @@
|
|
|
5370
4421
|
"summary": "List the program area rollup grouped by a facet.",
|
|
5371
4422
|
"examplePrompts": [
|
|
5372
4423
|
"Break down the area by storey",
|
|
5373
|
-
"Break down net vs gross area by storey",
|
|
5374
4424
|
"Show the area rollup per department",
|
|
5375
4425
|
"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```"
|
|
5376
4426
|
],
|
|
@@ -5383,7 +4433,6 @@
|
|
|
5383
4433
|
"summary": "List the spaces that make up one area group.",
|
|
5384
4434
|
"examplePrompts": [
|
|
5385
4435
|
"List the spaces on this storey with their areas",
|
|
5386
|
-
"Which spaces are net and which are gross on this storey?",
|
|
5387
4436
|
"What rooms are in the Bedrooms department bucket?",
|
|
5388
4437
|
"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```"
|
|
5389
4438
|
],
|
|
@@ -5544,54 +4593,6 @@
|
|
|
5544
4593
|
"argsType": "string",
|
|
5545
4594
|
"resultType": "PluginProgramDepartmentsUpdateResult"
|
|
5546
4595
|
},
|
|
5547
|
-
{
|
|
5548
|
-
"path": "program.layout.arrange",
|
|
5549
|
-
"namespace": "program.layout",
|
|
5550
|
-
"summary": "Arrange the spaces inside the envelope using the computed adjacency data.",
|
|
5551
|
-
"examplePrompts": [
|
|
5552
|
-
"Arrange the rooms in the envelope",
|
|
5553
|
-
"Lay out the departments inside the building envelope",
|
|
5554
|
-
"Auto-arrange the program spaces\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```"
|
|
5555
|
-
],
|
|
5556
|
-
"argsType": "PluginProgramLayoutRunArgs",
|
|
5557
|
-
"resultType": "PluginProgramLayoutRunResult"
|
|
5558
|
-
},
|
|
5559
|
-
{
|
|
5560
|
-
"path": "program.layout.cancel",
|
|
5561
|
-
"namespace": "program.layout",
|
|
5562
|
-
"summary": "Cancel the in-flight layout run.",
|
|
5563
|
-
"examplePrompts": [
|
|
5564
|
-
"Cancel the arrange",
|
|
5565
|
-
"Stop the running layout job",
|
|
5566
|
-
"Abort the pack in envelope\n\n# Example\n```ts\nawait snaptrude.program.layout.cancel()\n```"
|
|
5567
|
-
],
|
|
5568
|
-
"argsType": null,
|
|
5569
|
-
"resultType": "boolean"
|
|
5570
|
-
},
|
|
5571
|
-
{
|
|
5572
|
-
"path": "program.layout.getState",
|
|
5573
|
-
"namespace": "program.layout",
|
|
5574
|
-
"summary": "Get the state of the layout run.",
|
|
5575
|
-
"examplePrompts": [
|
|
5576
|
-
"Is the arrange done?",
|
|
5577
|
-
"Check the status of the layout run",
|
|
5578
|
-
"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```"
|
|
5579
|
-
],
|
|
5580
|
-
"argsType": null,
|
|
5581
|
-
"resultType": "PluginProgramLayoutStateResult"
|
|
5582
|
-
},
|
|
5583
|
-
{
|
|
5584
|
-
"path": "program.layout.pack",
|
|
5585
|
-
"namespace": "program.layout",
|
|
5586
|
-
"summary": "Pack the spaces into the envelope (a tighter fit than arrange).",
|
|
5587
|
-
"examplePrompts": [
|
|
5588
|
-
"Pack the rooms into the envelope",
|
|
5589
|
-
"Fit the program spaces tightly into the building",
|
|
5590
|
-
"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```"
|
|
5591
|
-
],
|
|
5592
|
-
"argsType": "PluginProgramLayoutRunArgs",
|
|
5593
|
-
"resultType": "PluginProgramLayoutRunResult"
|
|
5594
|
-
},
|
|
5595
4596
|
{
|
|
5596
4597
|
"path": "program.metrics.get",
|
|
5597
4598
|
"namespace": "program.metrics",
|
|
@@ -5646,30 +4647,6 @@
|
|
|
5646
4647
|
"argsType": null,
|
|
5647
4648
|
"resultType": "PluginProgramSiteContextResult"
|
|
5648
4649
|
},
|
|
5649
|
-
{
|
|
5650
|
-
"path": "program.site.getLocation",
|
|
5651
|
-
"namespace": "program.site",
|
|
5652
|
-
"summary": "Get the project's geographic location.",
|
|
5653
|
-
"examplePrompts": [
|
|
5654
|
-
"What's the project's latitude and longitude?",
|
|
5655
|
-
"Where is this site located?",
|
|
5656
|
-
"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```"
|
|
5657
|
-
],
|
|
5658
|
-
"argsType": null,
|
|
5659
|
-
"resultType": "PluginProgramSiteLocationResult"
|
|
5660
|
-
},
|
|
5661
|
-
{
|
|
5662
|
-
"path": "program.site.getNorthAngle",
|
|
5663
|
-
"namespace": "program.site",
|
|
5664
|
-
"summary": "Get the site's true-north angle.",
|
|
5665
|
-
"examplePrompts": [
|
|
5666
|
-
"What's the north angle of the site?",
|
|
5667
|
-
"How far is the model rotated from true north?",
|
|
5668
|
-
"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```"
|
|
5669
|
-
],
|
|
5670
|
-
"argsType": null,
|
|
5671
|
-
"resultType": "PluginProgramSiteNorthAngleResult"
|
|
5672
|
-
},
|
|
5673
4650
|
{
|
|
5674
4651
|
"path": "program.site.listGeoPolygons",
|
|
5675
4652
|
"namespace": "program.site",
|