@snaptrude/plugin-core 0.6.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 +29 -0
- package/api-manifest.json +206 -704
- package/dist/api/core/index.d.ts +5 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/proposals/index.d.ts +475 -0
- package/dist/api/core/proposals/index.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +209 -0
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +159 -0
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/furniture/index.d.ts +34 -5
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +83 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/lock.d.ts +26 -0
- package/dist/api/design/lock.d.ts.map +1 -1
- package/dist/api/design/materials/index.d.ts +159 -2
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +115 -5
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/selection/index.d.ts +2 -2
- package/dist/api/design/transform/index.d.ts +83 -2
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +168 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +113 -2
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +101 -7
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +1967 -7
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -1
- package/dist/api/presentation/import.d.ts +49 -4
- package/dist/api/presentation/import.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/api/presentation/views.d.ts +210 -5
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/program/areas.d.ts +42 -12
- package/dist/api/program/areas.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +3 -11
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/layout.d.ts +186 -11
- package/dist/api/program/layout.d.ts.map +1 -1
- package/dist/errors/codes.d.ts +34 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/envelope.d.ts +56 -0
- package/dist/errors/envelope.d.ts.map +1 -0
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/plugin-error.d.ts +69 -0
- package/dist/errors/plugin-error.d.ts.map +1 -0
- package/dist/host-utils.d.ts +4 -0
- package/dist/host-utils.d.ts.map +1 -1
- package/dist/index.cjs +1993 -1033
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1874 -1030
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/scripts/generate-manifest.test.mjs +77 -0
- package/src/api/core/index.ts +5 -0
- package/src/api/core/proposals/index.ts +509 -0
- package/src/api/design/create/index.ts +249 -0
- package/src/api/design/doors/index.ts +168 -0
- package/src/api/design/furniture/index.ts +36 -5
- package/src/api/design/index.ts +87 -0
- package/src/api/design/lock.ts +27 -0
- package/src/api/design/materials/index.ts +182 -2
- package/src/api/design/query/index.ts +81 -0
- package/src/api/design/transform/index.ts +74 -2
- package/src/api/design/update/index.ts +167 -0
- package/src/api/design/windows/index.ts +128 -2
- package/src/api/entity/story.ts +105 -7
- package/src/api/presentation/aiInspiration.ts +761 -7
- package/src/api/presentation/import.ts +45 -4
- package/src/api/presentation/index.ts +2 -3
- package/src/api/presentation/views.ts +221 -5
- package/src/api/program/areas.ts +34 -12
- package/src/api/program/index.ts +3 -11
- package/src/api/program/layout.ts +195 -11
- package/src/errors/codes.ts +136 -0
- package/src/errors/envelope.ts +75 -0
- package/src/errors/index.ts +21 -0
- package/src/errors/plugin-error.ts +134 -0
- package/src/host-utils.ts +4 -0
- package/src/index.ts +1 -0
- package/test/errors.test.mjs +184 -0
- package/api-manifest.full.json +0 -5600
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",
|
|
@@ -2050,431 +1810,6 @@
|
|
|
2050
1810
|
"argsType": "number",
|
|
2051
1811
|
"resultType": "PluginHistoryStepResult"
|
|
2052
1812
|
},
|
|
2053
|
-
{
|
|
2054
|
-
"path": "core.io.import.cadJson",
|
|
2055
|
-
"namespace": "core.io.import",
|
|
2056
|
-
"summary": "Sketch a CAD underlay from **already-parsed CAD JSON** — synchronous, with no server round-trip. Use this when you hold parsed CAD data (e.g. produced by your own converter); use {@link PluginCoreIoImportApi.dwg} for raw `.dwg` files.",
|
|
2057
|
-
"examplePrompts": [
|
|
2058
|
-
"Sketch this parsed CAD JSON onto the active storey",
|
|
2059
|
-
"Draw these CAD curves as an underlay on storey 2",
|
|
2060
|
-
"Create a CAD sketch from this geometry data",
|
|
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```"
|
|
2062
|
-
],
|
|
2063
|
-
"argsType": "CadJsonInput",
|
|
2064
|
-
"resultType": "UnderlayHandle"
|
|
2065
|
-
},
|
|
2066
|
-
{
|
|
2067
|
-
"path": "core.io.import.dwg",
|
|
2068
|
-
"namespace": "core.io.import",
|
|
2069
|
-
"summary": "Import a **DWG** CAD drawing as a scene underlay. `.dwg` only (no DXF).",
|
|
2070
|
-
"examplePrompts": [
|
|
2071
|
-
"Import this DWG floor plan onto storey 1",
|
|
2072
|
-
"Bring in a CAD drawing as an underlay and tell me when it's ready",
|
|
2073
|
-
"Start importing this CAD file onto the ground floor\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(\"https://example.com/plan.dwg\", 1)\n// Poll until the server-side conversion finishes — always with a timeout\n// (a UI-cancelled import stays \"processing\" forever).\nconst deadline = Date.now() + 5 * 60_000\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n// The DWG lands as a CAD underlay. CAD scaling isn't supported; manage it\n// (list / fade / delete) via core.io.underlay.*.\nconst cad = await snaptrude.core.io.job.getResult(job)\nif (cad) console.log(\"DWG imported as CAD underlay:\", cad)\n```"
|
|
2074
|
-
],
|
|
2075
|
-
"argsType": "string",
|
|
2076
|
-
"resultType": "ImportJobHandle"
|
|
2077
|
-
},
|
|
2078
|
-
{
|
|
2079
|
-
"path": "core.io.import.image",
|
|
2080
|
-
"namespace": "core.io.import",
|
|
2081
|
-
"summary": "Import a raster image as a scene **underlay** — a flat, textured reference plane placed on a storey that you can trace over.",
|
|
2082
|
-
"examplePrompts": [
|
|
2083
|
-
"Import this floor plan image onto the ground floor to trace over",
|
|
2084
|
-
"Drop this survey PNG in as a reference underlay at 30% opacity",
|
|
2085
|
-
"Add a site plan image on storey 2",
|
|
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```"
|
|
2087
|
-
],
|
|
2088
|
-
"argsType": "string",
|
|
2089
|
-
"resultType": "UnderlayHandle"
|
|
2090
|
-
},
|
|
2091
|
-
{
|
|
2092
|
-
"path": "core.io.import.model",
|
|
2093
|
-
"namespace": "core.io.import",
|
|
2094
|
-
"summary": "Import a **3D model** file and place it in the scene as a component.",
|
|
2095
|
-
"examplePrompts": [
|
|
2096
|
-
"Import this SketchUp model onto storey 1",
|
|
2097
|
-
"Bring in this OBJ file and place it at the origin",
|
|
2098
|
-
"Add this 3D model to the ground floor\n\n# Example\n```ts\nconst model = await snaptrude.core.io.import.model(\n\"https://example.com/tree.skp\",\n1, // storey\n\"skp\",\n)\n```"
|
|
2099
|
-
],
|
|
2100
|
-
"argsType": "string",
|
|
2101
|
-
"resultType": "ComponentHandle"
|
|
2102
|
-
},
|
|
2103
|
-
{
|
|
2104
|
-
"path": "core.io.import.pdf",
|
|
2105
|
-
"namespace": "core.io.import",
|
|
2106
|
-
"summary": "Import one page of a PDF as a scene **underlay** (a traceable reference plane).",
|
|
2107
|
-
"examplePrompts": [
|
|
2108
|
-
"Import page 1 of this PDF floor plan onto storey 1",
|
|
2109
|
-
"Bring in the second page of this PDF as an underlay at 1:50",
|
|
2110
|
-
"Add this PDF plan to the ground floor to trace over",
|
|
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```"
|
|
2112
|
-
],
|
|
2113
|
-
"argsType": "string",
|
|
2114
|
-
"resultType": "UnderlayHandle"
|
|
2115
|
-
},
|
|
2116
|
-
{
|
|
2117
|
-
"path": "core.io.import.terrain",
|
|
2118
|
-
"namespace": "core.io.import",
|
|
2119
|
-
"summary": "Import **site terrain** for a location — Mapbox topography (elevation + satellite/streets imagery, optional neighborhood buildings and parcels).",
|
|
2120
|
-
"examplePrompts": [
|
|
2121
|
-
"Import the site terrain for this location, about 500m across",
|
|
2122
|
-
"Load the topography at 40.7128, -74.0060 for a 300 by 300 meter site",
|
|
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"
|
|
2128
|
-
},
|
|
2129
|
-
{
|
|
2130
|
-
"path": "core.io.job.getError",
|
|
2131
|
-
"namespace": "core.io.job",
|
|
2132
|
-
"summary": "The failure message if the job's status is `\"failed\"`; otherwise `null`.",
|
|
2133
|
-
"examplePrompts": [
|
|
2134
|
-
"Why did my DWG import fail?",
|
|
2135
|
-
"What went wrong with the CAD import?",
|
|
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"
|
|
2141
|
-
},
|
|
2142
|
-
{
|
|
2143
|
-
"path": "core.io.job.getResult",
|
|
2144
|
-
"namespace": "core.io.job",
|
|
2145
|
-
"summary": "The imported result once the job is complete — the placed {@linkcode UnderlayHandle}. Returns `null` while the job is still pending/processing or if it failed (check {@link PluginCoreIoJobApi.getError}).",
|
|
2146
|
-
"examplePrompts": [
|
|
2147
|
-
"Get the underlay from my finished DWG import",
|
|
2148
|
-
"Give me the result of the CAD import job",
|
|
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"
|
|
2154
|
-
},
|
|
2155
|
-
{
|
|
2156
|
-
"path": "core.io.job.getStatus",
|
|
2157
|
-
"namespace": "core.io.job",
|
|
2158
|
-
"summary": "Read a job's current status: `\"pending\"` (queued), `\"processing\"` (running), `\"complete\"` (result ready), or `\"failed\"`.",
|
|
2159
|
-
"examplePrompts": [
|
|
2160
|
-
"What's the status of my DWG import?",
|
|
2161
|
-
"Is the CAD import still processing?",
|
|
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"
|
|
2167
|
-
},
|
|
2168
|
-
{
|
|
2169
|
-
"path": "core.io.job.isComplete",
|
|
2170
|
-
"namespace": "core.io.job",
|
|
2171
|
-
"summary": "Whether the job has finished successfully (status is `\"complete\"` and a result is ready). Returns `false` while pending/processing and on failure.",
|
|
2172
|
-
"examplePrompts": [
|
|
2173
|
-
"Is the DWG import done yet?",
|
|
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",
|
|
2179
|
-
"resultType": "boolean"
|
|
2180
|
-
},
|
|
2181
|
-
{
|
|
2182
|
-
"path": "core.io.query.getPdfPageCount",
|
|
2183
|
-
"namespace": "core.io.query",
|
|
2184
|
-
"summary": "Count the pages of a PDF without importing it. `null` if the source can't be read as a PDF.",
|
|
2185
|
-
"examplePrompts": [
|
|
2186
|
-
"How many pages does this PDF have?",
|
|
2187
|
-
"Count the pages in the drawing set before importing",
|
|
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"
|
|
2193
|
-
},
|
|
2194
|
-
{
|
|
2195
|
-
"path": "core.io.query.listCadLayers",
|
|
2196
|
-
"namespace": "core.io.query",
|
|
2197
|
-
"summary": "List the distinct CAD layer names tagged on a parsed CAD JSON's entities. Read-only inspection: imports always bring in **every** layer (there is no layer filter on {@link core.io.import.dwg} / {@link core.io.import.cadJson}) — use the names to decide whether to import at all, or what to tell the user.",
|
|
2198
|
-
"examplePrompts": [
|
|
2199
|
-
"What CAD layers are in this drawing?",
|
|
2200
|
-
"List the layers before importing the CAD",
|
|
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[]"
|
|
2206
|
-
},
|
|
2207
|
-
{
|
|
2208
|
-
"path": "core.io.terrain.delete",
|
|
2209
|
-
"namespace": "core.io.terrain",
|
|
2210
|
-
"summary": "Delete the site terrain. Undoable.",
|
|
2211
|
-
"examplePrompts": [
|
|
2212
|
-
"Delete the site terrain",
|
|
2213
|
-
"Remove the topography",
|
|
2214
|
-
"Clear the imported site",
|
|
2215
|
-
"Get rid of the terrain"
|
|
2216
|
-
],
|
|
2217
|
-
"argsType": null,
|
|
2218
|
-
"resultType": "void"
|
|
2219
|
-
},
|
|
2220
|
-
{
|
|
2221
|
-
"path": "core.io.terrain.disableElevation",
|
|
2222
|
-
"namespace": "core.io.terrain",
|
|
2223
|
-
"summary": "Turn terrain elevation OFF — flatten to a plane. Undoable.",
|
|
2224
|
-
"examplePrompts": [
|
|
2225
|
-
"Flatten the terrain",
|
|
2226
|
-
"Turn off site elevation",
|
|
2227
|
-
"Disable the heightmap",
|
|
2228
|
-
"Make the terrain flat"
|
|
2229
|
-
],
|
|
2230
|
-
"argsType": null,
|
|
2231
|
-
"resultType": "void"
|
|
2232
|
-
},
|
|
2233
|
-
{
|
|
2234
|
-
"path": "core.io.terrain.disableSatellite",
|
|
2235
|
-
"namespace": "core.io.terrain",
|
|
2236
|
-
"summary": "Turn satellite imagery OFF. Undoable.",
|
|
2237
|
-
"examplePrompts": [
|
|
2238
|
-
"Hide the satellite imagery",
|
|
2239
|
-
"Turn off the aerial texture",
|
|
2240
|
-
"Disable satellite on the site",
|
|
2241
|
-
"Remove the satellite drape"
|
|
2242
|
-
],
|
|
2243
|
-
"argsType": null,
|
|
2244
|
-
"resultType": "void"
|
|
2245
|
-
},
|
|
2246
|
-
{
|
|
2247
|
-
"path": "core.io.terrain.enableElevation",
|
|
2248
|
-
"namespace": "core.io.terrain",
|
|
2249
|
-
"summary": "Turn terrain elevation (DEM height) ON — a real 3D topography surface. Undoable.",
|
|
2250
|
-
"examplePrompts": [
|
|
2251
|
-
"Turn on terrain elevation",
|
|
2252
|
-
"Enable the site heightmap",
|
|
2253
|
-
"Make the terrain 3D",
|
|
2254
|
-
"Show the topography relief"
|
|
2255
|
-
],
|
|
2256
|
-
"argsType": null,
|
|
2257
|
-
"resultType": "void"
|
|
2258
|
-
},
|
|
2259
|
-
{
|
|
2260
|
-
"path": "core.io.terrain.enableSatellite",
|
|
2261
|
-
"namespace": "core.io.terrain",
|
|
2262
|
-
"summary": "Turn satellite imagery ON. Undoable.",
|
|
2263
|
-
"examplePrompts": [
|
|
2264
|
-
"Show satellite imagery on the site",
|
|
2265
|
-
"Enable the satellite texture",
|
|
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
1813
|
{
|
|
2479
1814
|
"path": "core.layers.get",
|
|
2480
1815
|
"namespace": "core.layers",
|
|
@@ -4388,21 +3723,6 @@
|
|
|
4388
3723
|
"argsType": "ComponentHandle[]",
|
|
4389
3724
|
"resultType": "PluginDesignChangeResult"
|
|
4390
3725
|
},
|
|
4391
|
-
{
|
|
4392
|
-
"path": "design.selection.setByFilter",
|
|
4393
|
-
"namespace": "design.selection",
|
|
4394
|
-
"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.",
|
|
4395
|
-
"examplePrompts": [
|
|
4396
|
-
"Select everything on storey 2",
|
|
4397
|
-
"Select all the walls and doors",
|
|
4398
|
-
"Story selection: select the ground floor and first floor",
|
|
4399
|
-
"Filter selection: select all furniture in the model",
|
|
4400
|
-
"Select only the furniture on the second storey",
|
|
4401
|
-
"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```"
|
|
4402
|
-
],
|
|
4403
|
-
"argsType": "PluginSelectionFilter",
|
|
4404
|
-
"resultType": "PluginDesignChangeResult"
|
|
4405
|
-
},
|
|
4406
3726
|
{
|
|
4407
3727
|
"path": "design.transform.move",
|
|
4408
3728
|
"namespace": "design.transform",
|
|
@@ -4685,6 +4005,212 @@
|
|
|
4685
4005
|
"argsType": "number",
|
|
4686
4006
|
"resultType": "PluginStoryUpdateResult"
|
|
4687
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
|
+
},
|
|
4688
4214
|
{
|
|
4689
4215
|
"path": "presentation.diagrams.place",
|
|
4690
4216
|
"namespace": "presentation.diagrams",
|
|
@@ -5121,30 +4647,6 @@
|
|
|
5121
4647
|
"argsType": null,
|
|
5122
4648
|
"resultType": "PluginProgramSiteContextResult"
|
|
5123
4649
|
},
|
|
5124
|
-
{
|
|
5125
|
-
"path": "program.site.getLocation",
|
|
5126
|
-
"namespace": "program.site",
|
|
5127
|
-
"summary": "Get the project's geographic location.",
|
|
5128
|
-
"examplePrompts": [
|
|
5129
|
-
"What's the project's latitude and longitude?",
|
|
5130
|
-
"Where is this site located?",
|
|
5131
|
-
"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```"
|
|
5132
|
-
],
|
|
5133
|
-
"argsType": null,
|
|
5134
|
-
"resultType": "PluginProgramSiteLocationResult"
|
|
5135
|
-
},
|
|
5136
|
-
{
|
|
5137
|
-
"path": "program.site.getNorthAngle",
|
|
5138
|
-
"namespace": "program.site",
|
|
5139
|
-
"summary": "Get the site's true-north angle.",
|
|
5140
|
-
"examplePrompts": [
|
|
5141
|
-
"What's the north angle of the site?",
|
|
5142
|
-
"How far is the model rotated from true north?",
|
|
5143
|
-
"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```"
|
|
5144
|
-
],
|
|
5145
|
-
"argsType": null,
|
|
5146
|
-
"resultType": "PluginProgramSiteNorthAngleResult"
|
|
5147
|
-
},
|
|
5148
4650
|
{
|
|
5149
4651
|
"path": "program.site.listGeoPolygons",
|
|
5150
4652
|
"namespace": "program.site",
|