@snaptrude/plugin-core 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +73 -0
- package/api-manifest.full.json +2644 -542
- package/api-manifest.json +2606 -424
- package/dist/api/analysis/heatmaps.d.ts +234 -0
- package/dist/api/analysis/heatmaps.d.ts.map +1 -0
- package/dist/api/analysis/illuminance.d.ts +145 -0
- package/dist/api/analysis/illuminance.d.ts.map +1 -0
- package/dist/api/analysis/index.d.ts +44 -0
- package/dist/api/analysis/index.d.ts.map +1 -0
- package/dist/api/analysis/shadows.d.ts +165 -0
- package/dist/api/analysis/shadows.d.ts.map +1 -0
- package/dist/api/analysis/sunlightHours.d.ts +208 -0
- package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
- package/dist/api/analysis/sunpath.d.ts +80 -0
- package/dist/api/analysis/sunpath.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +10 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +392 -0
- package/dist/api/core/io/import/index.d.ts.map +1 -0
- package/dist/api/core/io/index.d.ts +35 -0
- package/dist/api/core/io/index.d.ts.map +1 -0
- package/dist/api/core/io/job/index.d.ts +139 -0
- package/dist/api/core/io/job/index.d.ts.map +1 -0
- package/dist/api/core/io/query/index.d.ts +74 -0
- package/dist/api/core/io/query/index.d.ts.map +1 -0
- package/dist/api/core/io/terrain/index.d.ts +206 -0
- package/dist/api/core/io/terrain/index.d.ts.map +1 -0
- package/dist/api/core/io/underlay/index.d.ts +286 -0
- package/dist/api/core/io/underlay/index.d.ts.map +1 -0
- package/dist/api/core/layers.d.ts +7 -7
- 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 +218 -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/query/spaces.d.ts +3 -3
- package/dist/api/design/selection/index.d.ts +144 -0
- package/dist/api/design/selection/index.d.ts.map +1 -1
- 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/space.d.ts +2 -2
- package/dist/api/entity/story.d.ts +101 -7
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/import.d.ts +49 -4
- package/dist/api/presentation/import.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/api/program/site.d.ts +84 -0
- package/dist/api/program/site.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/handles.d.ts +33 -0
- package/dist/handles.d.ts.map +1 -1
- package/dist/host-utils.d.ts +4 -0
- package/dist/host-utils.d.ts.map +1 -1
- package/dist/index.cjs +1942 -998
- 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 +1810 -994
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/scripts/generate-manifest.test.mjs +103 -4
- package/src/api/analysis/heatmaps.ts +256 -0
- package/src/api/analysis/illuminance.ts +155 -0
- package/src/api/analysis/index.ts +46 -0
- package/src/api/analysis/shadows.ts +183 -0
- package/src/api/analysis/sunlightHours.ts +211 -0
- package/src/api/analysis/sunpath.ts +83 -0
- package/src/api/core/index.ts +10 -0
- package/src/api/core/io/import/index.ts +432 -0
- package/src/api/core/io/index.ts +37 -0
- package/src/api/core/io/job/index.ts +140 -0
- package/src/api/core/io/query/index.ts +71 -0
- package/src/api/core/io/terrain/index.ts +214 -0
- package/src/api/core/io/underlay/index.ts +295 -0
- package/src/api/core/proposals/index.ts +509 -0
- package/src/api/design/create/index.ts +258 -0
- package/src/api/design/doors/index.ts +168 -0
- package/src/api/design/erase/index.ts +1 -1
- 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/selection/index.ts +129 -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/index.ts +5 -0
- package/src/api/presentation/import.ts +45 -4
- 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/api/program/site.ts +93 -0
- 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/handles.ts +46 -0
- package/src/host-utils.ts +4 -0
- package/src/index.ts +1 -0
- package/test/errors.test.mjs +184 -0
package/api-manifest.json
CHANGED
|
@@ -1,4 +1,244 @@
|
|
|
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
|
+
},
|
|
2
242
|
{
|
|
3
243
|
"path": "core.buildings.copy",
|
|
4
244
|
"namespace": "core.buildings",
|
|
@@ -110,32 +350,52 @@
|
|
|
110
350
|
{
|
|
111
351
|
"path": "core.comment.create",
|
|
112
352
|
"namespace": "core.comment",
|
|
113
|
-
"summary": "Create a comment
|
|
114
|
-
"examplePrompts": [
|
|
353
|
+
"summary": "Create a comment in the project — optionally pinned to a component at a 3D point — with optional",
|
|
354
|
+
"examplePrompts": [
|
|
355
|
+
"Add a comment on this wall saying the height looks wrong",
|
|
356
|
+
"Leave a note on the selected room for the design team",
|
|
357
|
+
"Comment \"verify the door swing\" and tag alex@acme.com",
|
|
358
|
+
"Pin a review note at this point on the slab\n\n# Example\n```ts\nconst c = await snaptrude.core.comment.create(\n\"Check this wall 🎉\",\nspaceId,\nundefined,\n[\"alex@acme.com\"],\n)\n```"
|
|
359
|
+
],
|
|
115
360
|
"argsType": "string",
|
|
116
361
|
"resultType": "CommentHandle"
|
|
117
362
|
},
|
|
118
363
|
{
|
|
119
364
|
"path": "core.comment.delete",
|
|
120
365
|
"namespace": "core.comment",
|
|
121
|
-
"summary": "
|
|
122
|
-
"examplePrompts": [
|
|
366
|
+
"summary": "Permanently remove a comment from the project.",
|
|
367
|
+
"examplePrompts": [
|
|
368
|
+
"Delete this comment",
|
|
369
|
+
"Remove the note about the old layout",
|
|
370
|
+
"Get rid of my last comment",
|
|
371
|
+
"Clear that resolved comment off the wall\n\n# Example\n```ts\nconst [comment] = await snaptrude.core.comment.list()\nawait snaptrude.core.comment.delete(comment)\n```"
|
|
372
|
+
],
|
|
123
373
|
"argsType": "CommentHandle",
|
|
124
374
|
"resultType": "boolean"
|
|
125
375
|
},
|
|
126
376
|
{
|
|
127
377
|
"path": "core.comment.isResolved",
|
|
128
378
|
"namespace": "core.comment",
|
|
129
|
-
"summary": "
|
|
130
|
-
"examplePrompts": [
|
|
379
|
+
"summary": "Check whether a comment has been marked resolved.",
|
|
380
|
+
"examplePrompts": [
|
|
381
|
+
"Is this comment resolved yet?",
|
|
382
|
+
"Check if the note about the roof has been closed",
|
|
383
|
+
"Has my comment been resolved?",
|
|
384
|
+
"Tell me whether that comment is still open\n\n# Example\n```ts\nconst [comment] = await snaptrude.core.comment.list()\nconst resolved = await snaptrude.core.comment.isResolved(comment)\nconsole.log(resolved ? \"resolved\" : \"still open\")\n```"
|
|
385
|
+
],
|
|
131
386
|
"argsType": "CommentHandle",
|
|
132
387
|
"resultType": "boolean"
|
|
133
388
|
},
|
|
134
389
|
{
|
|
135
390
|
"path": "core.comment.list",
|
|
136
391
|
"namespace": "core.comment",
|
|
137
|
-
"summary": "List
|
|
138
|
-
"examplePrompts": [
|
|
392
|
+
"summary": "List every comment in the project (deleted ones are excluded), returned as comment handles you can pass to the other comment methods.",
|
|
393
|
+
"examplePrompts": [
|
|
394
|
+
"List all the comments in this project",
|
|
395
|
+
"How many comments are on this model?",
|
|
396
|
+
"Show every note in the file",
|
|
397
|
+
"Get all comments so I can check which are resolved\n\n# Example\n```ts\nconst comments = await snaptrude.core.comment.list()\nconsole.log(`${comments.length} comments in the project`)\n```"
|
|
398
|
+
],
|
|
139
399
|
"argsType": null,
|
|
140
400
|
"resultType": "CommentHandle[]"
|
|
141
401
|
},
|
|
@@ -143,7 +403,12 @@
|
|
|
143
403
|
"path": "core.comment.reopen",
|
|
144
404
|
"namespace": "core.comment",
|
|
145
405
|
"summary": "Reopen a resolved comment. Paired with {@link PluginCommentApi.resolve}.",
|
|
146
|
-
"examplePrompts": [
|
|
406
|
+
"examplePrompts": [
|
|
407
|
+
"Reopen this resolved comment",
|
|
408
|
+
"Mark the comment as unresolved again",
|
|
409
|
+
"Bring back the closed note about the window heights",
|
|
410
|
+
"Un-resolve that comment so we can keep discussing it\n\n# Example\n```ts\nconst [comment] = await snaptrude.core.comment.list()\nawait snaptrude.core.comment.reopen(comment)\n```"
|
|
411
|
+
],
|
|
147
412
|
"argsType": "CommentHandle",
|
|
148
413
|
"resultType": "boolean"
|
|
149
414
|
},
|
|
@@ -151,7 +416,12 @@
|
|
|
151
416
|
"path": "core.comment.resolve",
|
|
152
417
|
"namespace": "core.comment",
|
|
153
418
|
"summary": "Mark a comment resolved. Paired with {@link PluginCommentApi.reopen}.",
|
|
154
|
-
"examplePrompts": [
|
|
419
|
+
"examplePrompts": [
|
|
420
|
+
"Mark this comment as resolved",
|
|
421
|
+
"Resolve the comment about the staircase",
|
|
422
|
+
"Close out this review note",
|
|
423
|
+
"Set that comment to done\n\n# Example\n```ts\nconst c = await snaptrude.core.comment.create(\"Verify the door swing\")\nawait snaptrude.core.comment.resolve(c)\n```"
|
|
424
|
+
],
|
|
155
425
|
"argsType": "CommentHandle",
|
|
156
426
|
"resultType": "boolean"
|
|
157
427
|
},
|
|
@@ -159,7 +429,12 @@
|
|
|
159
429
|
"path": "core.comment.tag",
|
|
160
430
|
"namespace": "core.comment",
|
|
161
431
|
"summary": "Tag (mention) a user on an existing comment, by email.",
|
|
162
|
-
"examplePrompts": [
|
|
432
|
+
"examplePrompts": [
|
|
433
|
+
"Tag alex@acme.com on this comment",
|
|
434
|
+
"Mention the structural engineer in that note",
|
|
435
|
+
"Add priya@studio.com to the comment about the lobby",
|
|
436
|
+
"Notify a teammate about an existing comment\n\n# Example\n```ts\nconst [comment] = await snaptrude.core.comment.list()\nawait snaptrude.core.comment.tag(comment, \"alex@acme.com\")\n```"
|
|
437
|
+
],
|
|
163
438
|
"argsType": "CommentHandle",
|
|
164
439
|
"resultType": "boolean"
|
|
165
440
|
},
|
|
@@ -167,7 +442,12 @@
|
|
|
167
442
|
"path": "core.comment.update",
|
|
168
443
|
"namespace": "core.comment",
|
|
169
444
|
"summary": "Edit a comment's message (and optional",
|
|
170
|
-
"examplePrompts": [
|
|
445
|
+
"examplePrompts": [
|
|
446
|
+
"Edit my comment to say the beam depth is 600mm",
|
|
447
|
+
"Change the text of this comment",
|
|
448
|
+
"Update the note on the wall and mention priya@studio.com",
|
|
449
|
+
"Reword the comment I just added\n\n# Example\n```ts\nconst c = await snaptrude.core.comment.create(\"Beam depth TBD\")\nawait snaptrude.core.comment.update(c, \"Beam depth is 600mm\", [\"priya@studio.com\"])\n```"
|
|
450
|
+
],
|
|
171
451
|
"argsType": "CommentHandle",
|
|
172
452
|
"resultType": "boolean"
|
|
173
453
|
},
|
|
@@ -175,7 +455,10 @@
|
|
|
175
455
|
"path": "core.geom.create.arc",
|
|
176
456
|
"namespace": "core.geom.create",
|
|
177
457
|
"summary": "Create a circular arc from its start, end, centre, and axis point handles. Host API call — returns a handle.",
|
|
178
|
-
"examplePrompts": [
|
|
458
|
+
"examplePrompts": [
|
|
459
|
+
"Draw an arc between these two points around a centre",
|
|
460
|
+
"Add a curved segment from A to B"
|
|
461
|
+
],
|
|
179
462
|
"argsType": "Vec3Handle",
|
|
180
463
|
"resultType": "ArcHandle"
|
|
181
464
|
},
|
|
@@ -183,7 +466,10 @@
|
|
|
183
466
|
"path": "core.geom.create.circle",
|
|
184
467
|
"namespace": "core.geom.create",
|
|
185
468
|
"summary": "Create a circle from a centre point, an axis (plane normal), and a radius. Host API call — returns a handle. A circle is a closed curve; read it back via `snaptrude.core.geom.query.circle.*`.",
|
|
186
|
-
"examplePrompts": [
|
|
469
|
+
"examplePrompts": [
|
|
470
|
+
"Make a circle of radius 2 at this point",
|
|
471
|
+
"Draw a circular outline 5m across"
|
|
472
|
+
],
|
|
187
473
|
"argsType": "Vec3Handle",
|
|
188
474
|
"resultType": "CircleHandle"
|
|
189
475
|
},
|
|
@@ -199,7 +485,10 @@
|
|
|
199
485
|
"path": "core.geom.create.contourFromProfiles",
|
|
200
486
|
"namespace": "core.geom.create",
|
|
201
487
|
"summary": "Create a contour from an outer profile plus zero or more inner profiles (holes). Host API call — returns a handle.",
|
|
202
|
-
"examplePrompts": [
|
|
488
|
+
"examplePrompts": [
|
|
489
|
+
"Make a shape with a hole in the middle",
|
|
490
|
+
"Cut a courtyard opening out of this floor outline"
|
|
491
|
+
],
|
|
203
492
|
"argsType": "ProfileHandle",
|
|
204
493
|
"resultType": "ContourHandle"
|
|
205
494
|
},
|
|
@@ -207,7 +496,10 @@
|
|
|
207
496
|
"path": "core.geom.create.line",
|
|
208
497
|
"namespace": "core.geom.create",
|
|
209
498
|
"summary": "Create a straight line segment between two point handles. Host API call — returns a handle.",
|
|
210
|
-
"examplePrompts": [
|
|
499
|
+
"examplePrompts": [
|
|
500
|
+
"Draw a line from point A to point B",
|
|
501
|
+
"Draw a straight edge between these two points"
|
|
502
|
+
],
|
|
211
503
|
"argsType": "Vec3Handle",
|
|
212
504
|
"resultType": "LineHandle"
|
|
213
505
|
},
|
|
@@ -215,7 +507,9 @@
|
|
|
215
507
|
"path": "core.geom.create.profileFromCurves",
|
|
216
508
|
"namespace": "core.geom.create",
|
|
217
509
|
"summary": "Create a profile from an ordered list of curve handles forming a closed loop. Host API call — returns a handle.",
|
|
218
|
-
"examplePrompts": [
|
|
510
|
+
"examplePrompts": [
|
|
511
|
+
"Join these lines and arcs into one closed shape"
|
|
512
|
+
],
|
|
219
513
|
"argsType": "CurveHandle[]",
|
|
220
514
|
"resultType": "ProfileHandle"
|
|
221
515
|
},
|
|
@@ -223,7 +517,10 @@
|
|
|
223
517
|
"path": "core.geom.create.profileFromLinePoints",
|
|
224
518
|
"namespace": "core.geom.create",
|
|
225
519
|
"summary": "Create a closed profile from an ordered list of point handles connected by line segments (last auto-connected to first). Host API call — returns a handle.",
|
|
226
|
-
"examplePrompts": [
|
|
520
|
+
"examplePrompts": [
|
|
521
|
+
"Draw a closed polygon through these corner points",
|
|
522
|
+
"Create an L-shaped outline from a list of points"
|
|
523
|
+
],
|
|
227
524
|
"argsType": "Vec3Handle[]",
|
|
228
525
|
"resultType": "ProfileHandle"
|
|
229
526
|
},
|
|
@@ -231,7 +528,10 @@
|
|
|
231
528
|
"path": "core.geom.create.profileRect",
|
|
232
529
|
"namespace": "core.geom.create",
|
|
233
530
|
"summary": "Create an axis-aligned **rectangle** profile (XZ plane) of `width` × `depth`, centred at `center` (defaults to the origin). Host API call — returns a handle.",
|
|
234
|
-
"examplePrompts": [
|
|
531
|
+
"examplePrompts": [
|
|
532
|
+
"Draw a 4m by 3m rectangle",
|
|
533
|
+
"Make a rectangular outline for a room footprint"
|
|
534
|
+
],
|
|
235
535
|
"argsType": "number",
|
|
236
536
|
"resultType": "ProfileHandle"
|
|
237
537
|
},
|
|
@@ -263,7 +563,10 @@
|
|
|
263
563
|
"path": "core.geom.query.arc.getCentre",
|
|
264
564
|
"namespace": "core.geom.query.arc",
|
|
265
565
|
"summary": "Read the centre point of an arc.",
|
|
266
|
-
"examplePrompts": [
|
|
566
|
+
"examplePrompts": [
|
|
567
|
+
"Where is the centre of this arc?",
|
|
568
|
+
"Find the center point of the curved wall\n\n# Example\n```ts\nconst start = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst end = await snaptrude.core.math.vec3.new(0, 0, 5)\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst arc = await snaptrude.core.geom.create.arc(start, end, origin, up)\nconst centre = await snaptrude.core.geom.query.arc.getCentre(arc)\nconsole.log(centre.x, centre.y, centre.z)\n```"
|
|
569
|
+
],
|
|
267
570
|
"argsType": "ArcHandle",
|
|
268
571
|
"resultType": "Vec3Components"
|
|
269
572
|
},
|
|
@@ -271,7 +574,10 @@
|
|
|
271
574
|
"path": "core.geom.query.arc.getRadius",
|
|
272
575
|
"namespace": "core.geom.query.arc",
|
|
273
576
|
"summary": "Read the radius of an arc.",
|
|
274
|
-
"examplePrompts": [
|
|
577
|
+
"examplePrompts": [
|
|
578
|
+
"What is the radius of this curved wall segment?",
|
|
579
|
+
"Measure the radius of the selected arc\n\n# Example\n```ts\nconst start = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst end = await snaptrude.core.math.vec3.new(0, 0, 5)\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst arc = await snaptrude.core.geom.create.arc(start, end, origin, up)\nconst radius = await snaptrude.core.geom.query.arc.getRadius(arc)\n```"
|
|
580
|
+
],
|
|
275
581
|
"argsType": "ArcHandle",
|
|
276
582
|
"resultType": "number"
|
|
277
583
|
},
|
|
@@ -279,7 +585,10 @@
|
|
|
279
585
|
"path": "core.geom.query.arc.getSweepAngle",
|
|
280
586
|
"namespace": "core.geom.query.arc",
|
|
281
587
|
"summary": "Read the sweep angle of an arc (the angle subtended at its centre).",
|
|
282
|
-
"examplePrompts": [
|
|
588
|
+
"examplePrompts": [
|
|
589
|
+
"What angle does this arc sweep through?",
|
|
590
|
+
"How many degrees does this curved wall turn?\n\n# Example\n```ts\nconst start = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst end = await snaptrude.core.math.vec3.new(0, 0, 5)\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst arc = await snaptrude.core.geom.create.arc(start, end, origin, up)\nconst sweep = await snaptrude.core.geom.query.arc.getSweepAngle(arc)\nconsole.log(\"degrees:\", (sweep * 180) / Math.PI)\n```"
|
|
591
|
+
],
|
|
283
592
|
"argsType": "ArcHandle",
|
|
284
593
|
"resultType": "number"
|
|
285
594
|
},
|
|
@@ -295,7 +604,10 @@
|
|
|
295
604
|
"path": "core.geom.query.brep.getBoundingBox",
|
|
296
605
|
"namespace": "core.geom.query.brep",
|
|
297
606
|
"summary": "Get the axis-aligned bounding box of a brep.",
|
|
298
|
-
"examplePrompts": [
|
|
607
|
+
"examplePrompts": [
|
|
608
|
+
"What is the bounding box of this shape?",
|
|
609
|
+
"How big is this object overall — give me its min and max extents\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst { min, max } = await snaptrude.core.geom.query.brep.getBoundingBox(brep)\nconsole.log(\"size:\", max.x - min.x, max.y - min.y, max.z - min.z)\n}\n```"
|
|
610
|
+
],
|
|
299
611
|
"argsType": "BrepHandle",
|
|
300
612
|
"resultType": "BBoxComponents"
|
|
301
613
|
},
|
|
@@ -303,7 +615,10 @@
|
|
|
303
615
|
"path": "core.geom.query.brep.getCentroid",
|
|
304
616
|
"namespace": "core.geom.query.brep",
|
|
305
617
|
"summary": "Get the centroid (mean of all vertex positions) of a brep.",
|
|
306
|
-
"examplePrompts": [
|
|
618
|
+
"examplePrompts": [
|
|
619
|
+
"Find the centre point of this shape",
|
|
620
|
+
"What is the centroid of the selected object?\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst centroid = await snaptrude.core.geom.query.brep.getCentroid(brep)\nconsole.log(centroid.x, centroid.y, centroid.z)\n}\n```"
|
|
621
|
+
],
|
|
307
622
|
"argsType": "BrepHandle",
|
|
308
623
|
"resultType": "Vec3Components"
|
|
309
624
|
},
|
|
@@ -367,7 +682,10 @@
|
|
|
367
682
|
"path": "core.geom.query.brep.isEqual",
|
|
368
683
|
"namespace": "core.geom.query.brep",
|
|
369
684
|
"summary": "Test whether two breps are geometrically equal.",
|
|
370
|
-
"examplePrompts": [
|
|
685
|
+
"examplePrompts": [
|
|
686
|
+
"Are these two shapes geometrically identical?",
|
|
687
|
+
"Check whether these two objects have the same geometry\n\n# Example\n```ts\nconst [a, b] = await snaptrude.design.query.listMasses()\nconst brepA = await snaptrude.design.query.geometry.getBrep(a)\nconst brepB = await snaptrude.design.query.geometry.getBrep(b)\nif (brepA && brepB) {\nconst same = await snaptrude.core.geom.query.brep.isEqual(brepA, brepB)\n}\n```"
|
|
688
|
+
],
|
|
371
689
|
"argsType": "BrepHandle",
|
|
372
690
|
"resultType": "boolean"
|
|
373
691
|
},
|
|
@@ -407,7 +725,10 @@
|
|
|
407
725
|
"path": "core.geom.query.brep.listVertexPositions",
|
|
408
726
|
"namespace": "core.geom.query.brep",
|
|
409
727
|
"summary": "List the positions of all vertices in a brep (ordered as {@linkcode PluginGeomQueryBrepApi.listVertices}).",
|
|
410
|
-
"examplePrompts": [
|
|
728
|
+
"examplePrompts": [
|
|
729
|
+
"Get the coordinates of every corner of this shape",
|
|
730
|
+
"Give me all the corner points of the selected mass as XYZ coordinates\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst positions = await snaptrude.core.geom.query.brep.listVertexPositions(brep)\nfor (const p of positions) console.log(p.x, p.y, p.z)\n}\n```"
|
|
731
|
+
],
|
|
411
732
|
"argsType": "BrepHandle",
|
|
412
733
|
"resultType": "Vec3Components[]"
|
|
413
734
|
},
|
|
@@ -431,7 +752,10 @@
|
|
|
431
752
|
"path": "core.geom.query.circle.getCentre",
|
|
432
753
|
"namespace": "core.geom.query.circle",
|
|
433
754
|
"summary": "Read the centre point of a circle.",
|
|
434
|
-
"examplePrompts": [
|
|
755
|
+
"examplePrompts": [
|
|
756
|
+
"Where is the centre of this circle?",
|
|
757
|
+
"Find the center point of the circular courtyard outline\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst centre = await snaptrude.core.geom.query.circle.getCentre(circle)\nconsole.log(centre.x, centre.y, centre.z)\n```"
|
|
758
|
+
],
|
|
435
759
|
"argsType": "CircleHandle",
|
|
436
760
|
"resultType": "Vec3Components"
|
|
437
761
|
},
|
|
@@ -439,7 +763,10 @@
|
|
|
439
763
|
"path": "core.geom.query.circle.getLength",
|
|
440
764
|
"namespace": "core.geom.query.circle",
|
|
441
765
|
"summary": "Read the length (circumference, `2πr`) of a circle.",
|
|
442
|
-
"examplePrompts": [
|
|
766
|
+
"examplePrompts": [
|
|
767
|
+
"What is the circumference of this circle?",
|
|
768
|
+
"How long is the circular path around the courtyard?\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst circumference = await snaptrude.core.geom.query.circle.getLength(circle)\n```"
|
|
769
|
+
],
|
|
443
770
|
"argsType": "CircleHandle",
|
|
444
771
|
"resultType": "number"
|
|
445
772
|
},
|
|
@@ -447,7 +774,9 @@
|
|
|
447
774
|
"path": "core.geom.query.circle.getNearestPoint",
|
|
448
775
|
"namespace": "core.geom.query.circle",
|
|
449
776
|
"summary": "Get the point on a circle nearest to an arbitrary point.",
|
|
450
|
-
"examplePrompts": [
|
|
777
|
+
"examplePrompts": [
|
|
778
|
+
"Find the point on the circle closest to this column\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst target = await snaptrude.core.math.vec3.new(8, 0, 2)\nconst nearest = await snaptrude.core.geom.query.circle.getNearestPoint(circle, target)\nconsole.log(nearest.x, nearest.y, nearest.z)\n```"
|
|
779
|
+
],
|
|
451
780
|
"argsType": "CircleHandle",
|
|
452
781
|
"resultType": "Vec3Components"
|
|
453
782
|
},
|
|
@@ -463,7 +792,9 @@
|
|
|
463
792
|
"path": "core.geom.query.circle.getPointAtDistance",
|
|
464
793
|
"namespace": "core.geom.query.circle",
|
|
465
794
|
"summary": "Get the point reached by travelling a signed arc-distance along the circle from a reference point that lies on it.",
|
|
466
|
-
"examplePrompts": [
|
|
795
|
+
"examplePrompts": [
|
|
796
|
+
"Mark a point 2 metres along the circle from this point\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst ref = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst ahead = await snaptrude.core.geom.query.circle.getPointAtDistance(circle, ref, 2)\nconst behind = await snaptrude.core.geom.query.circle.getPointAtDistance(circle, ref, 2, false)\n```"
|
|
797
|
+
],
|
|
467
798
|
"argsType": "CircleHandle",
|
|
468
799
|
"resultType": "Vec3Components"
|
|
469
800
|
},
|
|
@@ -471,7 +802,10 @@
|
|
|
471
802
|
"path": "core.geom.query.circle.getRadius",
|
|
472
803
|
"namespace": "core.geom.query.circle",
|
|
473
804
|
"summary": "Read the radius of a circle.",
|
|
474
|
-
"examplePrompts": [
|
|
805
|
+
"examplePrompts": [
|
|
806
|
+
"What is the radius of this circle?",
|
|
807
|
+
"Measure the radius of the circular column grid\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst radius = await snaptrude.core.geom.query.circle.getRadius(circle)\n```"
|
|
808
|
+
],
|
|
475
809
|
"argsType": "CircleHandle",
|
|
476
810
|
"resultType": "number"
|
|
477
811
|
},
|
|
@@ -487,7 +821,9 @@
|
|
|
487
821
|
"path": "core.geom.query.circle.hasPoint",
|
|
488
822
|
"namespace": "core.geom.query.circle",
|
|
489
823
|
"summary": "Test whether a point lies on a circle.",
|
|
490
|
-
"examplePrompts": [
|
|
824
|
+
"examplePrompts": [
|
|
825
|
+
"Check whether this point sits on the circle\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst pt = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst onCircle = await snaptrude.core.geom.query.circle.hasPoint(circle, pt)\n```"
|
|
826
|
+
],
|
|
491
827
|
"argsType": "CircleHandle",
|
|
492
828
|
"resultType": "boolean"
|
|
493
829
|
},
|
|
@@ -511,7 +847,10 @@
|
|
|
511
847
|
"path": "core.geom.query.circle.listPoints",
|
|
512
848
|
"namespace": "core.geom.query.circle",
|
|
513
849
|
"summary": "Sample a circle into an ordered list of points.",
|
|
514
|
-
"examplePrompts": [
|
|
850
|
+
"examplePrompts": [
|
|
851
|
+
"Divide this circle into 12 equal points",
|
|
852
|
+
"Get evenly spaced points around the circle to place columns\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst points = await snaptrude.core.geom.query.circle.listPoints(circle, 12)\nfor (const p of points) console.log(p.x, p.y, p.z)\n```"
|
|
853
|
+
],
|
|
515
854
|
"argsType": "CircleHandle",
|
|
516
855
|
"resultType": "Vec3Components[]"
|
|
517
856
|
},
|
|
@@ -519,7 +858,10 @@
|
|
|
519
858
|
"path": "core.geom.query.contour.getArea",
|
|
520
859
|
"namespace": "core.geom.query.contour",
|
|
521
860
|
"summary": "Get the (approximate) net enclosed area of a contour — the outer profile area minus the area of every hole.",
|
|
522
|
-
"examplePrompts": [
|
|
861
|
+
"examplePrompts": [
|
|
862
|
+
"What is the area of this shape?",
|
|
863
|
+
"Calculate the usable area of this outline after subtracting its holes\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(6, 4)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 1)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst area = await snaptrude.core.geom.query.contour.getArea(contour) // 24 - 2 = 22\n```"
|
|
864
|
+
],
|
|
523
865
|
"argsType": "ContourHandle",
|
|
524
866
|
"resultType": "number"
|
|
525
867
|
},
|
|
@@ -527,7 +869,9 @@
|
|
|
527
869
|
"path": "core.geom.query.contour.getBoundingBox",
|
|
528
870
|
"namespace": "core.geom.query.contour",
|
|
529
871
|
"summary": "Get the axis-aligned bounding box of a contour.",
|
|
530
|
-
"examplePrompts": [
|
|
872
|
+
"examplePrompts": [
|
|
873
|
+
"What are the overall extents of this shape?\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst { min, max } = await snaptrude.core.geom.query.contour.getBoundingBox(contour)\nconsole.log(max.x - min.x, max.z - min.z) // 4 3\n```"
|
|
874
|
+
],
|
|
531
875
|
"argsType": "ContourHandle",
|
|
532
876
|
"resultType": "BBoxComponents"
|
|
533
877
|
},
|
|
@@ -535,7 +879,10 @@
|
|
|
535
879
|
"path": "core.geom.query.contour.getHoleCount",
|
|
536
880
|
"namespace": "core.geom.query.contour",
|
|
537
881
|
"summary": "Get the number of inner profiles (holes) in a contour.",
|
|
538
|
-
"examplePrompts": [
|
|
882
|
+
"examplePrompts": [
|
|
883
|
+
"How many holes does this shape have?",
|
|
884
|
+
"Count the openings in this slab outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(6, 4)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 1)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst count = await snaptrude.core.geom.query.contour.getHoleCount(contour) // 1\n```"
|
|
885
|
+
],
|
|
539
886
|
"argsType": "ContourHandle",
|
|
540
887
|
"resultType": "number"
|
|
541
888
|
},
|
|
@@ -543,7 +890,9 @@
|
|
|
543
890
|
"path": "core.geom.query.contour.getNearestPoint",
|
|
544
891
|
"namespace": "core.geom.query.contour",
|
|
545
892
|
"summary": "Get the point on a contour nearest to an arbitrary point.",
|
|
546
|
-
"examplePrompts": [
|
|
893
|
+
"examplePrompts": [
|
|
894
|
+
"Find the point on this boundary closest to a given location\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst point = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst nearest = await snaptrude.core.geom.query.contour.getNearestPoint(contour, point)\nconsole.log(nearest.x, nearest.y, nearest.z) // 2 0 0\n```"
|
|
895
|
+
],
|
|
547
896
|
"argsType": "ContourHandle",
|
|
548
897
|
"resultType": "Vec3Components"
|
|
549
898
|
},
|
|
@@ -567,7 +916,10 @@
|
|
|
567
916
|
"path": "core.geom.query.contour.getPerimeter",
|
|
568
917
|
"namespace": "core.geom.query.contour",
|
|
569
918
|
"summary": "Get the perimeter (total length of every curve) of a contour, including holes.",
|
|
570
|
-
"examplePrompts": [
|
|
919
|
+
"examplePrompts": [
|
|
920
|
+
"What is the perimeter of this shape?",
|
|
921
|
+
"How long is the boundary of this outline, including its holes?\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst perimeter = await snaptrude.core.geom.query.contour.getPerimeter(contour) // 14\n```"
|
|
922
|
+
],
|
|
571
923
|
"argsType": "ContourHandle",
|
|
572
924
|
"resultType": "number"
|
|
573
925
|
},
|
|
@@ -575,7 +927,10 @@
|
|
|
575
927
|
"path": "core.geom.query.contour.hasPoint",
|
|
576
928
|
"namespace": "core.geom.query.contour",
|
|
577
929
|
"summary": "Test whether a point lies inside a contour (inside the outer profile and outside every hole).",
|
|
578
|
-
"examplePrompts": [
|
|
930
|
+
"examplePrompts": [
|
|
931
|
+
"Is this point inside the shape?",
|
|
932
|
+
"Check whether a location falls within this boundary but not in a hole\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(6, 4)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 1)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst point = await snaptrude.core.math.vec3.new(2.5, 0, 1.5)\nconst inside = await snaptrude.core.geom.query.contour.hasPoint(contour, point) // true — outside the hole\n```"
|
|
933
|
+
],
|
|
579
934
|
"argsType": "ContourHandle",
|
|
580
935
|
"resultType": "boolean"
|
|
581
936
|
},
|
|
@@ -647,7 +1002,9 @@
|
|
|
647
1002
|
"path": "core.geom.query.curve.getChordLength",
|
|
648
1003
|
"namespace": "core.geom.query.curve",
|
|
649
1004
|
"summary": "Get the straight-line chord length between a curve's endpoints.",
|
|
650
|
-
"examplePrompts": [
|
|
1005
|
+
"examplePrompts": [
|
|
1006
|
+
"What is the straight-line distance between the two ends of this arc?\n\n# Example\n```ts\nconst start = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst end = await snaptrude.core.math.vec3.new(-5, 0, 0)\nconst centre = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst axis = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst arc = await snaptrude.core.geom.create.arc(start, end, centre, axis)\nconst chord = await snaptrude.core.geom.query.curve.getChordLength(arc) // 10 (getLength gives the arc length)\n```"
|
|
1007
|
+
],
|
|
651
1008
|
"argsType": "CurveHandle",
|
|
652
1009
|
"resultType": "number"
|
|
653
1010
|
},
|
|
@@ -655,7 +1012,9 @@
|
|
|
655
1012
|
"path": "core.geom.query.curve.getCommonPart",
|
|
656
1013
|
"namespace": "core.geom.query.curve",
|
|
657
1014
|
"summary": "Get the common (overlapping) part of two curves.",
|
|
658
|
-
"examplePrompts": [
|
|
1015
|
+
"examplePrompts": [
|
|
1016
|
+
"Get the shared segment where these two edges overlap\n\n# Example\n```ts\nconst p0 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst p5 = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst p10 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst p15 = await snaptrude.core.math.vec3.new(15, 0, 0)\nconst lineA = await snaptrude.core.geom.create.line(p0, p10)\nconst lineB = await snaptrude.core.geom.create.line(p5, p15)\nconst common = await snaptrude.core.geom.query.curve.getCommonPart(lineA, lineB)\nif (common) {\nconst length = await snaptrude.core.geom.query.curve.getLength(common) // 5\n}\n```"
|
|
1017
|
+
],
|
|
659
1018
|
"argsType": "CurveHandle",
|
|
660
1019
|
"resultType": "CurveHandle | null"
|
|
661
1020
|
},
|
|
@@ -671,7 +1030,9 @@
|
|
|
671
1030
|
"path": "core.geom.query.curve.getDistanceAlong",
|
|
672
1031
|
"namespace": "core.geom.query.curve",
|
|
673
1032
|
"summary": "Get the arc-length distance along a curve between two points on it.",
|
|
674
|
-
"examplePrompts": [
|
|
1033
|
+
"examplePrompts": [
|
|
1034
|
+
"How far apart are these two points measured along the curved wall?\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst mid = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst d = await snaptrude.core.geom.query.curve.getDistanceAlong(line, a, mid) // 5\n```"
|
|
1035
|
+
],
|
|
675
1036
|
"argsType": "CurveHandle",
|
|
676
1037
|
"resultType": "number"
|
|
677
1038
|
},
|
|
@@ -679,7 +1040,10 @@
|
|
|
679
1040
|
"path": "core.geom.query.curve.getDistanceBetween",
|
|
680
1041
|
"namespace": "core.geom.query.curve",
|
|
681
1042
|
"summary": "Get the perpendicular distance between two parallel lines.",
|
|
682
|
-
"examplePrompts": [
|
|
1043
|
+
"examplePrompts": [
|
|
1044
|
+
"How far apart are these two parallel walls?",
|
|
1045
|
+
"Measure the spacing between these two gridlines\n\n# Example\n```ts\nconst a1 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst a2 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst b1 = await snaptrude.core.math.vec3.new(0, 0, 4)\nconst b2 = await snaptrude.core.math.vec3.new(10, 0, 4)\nconst lineA = await snaptrude.core.geom.create.line(a1, a2)\nconst lineB = await snaptrude.core.geom.create.line(b1, b2)\nconst spacing = await snaptrude.core.geom.query.curve.getDistanceBetween(lineA, lineB) // 4\n```"
|
|
1046
|
+
],
|
|
683
1047
|
"argsType": "LineHandle",
|
|
684
1048
|
"resultType": "number"
|
|
685
1049
|
},
|
|
@@ -687,7 +1051,10 @@
|
|
|
687
1051
|
"path": "core.geom.query.curve.getDistanceToPoint",
|
|
688
1052
|
"namespace": "core.geom.query.curve",
|
|
689
1053
|
"summary": "Get the shortest distance from an arbitrary point to a curve.",
|
|
690
|
-
"examplePrompts": [
|
|
1054
|
+
"examplePrompts": [
|
|
1055
|
+
"How far is this column from the wall edge?",
|
|
1056
|
+
"What is the shortest distance from this point to the boundary line?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nconst point = await snaptrude.core.math.vec3.new(2, 0, 3)\nif (centerline) {\nconst distance = await snaptrude.core.geom.query.curve.getDistanceToPoint(centerline, point)\n}\n```"
|
|
1057
|
+
],
|
|
691
1058
|
"argsType": "CurveHandle",
|
|
692
1059
|
"resultType": "number"
|
|
693
1060
|
},
|
|
@@ -695,7 +1062,9 @@
|
|
|
695
1062
|
"path": "core.geom.query.curve.getEndPoint",
|
|
696
1063
|
"namespace": "core.geom.query.curve",
|
|
697
1064
|
"summary": "Get the end point of a curve.",
|
|
698
|
-
"examplePrompts": [
|
|
1065
|
+
"examplePrompts": [
|
|
1066
|
+
"Get the coordinates of the far end of this edge\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst end = await snaptrude.core.geom.query.curve.getEndPoint(line) // { x: 5, y: 0, z: 0 }\n```"
|
|
1067
|
+
],
|
|
699
1068
|
"argsType": "CurveHandle",
|
|
700
1069
|
"resultType": "Vec3Components"
|
|
701
1070
|
},
|
|
@@ -703,7 +1072,10 @@
|
|
|
703
1072
|
"path": "core.geom.query.curve.getLength",
|
|
704
1073
|
"namespace": "core.geom.query.curve",
|
|
705
1074
|
"summary": "Get the arc-length of a curve.",
|
|
706
|
-
"examplePrompts": [
|
|
1075
|
+
"examplePrompts": [
|
|
1076
|
+
"How long is this wall edge?",
|
|
1077
|
+
"Measure the length of this curved boundary\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst length = await snaptrude.core.geom.query.curve.getLength(centerline)\n}\n```"
|
|
1078
|
+
],
|
|
707
1079
|
"argsType": "CurveHandle",
|
|
708
1080
|
"resultType": "number"
|
|
709
1081
|
},
|
|
@@ -711,7 +1083,9 @@
|
|
|
711
1083
|
"path": "core.geom.query.curve.getMergedCurve",
|
|
712
1084
|
"namespace": "core.geom.query.curve",
|
|
713
1085
|
"summary": "Merge two curves into a single curve when they are mergeable.",
|
|
714
|
-
"examplePrompts": [
|
|
1086
|
+
"examplePrompts": [
|
|
1087
|
+
"Merge these two line segments into a single line\n\n# Example\n```ts\nconst p0 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst p5 = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst p10 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst lineA = await snaptrude.core.geom.create.line(p0, p5)\nconst lineB = await snaptrude.core.geom.create.line(p5, p10)\nconst merged = await snaptrude.core.geom.query.curve.getMergedCurve(lineA, lineB)\nif (merged) {\nconst length = await snaptrude.core.geom.query.curve.getLength(merged) // 10\n}\n```"
|
|
1088
|
+
],
|
|
715
1089
|
"argsType": "CurveHandle",
|
|
716
1090
|
"resultType": "CurveHandle | null"
|
|
717
1091
|
},
|
|
@@ -719,7 +1093,10 @@
|
|
|
719
1093
|
"path": "core.geom.query.curve.getMidPoint",
|
|
720
1094
|
"namespace": "core.geom.query.curve",
|
|
721
1095
|
"summary": "Get the mid point of a curve.",
|
|
722
|
-
"examplePrompts": [
|
|
1096
|
+
"examplePrompts": [
|
|
1097
|
+
"Find the midpoint of this wall edge",
|
|
1098
|
+
"Where is the centre of this boundary line?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst mid = await snaptrude.core.geom.query.curve.getMidPoint(centerline)\nconsole.log(mid.x, mid.y, mid.z)\n}\n```"
|
|
1099
|
+
],
|
|
723
1100
|
"argsType": "CurveHandle",
|
|
724
1101
|
"resultType": "Vec3Components"
|
|
725
1102
|
},
|
|
@@ -727,7 +1104,9 @@
|
|
|
727
1104
|
"path": "core.geom.query.curve.getNearestPoint",
|
|
728
1105
|
"namespace": "core.geom.query.curve",
|
|
729
1106
|
"summary": "Get the point on a curve nearest to an arbitrary point.",
|
|
730
|
-
"examplePrompts": [
|
|
1107
|
+
"examplePrompts": [
|
|
1108
|
+
"Find the point on this edge closest to the column\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nconst reference = await snaptrude.core.math.vec3.new(2, 0, 3)\nif (centerline) {\nconst nearest = await snaptrude.core.geom.query.curve.getNearestPoint(centerline, reference)\n}\n```"
|
|
1109
|
+
],
|
|
731
1110
|
"argsType": "CurveHandle",
|
|
732
1111
|
"resultType": "Vec3Components"
|
|
733
1112
|
},
|
|
@@ -751,7 +1130,10 @@
|
|
|
751
1130
|
"path": "core.geom.query.curve.getPointAtDistance",
|
|
752
1131
|
"namespace": "core.geom.query.curve",
|
|
753
1132
|
"summary": "Get the point at a given distance along a curve from a reference point.",
|
|
754
|
-
"examplePrompts": [
|
|
1133
|
+
"examplePrompts": [
|
|
1134
|
+
"Find the point 2 metres along this edge from the corner",
|
|
1135
|
+
"Mark a spot 900mm from the start of the wall edge\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst p = await snaptrude.core.geom.query.curve.getPointAtDistance(line, a, 2) // { x: 2, y: 0, z: 0 }\nconst q = await snaptrude.core.geom.query.curve.getPointAtDistance(line, b, 2, false) // measured backwards from the end\n```"
|
|
1136
|
+
],
|
|
755
1137
|
"argsType": "CurveHandle",
|
|
756
1138
|
"resultType": "Vec3Components"
|
|
757
1139
|
},
|
|
@@ -767,7 +1149,10 @@
|
|
|
767
1149
|
"path": "core.geom.query.curve.getShortestGap",
|
|
768
1150
|
"namespace": "core.geom.query.curve",
|
|
769
1151
|
"summary": "Get the shortest gap between two curves, optionally including their endpoints.",
|
|
770
|
-
"examplePrompts": [
|
|
1152
|
+
"examplePrompts": [
|
|
1153
|
+
"What is the gap between these two wall edges?",
|
|
1154
|
+
"How close do these two curves get to each other?\n\n# Example\n```ts\nconst a1 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst a2 = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst b1 = await snaptrude.core.math.vec3.new(0, 0, 2)\nconst b2 = await snaptrude.core.math.vec3.new(5, 0, 2)\nconst curveA = await snaptrude.core.geom.create.line(a1, a2)\nconst curveB = await snaptrude.core.geom.create.line(b1, b2)\nconst gap = await snaptrude.core.geom.query.curve.getShortestGap(curveA, curveB) // 2\n```"
|
|
1155
|
+
],
|
|
771
1156
|
"argsType": "CurveHandle",
|
|
772
1157
|
"resultType": "number"
|
|
773
1158
|
},
|
|
@@ -775,7 +1160,9 @@
|
|
|
775
1160
|
"path": "core.geom.query.curve.getStartPoint",
|
|
776
1161
|
"namespace": "core.geom.query.curve",
|
|
777
1162
|
"summary": "Get the start point of a curve.",
|
|
778
|
-
"examplePrompts": [
|
|
1163
|
+
"examplePrompts": [
|
|
1164
|
+
"Where does this wall edge start?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst start = await snaptrude.core.geom.query.curve.getStartPoint(centerline)\nconsole.log(start.x, start.y, start.z)\n}\n```"
|
|
1165
|
+
],
|
|
779
1166
|
"argsType": "CurveHandle",
|
|
780
1167
|
"resultType": "Vec3Components"
|
|
781
1168
|
},
|
|
@@ -799,7 +1186,9 @@
|
|
|
799
1186
|
"path": "core.geom.query.curve.isContinuous",
|
|
800
1187
|
"namespace": "core.geom.query.curve",
|
|
801
1188
|
"summary": "Test whether two curves are continuous (share an endpoint without a gap).",
|
|
802
|
-
"examplePrompts": [
|
|
1189
|
+
"examplePrompts": [
|
|
1190
|
+
"Do these two edges connect end to end without a gap?\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst c = await snaptrude.core.math.vec3.new(5, 0, 5)\nconst lineA = await snaptrude.core.geom.create.line(a, b)\nconst lineB = await snaptrude.core.geom.create.line(b, c)\nconst connected = await snaptrude.core.geom.query.curve.isContinuous(lineA, lineB) // true\n```"
|
|
1191
|
+
],
|
|
803
1192
|
"argsType": "CurveHandle",
|
|
804
1193
|
"resultType": "boolean"
|
|
805
1194
|
},
|
|
@@ -815,7 +1204,9 @@
|
|
|
815
1204
|
"path": "core.geom.query.curve.isLinear",
|
|
816
1205
|
"namespace": "core.geom.query.curve",
|
|
817
1206
|
"summary": "Test whether a curve is a straight line.",
|
|
818
|
-
"examplePrompts": [
|
|
1207
|
+
"examplePrompts": [
|
|
1208
|
+
"Is this edge straight or curved?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst straight = await snaptrude.core.geom.query.curve.isLinear(centerline)\n}\n```"
|
|
1209
|
+
],
|
|
819
1210
|
"argsType": "CurveHandle",
|
|
820
1211
|
"resultType": "boolean"
|
|
821
1212
|
},
|
|
@@ -823,7 +1214,9 @@
|
|
|
823
1214
|
"path": "core.geom.query.curve.isOnCurve",
|
|
824
1215
|
"namespace": "core.geom.query.curve",
|
|
825
1216
|
"summary": "Test whether a point lies on a curve within an optional threshold.",
|
|
826
|
-
"examplePrompts": [
|
|
1217
|
+
"examplePrompts": [
|
|
1218
|
+
"Check whether this point lies on the wall edge\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst point = await snaptrude.core.math.vec3.new(5, 0, 0.005)\nconst on = await snaptrude.core.geom.query.curve.isOnCurve(line, point, 0.01) // true within tolerance\n```"
|
|
1219
|
+
],
|
|
827
1220
|
"argsType": "CurveHandle",
|
|
828
1221
|
"resultType": "boolean"
|
|
829
1222
|
},
|
|
@@ -831,7 +1224,9 @@
|
|
|
831
1224
|
"path": "core.geom.query.curve.isOverlapping",
|
|
832
1225
|
"namespace": "core.geom.query.curve",
|
|
833
1226
|
"summary": "Test whether two curves overlap (share a collinear/concentric span), optionally including their endpoints.",
|
|
834
|
-
"examplePrompts": [
|
|
1227
|
+
"examplePrompts": [
|
|
1228
|
+
"Do these two wall edges overlap?\n\n# Example\n```ts\nconst p0 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst p5 = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst p10 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst p15 = await snaptrude.core.math.vec3.new(15, 0, 0)\nconst lineA = await snaptrude.core.geom.create.line(p0, p10)\nconst lineB = await snaptrude.core.geom.create.line(p5, p15)\nconst overlaps = await snaptrude.core.geom.query.curve.isOverlapping(lineA, lineB) // true (share the 5..10 span)\n```"
|
|
1229
|
+
],
|
|
835
1230
|
"argsType": "CurveHandle",
|
|
836
1231
|
"resultType": "boolean"
|
|
837
1232
|
},
|
|
@@ -839,7 +1234,10 @@
|
|
|
839
1234
|
"path": "core.geom.query.curve.isParallel",
|
|
840
1235
|
"namespace": "core.geom.query.curve",
|
|
841
1236
|
"summary": "Test whether two lines are parallel within an optional tolerance.",
|
|
842
|
-
"examplePrompts": [
|
|
1237
|
+
"examplePrompts": [
|
|
1238
|
+
"Are these two walls parallel?",
|
|
1239
|
+
"Check if these gridlines run parallel to each other\n\n# Example\n```ts\nconst a1 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst a2 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst b1 = await snaptrude.core.math.vec3.new(0, 0, 3)\nconst b2 = await snaptrude.core.math.vec3.new(10, 0, 3)\nconst lineA = await snaptrude.core.geom.create.line(a1, a2)\nconst lineB = await snaptrude.core.geom.create.line(b1, b2)\nconst parallel = await snaptrude.core.geom.query.curve.isParallel(lineA, lineB) // true\n```"
|
|
1240
|
+
],
|
|
843
1241
|
"argsType": "LineHandle",
|
|
844
1242
|
"resultType": "boolean"
|
|
845
1243
|
},
|
|
@@ -847,7 +1245,10 @@
|
|
|
847
1245
|
"path": "core.geom.query.curve.listIntersections",
|
|
848
1246
|
"namespace": "core.geom.query.curve",
|
|
849
1247
|
"summary": "List the intersection points between two curves.",
|
|
850
|
-
"examplePrompts": [
|
|
1248
|
+
"examplePrompts": [
|
|
1249
|
+
"Where do these two lines cross?",
|
|
1250
|
+
"Find the intersection points of these two gridlines\n\n# Example\n```ts\nconst a1 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst a2 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst b1 = await snaptrude.core.math.vec3.new(5, 0, -5)\nconst b2 = await snaptrude.core.math.vec3.new(5, 0, 5)\nconst lineA = await snaptrude.core.geom.create.line(a1, a2)\nconst lineB = await snaptrude.core.geom.create.line(b1, b2)\nconst points = await snaptrude.core.geom.query.curve.listIntersections(lineA, lineB) // [{ x: 5, y: 0, z: 0 }]\nconst unbounded = await snaptrude.core.geom.query.curve.listIntersections(lineA, lineB, false, false) // treat both as infinite\n```"
|
|
1251
|
+
],
|
|
851
1252
|
"argsType": "CurveHandle",
|
|
852
1253
|
"resultType": "Vec3Components[]"
|
|
853
1254
|
},
|
|
@@ -863,7 +1264,10 @@
|
|
|
863
1264
|
"path": "core.geom.query.curve.listSubdivisions",
|
|
864
1265
|
"namespace": "core.geom.query.curve",
|
|
865
1266
|
"summary": "List the points produced by subdividing a curve into equal segments.",
|
|
866
|
-
"examplePrompts": [
|
|
1267
|
+
"examplePrompts": [
|
|
1268
|
+
"Divide this edge into 5 equal segments",
|
|
1269
|
+
"Split the wall line into equal parts for placing columns\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst points = await snaptrude.core.geom.query.curve.listSubdivisions(centerline, 5)\n}\n```"
|
|
1270
|
+
],
|
|
867
1271
|
"argsType": "CurveHandle",
|
|
868
1272
|
"resultType": "Vec3Components[]"
|
|
869
1273
|
},
|
|
@@ -951,7 +1355,9 @@
|
|
|
951
1355
|
"path": "core.geom.query.face.hasHoles",
|
|
952
1356
|
"namespace": "core.geom.query.face",
|
|
953
1357
|
"summary": "Test whether a face has any holes.",
|
|
954
|
-
"examplePrompts": [
|
|
1358
|
+
"examplePrompts": [
|
|
1359
|
+
"Does this face have any holes cut into it?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst brep = await snaptrude.design.query.geometry.getBrep(wall)\nif (brep) {\nconst [face] = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst pierced = await snaptrude.core.geom.query.face.hasHoles(face)\n}\n```"
|
|
1360
|
+
],
|
|
955
1361
|
"argsType": "FaceHandle",
|
|
956
1362
|
"resultType": "boolean"
|
|
957
1363
|
},
|
|
@@ -959,7 +1365,10 @@
|
|
|
959
1365
|
"path": "core.geom.query.face.listAdjacentFaces",
|
|
960
1366
|
"namespace": "core.geom.query.face",
|
|
961
1367
|
"summary": "List the faces adjacent to a face (sharing an edge). Boundary edges are skipped.",
|
|
962
|
-
"examplePrompts": [
|
|
1368
|
+
"examplePrompts": [
|
|
1369
|
+
"Which faces are next to this one?",
|
|
1370
|
+
"Find the faces that share an edge with the selected face\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst [face] = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst neighbours = await snaptrude.core.geom.query.face.listAdjacentFaces(face)\n}\n```"
|
|
1371
|
+
],
|
|
963
1372
|
"argsType": "FaceHandle",
|
|
964
1373
|
"resultType": "FaceHandle[]"
|
|
965
1374
|
},
|
|
@@ -999,7 +1408,10 @@
|
|
|
999
1408
|
"path": "core.geom.query.face.listVertexPositions",
|
|
1000
1409
|
"namespace": "core.geom.query.face",
|
|
1001
1410
|
"summary": "List the positions of a face's outer-loop vertices (needs the parent brep for coordinates).",
|
|
1002
|
-
"examplePrompts": [
|
|
1411
|
+
"examplePrompts": [
|
|
1412
|
+
"What are the corner coordinates of this face?",
|
|
1413
|
+
"Get the boundary points of the selected face\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst brep = await snaptrude.design.query.geometry.getBrep(wall)\nif (brep) {\nconst [face] = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst corners = await snaptrude.core.geom.query.face.listVertexPositions(face, brep)\nfor (const p of corners) console.log(p.x, p.y, p.z)\n}\n```"
|
|
1414
|
+
],
|
|
1003
1415
|
"argsType": "FaceHandle",
|
|
1004
1416
|
"resultType": "Vec3Components[]"
|
|
1005
1417
|
},
|
|
@@ -1007,7 +1419,9 @@
|
|
|
1007
1419
|
"path": "core.geom.query.face.listVertexPositionsWithCurves",
|
|
1008
1420
|
"namespace": "core.geom.query.face",
|
|
1009
1421
|
"summary": "List the tessellated boundary points of a face's outer loop (arcs sampled, sense-corrected). Not cardinality-equal to {@linkcode PluginGeomQueryFaceApi.listVertexPositions}.",
|
|
1010
|
-
"examplePrompts": [
|
|
1422
|
+
"examplePrompts": [
|
|
1423
|
+
"Trace the outline of this face including its curved edges\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst brep = await snaptrude.design.query.geometry.getBrep(wall)\nif (brep) {\nconst [face] = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst outline = await snaptrude.core.geom.query.face.listVertexPositionsWithCurves(face)\n}\n```"
|
|
1424
|
+
],
|
|
1011
1425
|
"argsType": "FaceHandle",
|
|
1012
1426
|
"resultType": "Vec3Components[]"
|
|
1013
1427
|
},
|
|
@@ -1087,7 +1501,10 @@
|
|
|
1087
1501
|
"path": "core.geom.query.profile.getArea",
|
|
1088
1502
|
"namespace": "core.geom.query.profile",
|
|
1089
1503
|
"summary": "Get the (approximate) enclosed area of a profile.",
|
|
1090
|
-
"examplePrompts": [
|
|
1504
|
+
"examplePrompts": [
|
|
1505
|
+
"What is the area enclosed by this outline?",
|
|
1506
|
+
"Measure the area of this shape\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst area = await snaptrude.core.geom.query.profile.getArea(rect) // 12\n```"
|
|
1507
|
+
],
|
|
1091
1508
|
"argsType": "ProfileHandle",
|
|
1092
1509
|
"resultType": "number"
|
|
1093
1510
|
},
|
|
@@ -1095,7 +1512,9 @@
|
|
|
1095
1512
|
"path": "core.geom.query.profile.getBoundingBox",
|
|
1096
1513
|
"namespace": "core.geom.query.profile",
|
|
1097
1514
|
"summary": "Get the axis-aligned bounding box of a profile.",
|
|
1098
|
-
"examplePrompts": [
|
|
1515
|
+
"examplePrompts": [
|
|
1516
|
+
"How wide and long is this outline overall?\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst { min, max } = await snaptrude.core.geom.query.profile.getBoundingBox(rect)\nconsole.log(max.x - min.x, max.z - min.z) // 4 3\n```"
|
|
1517
|
+
],
|
|
1099
1518
|
"argsType": "ProfileHandle",
|
|
1100
1519
|
"resultType": "BBoxComponents"
|
|
1101
1520
|
},
|
|
@@ -1103,7 +1522,9 @@
|
|
|
1103
1522
|
"path": "core.geom.query.profile.getNearestPoint",
|
|
1104
1523
|
"namespace": "core.geom.query.profile",
|
|
1105
1524
|
"summary": "Get the point on a profile nearest to an arbitrary point.",
|
|
1106
|
-
"examplePrompts": [
|
|
1525
|
+
"examplePrompts": [
|
|
1526
|
+
"Find the closest point on this outline to a given point\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst point = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst nearest = await snaptrude.core.geom.query.profile.getNearestPoint(rect, point)\nconsole.log(nearest.x, nearest.y, nearest.z) // 2 0 0\n```"
|
|
1527
|
+
],
|
|
1107
1528
|
"argsType": "ProfileHandle",
|
|
1108
1529
|
"resultType": "Vec3Components"
|
|
1109
1530
|
},
|
|
@@ -1119,7 +1540,10 @@
|
|
|
1119
1540
|
"path": "core.geom.query.profile.getPerimeter",
|
|
1120
1541
|
"namespace": "core.geom.query.profile",
|
|
1121
1542
|
"summary": "Get the perimeter (total curve length) of a profile.",
|
|
1122
|
-
"examplePrompts": [
|
|
1543
|
+
"examplePrompts": [
|
|
1544
|
+
"How long is the boundary of this shape in total?",
|
|
1545
|
+
"Measure the perimeter of this outline\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst perimeter = await snaptrude.core.geom.query.profile.getPerimeter(rect) // 14\n```"
|
|
1546
|
+
],
|
|
1123
1547
|
"argsType": "ProfileHandle",
|
|
1124
1548
|
"resultType": "number"
|
|
1125
1549
|
},
|
|
@@ -1127,7 +1551,10 @@
|
|
|
1127
1551
|
"path": "core.geom.query.profile.hasPoint",
|
|
1128
1552
|
"namespace": "core.geom.query.profile",
|
|
1129
1553
|
"summary": "Test whether a point lies inside a profile.",
|
|
1130
|
-
"examplePrompts": [
|
|
1554
|
+
"examplePrompts": [
|
|
1555
|
+
"Does this point fall inside the outline?",
|
|
1556
|
+
"Check if the column location lies within this room boundary\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst point = await snaptrude.core.math.vec3.new(1, 0, 1)\nconst inside = await snaptrude.core.geom.query.profile.hasPoint(rect, point) // true\n```"
|
|
1557
|
+
],
|
|
1131
1558
|
"argsType": "ProfileHandle",
|
|
1132
1559
|
"resultType": "boolean"
|
|
1133
1560
|
},
|
|
@@ -1143,7 +1570,10 @@
|
|
|
1143
1570
|
"path": "core.geom.query.profile.isClosed",
|
|
1144
1571
|
"namespace": "core.geom.query.profile",
|
|
1145
1572
|
"summary": "Test whether a profile forms a closed loop.",
|
|
1146
|
-
"examplePrompts": [
|
|
1573
|
+
"examplePrompts": [
|
|
1574
|
+
"Is my sketch outline closed or still open?",
|
|
1575
|
+
"Check whether this boundary forms a complete loop\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst closed = await snaptrude.core.geom.query.profile.isClosed(rect) // true\n```"
|
|
1576
|
+
],
|
|
1147
1577
|
"argsType": "ProfileHandle",
|
|
1148
1578
|
"resultType": "boolean"
|
|
1149
1579
|
},
|
|
@@ -1199,7 +1629,10 @@
|
|
|
1199
1629
|
"path": "core.geom.query.profile.listPoints",
|
|
1200
1630
|
"namespace": "core.geom.query.profile",
|
|
1201
1631
|
"summary": "List the tessellated points along a profile.",
|
|
1202
|
-
"examplePrompts": [
|
|
1632
|
+
"examplePrompts": [
|
|
1633
|
+
"Give me the corner coordinates of this shape",
|
|
1634
|
+
"List the vertex points along this outline\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst points = await snaptrude.core.geom.query.profile.listPoints(rect)\nfor (const p of points) console.log(p.x, p.y, p.z)\n```"
|
|
1635
|
+
],
|
|
1203
1636
|
"argsType": "ProfileHandle",
|
|
1204
1637
|
"resultType": "Vec3Components[]"
|
|
1205
1638
|
},
|
|
@@ -1223,7 +1656,10 @@
|
|
|
1223
1656
|
"path": "core.geom.query.vertex.getPosition",
|
|
1224
1657
|
"namespace": "core.geom.query.vertex",
|
|
1225
1658
|
"summary": "Get the position of a vertex (needs the parent brep for coordinates).",
|
|
1226
|
-
"examplePrompts": [
|
|
1659
|
+
"examplePrompts": [
|
|
1660
|
+
"What are the coordinates of this corner point?",
|
|
1661
|
+
"Get the exact x, y, z position of the selected vertex\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst brep = await snaptrude.design.query.geometry.getBrep(wall)\nif (brep) {\nconst [vertex] = await snaptrude.core.geom.query.brep.listVertices(brep)\nconst pos = await snaptrude.core.geom.query.vertex.getPosition(brep, vertex)\nconsole.log(pos.x, pos.y, pos.z)\n}\n```"
|
|
1662
|
+
],
|
|
1227
1663
|
"argsType": "BrepHandle",
|
|
1228
1664
|
"resultType": "Vec3Components"
|
|
1229
1665
|
},
|
|
@@ -1263,7 +1699,10 @@
|
|
|
1263
1699
|
"path": "core.geom.update.contour.addHole",
|
|
1264
1700
|
"namespace": "core.geom.update.contour",
|
|
1265
1701
|
"summary": "Add a hole to a contour by appending an inner profile. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1266
|
-
"examplePrompts": [
|
|
1702
|
+
"examplePrompts": [
|
|
1703
|
+
"Cut a hole in this shape",
|
|
1704
|
+
"Punch an opening through this floor outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(10, 8)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(outer)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 2)\nconst withHole = await snaptrude.core.geom.update.contour.addHole(contour, hole)\nconst count = await snaptrude.core.geom.query.contour.getHoleCount(withHole) // 1\n```"
|
|
1705
|
+
],
|
|
1267
1706
|
"argsType": "ContourHandle",
|
|
1268
1707
|
"resultType": "ContourHandle"
|
|
1269
1708
|
},
|
|
@@ -1271,7 +1710,10 @@
|
|
|
1271
1710
|
"path": "core.geom.update.contour.mirror",
|
|
1272
1711
|
"namespace": "core.geom.update.contour",
|
|
1273
1712
|
"summary": "Mirror a contour across a plane. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1274
|
-
"examplePrompts": [
|
|
1713
|
+
"examplePrompts": [
|
|
1714
|
+
"Mirror this shape across the gridline",
|
|
1715
|
+
"Flip this outline to its mirror image\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst point = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst normal = await snaptrude.core.math.vec3.new(1, 0, 0)\nconst mirrored = await snaptrude.core.geom.update.contour.mirror(contour, { point, normal })\n```"
|
|
1716
|
+
],
|
|
1275
1717
|
"argsType": "ContourHandle",
|
|
1276
1718
|
"resultType": "ContourHandle"
|
|
1277
1719
|
},
|
|
@@ -1279,7 +1721,10 @@
|
|
|
1279
1721
|
"path": "core.geom.update.contour.move",
|
|
1280
1722
|
"namespace": "core.geom.update.contour",
|
|
1281
1723
|
"summary": "Translate a contour by a vector. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1282
|
-
"examplePrompts": [
|
|
1724
|
+
"examplePrompts": [
|
|
1725
|
+
"Move this shape 2 metres to the right",
|
|
1726
|
+
"Shift this outline over by 5 feet\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst shift = await snaptrude.core.math.vec3.new(2, 0, 0)\nconst moved = await snaptrude.core.geom.update.contour.move(contour, shift)\n```"
|
|
1727
|
+
],
|
|
1283
1728
|
"argsType": "ContourHandle",
|
|
1284
1729
|
"resultType": "ContourHandle"
|
|
1285
1730
|
},
|
|
@@ -1287,7 +1732,10 @@
|
|
|
1287
1732
|
"path": "core.geom.update.contour.offset",
|
|
1288
1733
|
"namespace": "core.geom.update.contour",
|
|
1289
1734
|
"summary": "Offset a contour inward/outward by a signed distance. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1290
|
-
"examplePrompts": [
|
|
1735
|
+
"examplePrompts": [
|
|
1736
|
+
"Offset this boundary 500mm inward",
|
|
1737
|
+
"Shrink this floor outline by half a metre all around\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(10, 8)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst inset = await snaptrude.core.geom.update.contour.offset(contour, -0.5)\nconst area = await snaptrude.core.geom.query.contour.getArea(inset)\n```"
|
|
1738
|
+
],
|
|
1291
1739
|
"argsType": "ContourHandle",
|
|
1292
1740
|
"resultType": "ContourHandle"
|
|
1293
1741
|
},
|
|
@@ -1295,7 +1743,10 @@
|
|
|
1295
1743
|
"path": "core.geom.update.contour.removeHole",
|
|
1296
1744
|
"namespace": "core.geom.update.contour",
|
|
1297
1745
|
"summary": "Remove a hole from a contour by inner-profile index. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1298
|
-
"examplePrompts": [
|
|
1746
|
+
"examplePrompts": [
|
|
1747
|
+
"Remove the hole from this shape",
|
|
1748
|
+
"Fill in the opening in this floor outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(10, 8)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 2)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst solid = await snaptrude.core.geom.update.contour.removeHole(contour, 0)\n```"
|
|
1749
|
+
],
|
|
1299
1750
|
"argsType": "ContourHandle",
|
|
1300
1751
|
"resultType": "ContourHandle"
|
|
1301
1752
|
},
|
|
@@ -1303,7 +1754,10 @@
|
|
|
1303
1754
|
"path": "core.geom.update.contour.rotate",
|
|
1304
1755
|
"namespace": "core.geom.update.contour",
|
|
1305
1756
|
"summary": "Rotate a contour about an axis through an optional pivot. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1306
|
-
"examplePrompts": [
|
|
1757
|
+
"examplePrompts": [
|
|
1758
|
+
"Rotate this shape 45 degrees",
|
|
1759
|
+
"Turn this outline 90 degrees about its corner\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst axis = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst pivot = await snaptrude.core.math.vec3.new(3, 0, 2)\nconst rotated = await snaptrude.core.geom.update.contour.rotate(contour, axis, Math.PI / 4, pivot)\n```"
|
|
1760
|
+
],
|
|
1307
1761
|
"argsType": "ContourHandle",
|
|
1308
1762
|
"resultType": "ContourHandle"
|
|
1309
1763
|
},
|
|
@@ -1311,7 +1765,10 @@
|
|
|
1311
1765
|
"path": "core.geom.update.contour.scale",
|
|
1312
1766
|
"namespace": "core.geom.update.contour",
|
|
1313
1767
|
"summary": "Scale a contour uniformly or per-axis about an optional pivot. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1314
|
-
"examplePrompts": [
|
|
1768
|
+
"examplePrompts": [
|
|
1769
|
+
"Scale this shape up by a factor of 2",
|
|
1770
|
+
"Make this outline half its current size\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst doubled = await snaptrude.core.geom.update.contour.scale(contour, 2)\nconst stretched = await snaptrude.core.geom.update.contour.scale(contour, { x: 2, y: 1, z: 1 })\n```"
|
|
1771
|
+
],
|
|
1315
1772
|
"argsType": "ContourHandle",
|
|
1316
1773
|
"resultType": "ContourHandle"
|
|
1317
1774
|
},
|
|
@@ -1319,7 +1776,10 @@
|
|
|
1319
1776
|
"path": "core.geom.update.curve.extend",
|
|
1320
1777
|
"namespace": "core.geom.update.curve",
|
|
1321
1778
|
"summary": "Extend a curve by a distance from one of its ends. Host API call — returns a handle.",
|
|
1322
|
-
"examplePrompts": [
|
|
1779
|
+
"examplePrompts": [
|
|
1780
|
+
"Extend this line by 1 metre",
|
|
1781
|
+
"Lengthen this edge from its start point\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst longer = await snaptrude.core.geom.update.curve.extend(line, 1, false)\nconst length = await snaptrude.core.geom.query.curve.getLength(longer) // 6\n```"
|
|
1782
|
+
],
|
|
1323
1783
|
"argsType": "CurveHandle",
|
|
1324
1784
|
"resultType": "CurveHandle"
|
|
1325
1785
|
},
|
|
@@ -1327,7 +1787,10 @@
|
|
|
1327
1787
|
"path": "core.geom.update.curve.offset",
|
|
1328
1788
|
"namespace": "core.geom.update.curve",
|
|
1329
1789
|
"summary": "Offset a curve by a translation vector. Host API call — returns a handle.",
|
|
1330
|
-
"examplePrompts": [
|
|
1790
|
+
"examplePrompts": [
|
|
1791
|
+
"Offset this line 500mm to the side",
|
|
1792
|
+
"Shift this edge over to make a parallel copy\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(8, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst sideways = await snaptrude.core.math.vec3.new(0, 0, 0.5)\nconst parallel = await snaptrude.core.geom.update.curve.offset(line, sideways)\n```"
|
|
1793
|
+
],
|
|
1331
1794
|
"argsType": "CurveHandle",
|
|
1332
1795
|
"resultType": "CurveHandle"
|
|
1333
1796
|
},
|
|
@@ -1343,7 +1806,10 @@
|
|
|
1343
1806
|
"path": "core.geom.update.curve.split",
|
|
1344
1807
|
"namespace": "core.geom.update.curve",
|
|
1345
1808
|
"summary": "Split a curve at a point into separate segments. Host API call — returns handles.",
|
|
1346
|
-
"examplePrompts": [
|
|
1809
|
+
"examplePrompts": [
|
|
1810
|
+
"Split this line at its midpoint",
|
|
1811
|
+
"Break this edge into two pieces where it meets the gridline\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(6, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst mid = await snaptrude.core.math.vec3.new(3, 0, 0)\nconst [left, right] = await snaptrude.core.geom.update.curve.split(line, mid)\n```"
|
|
1812
|
+
],
|
|
1347
1813
|
"argsType": "CurveHandle",
|
|
1348
1814
|
"resultType": "CurveHandle[]"
|
|
1349
1815
|
},
|
|
@@ -1351,7 +1817,10 @@
|
|
|
1351
1817
|
"path": "core.geom.update.curve.trim",
|
|
1352
1818
|
"namespace": "core.geom.update.curve",
|
|
1353
1819
|
"summary": "Trim a curve to the portion between two parameter values. Host API call — returns a handle.",
|
|
1354
|
-
"examplePrompts": [
|
|
1820
|
+
"examplePrompts": [
|
|
1821
|
+
"Trim this line back to a shorter segment",
|
|
1822
|
+
"Keep only the middle portion of this curve\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst middle = await snaptrude.core.geom.update.curve.trim(line, 0.25, 0.75)\n```"
|
|
1823
|
+
],
|
|
1355
1824
|
"argsType": "CurveHandle",
|
|
1356
1825
|
"resultType": "CurveHandle"
|
|
1357
1826
|
},
|
|
@@ -1367,7 +1836,10 @@
|
|
|
1367
1836
|
"path": "core.geom.update.profile.mirror",
|
|
1368
1837
|
"namespace": "core.geom.update.profile",
|
|
1369
1838
|
"summary": "Mirror a profile across a plane. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1370
|
-
"examplePrompts": [
|
|
1839
|
+
"examplePrompts": [
|
|
1840
|
+
"Mirror this outline across the vertical plane",
|
|
1841
|
+
"Flip this boundary to its mirror image\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst point = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst normal = await snaptrude.core.math.vec3.new(1, 0, 0)\nconst mirrored = await snaptrude.core.geom.update.profile.mirror(rect, { point, normal })\n```"
|
|
1842
|
+
],
|
|
1371
1843
|
"argsType": "ProfileHandle",
|
|
1372
1844
|
"resultType": "ProfileHandle"
|
|
1373
1845
|
},
|
|
@@ -1375,7 +1847,10 @@
|
|
|
1375
1847
|
"path": "core.geom.update.profile.move",
|
|
1376
1848
|
"namespace": "core.geom.update.profile",
|
|
1377
1849
|
"summary": "Translate a profile by a vector. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1378
|
-
"examplePrompts": [
|
|
1850
|
+
"examplePrompts": [
|
|
1851
|
+
"Move this outline 3 metres along the x axis",
|
|
1852
|
+
"Shift this boundary to a new position\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst shift = await snaptrude.core.math.vec3.new(3, 0, 0)\nconst moved = await snaptrude.core.geom.update.profile.move(rect, shift)\n```"
|
|
1853
|
+
],
|
|
1379
1854
|
"argsType": "ProfileHandle",
|
|
1380
1855
|
"resultType": "ProfileHandle"
|
|
1381
1856
|
},
|
|
@@ -1383,7 +1858,10 @@
|
|
|
1383
1858
|
"path": "core.geom.update.profile.offset",
|
|
1384
1859
|
"namespace": "core.geom.update.profile",
|
|
1385
1860
|
"summary": "Offset a closed profile inward/outward by a signed distance. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1386
|
-
"examplePrompts": [
|
|
1861
|
+
"examplePrompts": [
|
|
1862
|
+
"Offset this outline 300mm inward",
|
|
1863
|
+
"Inset this boundary by a foot all around\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(10, 8)\nconst inset = await snaptrude.core.geom.update.profile.offset(rect, -0.3)\nconst area = await snaptrude.core.geom.query.profile.getArea(inset)\n```"
|
|
1864
|
+
],
|
|
1387
1865
|
"argsType": "ProfileHandle",
|
|
1388
1866
|
"resultType": "ProfileHandle"
|
|
1389
1867
|
},
|
|
@@ -1407,7 +1885,10 @@
|
|
|
1407
1885
|
"path": "core.geom.update.profile.rotate",
|
|
1408
1886
|
"namespace": "core.geom.update.profile",
|
|
1409
1887
|
"summary": "Rotate a profile about an axis through an optional pivot. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1410
|
-
"examplePrompts": [
|
|
1888
|
+
"examplePrompts": [
|
|
1889
|
+
"Rotate this outline 30 degrees",
|
|
1890
|
+
"Turn this boundary about its centre point\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst axis = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst rotated = await snaptrude.core.geom.update.profile.rotate(rect, axis, Math.PI / 6)\n```"
|
|
1891
|
+
],
|
|
1411
1892
|
"argsType": "ProfileHandle",
|
|
1412
1893
|
"resultType": "ProfileHandle"
|
|
1413
1894
|
},
|
|
@@ -1415,7 +1896,10 @@
|
|
|
1415
1896
|
"path": "core.geom.update.profile.scale",
|
|
1416
1897
|
"namespace": "core.geom.update.profile",
|
|
1417
1898
|
"summary": "Scale a profile uniformly or per-axis about an optional pivot. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1418
|
-
"examplePrompts": [
|
|
1899
|
+
"examplePrompts": [
|
|
1900
|
+
"Scale this outline down to half size",
|
|
1901
|
+
"Enlarge this boundary by 50 percent\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst half = await snaptrude.core.geom.update.profile.scale(rect, 0.5)\nconst stretched = await snaptrude.core.geom.update.profile.scale(rect, { x: 2, y: 1, z: 1 })\n```"
|
|
1902
|
+
],
|
|
1419
1903
|
"argsType": "ProfileHandle",
|
|
1420
1904
|
"resultType": "ProfileHandle"
|
|
1421
1905
|
},
|
|
@@ -1423,7 +1907,10 @@
|
|
|
1423
1907
|
"path": "core.geom.update.profile.simplify",
|
|
1424
1908
|
"namespace": "core.geom.update.profile",
|
|
1425
1909
|
"summary": "Simplify a profile by merging collinear/redundant segments. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1426
|
-
"examplePrompts": [
|
|
1910
|
+
"examplePrompts": [
|
|
1911
|
+
"Clean up this outline by merging collinear segments",
|
|
1912
|
+
"Simplify this polyline and remove redundant points\n\n# Example\n```ts\nconst p0 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst p1 = await snaptrude.core.math.vec3.new(2, 0, 0) // collinear with p0 and p2\nconst p2 = await snaptrude.core.math.vec3.new(4, 0, 0)\nconst p3 = await snaptrude.core.math.vec3.new(4, 0, 3)\nconst jagged = await snaptrude.core.geom.create.profileFromLinePoints([p0, p1, p2, p3])\nconst clean = await snaptrude.core.geom.update.profile.simplify(jagged)\nconst curves = await snaptrude.core.geom.query.profile.listCurves(clean) // p0→p2 merged\n```"
|
|
1913
|
+
],
|
|
1427
1914
|
"argsType": "ProfileHandle",
|
|
1428
1915
|
"resultType": "ProfileHandle"
|
|
1429
1916
|
},
|
|
@@ -1540,7 +2027,12 @@
|
|
|
1540
2027
|
"path": "core.history.redo",
|
|
1541
2028
|
"namespace": "core.history",
|
|
1542
2029
|
"summary": "Step forward over previously undone entries. Symmetric with {@linkcode PluginHistoryApi.undo}.",
|
|
1543
|
-
"examplePrompts": [
|
|
2030
|
+
"examplePrompts": [
|
|
2031
|
+
"Redo the change I just undid",
|
|
2032
|
+
"Redo the last two undone actions",
|
|
2033
|
+
"Bring back the edit I reverted",
|
|
2034
|
+
"Step forward again in the history\n\n# Example\n```ts\nawait snaptrude.core.history.redo()\nawait snaptrude.core.history.redo(2)\n```"
|
|
2035
|
+
],
|
|
1544
2036
|
"argsType": "number",
|
|
1545
2037
|
"resultType": "PluginHistoryStepResult"
|
|
1546
2038
|
},
|
|
@@ -1548,178 +2040,609 @@
|
|
|
1548
2040
|
"path": "core.history.undo",
|
|
1549
2041
|
"namespace": "core.history",
|
|
1550
2042
|
"summary": "Step back over committed history entries.",
|
|
1551
|
-
"examplePrompts": [
|
|
2043
|
+
"examplePrompts": [
|
|
2044
|
+
"Undo my last change",
|
|
2045
|
+
"Undo the last 3 actions",
|
|
2046
|
+
"Revert what I just did to the model",
|
|
2047
|
+
"Step back one change",
|
|
2048
|
+
"Take back that last edit\n\n# Example\n```ts\nawait snaptrude.core.history.undo() // one step\nawait snaptrude.core.history.undo(3) // up to three steps\n```"
|
|
2049
|
+
],
|
|
1552
2050
|
"argsType": "number",
|
|
1553
2051
|
"resultType": "PluginHistoryStepResult"
|
|
1554
2052
|
},
|
|
1555
2053
|
{
|
|
1556
|
-
"path": "core.
|
|
1557
|
-
"namespace": "core.
|
|
1558
|
-
"summary": "
|
|
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.",
|
|
1559
2057
|
"examplePrompts": [
|
|
1560
|
-
"
|
|
1561
|
-
"
|
|
1562
|
-
"
|
|
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```"
|
|
1563
2062
|
],
|
|
1564
|
-
"argsType": "
|
|
1565
|
-
"resultType": "
|
|
2063
|
+
"argsType": "CadJsonInput",
|
|
2064
|
+
"resultType": "UnderlayHandle"
|
|
1566
2065
|
},
|
|
1567
2066
|
{
|
|
1568
|
-
"path": "core.
|
|
1569
|
-
"namespace": "core.
|
|
1570
|
-
"summary": "
|
|
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).",
|
|
1571
2070
|
"examplePrompts": [
|
|
1572
|
-
"
|
|
1573
|
-
"
|
|
1574
|
-
"
|
|
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```"
|
|
1575
2074
|
],
|
|
1576
2075
|
"argsType": "string",
|
|
1577
|
-
"resultType": "
|
|
2076
|
+
"resultType": "ImportJobHandle"
|
|
1578
2077
|
},
|
|
1579
2078
|
{
|
|
1580
|
-
"path": "core.
|
|
1581
|
-
"namespace": "core.
|
|
1582
|
-
"summary": "
|
|
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.",
|
|
1583
2082
|
"examplePrompts": [
|
|
1584
|
-
"
|
|
1585
|
-
"
|
|
1586
|
-
"
|
|
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```"
|
|
1587
2087
|
],
|
|
1588
2088
|
"argsType": "string",
|
|
1589
|
-
"resultType": "
|
|
2089
|
+
"resultType": "UnderlayHandle"
|
|
1590
2090
|
},
|
|
1591
2091
|
{
|
|
1592
|
-
"path": "core.
|
|
1593
|
-
"namespace": "core.
|
|
1594
|
-
"summary": "
|
|
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.",
|
|
1595
2095
|
"examplePrompts": [
|
|
1596
|
-
"
|
|
1597
|
-
"
|
|
1598
|
-
"
|
|
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```"
|
|
1599
2099
|
],
|
|
1600
2100
|
"argsType": "string",
|
|
1601
|
-
"resultType": "
|
|
2101
|
+
"resultType": "ComponentHandle"
|
|
1602
2102
|
},
|
|
1603
2103
|
{
|
|
1604
|
-
"path": "core.
|
|
1605
|
-
"namespace": "core.
|
|
1606
|
-
"summary": "
|
|
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).",
|
|
1607
2107
|
"examplePrompts": [
|
|
1608
|
-
"
|
|
1609
|
-
"
|
|
1610
|
-
"
|
|
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```"
|
|
1611
2112
|
],
|
|
1612
2113
|
"argsType": "string",
|
|
1613
|
-
"resultType": "
|
|
2114
|
+
"resultType": "UnderlayHandle"
|
|
1614
2115
|
},
|
|
1615
2116
|
{
|
|
1616
|
-
"path": "core.
|
|
1617
|
-
"namespace": "core.
|
|
1618
|
-
"summary": "
|
|
1619
|
-
"examplePrompts": [
|
|
1620
|
-
|
|
1621
|
-
|
|
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"
|
|
1622
2128
|
},
|
|
1623
2129
|
{
|
|
1624
|
-
"path": "core.
|
|
1625
|
-
"namespace": "core.
|
|
1626
|
-
"summary": "
|
|
1627
|
-
"examplePrompts": [
|
|
1628
|
-
|
|
1629
|
-
|
|
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"
|
|
1630
2141
|
},
|
|
1631
2142
|
{
|
|
1632
|
-
"path": "core.
|
|
1633
|
-
"namespace": "core.
|
|
1634
|
-
"summary": "
|
|
1635
|
-
"examplePrompts": [
|
|
1636
|
-
|
|
1637
|
-
|
|
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"
|
|
1638
2154
|
},
|
|
1639
2155
|
{
|
|
1640
|
-
"path": "core.
|
|
1641
|
-
"namespace": "core.
|
|
1642
|
-
"summary": "
|
|
1643
|
-
"examplePrompts": [
|
|
1644
|
-
|
|
1645
|
-
|
|
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"
|
|
1646
2167
|
},
|
|
1647
2168
|
{
|
|
1648
|
-
"path": "core.
|
|
1649
|
-
"namespace": "core.
|
|
1650
|
-
"summary": "
|
|
1651
|
-
"examplePrompts": [
|
|
1652
|
-
|
|
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",
|
|
1653
2179
|
"resultType": "boolean"
|
|
1654
2180
|
},
|
|
1655
2181
|
{
|
|
1656
|
-
"path": "core.
|
|
1657
|
-
"namespace": "core.
|
|
1658
|
-
"summary": "
|
|
1659
|
-
"examplePrompts": [
|
|
1660
|
-
|
|
1661
|
-
|
|
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"
|
|
1662
2193
|
},
|
|
1663
2194
|
{
|
|
1664
|
-
"path": "core.
|
|
1665
|
-
"namespace": "core.
|
|
1666
|
-
"summary": "
|
|
1667
|
-
"examplePrompts": [
|
|
1668
|
-
|
|
1669
|
-
|
|
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[]"
|
|
1670
2206
|
},
|
|
1671
2207
|
{
|
|
1672
|
-
"path": "core.
|
|
1673
|
-
"namespace": "core.
|
|
1674
|
-
"summary": "
|
|
1675
|
-
"examplePrompts": [
|
|
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
|
+
],
|
|
1676
2217
|
"argsType": null,
|
|
1677
|
-
"resultType": "
|
|
2218
|
+
"resultType": "void"
|
|
1678
2219
|
},
|
|
1679
2220
|
{
|
|
1680
|
-
"path": "core.
|
|
1681
|
-
"namespace": "core.
|
|
1682
|
-
"summary": "
|
|
1683
|
-
"examplePrompts": [
|
|
1684
|
-
|
|
1685
|
-
|
|
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"
|
|
1686
2232
|
},
|
|
1687
2233
|
{
|
|
1688
|
-
"path": "core.
|
|
1689
|
-
"namespace": "core.
|
|
1690
|
-
"summary": "
|
|
1691
|
-
"examplePrompts": [
|
|
1692
|
-
|
|
1693
|
-
|
|
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"
|
|
1694
2245
|
},
|
|
1695
2246
|
{
|
|
1696
|
-
"path": "core.
|
|
1697
|
-
"namespace": "core.
|
|
1698
|
-
"summary": "
|
|
1699
|
-
"examplePrompts": [
|
|
1700
|
-
|
|
1701
|
-
|
|
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"
|
|
1702
2258
|
},
|
|
1703
2259
|
{
|
|
1704
|
-
"path": "core.
|
|
1705
|
-
"namespace": "core.
|
|
1706
|
-
"summary": "
|
|
1707
|
-
"examplePrompts": [
|
|
1708
|
-
|
|
1709
|
-
|
|
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"
|
|
1710
2271
|
},
|
|
1711
2272
|
{
|
|
1712
|
-
"path": "core.
|
|
1713
|
-
"namespace": "core.
|
|
1714
|
-
"summary": "
|
|
1715
|
-
"examplePrompts": [
|
|
1716
|
-
|
|
1717
|
-
|
|
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"
|
|
1718
2284
|
},
|
|
1719
2285
|
{
|
|
1720
|
-
"path": "core.
|
|
1721
|
-
"namespace": "core.
|
|
1722
|
-
"summary": "
|
|
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"
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
"path": "core.math.quat.normalize",
|
|
2636
|
+
"namespace": "core.math.quat",
|
|
2637
|
+
"summary": "Normalize a quaternion to unit length.",
|
|
2638
|
+
"examplePrompts": [],
|
|
2639
|
+
"argsType": "QuatHandle",
|
|
2640
|
+
"resultType": "QuatHandle"
|
|
2641
|
+
},
|
|
2642
|
+
{
|
|
2643
|
+
"path": "core.math.quat.slerp",
|
|
2644
|
+
"namespace": "core.math.quat",
|
|
2645
|
+
"summary": "Spherically interpolate (slerp) between two rotations by factor `t`.",
|
|
1723
2646
|
"examplePrompts": [],
|
|
1724
2647
|
"argsType": "QuatHandle",
|
|
1725
2648
|
"resultType": "QuatHandle"
|
|
@@ -1727,7 +2650,7 @@
|
|
|
1727
2650
|
{
|
|
1728
2651
|
"path": "core.math.quat.toAxisAngle",
|
|
1729
2652
|
"namespace": "core.math.quat",
|
|
1730
|
-
"summary": "Decompose into axis
|
|
2653
|
+
"summary": "Decompose a quaternion into its rotation axis and angle (radians).",
|
|
1731
2654
|
"examplePrompts": [],
|
|
1732
2655
|
"argsType": "QuatHandle",
|
|
1733
2656
|
"resultType": "{ axis: Vec3Handle; angle: number }"
|
|
@@ -1735,7 +2658,7 @@
|
|
|
1735
2658
|
{
|
|
1736
2659
|
"path": "core.math.vec3.add",
|
|
1737
2660
|
"namespace": "core.math.vec3",
|
|
1738
|
-
"summary": "
|
|
2661
|
+
"summary": "Add two vectors component-wise (`a + b`).",
|
|
1739
2662
|
"examplePrompts": [],
|
|
1740
2663
|
"argsType": "Vec3Handle",
|
|
1741
2664
|
"resultType": "Vec3Handle"
|
|
@@ -1751,7 +2674,7 @@
|
|
|
1751
2674
|
{
|
|
1752
2675
|
"path": "core.math.vec3.cross",
|
|
1753
2676
|
"namespace": "core.math.vec3",
|
|
1754
|
-
"summary": "
|
|
2677
|
+
"summary": "Compute the cross product `a × b` — the vector perpendicular to both.",
|
|
1755
2678
|
"examplePrompts": [],
|
|
1756
2679
|
"argsType": "Vec3Handle",
|
|
1757
2680
|
"resultType": "Vec3Handle"
|
|
@@ -1759,15 +2682,18 @@
|
|
|
1759
2682
|
{
|
|
1760
2683
|
"path": "core.math.vec3.distance",
|
|
1761
2684
|
"namespace": "core.math.vec3",
|
|
1762
|
-
"summary": "Euclidean distance between two points.",
|
|
1763
|
-
"examplePrompts": [
|
|
2685
|
+
"summary": "Measure the straight-line (Euclidean) distance between two points.",
|
|
2686
|
+
"examplePrompts": [
|
|
2687
|
+
"What is the distance between these two points?",
|
|
2688
|
+
"Measure how far apart these two points are\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(3, 4, 0)\nconst dist = await snaptrude.core.math.vec3.distance(a, b) // 5\n```"
|
|
2689
|
+
],
|
|
1764
2690
|
"argsType": "Vec3Handle",
|
|
1765
2691
|
"resultType": "number"
|
|
1766
2692
|
},
|
|
1767
2693
|
{
|
|
1768
2694
|
"path": "core.math.vec3.dot",
|
|
1769
2695
|
"namespace": "core.math.vec3",
|
|
1770
|
-
"summary": "
|
|
2696
|
+
"summary": "Compute the dot product of two vectors.",
|
|
1771
2697
|
"examplePrompts": [],
|
|
1772
2698
|
"argsType": "Vec3Handle",
|
|
1773
2699
|
"resultType": "number"
|
|
@@ -1775,7 +2701,7 @@
|
|
|
1775
2701
|
{
|
|
1776
2702
|
"path": "core.math.vec3.equals",
|
|
1777
2703
|
"namespace": "core.math.vec3",
|
|
1778
|
-
"summary": "
|
|
2704
|
+
"summary": "Test whether two vectors have exactly equal components.",
|
|
1779
2705
|
"examplePrompts": [],
|
|
1780
2706
|
"argsType": "Vec3Handle",
|
|
1781
2707
|
"resultType": "boolean"
|
|
@@ -1783,7 +2709,7 @@
|
|
|
1783
2709
|
{
|
|
1784
2710
|
"path": "core.math.vec3.equalsApprox",
|
|
1785
2711
|
"namespace": "core.math.vec3",
|
|
1786
|
-
"summary": "
|
|
2712
|
+
"summary": "Test whether two vectors are equal within a tolerance `epsilon` (default `1e-6`).",
|
|
1787
2713
|
"examplePrompts": [],
|
|
1788
2714
|
"argsType": "Vec3Handle",
|
|
1789
2715
|
"resultType": "boolean"
|
|
@@ -1791,7 +2717,7 @@
|
|
|
1791
2717
|
{
|
|
1792
2718
|
"path": "core.math.vec3.length",
|
|
1793
2719
|
"namespace": "core.math.vec3",
|
|
1794
|
-
"summary": "Euclidean length.",
|
|
2720
|
+
"summary": "Compute the Euclidean length (magnitude) of a vector.",
|
|
1795
2721
|
"examplePrompts": [],
|
|
1796
2722
|
"argsType": "Vec3Handle",
|
|
1797
2723
|
"resultType": "number"
|
|
@@ -1799,7 +2725,7 @@
|
|
|
1799
2725
|
{
|
|
1800
2726
|
"path": "core.math.vec3.lengthSquared",
|
|
1801
2727
|
"namespace": "core.math.vec3",
|
|
1802
|
-
"summary": "
|
|
2728
|
+
"summary": "Compute the squared Euclidean length of a vector (avoids the sqrt).",
|
|
1803
2729
|
"examplePrompts": [],
|
|
1804
2730
|
"argsType": "Vec3Handle",
|
|
1805
2731
|
"resultType": "number"
|
|
@@ -1807,7 +2733,7 @@
|
|
|
1807
2733
|
{
|
|
1808
2734
|
"path": "core.math.vec3.lerp",
|
|
1809
2735
|
"namespace": "core.math.vec3",
|
|
1810
|
-
"summary": "
|
|
2736
|
+
"summary": "Linearly interpolate between two vectors: `a + (b - a) * t`.",
|
|
1811
2737
|
"examplePrompts": [],
|
|
1812
2738
|
"argsType": "Vec3Handle",
|
|
1813
2739
|
"resultType": "Vec3Handle"
|
|
@@ -1815,7 +2741,7 @@
|
|
|
1815
2741
|
{
|
|
1816
2742
|
"path": "core.math.vec3.negate",
|
|
1817
2743
|
"namespace": "core.math.vec3",
|
|
1818
|
-
"summary": "Negate
|
|
2744
|
+
"summary": "Negate a vector, reversing its direction.",
|
|
1819
2745
|
"examplePrompts": [],
|
|
1820
2746
|
"argsType": "Vec3Handle",
|
|
1821
2747
|
"resultType": "Vec3Handle"
|
|
@@ -1831,7 +2757,7 @@
|
|
|
1831
2757
|
{
|
|
1832
2758
|
"path": "core.math.vec3.normalize",
|
|
1833
2759
|
"namespace": "core.math.vec3",
|
|
1834
|
-
"summary": "
|
|
2760
|
+
"summary": "Return the unit vector in the same direction (the zero vector if length is 0).",
|
|
1835
2761
|
"examplePrompts": [],
|
|
1836
2762
|
"argsType": "Vec3Handle",
|
|
1837
2763
|
"resultType": "Vec3Handle"
|
|
@@ -1847,7 +2773,7 @@
|
|
|
1847
2773
|
{
|
|
1848
2774
|
"path": "core.math.vec3.subtract",
|
|
1849
2775
|
"namespace": "core.math.vec3",
|
|
1850
|
-
"summary": "
|
|
2776
|
+
"summary": "Subtract vector `b` from `a` component-wise (`a - b`).",
|
|
1851
2777
|
"examplePrompts": [],
|
|
1852
2778
|
"argsType": "Vec3Handle",
|
|
1853
2779
|
"resultType": "Vec3Handle"
|
|
@@ -1856,39 +2782,64 @@
|
|
|
1856
2782
|
"path": "core.project.settings.getTolerance",
|
|
1857
2783
|
"namespace": "core.project.settings",
|
|
1858
2784
|
"summary": "Get the project tolerance as a numeric magnitude.",
|
|
1859
|
-
"examplePrompts": [
|
|
2785
|
+
"examplePrompts": [
|
|
2786
|
+
"What is the tolerance setting in this project?",
|
|
2787
|
+
"Check the current dimension precision of the model",
|
|
2788
|
+
"How precise are the measurements in this project?",
|
|
2789
|
+
"Show me the project's tolerance value\n\n# Example\n```ts\nconst tolerance = await snaptrude.core.project.settings.getTolerance()\nconsole.log(tolerance) // e.g. 0.01\n```"
|
|
2790
|
+
],
|
|
1860
2791
|
"argsType": null,
|
|
1861
2792
|
"resultType": "number"
|
|
1862
2793
|
},
|
|
1863
2794
|
{
|
|
1864
2795
|
"path": "core.project.settings.grid.disable",
|
|
1865
2796
|
"namespace": "core.project.settings.grid",
|
|
1866
|
-
"summary": "Turn the grid off.",
|
|
1867
|
-
"examplePrompts": [
|
|
2797
|
+
"summary": "Turn the grid off, hiding the visual snap-to grid in the canvas.",
|
|
2798
|
+
"examplePrompts": [
|
|
2799
|
+
"Turn off the grid",
|
|
2800
|
+
"Hide the grid",
|
|
2801
|
+
"Disable the background grid in the canvas",
|
|
2802
|
+
"Remove the drawing grid from view\n\n# Example\n```ts\nawait snaptrude.core.project.settings.grid.disable()\n```"
|
|
2803
|
+
],
|
|
1868
2804
|
"argsType": null,
|
|
1869
2805
|
"resultType": "boolean"
|
|
1870
2806
|
},
|
|
1871
2807
|
{
|
|
1872
2808
|
"path": "core.project.settings.grid.enable",
|
|
1873
2809
|
"namespace": "core.project.settings.grid",
|
|
1874
|
-
"summary": "Turn the grid on.",
|
|
1875
|
-
"examplePrompts": [
|
|
2810
|
+
"summary": "Turn the grid on, showing the visual snap-to grid in the canvas.",
|
|
2811
|
+
"examplePrompts": [
|
|
2812
|
+
"Turn on the grid",
|
|
2813
|
+
"Show the grid in my project",
|
|
2814
|
+
"Enable the drawing grid",
|
|
2815
|
+
"Switch the snap grid back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.grid.enable()\n```"
|
|
2816
|
+
],
|
|
1876
2817
|
"argsType": null,
|
|
1877
2818
|
"resultType": "boolean"
|
|
1878
2819
|
},
|
|
1879
2820
|
{
|
|
1880
2821
|
"path": "core.project.settings.grid.getValue",
|
|
1881
2822
|
"namespace": "core.project.settings.grid",
|
|
1882
|
-
"summary": "Get the grid cell value.",
|
|
1883
|
-
"examplePrompts": [
|
|
2823
|
+
"summary": "Get the current grid cell value — the size of each cell in the visual snap-to grid.",
|
|
2824
|
+
"examplePrompts": [
|
|
2825
|
+
"What is the grid spacing?",
|
|
2826
|
+
"Check the current grid cell size",
|
|
2827
|
+
"How big are the grid squares?",
|
|
2828
|
+
"Show me the grid size setting\n\n# Example\n```ts\nconst cellSize = await snaptrude.core.project.settings.grid.getValue()\nconsole.log(cellSize)\n```"
|
|
2829
|
+
],
|
|
1884
2830
|
"argsType": null,
|
|
1885
2831
|
"resultType": "number"
|
|
1886
2832
|
},
|
|
1887
2833
|
{
|
|
1888
2834
|
"path": "core.project.settings.grid.setValue",
|
|
1889
2835
|
"namespace": "core.project.settings.grid",
|
|
1890
|
-
"summary": "Set the grid cell value.",
|
|
1891
|
-
"examplePrompts": [
|
|
2836
|
+
"summary": "Set the grid cell value — the size of each cell in the visual snap-to grid.",
|
|
2837
|
+
"examplePrompts": [
|
|
2838
|
+
"Set the grid spacing to 1 metre",
|
|
2839
|
+
"Change the grid cell size to 500mm",
|
|
2840
|
+
"Make the grid squares 2 feet wide",
|
|
2841
|
+
"Adjust the grid size in this project\n\n# Example\n```ts\nawait snaptrude.core.project.settings.grid.setValue(1)\nawait snaptrude.core.project.settings.grid.enable()\n```"
|
|
2842
|
+
],
|
|
1892
2843
|
"argsType": "number",
|
|
1893
2844
|
"resultType": "boolean"
|
|
1894
2845
|
},
|
|
@@ -1896,122 +2847,305 @@
|
|
|
1896
2847
|
"path": "core.project.settings.setTolerance",
|
|
1897
2848
|
"namespace": "core.project.settings",
|
|
1898
2849
|
"summary": "Set the project tolerance. The value snaps to the **nearest allowed** per-unit precision option (tolerance is a discrete dropdown, not arbitrary).",
|
|
1899
|
-
"examplePrompts": [
|
|
2850
|
+
"examplePrompts": [
|
|
2851
|
+
"Set the project tolerance to 0.01",
|
|
2852
|
+
"Change the dimension precision to two decimal places",
|
|
2853
|
+
"Round dimensions to the nearest quarter inch",
|
|
2854
|
+
"Make the measurements in this project more precise\n\n# Example\n```ts\n// snaps to the nearest allowed precision option\nconst applied = await snaptrude.core.project.settings.setTolerance(0.01)\nif (!applied) console.log(\"no tolerance options available\")\n```"
|
|
2855
|
+
],
|
|
1900
2856
|
"argsType": "number",
|
|
1901
2857
|
"resultType": "boolean"
|
|
1902
2858
|
},
|
|
1903
2859
|
{
|
|
1904
2860
|
"path": "core.project.settings.snaps.disableAngle",
|
|
1905
2861
|
"namespace": "core.project.settings.snaps",
|
|
1906
|
-
"summary": "Turn angle snapping off.",
|
|
1907
|
-
"examplePrompts": [
|
|
2862
|
+
"summary": "Turn angle snapping off, so lines can be drawn at any angle without snapping to fixed increments.",
|
|
2863
|
+
"examplePrompts": [
|
|
2864
|
+
"Turn off angle snapping",
|
|
2865
|
+
"Stop lines snapping to fixed angles",
|
|
2866
|
+
"Disable the angle snap so I can draw at any angle",
|
|
2867
|
+
"Remove angle snapping while sketching\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableAngle()\n```"
|
|
2868
|
+
],
|
|
1908
2869
|
"argsType": null,
|
|
1909
2870
|
"resultType": "boolean"
|
|
1910
2871
|
},
|
|
1911
2872
|
{
|
|
1912
2873
|
"path": "core.project.settings.snaps.disableDimension",
|
|
1913
2874
|
"namespace": "core.project.settings.snaps",
|
|
1914
|
-
"summary": "Turn dimension snapping off.",
|
|
1915
|
-
"examplePrompts": [
|
|
2875
|
+
"summary": "Turn dimension snapping off, so lengths no longer snap to the configured increment while drawing.",
|
|
2876
|
+
"examplePrompts": [
|
|
2877
|
+
"Turn off dimension snapping",
|
|
2878
|
+
"Stop snapping to fixed lengths when I draw",
|
|
2879
|
+
"Disable the length snap so I can draw freely",
|
|
2880
|
+
"I don't want dimensions to snap anymore\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableDimension()\n```"
|
|
2881
|
+
],
|
|
1916
2882
|
"argsType": null,
|
|
1917
2883
|
"resultType": "boolean"
|
|
1918
2884
|
},
|
|
1919
2885
|
{
|
|
1920
2886
|
"path": "core.project.settings.snaps.disableMagnetic",
|
|
1921
2887
|
"namespace": "core.project.settings.snaps",
|
|
1922
|
-
"summary": "Turn magnetic snapping off.",
|
|
1923
|
-
"examplePrompts": [
|
|
2888
|
+
"summary": "Turn magnetic snapping off, so the cursor is no longer pulled to nearby geometry while drawing.",
|
|
2889
|
+
"examplePrompts": [
|
|
2890
|
+
"Turn off magnetic snapping",
|
|
2891
|
+
"Disable the magnet snap",
|
|
2892
|
+
"Stop the cursor sticking to nearby objects",
|
|
2893
|
+
"The magnetic snap is annoying, switch it off\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableMagnetic()\n```"
|
|
2894
|
+
],
|
|
1924
2895
|
"argsType": null,
|
|
1925
2896
|
"resultType": "boolean"
|
|
1926
2897
|
},
|
|
1927
2898
|
{
|
|
1928
2899
|
"path": "core.project.settings.snaps.disableNormal",
|
|
1929
2900
|
"namespace": "core.project.settings.snaps",
|
|
1930
|
-
"summary": "Turn normal (perpendicular) snapping off.",
|
|
1931
|
-
"examplePrompts": [
|
|
2901
|
+
"summary": "Turn normal (perpendicular) snapping off, so drawing no longer snaps at right angles to existing edges.",
|
|
2902
|
+
"examplePrompts": [
|
|
2903
|
+
"Turn off perpendicular snapping",
|
|
2904
|
+
"Disable the normal snap",
|
|
2905
|
+
"Stop snapping at right angles to edges",
|
|
2906
|
+
"Remove the 90 degree snap guide\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableNormal()\n```"
|
|
2907
|
+
],
|
|
1932
2908
|
"argsType": null,
|
|
1933
2909
|
"resultType": "boolean"
|
|
1934
2910
|
},
|
|
1935
2911
|
{
|
|
1936
2912
|
"path": "core.project.settings.snaps.disableParallel",
|
|
1937
2913
|
"namespace": "core.project.settings.snaps",
|
|
1938
|
-
"summary": "Turn parallel snapping off.",
|
|
1939
|
-
"examplePrompts": [
|
|
2914
|
+
"summary": "Turn parallel snapping off, so drawing no longer snaps to directions parallel to existing edges.",
|
|
2915
|
+
"examplePrompts": [
|
|
2916
|
+
"Turn off parallel snapping",
|
|
2917
|
+
"Stop snapping to parallel edges",
|
|
2918
|
+
"Disable the parallel snap guide",
|
|
2919
|
+
"I don't want my lines snapping parallel anymore\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableParallel()\n```"
|
|
2920
|
+
],
|
|
1940
2921
|
"argsType": null,
|
|
1941
2922
|
"resultType": "boolean"
|
|
1942
2923
|
},
|
|
1943
2924
|
{
|
|
1944
2925
|
"path": "core.project.settings.snaps.enableAngle",
|
|
1945
2926
|
"namespace": "core.project.settings.snaps",
|
|
1946
|
-
"summary": "Turn angle snapping on.",
|
|
1947
|
-
"examplePrompts": [
|
|
2927
|
+
"summary": "Turn angle snapping on, so drawn lines snap to the configured angle increment.",
|
|
2928
|
+
"examplePrompts": [
|
|
2929
|
+
"Turn on angle snapping",
|
|
2930
|
+
"Enable snapping to angles while drawing",
|
|
2931
|
+
"Make my lines snap to set angles",
|
|
2932
|
+
"Switch angle snap back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableAngle()\n```"
|
|
2933
|
+
],
|
|
1948
2934
|
"argsType": null,
|
|
1949
2935
|
"resultType": "boolean"
|
|
1950
2936
|
},
|
|
1951
2937
|
{
|
|
1952
2938
|
"path": "core.project.settings.snaps.enableDimension",
|
|
1953
2939
|
"namespace": "core.project.settings.snaps",
|
|
1954
|
-
"summary": "Turn dimension snapping on.",
|
|
1955
|
-
"examplePrompts": [
|
|
2940
|
+
"summary": "Turn dimension snapping on, so drawing and editing snap to the configured length increment.",
|
|
2941
|
+
"examplePrompts": [
|
|
2942
|
+
"Turn on dimension snapping",
|
|
2943
|
+
"Enable snapping to set lengths while I draw",
|
|
2944
|
+
"Make my walls snap to round dimensions",
|
|
2945
|
+
"Switch length snapping back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableDimension()\n```"
|
|
2946
|
+
],
|
|
1956
2947
|
"argsType": null,
|
|
1957
2948
|
"resultType": "boolean"
|
|
1958
2949
|
},
|
|
1959
2950
|
{
|
|
1960
2951
|
"path": "core.project.settings.snaps.enableMagnetic",
|
|
1961
2952
|
"namespace": "core.project.settings.snaps",
|
|
1962
|
-
"summary": "Turn magnetic snapping on.",
|
|
1963
|
-
"examplePrompts": [
|
|
2953
|
+
"summary": "Turn magnetic snapping on, so the cursor is pulled to nearby geometry while drawing.",
|
|
2954
|
+
"examplePrompts": [
|
|
2955
|
+
"Turn on magnetic snapping",
|
|
2956
|
+
"Enable the magnet snap",
|
|
2957
|
+
"Make the cursor stick to nearby geometry when drawing",
|
|
2958
|
+
"Switch magnetic snap back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableMagnetic()\n```"
|
|
2959
|
+
],
|
|
1964
2960
|
"argsType": null,
|
|
1965
2961
|
"resultType": "boolean"
|
|
1966
2962
|
},
|
|
1967
2963
|
{
|
|
1968
2964
|
"path": "core.project.settings.snaps.enableNormal",
|
|
1969
2965
|
"namespace": "core.project.settings.snaps",
|
|
1970
|
-
"summary": "Turn normal (perpendicular) snapping on.",
|
|
1971
|
-
"examplePrompts": [
|
|
2966
|
+
"summary": "Turn normal (perpendicular) snapping on, so drawing snaps when the cursor is at a right angle to existing edges.",
|
|
2967
|
+
"examplePrompts": [
|
|
2968
|
+
"Turn on perpendicular snapping",
|
|
2969
|
+
"Enable the normal snap so lines snap at right angles",
|
|
2970
|
+
"Snap to perpendicular when I draw walls",
|
|
2971
|
+
"Help me draw at 90 degrees to existing edges\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableNormal()\n```"
|
|
2972
|
+
],
|
|
1972
2973
|
"argsType": null,
|
|
1973
2974
|
"resultType": "boolean"
|
|
1974
2975
|
},
|
|
1975
2976
|
{
|
|
1976
2977
|
"path": "core.project.settings.snaps.enableParallel",
|
|
1977
2978
|
"namespace": "core.project.settings.snaps",
|
|
1978
|
-
"summary": "Turn parallel snapping on.",
|
|
1979
|
-
"examplePrompts": [
|
|
2979
|
+
"summary": "Turn parallel snapping on, so drawing snaps when the cursor lines up parallel to existing edges.",
|
|
2980
|
+
"examplePrompts": [
|
|
2981
|
+
"Turn on parallel snapping",
|
|
2982
|
+
"Enable snapping to parallel lines",
|
|
2983
|
+
"Help me draw walls parallel to existing ones",
|
|
2984
|
+
"Snap to parallel edges when drawing\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableParallel()\n```"
|
|
2985
|
+
],
|
|
1980
2986
|
"argsType": null,
|
|
1981
2987
|
"resultType": "boolean"
|
|
1982
2988
|
},
|
|
1983
2989
|
{
|
|
1984
2990
|
"path": "core.project.settings.snaps.getAngle",
|
|
1985
2991
|
"namespace": "core.project.settings.snaps",
|
|
1986
|
-
"summary": "Get the angle-snap threshold
|
|
1987
|
-
"examplePrompts": [
|
|
2992
|
+
"summary": "Get the current angle-snap threshold in degrees — the angular increment that drawing snaps to when angle snapping is on.",
|
|
2993
|
+
"examplePrompts": [
|
|
2994
|
+
"What angle does drawing snap to?",
|
|
2995
|
+
"Check the current angle snap in degrees",
|
|
2996
|
+
"Show me the angle snapping increment",
|
|
2997
|
+
"How many degrees is the angle snap set to?\n\n# Example\n```ts\nconst degrees = await snaptrude.core.project.settings.snaps.getAngle()\nconsole.log(degrees)\n```"
|
|
2998
|
+
],
|
|
1988
2999
|
"argsType": null,
|
|
1989
3000
|
"resultType": "number"
|
|
1990
3001
|
},
|
|
1991
3002
|
{
|
|
1992
3003
|
"path": "core.project.settings.snaps.getDimension",
|
|
1993
3004
|
"namespace": "core.project.settings.snaps",
|
|
1994
|
-
"summary": "Get the dimension-snap threshold.",
|
|
1995
|
-
"examplePrompts": [
|
|
3005
|
+
"summary": "Get the current dimension-snap threshold — the length increment that drawing and editing snap to when dimension snapping is on.",
|
|
3006
|
+
"examplePrompts": [
|
|
3007
|
+
"What is the dimension snap distance?",
|
|
3008
|
+
"Check the current snap increment for drawing",
|
|
3009
|
+
"How far apart are the length snaps set?",
|
|
3010
|
+
"Show me the snap spacing value\n\n# Example\n```ts\nconst increment = await snaptrude.core.project.settings.snaps.getDimension()\nconsole.log(increment)\n```"
|
|
3011
|
+
],
|
|
1996
3012
|
"argsType": null,
|
|
1997
3013
|
"resultType": "number"
|
|
1998
3014
|
},
|
|
1999
3015
|
{
|
|
2000
3016
|
"path": "core.project.settings.snaps.setAngle",
|
|
2001
3017
|
"namespace": "core.project.settings.snaps",
|
|
2002
|
-
"summary": "Set the angle-snap threshold
|
|
2003
|
-
"examplePrompts": [
|
|
3018
|
+
"summary": "Set the angle-snap threshold in degrees — the angular increment that drawing snaps to when angle snapping is on.",
|
|
3019
|
+
"examplePrompts": [
|
|
3020
|
+
"Set the angle snap to 15 degrees",
|
|
3021
|
+
"Change angle snapping to every 45 degrees",
|
|
3022
|
+
"Make drawing snap at 30 degree increments",
|
|
3023
|
+
"Adjust the rotation snap angle\n\n# Example\n```ts\n// snap drawing to 15-degree increments (applies while angle snapping is on)\nawait snaptrude.core.project.settings.snaps.setAngle(15)\nawait snaptrude.core.project.settings.snaps.enableAngle()\n```"
|
|
3024
|
+
],
|
|
2004
3025
|
"argsType": "number",
|
|
2005
3026
|
"resultType": "boolean"
|
|
2006
3027
|
},
|
|
2007
3028
|
{
|
|
2008
3029
|
"path": "core.project.settings.snaps.setDimension",
|
|
2009
3030
|
"namespace": "core.project.settings.snaps",
|
|
2010
|
-
"summary": "Set the dimension-snap threshold.",
|
|
2011
|
-
"examplePrompts": [
|
|
3031
|
+
"summary": "Set the dimension-snap threshold — the length increment that drawing and editing snap to when dimension snapping is on.",
|
|
3032
|
+
"examplePrompts": [
|
|
3033
|
+
"Set the dimension snap to 100mm",
|
|
3034
|
+
"Change the snap distance to half a metre",
|
|
3035
|
+
"Make the cursor snap every 6 inches when drawing",
|
|
3036
|
+
"Adjust the snapping increment for lengths\n\n# Example\n```ts\n// the threshold only applies while dimension snapping is on\nawait snaptrude.core.project.settings.snaps.setDimension(100)\nawait snaptrude.core.project.settings.snaps.enableDimension()\n```"
|
|
3037
|
+
],
|
|
2012
3038
|
"argsType": "number",
|
|
2013
3039
|
"resultType": "boolean"
|
|
2014
3040
|
},
|
|
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
|
+
},
|
|
2015
3149
|
{
|
|
2016
3150
|
"path": "core.tags.assign",
|
|
2017
3151
|
"namespace": "core.tags",
|
|
@@ -2184,23 +3318,38 @@
|
|
|
2184
3318
|
"path": "core.units.convert",
|
|
2185
3319
|
"namespace": "core.units",
|
|
2186
3320
|
"summary": "Convert a value between two unit types.",
|
|
2187
|
-
"examplePrompts": [
|
|
3321
|
+
"examplePrompts": [
|
|
3322
|
+
"Convert 5 meters to feet and inches",
|
|
3323
|
+
"How many millimetres is 12 feet?",
|
|
3324
|
+
"Change this area from internal units to square metres",
|
|
3325
|
+
"Turn 2500 mm into meters",
|
|
3326
|
+
"Convert a volume value from babylon units to cubic feet\n\n# Example\n```ts\n// 5 meters → internal babylon units\nconst b = await snaptrude.core.units.convert(5, \"meters\", \"babylon\")\n// an internal area → square metres\nconst m2 = await snaptrude.core.units.convert(area, \"babylon\", \"meters\", 2)\n```"
|
|
3327
|
+
],
|
|
2188
3328
|
"argsType": "number",
|
|
2189
3329
|
"resultType": "number"
|
|
2190
3330
|
},
|
|
2191
3331
|
{
|
|
2192
3332
|
"path": "core.units.getBabylonType",
|
|
2193
3333
|
"namespace": "core.units",
|
|
2194
|
-
"summary": "
|
|
2195
|
-
"examplePrompts": [
|
|
3334
|
+
"summary": "Get the internal storage unit type that all geometry is kept in — always `\"babylon\"` — for use as one side of a {@linkcode PluginUnitsApi.convert} call.",
|
|
3335
|
+
"examplePrompts": [
|
|
3336
|
+
"What unit does Snaptrude store geometry in internally?",
|
|
3337
|
+
"Get the internal babylon unit type",
|
|
3338
|
+
"Which unit are raw model coordinates saved in?\n\n# Example\n```ts\nconst babylon = await snaptrude.core.units.getBabylonType() // \"babylon\"\nconst meters = await snaptrude.core.units.convert(10, babylon, \"meters\")\n```"
|
|
3339
|
+
],
|
|
2196
3340
|
"argsType": null,
|
|
2197
3341
|
"resultType": "PUnitType"
|
|
2198
3342
|
},
|
|
2199
3343
|
{
|
|
2200
3344
|
"path": "core.units.getType",
|
|
2201
3345
|
"namespace": "core.units",
|
|
2202
|
-
"summary": "
|
|
2203
|
-
"examplePrompts": [
|
|
3346
|
+
"summary": "Get the current project's unit type — the unit lengths are displayed and entered in. Paired with {@linkcode PluginUnitsApi.setType}.",
|
|
3347
|
+
"examplePrompts": [
|
|
3348
|
+
"What units is this project using?",
|
|
3349
|
+
"Are we working in metric or imperial?",
|
|
3350
|
+
"Check the current measurement unit of the model",
|
|
3351
|
+
"Is the file set to millimetres or feet and inches?\n\n# Example\n```ts\nconst type = await snaptrude.core.units.getType()\nconsole.log(type) // e.g. \"millimeters\"\n```"
|
|
3352
|
+
],
|
|
2204
3353
|
"argsType": null,
|
|
2205
3354
|
"resultType": "PUnitType"
|
|
2206
3355
|
},
|
|
@@ -2208,7 +3357,12 @@
|
|
|
2208
3357
|
"path": "core.units.listTypes",
|
|
2209
3358
|
"namespace": "core.units",
|
|
2210
3359
|
"summary": "List the selectable real-world unit types (excludes the internal `babylon` storage type, which is read via {@linkcode PluginUnitsApi.getBabylonType}).",
|
|
2211
|
-
"examplePrompts": [
|
|
3360
|
+
"examplePrompts": [
|
|
3361
|
+
"What units can I use in this project?",
|
|
3362
|
+
"List all the available measurement units",
|
|
3363
|
+
"Which unit systems does Snaptrude support?",
|
|
3364
|
+
"Show the unit options I could switch the model to\n\n# Example\n```ts\nconst types = await snaptrude.core.units.listTypes()\nconsole.log(types) // [\"meters\", \"feet-inches\", \"inches\", ...]\n```"
|
|
3365
|
+
],
|
|
2212
3366
|
"argsType": null,
|
|
2213
3367
|
"resultType": "PUnitType[]"
|
|
2214
3368
|
},
|
|
@@ -2216,7 +3370,12 @@
|
|
|
2216
3370
|
"path": "core.units.setType",
|
|
2217
3371
|
"namespace": "core.units",
|
|
2218
3372
|
"summary": "Set the current project's unit type. Paired with {@linkcode PluginUnitsApi.getType}.",
|
|
2219
|
-
"examplePrompts": [
|
|
3373
|
+
"examplePrompts": [
|
|
3374
|
+
"Change the project units to millimeters",
|
|
3375
|
+
"Switch this model to feet and inches",
|
|
3376
|
+
"Set the working units to metric",
|
|
3377
|
+
"Make the drawing use centimetres instead of meters\n\n# Example\n```ts\nawait snaptrude.core.units.setType(\"meters\")\n```"
|
|
3378
|
+
],
|
|
2220
3379
|
"argsType": "PUnitType",
|
|
2221
3380
|
"resultType": "boolean"
|
|
2222
3381
|
},
|
|
@@ -2224,7 +3383,13 @@
|
|
|
2224
3383
|
"path": "core.zoom.extents",
|
|
2225
3384
|
"namespace": "core.zoom",
|
|
2226
3385
|
"summary": "Zoom (fit) the camera to all geometry in the scene — the \"zoom extents\" action.",
|
|
2227
|
-
"examplePrompts": [
|
|
3386
|
+
"examplePrompts": [
|
|
3387
|
+
"Zoom out so I can see the whole model",
|
|
3388
|
+
"Fit everything in the view",
|
|
3389
|
+
"Frame the entire building in the viewport",
|
|
3390
|
+
"Do a zoom extents on the canvas",
|
|
3391
|
+
"Show me the full scene\n\n# Example\n```ts\nawait snaptrude.core.zoom.extents()\n```"
|
|
3392
|
+
],
|
|
2228
3393
|
"argsType": null,
|
|
2229
3394
|
"resultType": "boolean"
|
|
2230
3395
|
},
|
|
@@ -2232,31 +3397,53 @@
|
|
|
2232
3397
|
"path": "core.zoom.selection",
|
|
2233
3398
|
"namespace": "core.zoom",
|
|
2234
3399
|
"summary": "Zoom (fit) the camera to the current selection.",
|
|
2235
|
-
"examplePrompts": [
|
|
3400
|
+
"examplePrompts": [
|
|
3401
|
+
"Zoom in on what I have selected",
|
|
3402
|
+
"Frame the selected walls in the view",
|
|
3403
|
+
"Focus the camera on my current selection",
|
|
3404
|
+
"Fit the view to the selected room\n\n# Example\n```ts\nawait snaptrude.core.zoom.selection()\n```"
|
|
3405
|
+
],
|
|
2236
3406
|
"argsType": null,
|
|
2237
3407
|
"resultType": "boolean"
|
|
2238
3408
|
},
|
|
2239
3409
|
{
|
|
2240
3410
|
"path": "design.boolean.intersect",
|
|
2241
3411
|
"namespace": "design.boolean",
|
|
2242
|
-
"summary": "Keep only the
|
|
2243
|
-
"examplePrompts": [
|
|
3412
|
+
"summary": "Keep only the overlapping volume of exactly two masses (`A ∩ B`) — a boolean (CSG) intersection that discards everything outside the shared region and commits the overlap as a single undoable step. Order-independent.",
|
|
3413
|
+
"examplePrompts": [
|
|
3414
|
+
"Keep only the part where these two masses overlap",
|
|
3415
|
+
"Intersect the two selected volumes",
|
|
3416
|
+
"Give me the common volume between the tower and the zoning envelope",
|
|
3417
|
+
"Trim this mass down to just its overlap with the other one\n\n# Example\n```ts\n// Keep only the overlap of the tower and the zoning envelope (EXACTLY 2 inputs),\n// shifting the result mass 10 units in x via the optional offset\nconst [tower, envelope] = await snaptrude.design.query.listMasses()\nconst offset = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst { created } = await snaptrude.design.boolean.intersect([tower, envelope], { offset })\n```"
|
|
3418
|
+
],
|
|
2244
3419
|
"argsType": "ComponentHandle[]",
|
|
2245
3420
|
"resultType": "BooleanOutcome"
|
|
2246
3421
|
},
|
|
2247
3422
|
{
|
|
2248
3423
|
"path": "design.boolean.subtract",
|
|
2249
3424
|
"namespace": "design.boolean",
|
|
2250
|
-
"summary": "
|
|
2251
|
-
"examplePrompts": [
|
|
3425
|
+
"summary": "Cut one or more tool masses out of a target mass (`target − ⋃tools`) — a boolean (CSG) subtraction that carves the tools' volume out of the target and commits the remainder as a single undoable step.",
|
|
3426
|
+
"examplePrompts": [
|
|
3427
|
+
"Cut this shape out of the bigger mass",
|
|
3428
|
+
"Subtract the cylinder from the building volume",
|
|
3429
|
+
"Punch an opening through this block using the small box",
|
|
3430
|
+
"Carve the courtyard volume out of the main massing",
|
|
3431
|
+
"Remove the overlapping part of mass B from mass A\n\n# Example\n```ts\n// Order matters: the first arg is the target, the array holds the tools\nconst [building, courtyard] = await snaptrude.design.selection.get()\nconst { created, deleted } = await snaptrude.design.boolean.subtract(building, [courtyard])\n// deleted includes the target AND every tool; created is the remainder\n```"
|
|
3432
|
+
],
|
|
2252
3433
|
"argsType": "ComponentHandle",
|
|
2253
3434
|
"resultType": "BooleanOutcome"
|
|
2254
3435
|
},
|
|
2255
3436
|
{
|
|
2256
3437
|
"path": "design.boolean.union",
|
|
2257
3438
|
"namespace": "design.boolean",
|
|
2258
|
-
"summary": "Fuse
|
|
2259
|
-
"examplePrompts": [
|
|
3439
|
+
"summary": "Fuse two or more masses into a single combined mass (`A ∪ B ∪ …`) — a boolean (CSG) union that merges the adjacent or overlapping inputs into one solid, committed as a single undoable step. Order-independent.",
|
|
3440
|
+
"examplePrompts": [
|
|
3441
|
+
"Merge these two masses into one",
|
|
3442
|
+
"Union the selected volumes into a single mass",
|
|
3443
|
+
"Combine the overlapping rooms into one shape",
|
|
3444
|
+
"Join the tower and podium blocks together",
|
|
3445
|
+
"Fuse all the selected massing blocks into a single solid\n\n# Example\n```ts\n// Fuse the overlapping massing blocks on the ground storey into one solid\nconst masses = await snaptrude.design.query.listMasses({ storeys: [1] })\nconst { created, deleted } = await snaptrude.design.boolean.union(masses)\nconsole.log(\"created\", created.length, \"mass; consumed\", deleted.length)\n```"
|
|
3446
|
+
],
|
|
2260
3447
|
"argsType": "ComponentHandle[]",
|
|
2261
3448
|
"resultType": "BooleanOutcome"
|
|
2262
3449
|
},
|
|
@@ -2264,7 +3451,12 @@
|
|
|
2264
3451
|
"path": "design.create.beam",
|
|
2265
3452
|
"namespace": "design.create",
|
|
2266
3453
|
"summary": "Create a **beam** by extruding a cross-section contour along `direction` by `length`.",
|
|
2267
|
-
"examplePrompts": [
|
|
3454
|
+
"examplePrompts": [
|
|
3455
|
+
"Add a beam spanning 6 metres between the columns",
|
|
3456
|
+
"Create a horizontal beam along the X axis",
|
|
3457
|
+
"Run a 300x600 beam across the room",
|
|
3458
|
+
"Extrude this cross-section into a 5m long beam\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.3, 0.6)\nconst section = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst alongX = await snaptrude.core.math.vec3.new(1, 0, 0)\nconst beam = await snaptrude.design.create.beam(section, 6, alongX)\n```"
|
|
3459
|
+
],
|
|
2268
3460
|
"argsType": "ContourHandle",
|
|
2269
3461
|
"resultType": "ComponentHandle"
|
|
2270
3462
|
},
|
|
@@ -2272,7 +3464,12 @@
|
|
|
2272
3464
|
"path": "design.create.ceiling",
|
|
2273
3465
|
"namespace": "design.create",
|
|
2274
3466
|
"summary": "Create a **ceiling** by extruding a footprint contour by `thickness`, lifted `heightFromFloor` above the floor.",
|
|
2275
|
-
"examplePrompts": [
|
|
3467
|
+
"examplePrompts": [
|
|
3468
|
+
"Add a false ceiling 2.7m above the floor",
|
|
3469
|
+
"Create a ceiling over this room footprint",
|
|
3470
|
+
"Put a dropped ceiling in the living room at 3 metres",
|
|
3471
|
+
"Add a 50mm thick ceiling lifted 2800mm from floor level\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(5, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst ceiling = await snaptrude.design.create.ceiling(contour, 0.05, 2.8)\n```"
|
|
3472
|
+
],
|
|
2276
3473
|
"argsType": "ContourHandle",
|
|
2277
3474
|
"resultType": "ComponentHandle"
|
|
2278
3475
|
},
|
|
@@ -2280,7 +3477,12 @@
|
|
|
2280
3477
|
"path": "design.create.column",
|
|
2281
3478
|
"namespace": "design.create",
|
|
2282
3479
|
"summary": "Create a **column** by extruding a cross-section contour upward by `height` from a base `position`.",
|
|
2283
|
-
"examplePrompts": [
|
|
3480
|
+
"examplePrompts": [
|
|
3481
|
+
"Add a 3m tall column at this point",
|
|
3482
|
+
"Place a column at the grid intersection",
|
|
3483
|
+
"Create a 450mm square concrete column 4 metres high",
|
|
3484
|
+
"Stand a column up from this base point\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.45, 0.45)\nconst crossSection = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst base = await snaptrude.core.math.vec3.new(4, 0, 4)\nconst column = await snaptrude.design.create.column(base, crossSection, 3)\n```"
|
|
3485
|
+
],
|
|
2284
3486
|
"argsType": "Vec3Handle",
|
|
2285
3487
|
"resultType": "ComponentHandle"
|
|
2286
3488
|
},
|
|
@@ -2288,15 +3490,40 @@
|
|
|
2288
3490
|
"path": "design.create.copy",
|
|
2289
3491
|
"namespace": "design.create",
|
|
2290
3492
|
"summary": "**Copy** existing entities, offsetting each copy by `displacement * i` (i = 1…count), source positions preserved. Migrated from the removed `tools.copy`. In `\"instance\"` mode copies stay in the source's instance family where possible; `\"unique\"` makes independent geometry. The created copies become the active selection. Undoable.",
|
|
2291
|
-
"examplePrompts": [
|
|
3493
|
+
"examplePrompts": [
|
|
3494
|
+
"Copy this room 3 times spaced 6m apart",
|
|
3495
|
+
"Duplicate the selected furniture along the X axis",
|
|
3496
|
+
"Make 5 copies of this column at 4 metre intervals",
|
|
3497
|
+
"Array these walls with a 3m offset",
|
|
3498
|
+
"Clone the desk as a unique copy, not an instance\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\nconst copies = await snaptrude.design.create.copy([\"space-id\"], vec3.new(6, 0, 0), { count: 3 })\n```"
|
|
3499
|
+
],
|
|
2292
3500
|
"argsType": "ComponentHandle[]",
|
|
2293
3501
|
"resultType": "ComponentHandle[]"
|
|
2294
3502
|
},
|
|
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
|
+
},
|
|
2295
3517
|
{
|
|
2296
3518
|
"path": "design.create.floor",
|
|
2297
3519
|
"namespace": "design.create",
|
|
2298
3520
|
"summary": "Create a **floor** by extruding a footprint contour by `thickness` (extruded upward).",
|
|
2299
|
-
"examplePrompts": [
|
|
3521
|
+
"examplePrompts": [
|
|
3522
|
+
"Create a floor from this room outline",
|
|
3523
|
+
"Add a 100mm thick floor over the footprint",
|
|
3524
|
+
"Lay flooring across the selected outline",
|
|
3525
|
+
"Put a floor at this position with 150mm thickness\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(5, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst floor = await snaptrude.design.create.floor(contour, 0.1)\n```"
|
|
3526
|
+
],
|
|
2300
3527
|
"argsType": "ContourHandle",
|
|
2301
3528
|
"resultType": "ComponentHandle"
|
|
2302
3529
|
},
|
|
@@ -2304,7 +3531,13 @@
|
|
|
2304
3531
|
"path": "design.create.furniture",
|
|
2305
3532
|
"namespace": "design.create",
|
|
2306
3533
|
"summary": "Place a **furniture** item from the project library at a world position.",
|
|
2307
|
-
"examplePrompts": [
|
|
3534
|
+
"examplePrompts": [
|
|
3535
|
+
"Place a chair from the library at this spot",
|
|
3536
|
+
"Add a sofa from the furniture catalog to the living room",
|
|
3537
|
+
"Drop a desk into the scene at 3, 0, 5",
|
|
3538
|
+
"Insert the uploaded bed model in the bedroom",
|
|
3539
|
+
"Put a table from my project library here and name it Table-01\n\n# Example\n```ts\nconst chair = await snaptrude.design.create.furniture(\n\"6620f1a…\", // from design.furniture.listCatalog()\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Chair-01\" },\n)\n```"
|
|
3540
|
+
],
|
|
2308
3541
|
"argsType": "string",
|
|
2309
3542
|
"resultType": "ComponentHandle"
|
|
2310
3543
|
},
|
|
@@ -2312,7 +3545,12 @@
|
|
|
2312
3545
|
"path": "design.create.mass",
|
|
2313
3546
|
"namespace": "design.create",
|
|
2314
3547
|
"summary": "Create a **mass** — a generic extruded prism (default `massType` \"Generic mass\"). Same footprint-extrude path as {@linkcode PluginDesignCreateApi.space}.",
|
|
2315
|
-
"examplePrompts": [
|
|
3548
|
+
"examplePrompts": [
|
|
3549
|
+
"Create a generic mass 30m tall from this footprint",
|
|
3550
|
+
"Block out a conceptual massing volume for the site",
|
|
3551
|
+
"Extrude this shape into a building mass",
|
|
3552
|
+
"Add a simple study-model volume at the origin\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(20, 15)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst tower = await snaptrude.design.create.mass(contour, 30, \"Tower A\", undefined, \"Building\")\n```"
|
|
3553
|
+
],
|
|
2316
3554
|
"argsType": "ContourHandle",
|
|
2317
3555
|
"resultType": "ComponentHandle"
|
|
2318
3556
|
},
|
|
@@ -2320,7 +3558,13 @@
|
|
|
2320
3558
|
"path": "design.create.referenceLines",
|
|
2321
3559
|
"namespace": "design.create",
|
|
2322
3560
|
"summary": "Create **reference lines** from a profile — one reference line per curve in the profile's ordered chain. Returns a handle per created line.",
|
|
2323
|
-
"examplePrompts": [
|
|
3561
|
+
"examplePrompts": [
|
|
3562
|
+
"Draw a reference line between these two points",
|
|
3563
|
+
"Add dashed guide lines along this path",
|
|
3564
|
+
"Create grid lines tagged A through the plan",
|
|
3565
|
+
"Set up construction lines for the column grid",
|
|
3566
|
+
"Mark a red reference line across the site\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst profile = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(10, 0, 0),\n])\nconst lines = await snaptrude.design.create.referenceLines(\nprofile,\nundefined,\nundefined,\n\"DASHED\",\n)\n```"
|
|
3567
|
+
],
|
|
2324
3568
|
"argsType": "ProfileHandle",
|
|
2325
3569
|
"resultType": "ComponentHandle[]"
|
|
2326
3570
|
},
|
|
@@ -2328,7 +3572,12 @@
|
|
|
2328
3572
|
"path": "design.create.roof",
|
|
2329
3573
|
"namespace": "design.create",
|
|
2330
3574
|
"summary": "Create a **roof** by extruding a footprint contour by `thickness`. Created flat (extruded downward); pitch/slope is a separate post-creation edit.",
|
|
2331
|
-
"examplePrompts": [
|
|
3575
|
+
"examplePrompts": [
|
|
3576
|
+
"Add a flat roof over the building footprint",
|
|
3577
|
+
"Create a roof 200mm thick from this outline",
|
|
3578
|
+
"Cover the top storey with a roof slab",
|
|
3579
|
+
"Put a roof on this building\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(12, 10)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst roof = await snaptrude.design.create.roof(contour, 0.2)\n```"
|
|
3580
|
+
],
|
|
2332
3581
|
"argsType": "ContourHandle",
|
|
2333
3582
|
"resultType": "ComponentHandle"
|
|
2334
3583
|
},
|
|
@@ -2336,15 +3585,41 @@
|
|
|
2336
3585
|
"path": "design.create.slab",
|
|
2337
3586
|
"namespace": "design.create",
|
|
2338
3587
|
"summary": "Create a **slab** by extruding a footprint contour by `thickness` (default direction: down).",
|
|
2339
|
-
"examplePrompts": [
|
|
3588
|
+
"examplePrompts": [
|
|
3589
|
+
"Add a 150mm thick slab under this footprint",
|
|
3590
|
+
"Create a floor slab from this outline",
|
|
3591
|
+
"Pour a plinth slab over the building footprint",
|
|
3592
|
+
"Make a basement slab that extrudes downward",
|
|
3593
|
+
"Give this room outline a 6 inch slab\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(12, 10)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst slab = await snaptrude.design.create.slab(contour, 0.15, \"down\", \"Plinth\")\n```"
|
|
3594
|
+
],
|
|
2340
3595
|
"argsType": "ContourHandle",
|
|
2341
3596
|
"resultType": "ComponentHandle"
|
|
2342
3597
|
},
|
|
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
|
+
},
|
|
2343
3612
|
{
|
|
2344
3613
|
"path": "design.create.space",
|
|
2345
3614
|
"namespace": "design.create",
|
|
2346
3615
|
"summary": "Create a **space** (a room / mass) by extruding a footprint contour upward.",
|
|
2347
|
-
"examplePrompts": [
|
|
3616
|
+
"examplePrompts": [
|
|
3617
|
+
"Create a room called Living Room that's 3m tall from this outline",
|
|
3618
|
+
"Add a new space on the current storey using this footprint",
|
|
3619
|
+
"Make a bedroom here and assign it to the Residential department",
|
|
3620
|
+
"Extrude this closed outline into a 10 foot high room",
|
|
3621
|
+
"Can you create a Kitchen space from the sketch I just drew?\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst outer = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(10, 0, 0),\nawait v.new(10, 0, 8),\nawait v.new(0, 0, 8),\n])\nconst contour = await snaptrude.core.geom.create.contourFromProfile(outer)\nconst space = await snaptrude.design.create.space(contour, 3, \"Living\")\n```"
|
|
3622
|
+
],
|
|
2348
3623
|
"argsType": "ContourHandle",
|
|
2349
3624
|
"resultType": "ComponentHandle"
|
|
2350
3625
|
},
|
|
@@ -2352,7 +3627,12 @@
|
|
|
2352
3627
|
"path": "design.create.spaces",
|
|
2353
3628
|
"namespace": "design.create",
|
|
2354
3629
|
"summary": "Create **many spaces** in one undoable operation (bulk plural of {@linkcode space}). Migrated from the removed `entity.space.bulkCreate`. Each item extrudes a contour footprint up `height`. Validate-all-or-throw; one command. For a rectangular (box) space, build the footprint with `core.geom.create.profileRect` → `contourFromProfile`, then pass it as an item.",
|
|
2355
|
-
"examplePrompts": [
|
|
3630
|
+
"examplePrompts": [
|
|
3631
|
+
"Create several rooms at once from these footprints",
|
|
3632
|
+
"Generate all the bedrooms in one operation",
|
|
3633
|
+
"Bulk create the spaces for this floor plan",
|
|
3634
|
+
"Add three rooms with different heights in a single undo step\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst [a, b] = await snaptrude.design.create.spaces([\n{ contour, height: 3, label: \"R1\" },\n{ contour, height: 4, label: \"R2\", position: await vec3.new(10, 0, 0) },\n])\n```"
|
|
3635
|
+
],
|
|
2356
3636
|
"argsType": "PluginCreateSpaceItem[]",
|
|
2357
3637
|
"resultType": "ComponentHandle[]"
|
|
2358
3638
|
},
|
|
@@ -2360,7 +3640,13 @@
|
|
|
2360
3640
|
"path": "design.create.staircase",
|
|
2361
3641
|
"namespace": "design.create",
|
|
2362
3642
|
"summary": "Create a **staircase** from a parametric preset, placed at a point.",
|
|
2363
|
-
"examplePrompts": [
|
|
3643
|
+
"examplePrompts": [
|
|
3644
|
+
"Add a dog-legged staircase at this location",
|
|
3645
|
+
"Place a straight stair on level 01",
|
|
3646
|
+
"Create an L-shaped staircase in the lobby",
|
|
3647
|
+
"Insert a staircase near the entrance",
|
|
3648
|
+
"Put amphitheatre steps at these coordinates\n\n# Example\n```ts\nconst stair = await snaptrude.design.create.staircase(\n\"dogLegged\",\nawait snaptrude.core.math.vec3.new(5, 0, 5),\n)\n```"
|
|
3649
|
+
],
|
|
2364
3650
|
"argsType": "PluginStaircasePreset",
|
|
2365
3651
|
"resultType": "ComponentHandle"
|
|
2366
3652
|
},
|
|
@@ -2368,95 +3654,225 @@
|
|
|
2368
3654
|
"path": "design.create.walls",
|
|
2369
3655
|
"namespace": "design.create",
|
|
2370
3656
|
"summary": "Create a connected run of **walls** from a profile — one wall per curve in the profile's chain, with mitred corners at shared endpoints.",
|
|
2371
|
-
"examplePrompts": [
|
|
3657
|
+
"examplePrompts": [
|
|
3658
|
+
"Draw walls along this centerline",
|
|
3659
|
+
"Create 3m high, 200mm thick walls from these points",
|
|
3660
|
+
"Build a wall run around the room outline",
|
|
3661
|
+
"Turn this polyline sketch into walls",
|
|
3662
|
+
"Add walls with mitred corners along the path\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst centerlines = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(8, 0, 0),\nawait v.new(8, 0, 6),\n])\nconst walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)\n```"
|
|
3663
|
+
],
|
|
2372
3664
|
"argsType": "ProfileHandle",
|
|
2373
3665
|
"resultType": "ComponentHandle[]"
|
|
2374
3666
|
},
|
|
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
|
+
},
|
|
2375
3681
|
{
|
|
2376
3682
|
"path": "design.delete.entities",
|
|
2377
3683
|
"namespace": "design.delete",
|
|
2378
3684
|
"summary": "Delete one or more entities. Generic hard delete (backed by the same batched, undoable path as `entity.space.delete`). Cascade is opinionated by the engine: children are removed and linked-list neighbours are fixed up — not caller-tunable in v1. Undoable — commits as a **single** undo entry.",
|
|
2379
|
-
"examplePrompts": [
|
|
3685
|
+
"examplePrompts": [
|
|
3686
|
+
"Delete the selected objects",
|
|
3687
|
+
"Remove these walls from the model",
|
|
3688
|
+
"Get rid of this mass entirely",
|
|
3689
|
+
"Delete all the furniture I picked",
|
|
3690
|
+
"Remove the door and window I just created\n\n# Example\n```ts\n// Hard-delete every furniture item on storey 2 (a single undo entry)\nconst furniture = await snaptrude.design.query.listFurniture({ storeys: [2] })\nif (furniture.length > 0) {\nconst { affected } = await snaptrude.design.delete.entities(furniture)\n}\n```"
|
|
3691
|
+
],
|
|
2380
3692
|
"argsType": "ComponentHandle[]",
|
|
2381
3693
|
"resultType": "PluginDesignChangeResult"
|
|
2382
3694
|
},
|
|
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
|
+
},
|
|
2383
3721
|
{
|
|
2384
3722
|
"path": "design.doors.getFamily",
|
|
2385
3723
|
"namespace": "design.doors",
|
|
2386
|
-
"summary": "Get a door
|
|
2387
|
-
"examplePrompts": [
|
|
3724
|
+
"summary": "Get the family name of a door — the Revit or native family the door instance comes from.",
|
|
3725
|
+
"examplePrompts": [
|
|
3726
|
+
"Which family does this door belong to?",
|
|
3727
|
+
"What's the Revit family of the selected door?",
|
|
3728
|
+
"Show the family name for this door",
|
|
3729
|
+
"Find out which door family the imported door uses\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors()\nconst family = await snaptrude.design.doors.getFamily(door)\nif (family) console.log(\"family:\", family)\n```"
|
|
3730
|
+
],
|
|
2388
3731
|
"argsType": "ComponentHandle",
|
|
2389
3732
|
"resultType": "string | null"
|
|
2390
3733
|
},
|
|
2391
3734
|
{
|
|
2392
3735
|
"path": "design.doors.getHeight",
|
|
2393
3736
|
"namespace": "design.doors",
|
|
2394
|
-
"summary": "Get a door
|
|
2395
|
-
"examplePrompts": [
|
|
3737
|
+
"summary": "Get the height of a door — how tall its opening is from base to head.",
|
|
3738
|
+
"examplePrompts": [
|
|
3739
|
+
"How tall is this door?",
|
|
3740
|
+
"What's the height of the selected door?",
|
|
3741
|
+
"Check the door height for this opening",
|
|
3742
|
+
"Is the front door 2100mm high?\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors()\nconst height = await snaptrude.design.doors.getHeight(door)\nif (height !== null) console.log(\"door height:\", height)\n```"
|
|
3743
|
+
],
|
|
2396
3744
|
"argsType": "ComponentHandle",
|
|
2397
3745
|
"resultType": "number | null"
|
|
2398
3746
|
},
|
|
2399
3747
|
{
|
|
2400
3748
|
"path": "design.doors.getSupportFloor",
|
|
2401
3749
|
"namespace": "design.doors",
|
|
2402
|
-
"summary": "Get the floor a door is hosted on.",
|
|
2403
|
-
"examplePrompts": [
|
|
3750
|
+
"summary": "Get the floor a door is hosted on — the storey/level component that supports the door.",
|
|
3751
|
+
"examplePrompts": [
|
|
3752
|
+
"Which floor is this door on?",
|
|
3753
|
+
"What storey does the selected door belong to?",
|
|
3754
|
+
"Find the level that hosts this door",
|
|
3755
|
+
"Tell me which floor the entrance door sits on\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst floor = await snaptrude.design.doors.getSupportFloor(door)\nif (floor) {\nconst props = await snaptrude.design.query.getProperties(floor)\nconsole.log(\"hosted on storey:\", props.storey)\n}\n```"
|
|
3756
|
+
],
|
|
2404
3757
|
"argsType": "ComponentHandle",
|
|
2405
3758
|
"resultType": "ComponentHandle | null"
|
|
2406
3759
|
},
|
|
2407
3760
|
{
|
|
2408
3761
|
"path": "design.doors.getSwingDirection",
|
|
2409
3762
|
"namespace": "design.doors",
|
|
2410
|
-
"summary": "Get a door's swing (hinge) handedness —
|
|
2411
|
-
"examplePrompts": [
|
|
3763
|
+
"summary": "Get a door's swing (hinge) handedness — whether it opens as a left-hand or right-hand door. Derived from the door mesh's reflection state, not a persisted field.",
|
|
3764
|
+
"examplePrompts": [
|
|
3765
|
+
"Which way does this door swing?",
|
|
3766
|
+
"Is the selected door left-handed or right-handed?",
|
|
3767
|
+
"Check the hinge side of this door",
|
|
3768
|
+
"Does the entrance door open to the left or the right?\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst swing = await snaptrude.design.doors.getSwingDirection(door)\nif (swing) console.log(\"opens as a\", swing, \"hand door\")\n```"
|
|
3769
|
+
],
|
|
2412
3770
|
"argsType": "ComponentHandle",
|
|
2413
3771
|
"resultType": "\"left\" | \"right\" | null"
|
|
2414
3772
|
},
|
|
2415
3773
|
{
|
|
2416
3774
|
"path": "design.doors.getType",
|
|
2417
3775
|
"namespace": "design.doors",
|
|
2418
|
-
"summary": "Get a door
|
|
2419
|
-
"examplePrompts": [
|
|
3776
|
+
"summary": "Get the type name of a door — the label that identifies which kind of door the instance is, as shown in its properties.",
|
|
3777
|
+
"examplePrompts": [
|
|
3778
|
+
"What type of door is this?",
|
|
3779
|
+
"Tell me the door type of the selected door",
|
|
3780
|
+
"Is this a single or a double door?",
|
|
3781
|
+
"Check what kind of door is on this wall\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst type = await snaptrude.design.doors.getType(door)\nif (type) console.log(\"door type:\", type)\n```"
|
|
3782
|
+
],
|
|
2420
3783
|
"argsType": "ComponentHandle",
|
|
2421
3784
|
"resultType": "string | null"
|
|
2422
3785
|
},
|
|
2423
3786
|
{
|
|
2424
3787
|
"path": "design.doors.getWidth",
|
|
2425
3788
|
"namespace": "design.doors",
|
|
2426
|
-
"summary": "Get a door
|
|
2427
|
-
"examplePrompts": [
|
|
3789
|
+
"summary": "Get the width of a door — how wide its opening is along the host wall.",
|
|
3790
|
+
"examplePrompts": [
|
|
3791
|
+
"How wide is this door?",
|
|
3792
|
+
"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
|
+
],
|
|
2428
3796
|
"argsType": "ComponentHandle",
|
|
2429
3797
|
"resultType": "number | null"
|
|
2430
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```"
|
|
3821
|
+
],
|
|
3822
|
+
"argsType": null,
|
|
3823
|
+
"resultType": "PluginObjectCatalogGroup[]"
|
|
3824
|
+
},
|
|
2431
3825
|
{
|
|
2432
3826
|
"path": "design.doors.mirror",
|
|
2433
3827
|
"namespace": "design.doors",
|
|
2434
|
-
"summary": "Mirror a door across an axis
|
|
2435
|
-
"examplePrompts": [
|
|
3828
|
+
"summary": "Mirror a door across an axis, flipping its swing so it opens from the other side. Undoable as a single command.",
|
|
3829
|
+
"examplePrompts": [
|
|
3830
|
+
"Flip this door's swing",
|
|
3831
|
+
"Mirror the selected door",
|
|
3832
|
+
"Make this door open the other way",
|
|
3833
|
+
"Reverse the hinge side of the entrance door",
|
|
3834
|
+
"Change the door to swing from the other side\n\n# Example\n```ts\n// Flip the selected door's swing — axis defaults to \"x\" (the swing-flip\n// axis); pass \"y\" or \"z\" to reflect across a different axis\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst { affected } = await snaptrude.design.doors.mirror(door)\n```"
|
|
3835
|
+
],
|
|
2436
3836
|
"argsType": "ComponentHandle",
|
|
2437
3837
|
"resultType": "PluginDesignChangeResult"
|
|
2438
3838
|
},
|
|
2439
3839
|
{
|
|
2440
3840
|
"path": "design.doors.setHeight",
|
|
2441
3841
|
"namespace": "design.doors",
|
|
2442
|
-
"summary": "Set the height of one or more doors
|
|
2443
|
-
"examplePrompts": [
|
|
3842
|
+
"summary": "Set the height of one or more doors, resizing each opening and re-cutting the host wall. Height is in engine units; the change is undoable.",
|
|
3843
|
+
"examplePrompts": [
|
|
3844
|
+
"Make this door 2100mm tall",
|
|
3845
|
+
"Change the door height to 7 feet",
|
|
3846
|
+
"Raise the selected doors to 2.4m high",
|
|
3847
|
+
"Set all the doors on this storey to 2100 high\n\n# Example\n```ts\n// setHeight takes an array — wrap a single door\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nawait snaptrude.design.doors.setHeight([door], 2100)\n```"
|
|
3848
|
+
],
|
|
2444
3849
|
"argsType": "ComponentHandle[]",
|
|
2445
3850
|
"resultType": "PluginDesignChangeResult"
|
|
2446
3851
|
},
|
|
2447
3852
|
{
|
|
2448
3853
|
"path": "design.doors.setWidth",
|
|
2449
3854
|
"namespace": "design.doors",
|
|
2450
|
-
"summary": "Set the width of one or more doors
|
|
2451
|
-
"examplePrompts": [
|
|
3855
|
+
"summary": "Set the width of one or more doors, resizing each opening and re-cutting the host wall. Width is in engine units; the change is undoable.",
|
|
3856
|
+
"examplePrompts": [
|
|
3857
|
+
"Make this door 900mm wide",
|
|
3858
|
+
"Widen the selected doors to 1 metre",
|
|
3859
|
+
"Change the door width to 3 feet",
|
|
3860
|
+
"Resize all the bathroom doors to 750 wide",
|
|
3861
|
+
"Narrow the entrance door a bit\n\n# Example\n```ts\n// Resize every ground-floor door to a common width (engine units)\nconst doors = await snaptrude.design.query.listDoors({ storeys: [1] })\nconst { affected } = await snaptrude.design.doors.setWidth(doors, 900)\nconsole.log(\"resized\", affected.length, \"doors\")\n```"
|
|
3862
|
+
],
|
|
2452
3863
|
"argsType": "ComponentHandle[]",
|
|
2453
3864
|
"resultType": "PluginDesignChangeResult"
|
|
2454
3865
|
},
|
|
2455
3866
|
{
|
|
2456
3867
|
"path": "design.edit.offsetSplit",
|
|
2457
3868
|
"namespace": "design.edit",
|
|
2458
|
-
"summary": "Offset
|
|
2459
|
-
"examplePrompts": [
|
|
3869
|
+
"summary": "Offset the top profile of a component by a distance and split the face along the offset curve. Positive distances offset outward, negative inward. Single-component only (the engine rejects batches).",
|
|
3870
|
+
"examplePrompts": [
|
|
3871
|
+
"Offset the top face of this mass inward by 2 metres and split it",
|
|
3872
|
+
"Create a 1m setback border on top of the selected mass",
|
|
3873
|
+
"Split the roof profile with a 500mm inward offset",
|
|
3874
|
+
"Offset-split the slab's top profile outward by 3 feet\n\n# Example\n```ts\n// Offset the top profile inward by 2 units and split the face along it\nconst [mass] = await snaptrude.design.query.listMasses()\nconst { createdIds, offsetValue } = await snaptrude.design.edit.offsetSplit(mass, -2)\n// offsetValue is the post-clamp distance the engine actually applied\n```"
|
|
3875
|
+
],
|
|
2460
3876
|
"argsType": "ComponentHandle",
|
|
2461
3877
|
"resultType": "OffsetSplitOutcome"
|
|
2462
3878
|
},
|
|
@@ -2464,7 +3880,13 @@
|
|
|
2464
3880
|
"path": "design.erase.edge",
|
|
2465
3881
|
"namespace": "design.erase",
|
|
2466
3882
|
"summary": "Commit the erase for one edge. `DirectUnion` merges the two adjacent masses; `DirectDelete` drops the single mass behind the boundary edge. Single undo entry.",
|
|
2467
|
-
"examplePrompts": [
|
|
3883
|
+
"examplePrompts": [
|
|
3884
|
+
"Erase the edge between these two rooms so they merge",
|
|
3885
|
+
"Remove the shared boundary between the kitchen and the dining space",
|
|
3886
|
+
"Merge the two adjacent rooms by erasing their common edge",
|
|
3887
|
+
"Knock through the partition line between these spaces",
|
|
3888
|
+
"Erase this boundary edge from the plan\n\n# Example\n```ts\n// Merge two adjacent rooms by erasing an internal edge they share\nconst edges = await snaptrude.design.erase.listErasableEdges({ strategies: [\"DirectUnion\"] })\nif (edges.length > 0) {\nconst { ok } = await snaptrude.design.erase.edge(edges[0])\n}\n```"
|
|
3889
|
+
],
|
|
2468
3890
|
"argsType": "ErasableEdgeRef",
|
|
2469
3891
|
"resultType": "PluginDesignEraseEdgeResult"
|
|
2470
3892
|
},
|
|
@@ -2472,7 +3894,12 @@
|
|
|
2472
3894
|
"path": "design.erase.listErasableEdges",
|
|
2473
3895
|
"namespace": "design.erase",
|
|
2474
3896
|
"summary": "Enumerate every erasable edge in the current plan's bottom-adjacency graph (one {@linkcode ErasableEdgeRef} per edge). Pure read — no scene mutation, no command, not undoable. Erase-ineligible components (locked, hidden, off-storey) are filtered out.",
|
|
2475
|
-
"examplePrompts": [
|
|
3897
|
+
"examplePrompts": [
|
|
3898
|
+
"Which edges in my floor plan can be erased?",
|
|
3899
|
+
"List the erasable edges on this storey",
|
|
3900
|
+
"Show me the shared edges I could erase to merge rooms",
|
|
3901
|
+
"What edges between these two spaces can be removed?\n\n# Example\n```ts\nconst edges = await snaptrude.design.erase.listErasableEdges()\nconst union = edges.find((e) => e.strategy === \"DirectUnion\")\nif (union) await snaptrude.design.erase.edge(union)\n```"
|
|
3902
|
+
],
|
|
2476
3903
|
"argsType": "PluginDesignListErasableEdgesArgs",
|
|
2477
3904
|
"resultType": "ErasableEdgeRef[]"
|
|
2478
3905
|
},
|
|
@@ -2480,7 +3907,12 @@
|
|
|
2480
3907
|
"path": "design.furniture.exists",
|
|
2481
3908
|
"namespace": "design.furniture",
|
|
2482
3909
|
"summary": "Test whether a catalog item exists for the given library id.",
|
|
2483
|
-
"examplePrompts": [
|
|
3910
|
+
"examplePrompts": [
|
|
3911
|
+
"Is this furniture item still in the library?",
|
|
3912
|
+
"Check whether a catalog item with this id exists",
|
|
3913
|
+
"Does my team library have this chair?",
|
|
3914
|
+
"Verify the sofa is available in the catalog before placing it\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.furniture.listCatalog()\nconst stillAvailable = await snaptrude.design.furniture.exists(entry.id)\nconsole.log(stillAvailable ? \"safe to place\" : \"removed from library\")\n```"
|
|
3915
|
+
],
|
|
2484
3916
|
"argsType": "string",
|
|
2485
3917
|
"resultType": "boolean"
|
|
2486
3918
|
},
|
|
@@ -2488,71 +3920,193 @@
|
|
|
2488
3920
|
"path": "design.furniture.getCatalogItem",
|
|
2489
3921
|
"namespace": "design.furniture",
|
|
2490
3922
|
"summary": "Get a single catalog item by its library id.",
|
|
2491
|
-
"examplePrompts": [
|
|
3923
|
+
"examplePrompts": [
|
|
3924
|
+
"Get the details of this furniture item from the library",
|
|
3925
|
+
"Look up the catalog entry for this chair id",
|
|
3926
|
+
"What is the cost of this furniture item?",
|
|
3927
|
+
"Show me the family name of the sofa in the catalog\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.furniture.listCatalog()\nconst item = await snaptrude.design.furniture.getCatalogItem(entry.id)\nif (item) console.log(item.name, item.source, item.familyName)\n```"
|
|
3928
|
+
],
|
|
2492
3929
|
"argsType": "string",
|
|
2493
3930
|
"resultType": "PluginFurnitureCatalogItem | null"
|
|
2494
3931
|
},
|
|
2495
3932
|
{
|
|
2496
3933
|
"path": "design.furniture.listCatalog",
|
|
2497
3934
|
"namespace": "design.furniture",
|
|
2498
|
-
"summary": "List the placeable furniture catalog (team + general libraries)
|
|
2499
|
-
"examplePrompts": [
|
|
3935
|
+
"summary": "List the placeable furniture catalog (team + general libraries), optionally filtered by library `source` and/or `category`.",
|
|
3936
|
+
"examplePrompts": [
|
|
3937
|
+
"What furniture can I place in this project?",
|
|
3938
|
+
"Show me all the furniture available in the library",
|
|
3939
|
+
"List the chairs and tables I can add to the model",
|
|
3940
|
+
"Which furniture items are in my team's library?",
|
|
3941
|
+
"Show me the bedroom furniture I can place\n\n# Example\n```ts\nconst bedroom = await snaptrude.design.furniture.listCatalog(\"team\", \"bedroom\")\nfor (const item of bedroom) console.log(item.id, item.name, item.thumbnailUrl)\n```"
|
|
3942
|
+
],
|
|
2500
3943
|
"argsType": "\"team\" | \"general\"",
|
|
2501
3944
|
"resultType": "PluginFurnitureCatalogItem[]"
|
|
2502
3945
|
},
|
|
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
|
+
},
|
|
2503
3971
|
{
|
|
2504
3972
|
"path": "design.isLocked",
|
|
2505
3973
|
"namespace": "design",
|
|
2506
3974
|
"summary": "Test whether an entity is locked (folds group + bucket lock unless `includeInherited: false`).",
|
|
2507
|
-
"examplePrompts": [
|
|
3975
|
+
"examplePrompts": [
|
|
3976
|
+
"Is this wall locked?",
|
|
3977
|
+
"Check whether the selected mass is locked or editable",
|
|
3978
|
+
"Why can't I move this object? Check if it is locked",
|
|
3979
|
+
"Tell me if this room is locked, counting locks inherited from its group\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst locked = await snaptrude.design.isLocked(wall)\n// Own flag only — ignore locks inherited from the group / bucket\nconst ownLock = await snaptrude.design.isLocked(wall, false)\n```"
|
|
3980
|
+
],
|
|
2508
3981
|
"argsType": "ComponentHandle",
|
|
2509
3982
|
"resultType": "boolean"
|
|
2510
3983
|
},
|
|
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
|
+
},
|
|
2511
3996
|
{
|
|
2512
3997
|
"path": "design.listLocked",
|
|
2513
3998
|
"namespace": "design",
|
|
2514
3999
|
"summary": "List the explicitly-locked entities (excludes purely group/bucket-inherited locks).",
|
|
2515
|
-
"examplePrompts": [
|
|
4000
|
+
"examplePrompts": [
|
|
4001
|
+
"Which objects in the model are locked?",
|
|
4002
|
+
"List all the locked entities in this project",
|
|
4003
|
+
"Show everything that has been locked",
|
|
4004
|
+
"Are there any locked walls or masses in the scene?\n\n# Example\n```ts\nconst locked = await snaptrude.design.listLocked()\nconsole.log(locked.length, \"explicitly locked entities\")\n```"
|
|
4005
|
+
],
|
|
2516
4006
|
"argsType": null,
|
|
2517
4007
|
"resultType": "ComponentHandle[]"
|
|
2518
4008
|
},
|
|
2519
4009
|
{
|
|
2520
4010
|
"path": "design.lock",
|
|
2521
4011
|
"namespace": "design",
|
|
2522
|
-
"summary": "Lock entities
|
|
2523
|
-
"examplePrompts": [
|
|
4012
|
+
"summary": "Lock entities so they cannot be edited. Undoable. Cascades to void/door/window children, stacked-wall companions, and terrain neighborhood; skips active-group members.",
|
|
4013
|
+
"examplePrompts": [
|
|
4014
|
+
"Lock the selected walls so they can't be edited",
|
|
4015
|
+
"Freeze these masses so nobody moves them by accident",
|
|
4016
|
+
"Lock everything on the ground floor",
|
|
4017
|
+
"Protect this room from further changes\n\n# Example\n```ts\n// Lock every wall on the ground storey\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\nconst { affected } = await snaptrude.design.lock(walls)\n// affected is post-cascade: hosted doors/windows are included\n```"
|
|
4018
|
+
],
|
|
4019
|
+
"argsType": "ComponentHandle[]",
|
|
4020
|
+
"resultType": "PluginDesignChangeResult"
|
|
4021
|
+
},
|
|
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
|
+
],
|
|
2524
4032
|
"argsType": "ComponentHandle[]",
|
|
2525
4033
|
"resultType": "PluginDesignChangeResult"
|
|
2526
4034
|
},
|
|
2527
4035
|
{
|
|
2528
4036
|
"path": "design.materials.apply",
|
|
2529
4037
|
"namespace": "design.materials",
|
|
2530
|
-
"summary": "Apply a material
|
|
2531
|
-
"examplePrompts": [
|
|
4038
|
+
"summary": "Apply a material to one or more components — an existing project material by handle, or a new one described inline as a {@linkcode PluginMaterialSpec}. Undoable when `save` is true (the default).",
|
|
4039
|
+
"examplePrompts": [
|
|
4040
|
+
"Paint the selected walls red",
|
|
4041
|
+
"Apply the brick material to these walls",
|
|
4042
|
+
"Put a wood finish on the floor",
|
|
4043
|
+
"Change the colour of this room's walls to #ff8800",
|
|
4044
|
+
"Add a concrete texture to the facade\n\n# Example\n```ts\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\n// inline spec — creates (or reuses by name) a project material, then applies it\nconst { count } = await snaptrude.design.materials.apply(walls, { name: \"Accent Red\", color: \"#b04a3a\" })\nconsole.log(\"painted\", count, \"walls\")\n```"
|
|
4045
|
+
],
|
|
2532
4046
|
"argsType": "ComponentHandle[]",
|
|
2533
4047
|
"resultType": "PluginMaterialResult"
|
|
2534
4048
|
},
|
|
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
|
+
},
|
|
2535
4062
|
{
|
|
2536
4063
|
"path": "design.materials.create",
|
|
2537
4064
|
"namespace": "design.materials",
|
|
2538
|
-
"summary": "Create
|
|
2539
|
-
"examplePrompts": [
|
|
4065
|
+
"summary": "Create a new material in the project from a spec — a color, texture URL, opacity, and/or name. Idempotent by name: creating with the name of an existing material returns that material instead of duplicating it.",
|
|
4066
|
+
"examplePrompts": [
|
|
4067
|
+
"Create a new red material called Accent",
|
|
4068
|
+
"Make a material from this texture image URL",
|
|
4069
|
+
"Add a semi-transparent glass material to the project",
|
|
4070
|
+
"Define a dark grey concrete finish I can reuse\n\n# Example\n```ts\nconst glass = await snaptrude.design.materials.create({ name: \"Frosted Glass\", color: \"#cfe4e8\", alpha: 0.4 })\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\nawait snaptrude.design.materials.apply(walls, glass)\n```"
|
|
4071
|
+
],
|
|
2540
4072
|
"argsType": "PluginMaterialSpec",
|
|
2541
4073
|
"resultType": "MaterialHandle"
|
|
2542
4074
|
},
|
|
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
|
+
},
|
|
2543
4087
|
{
|
|
2544
4088
|
"path": "design.materials.getDefault",
|
|
2545
4089
|
"namespace": "design.materials",
|
|
2546
4090
|
"summary": "Get the default material for a component's type.",
|
|
2547
|
-
"examplePrompts": [
|
|
4091
|
+
"examplePrompts": [
|
|
4092
|
+
"What is the default material for walls?",
|
|
4093
|
+
"Get the standard material this floor type uses",
|
|
4094
|
+
"Which material would this roof have out of the box?",
|
|
4095
|
+
"Find the default finish for the selected column\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst defaultMaterial = await snaptrude.design.materials.getDefault(wall)\nif (defaultMaterial) console.log(await snaptrude.design.materials.getInfo(defaultMaterial))\n```"
|
|
4096
|
+
],
|
|
2548
4097
|
"argsType": "ComponentHandle",
|
|
2549
4098
|
"resultType": "MaterialHandle | null"
|
|
2550
4099
|
},
|
|
2551
4100
|
{
|
|
2552
4101
|
"path": "design.materials.getInfo",
|
|
2553
4102
|
"namespace": "design.materials",
|
|
2554
|
-
"summary": "Read a material's descriptor.",
|
|
2555
|
-
"examplePrompts": [
|
|
4103
|
+
"summary": "Read a material's descriptor — its name, color, opacity, and texture (when it has one).",
|
|
4104
|
+
"examplePrompts": [
|
|
4105
|
+
"What colour is the Brick material?",
|
|
4106
|
+
"Show me the details of this material",
|
|
4107
|
+
"Get the opacity of the glass finish",
|
|
4108
|
+
"Which texture image does the wood material use?\n\n# Example\n```ts\nconst [material] = await snaptrude.design.materials.list()\nconst info = await snaptrude.design.materials.getInfo(material)\nif (info) console.log(info.name, info.colorHex, info.alpha)\n```"
|
|
4109
|
+
],
|
|
2556
4110
|
"argsType": "MaterialHandle",
|
|
2557
4111
|
"resultType": "PluginMaterialInfo | null"
|
|
2558
4112
|
},
|
|
@@ -2560,7 +4114,12 @@
|
|
|
2560
4114
|
"path": "design.materials.hasTexture",
|
|
2561
4115
|
"namespace": "design.materials",
|
|
2562
4116
|
"summary": "Test whether a material has a texture.",
|
|
2563
|
-
"examplePrompts": [
|
|
4117
|
+
"examplePrompts": [
|
|
4118
|
+
"Does this material have a texture image?",
|
|
4119
|
+
"Is the brick material textured or just a flat colour?",
|
|
4120
|
+
"Check whether the wood finish uses an image map",
|
|
4121
|
+
"Tell me if this material is image-based or a plain colour\n\n# Example\n```ts\nconst [material] = await snaptrude.design.materials.list()\nconst textured = await snaptrude.design.materials.hasTexture(material)\nconsole.log(textured ? \"image-based\" : \"flat colour\")\n```"
|
|
4122
|
+
],
|
|
2564
4123
|
"argsType": "MaterialHandle",
|
|
2565
4124
|
"resultType": "boolean"
|
|
2566
4125
|
},
|
|
@@ -2568,7 +4127,12 @@
|
|
|
2568
4127
|
"path": "design.materials.isDefault",
|
|
2569
4128
|
"namespace": "design.materials",
|
|
2570
4129
|
"summary": "Test whether a component carries its (type) default material.",
|
|
2571
|
-
"examplePrompts": [
|
|
4130
|
+
"examplePrompts": [
|
|
4131
|
+
"Is this wall still using its default material?",
|
|
4132
|
+
"Has the material on this floor been changed?",
|
|
4133
|
+
"Check if the selected object still has its original finish",
|
|
4134
|
+
"Tell me whether this roof has been painted or is still standard\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst untouched = await snaptrude.design.materials.isDefault(wall)\nconsole.log(untouched ? \"still default\" : \"has been painted\")\n```"
|
|
4135
|
+
],
|
|
2572
4136
|
"argsType": "ComponentHandle",
|
|
2573
4137
|
"resultType": "boolean"
|
|
2574
4138
|
},
|
|
@@ -2576,7 +4140,12 @@
|
|
|
2576
4140
|
"path": "design.materials.isUniform",
|
|
2577
4141
|
"namespace": "design.materials",
|
|
2578
4142
|
"summary": "Test whether a component has a single (uniform) material across all faces.",
|
|
2579
|
-
"examplePrompts": [
|
|
4143
|
+
"examplePrompts": [
|
|
4144
|
+
"Does this wall have the same material on every face?",
|
|
4145
|
+
"Is the floor finished uniformly or face by face?",
|
|
4146
|
+
"Check if this column is a single material all over",
|
|
4147
|
+
"Are any faces of the selected object painted differently?\n\n# Example\n```ts\nconst [selected] = await snaptrude.design.selection.get()\nconst uniform = await snaptrude.design.materials.isUniform(selected)\nconsole.log(uniform ? \"one material all over\" : \"painted per face\")\n```"
|
|
4148
|
+
],
|
|
2580
4149
|
"argsType": "ComponentHandle",
|
|
2581
4150
|
"resultType": "boolean"
|
|
2582
4151
|
},
|
|
@@ -2584,23 +4153,63 @@
|
|
|
2584
4153
|
"path": "design.materials.list",
|
|
2585
4154
|
"namespace": "design.materials",
|
|
2586
4155
|
"summary": "List the project materials.",
|
|
2587
|
-
"examplePrompts": [
|
|
4156
|
+
"examplePrompts": [
|
|
4157
|
+
"List all the materials in this project",
|
|
4158
|
+
"What materials do I have available to apply?",
|
|
4159
|
+
"Show me the preset materials library",
|
|
4160
|
+
"Which finishes exist in this model?",
|
|
4161
|
+
"Get every material in the project palette\n\n# Example\n```ts\nconst presets = await snaptrude.design.materials.list(\"preset\")\nconsole.log(presets.length, \"preset materials\")\n```"
|
|
4162
|
+
],
|
|
2588
4163
|
"argsType": "\"project\" | \"preset\"",
|
|
2589
4164
|
"resultType": "MaterialHandle[]"
|
|
2590
4165
|
},
|
|
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
|
+
},
|
|
2591
4178
|
{
|
|
2592
4179
|
"path": "design.materials.reset",
|
|
2593
4180
|
"namespace": "design.materials",
|
|
2594
|
-
"summary": "Reset one or more components to
|
|
2595
|
-
"examplePrompts": [
|
|
4181
|
+
"summary": "Reset one or more components back to the default material for their type, removing any applied finish. The inverse of `apply`; undoable when `save` is true (the default).",
|
|
4182
|
+
"examplePrompts": [
|
|
4183
|
+
"Remove the paint from these walls",
|
|
4184
|
+
"Reset the selected objects to their default material",
|
|
4185
|
+
"Clear the custom finish on the floor",
|
|
4186
|
+
"Restore the original colour of this roof\n\n# Example\n```ts\nconst selected = await snaptrude.design.selection.get()\nconst { count } = await snaptrude.design.materials.reset(selected)\nconsole.log(\"reset\", count, \"components to their default material\")\n```"
|
|
4187
|
+
],
|
|
2596
4188
|
"argsType": "ComponentHandle[]",
|
|
2597
4189
|
"resultType": "PluginMaterialResult"
|
|
2598
4190
|
},
|
|
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
|
+
},
|
|
2599
4203
|
{
|
|
2600
4204
|
"path": "design.query.exists",
|
|
2601
4205
|
"namespace": "design.query",
|
|
2602
4206
|
"summary": "Test whether an entity id resolves to a live scene entity.",
|
|
2603
|
-
"examplePrompts": [
|
|
4207
|
+
"examplePrompts": [
|
|
4208
|
+
"Does this element still exist in the scene?",
|
|
4209
|
+
"Check whether the wall I stored earlier is still there",
|
|
4210
|
+
"Is id cmp_42 still valid?",
|
|
4211
|
+
"Verify the object wasn't deleted\n\n# Example\n```ts\n// Guard before acting on a handle that may have been deleted or undone\nif (await snaptrude.design.query.exists(wall)) {\nconst dx = await snaptrude.core.math.vec3.new(5, 0, 0)\nawait snaptrude.design.transform.move([wall], dx)\n}\n```"
|
|
4212
|
+
],
|
|
2604
4213
|
"argsType": "ComponentHandle",
|
|
2605
4214
|
"resultType": "boolean"
|
|
2606
4215
|
},
|
|
@@ -2608,23 +4217,53 @@
|
|
|
2608
4217
|
"path": "design.query.geometry.getBottomContour",
|
|
2609
4218
|
"namespace": "design.query.geometry",
|
|
2610
4219
|
"summary": "Get the **bottom-face contour** of a component — the footprint outline (outer profile + holes) of its lowest horizontal face, as a reusable {@linkcode ContourHandle}.",
|
|
2611
|
-
"examplePrompts": [
|
|
4220
|
+
"examplePrompts": [
|
|
4221
|
+
"Get the footprint of the selected mass",
|
|
4222
|
+
"What is the plan outline of this building volume?",
|
|
4223
|
+
"Trace the base profile of this wall",
|
|
4224
|
+
"Find the ground-level outline of the slab, including any openings",
|
|
4225
|
+
"Work out the footprint area of the selected component"
|
|
4226
|
+
],
|
|
2612
4227
|
"argsType": "ComponentHandle",
|
|
2613
4228
|
"resultType": "ContourHandle | null"
|
|
2614
4229
|
},
|
|
2615
4230
|
{
|
|
2616
4231
|
"path": "design.query.geometry.getBrep",
|
|
2617
4232
|
"namespace": "design.query.geometry",
|
|
2618
|
-
"summary": "Get the boundary
|
|
2619
|
-
"examplePrompts": [
|
|
4233
|
+
"summary": "Get the boundary representation (B-rep) of a scene component — the solid geometry (faces, edges, vertices) behind a wall, slab, room or any other scene entity, as a reusable {@linkcode BrepHandle} for the `core.geom.query.brep.*` reads.",
|
|
4234
|
+
"examplePrompts": [
|
|
4235
|
+
"Get the 3D solid geometry of the selected wall",
|
|
4236
|
+
"How many faces does this mass have?",
|
|
4237
|
+
"Inspect the mesh of this slab so I can look at its faces and edges",
|
|
4238
|
+
"Read the vertices of the selected column's geometry"
|
|
4239
|
+
],
|
|
2620
4240
|
"argsType": "ComponentHandle",
|
|
2621
4241
|
"resultType": "BrepHandle | null"
|
|
2622
4242
|
},
|
|
4243
|
+
{
|
|
4244
|
+
"path": "design.query.geometry.getCenterline",
|
|
4245
|
+
"namespace": "design.query.geometry",
|
|
4246
|
+
"summary": "Get the **centerline** (core curve) of a wall — the single curve running down the middle of the wall, as a reusable {@linkcode CurveHandle} (a `Line` for a straight wall, an `Arc` for a curved wall).",
|
|
4247
|
+
"examplePrompts": [
|
|
4248
|
+
"Get the centerline of the selected wall",
|
|
4249
|
+
"How long is this wall along its centre line?",
|
|
4250
|
+
"Find the axis running down the middle of this wall",
|
|
4251
|
+
"Give me the core curve of that curved wall",
|
|
4252
|
+
"Where does the wall's centreline start and end?"
|
|
4253
|
+
],
|
|
4254
|
+
"argsType": "ComponentHandle",
|
|
4255
|
+
"resultType": "CurveHandle | null"
|
|
4256
|
+
},
|
|
2623
4257
|
{
|
|
2624
4258
|
"path": "design.query.getBoundingBox",
|
|
2625
4259
|
"namespace": "design.query",
|
|
2626
4260
|
"summary": "Get the **union** axis-aligned bounding box enclosing a set of entities.",
|
|
2627
|
-
"examplePrompts": [
|
|
4261
|
+
"examplePrompts": [
|
|
4262
|
+
"Get the bounding box around the selected objects",
|
|
4263
|
+
"What is the overall extent of these walls?",
|
|
4264
|
+
"How big is the region these elements cover together?",
|
|
4265
|
+
"Find the combined extents of everything on level 2\n\n# Example\n```ts\nconst walls = await snaptrude.design.query.listWalls()\nconst box = await snaptrude.design.query.getBoundingBox(walls)\n\n// Compose with the `within` filter: everything in the selection's extents\nconst selection = await snaptrude.design.selection.get()\nconst extents = await snaptrude.design.query.getBoundingBox(selection)\nif (extents) {\nconst nearby = await snaptrude.design.query.listEntities({ within: extents })\nconst width = extents.max.x - extents.min.x\n}\n```"
|
|
4266
|
+
],
|
|
2628
4267
|
"argsType": "ComponentHandle[]",
|
|
2629
4268
|
"resultType": "BBoxComponents | null"
|
|
2630
4269
|
},
|
|
@@ -2632,7 +4271,12 @@
|
|
|
2632
4271
|
"path": "design.query.getById",
|
|
2633
4272
|
"namespace": "design.query",
|
|
2634
4273
|
"summary": "Look an entity up by id — returns the same handle if it still resolves live, else `null`. A cheap validity probe (distinct from {@linkcode PluginDesignQueryApi.exists}).",
|
|
2635
|
-
"examplePrompts": [
|
|
4274
|
+
"examplePrompts": [
|
|
4275
|
+
"Look up an object by its id",
|
|
4276
|
+
"Does id cmp_42 still point to something in the model?",
|
|
4277
|
+
"Fetch the element with this id",
|
|
4278
|
+
"Check if this saved element id is still valid\n\n# Example\n```ts\n// Persistence round-trip: save a ref now, revalidate it in a later run\nconst [wall] = await snaptrude.design.query.listWalls()\nconst savedRef = await snaptrude.design.query.getEntityRef(wall)\n\n// ...later (savedRef restored from plugin storage)...\nconst stillThere = await snaptrude.design.query.getById(savedRef)\nif (stillThere) {\nconst props = await snaptrude.design.query.getProperties(stillThere)\n}\n```"
|
|
4279
|
+
],
|
|
2636
4280
|
"argsType": "ComponentHandle",
|
|
2637
4281
|
"resultType": "ComponentHandle | null"
|
|
2638
4282
|
},
|
|
@@ -2640,15 +4284,24 @@
|
|
|
2640
4284
|
"path": "design.query.getEntityRef",
|
|
2641
4285
|
"namespace": "design.query",
|
|
2642
4286
|
"summary": "Get a serializable, persistable reference to an entity. Under the all-handle model a {@linkcode ComponentHandle} already IS the ref (raw `Component.id`), so this is the identity passthrough — provided for API completeness.",
|
|
2643
|
-
"examplePrompts": [
|
|
4287
|
+
"examplePrompts": [
|
|
4288
|
+
"Give me a reference I can save for this element",
|
|
4289
|
+
"Get a persistent id for the selected wall",
|
|
4290
|
+
"Store a handle to this room so I can find it later\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst savedRef = await snaptrude.design.query.getEntityRef(wall)\n// savedRef is a plain string — persist it, then revalidate in a later run\n// with snaptrude.design.query.getById(savedRef)\n```"
|
|
4291
|
+
],
|
|
2644
4292
|
"argsType": "ComponentHandle",
|
|
2645
4293
|
"resultType": "ComponentHandle"
|
|
2646
4294
|
},
|
|
2647
4295
|
{
|
|
2648
4296
|
"path": "design.query.getEntityType",
|
|
2649
4297
|
"namespace": "design.query",
|
|
2650
|
-
"summary": "Get
|
|
2651
|
-
"examplePrompts": [
|
|
4298
|
+
"summary": "Get the kind of BIM entity a handle refers to — wall, door, space, slab, and so on (its {@linkcode PluginEntityType}).",
|
|
4299
|
+
"examplePrompts": [
|
|
4300
|
+
"What kind of element is this?",
|
|
4301
|
+
"Is the selected object a wall or a mass?",
|
|
4302
|
+
"Tell me the type of this component",
|
|
4303
|
+
"What am I looking at — a door, a window, or a panel?\n\n# Example\n```ts\n// Dispatch on what the user selected\nconst selection = await snaptrude.design.selection.get()\nfor (const component of selection) {\nconst kind = await snaptrude.design.query.getEntityType(component)\nif (kind === \"wall\") {\n// wall-specific handling\n} else if (kind === \"space\") {\n// room-specific handling\n}\n}\n```"
|
|
4304
|
+
],
|
|
2652
4305
|
"argsType": "ComponentHandle",
|
|
2653
4306
|
"resultType": "PluginEntityType | null"
|
|
2654
4307
|
},
|
|
@@ -2656,7 +4309,12 @@
|
|
|
2656
4309
|
"path": "design.query.getHost",
|
|
2657
4310
|
"namespace": "design.query",
|
|
2658
4311
|
"summary": "Get an entity's host/parent entity (e.g. the wall a door is cut into).",
|
|
2659
|
-
"examplePrompts": [
|
|
4312
|
+
"examplePrompts": [
|
|
4313
|
+
"Which wall is this door in?",
|
|
4314
|
+
"Find the parent of the selected window",
|
|
4315
|
+
"What is this element attached to?",
|
|
4316
|
+
"Which wall hosts this window?\n\n# Example\n```ts\n// From a door up to its host wall, then measure the wall\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst hostWall = door ? await snaptrude.design.query.getHost(door) : null\nif (hostWall) {\nconst m = await snaptrude.design.query.measure(hostWall)\nconsole.log(\"wall length:\", m?.length)\n}\n```"
|
|
4317
|
+
],
|
|
2660
4318
|
"argsType": "ComponentHandle",
|
|
2661
4319
|
"resultType": "ComponentHandle | null"
|
|
2662
4320
|
},
|
|
@@ -2664,7 +4322,12 @@
|
|
|
2664
4322
|
"path": "design.query.getLabel",
|
|
2665
4323
|
"namespace": "design.query",
|
|
2666
4324
|
"summary": "Get an entity's human label (`room_type` for spaces/masses, else the mesh label; `\"\"` when unlabelled). The write side is `design.update` (`setLabel`).",
|
|
2667
|
-
"examplePrompts": [
|
|
4325
|
+
"examplePrompts": [
|
|
4326
|
+
"What is this room called?",
|
|
4327
|
+
"Get the name of the selected object",
|
|
4328
|
+
"Show the label on this wall",
|
|
4329
|
+
"What's the room type of this space?\n\n# Example\n```ts\n// Fuzzy label search (the `label` filter field is exact-match; for\n// case-insensitive or partial matches, read labels and compare yourself)\nconst spaces = await snaptrude.design.query.listSpaces()\nconst kitchens: typeof spaces = []\nfor (const space of spaces) {\nconst label = await snaptrude.design.query.getLabel(space)\nif (label.toLowerCase().includes(\"kitchen\")) kitchens.push(space)\n}\n```"
|
|
4330
|
+
],
|
|
2668
4331
|
"argsType": "ComponentHandle",
|
|
2669
4332
|
"resultType": "string"
|
|
2670
4333
|
},
|
|
@@ -2672,55 +4335,104 @@
|
|
|
2672
4335
|
"path": "design.query.getProperties",
|
|
2673
4336
|
"namespace": "design.query",
|
|
2674
4337
|
"summary": "Read an entity's common properties as a {@linkcode PluginEntityProperties} record (only applicable fields are present). For spaces/masses this includes `adjacency` — the per-entity adjacency read (bulk form: `program.adjacency.getMatrix`).",
|
|
2675
|
-
"examplePrompts": [
|
|
4338
|
+
"examplePrompts": [
|
|
4339
|
+
"Show me all the details of the selected object",
|
|
4340
|
+
"What storey is this wall on?",
|
|
4341
|
+
"Which department does this room belong to?",
|
|
4342
|
+
"Is this element locked or hidden?",
|
|
4343
|
+
"Get the adjacencies of this space\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst props = await snaptrude.design.query.getProperties(wall)\nconsole.log(props.type, props.storey, props.boundingBox)\n\n// The record is partial — type-specific fields exist only where they apply\nconst [room] = await snaptrude.design.query.listSpaces()\nconst p = await snaptrude.design.query.getProperties(room)\nif (p.spaceType === \"Room\" && p.areaClass === \"NET\") {\nfor (const adj of p.adjacency ?? []) {\n// adj.value: 2 = direct, 1 = indirect/contact, -1 = restricted\nconsole.log(adj.spaceId, adj.value)\n}\n}\n```"
|
|
4344
|
+
],
|
|
2676
4345
|
"argsType": "ComponentHandle",
|
|
2677
4346
|
"resultType": "PluginEntityProperties"
|
|
2678
4347
|
},
|
|
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
|
+
},
|
|
2679
4361
|
{
|
|
2680
4362
|
"path": "design.query.listBeams",
|
|
2681
4363
|
"namespace": "design.query",
|
|
2682
|
-
"summary": "List all
|
|
2683
|
-
"examplePrompts": [
|
|
4364
|
+
"summary": "List all the beams in the project, optionally filtered by storey, building, lock state, or region.",
|
|
4365
|
+
"examplePrompts": [
|
|
4366
|
+
"List all the beams in the project",
|
|
4367
|
+
"How many beams are on the second storey?",
|
|
4368
|
+
"Show the beams in this structure",
|
|
4369
|
+
"Find every locked beam\n\n# Example\n```ts\nconst storey2Beams = await snaptrude.design.query.listBeams({ storeys: [2] })\n```"
|
|
4370
|
+
],
|
|
2684
4371
|
"argsType": "PluginEntityFilter",
|
|
2685
4372
|
"resultType": "ComponentHandle[]"
|
|
2686
4373
|
},
|
|
2687
4374
|
{
|
|
2688
4375
|
"path": "design.query.listByType",
|
|
2689
4376
|
"namespace": "design.query",
|
|
2690
|
-
"summary": "List entities of
|
|
2691
|
-
"examplePrompts": [
|
|
4377
|
+
"summary": "List all entities of one BIM object type — wall, door, slab, panel, and so on — optionally narrowed by the shared filter.",
|
|
4378
|
+
"examplePrompts": [
|
|
4379
|
+
"List all the curtain walls in the project",
|
|
4380
|
+
"Show every curtain wall panel on this storey",
|
|
4381
|
+
"Get all the elements of a single type, like columns",
|
|
4382
|
+
"Find all the locked slabs in the model\n\n# Example\n```ts\nconst lockedSlabs = await snaptrude.design.query.listByType(\"slab\", { isLocked: true })\n\n// Curtain-wall panels on storeys 2-3 of one building\nconst panels = await snaptrude.design.query.listByType(\"panel\", {\nstoreys: [2, 3],\nbuildingIds: [\"bld_1\"],\n})\n```"
|
|
4383
|
+
],
|
|
2692
4384
|
"argsType": "PluginEntityType",
|
|
2693
4385
|
"resultType": "ComponentHandle[]"
|
|
2694
4386
|
},
|
|
2695
4387
|
{
|
|
2696
4388
|
"path": "design.query.listCeilings",
|
|
2697
4389
|
"namespace": "design.query",
|
|
2698
|
-
"summary": "List all
|
|
2699
|
-
"examplePrompts": [
|
|
4390
|
+
"summary": "List all the ceilings in the project, optionally filtered by storey, building, visibility, or region.",
|
|
4391
|
+
"examplePrompts": [
|
|
4392
|
+
"List all the ceilings in the model",
|
|
4393
|
+
"How many ceilings are on level 1?",
|
|
4394
|
+
"Which ceilings are hidden?",
|
|
4395
|
+
"Show the ceilings in building B\n\n# Example\n```ts\nconst hiddenCeilings = await snaptrude.design.query.listCeilings({ isHidden: true })\n```"
|
|
4396
|
+
],
|
|
2700
4397
|
"argsType": "PluginEntityFilter",
|
|
2701
4398
|
"resultType": "ComponentHandle[]"
|
|
2702
4399
|
},
|
|
2703
4400
|
{
|
|
2704
4401
|
"path": "design.query.listChildren",
|
|
2705
4402
|
"namespace": "design.query",
|
|
2706
|
-
"summary": "List an entity's direct child entities.",
|
|
2707
|
-
"examplePrompts": [
|
|
4403
|
+
"summary": "List an entity's direct child entities — for example the doors and windows hosted in a wall.",
|
|
4404
|
+
"examplePrompts": [
|
|
4405
|
+
"What's inside this wall — list its doors and windows",
|
|
4406
|
+
"Show the child elements of the selected object",
|
|
4407
|
+
"Which openings belong to this wall?",
|
|
4408
|
+
"List everything nested under this mass\n\n# Example\n```ts\n// Count the openings hosted in a wall, split by kind\nconst children = await snaptrude.design.query.listChildren(wall)\nlet doors = 0\nlet windows = 0\nfor (const child of children) {\nconst kind = await snaptrude.design.query.getEntityType(child)\nif (kind === \"door\") doors++\nif (kind === \"window\") windows++\n}\n```"
|
|
4409
|
+
],
|
|
2708
4410
|
"argsType": "ComponentHandle",
|
|
2709
4411
|
"resultType": "ComponentHandle[]"
|
|
2710
4412
|
},
|
|
2711
4413
|
{
|
|
2712
4414
|
"path": "design.query.listColumns",
|
|
2713
4415
|
"namespace": "design.query",
|
|
2714
|
-
"summary": "List all
|
|
2715
|
-
"examplePrompts": [
|
|
4416
|
+
"summary": "List all the columns in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4417
|
+
"examplePrompts": [
|
|
4418
|
+
"How many columns are on the ground floor?",
|
|
4419
|
+
"List all the columns in building A",
|
|
4420
|
+
"Show every column on level 3",
|
|
4421
|
+
"Which columns are currently selected?\n\n# Example\n```ts\nconst groundFloorColumns = await snaptrude.design.query.listColumns({ storeys: [1] })\n```"
|
|
4422
|
+
],
|
|
2716
4423
|
"argsType": "PluginEntityFilter",
|
|
2717
4424
|
"resultType": "ComponentHandle[]"
|
|
2718
4425
|
},
|
|
2719
4426
|
{
|
|
2720
4427
|
"path": "design.query.listDoors",
|
|
2721
4428
|
"namespace": "design.query",
|
|
2722
|
-
"summary": "List all
|
|
2723
|
-
"examplePrompts": [
|
|
4429
|
+
"summary": "List all the doors in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4430
|
+
"examplePrompts": [
|
|
4431
|
+
"How many doors are in the project?",
|
|
4432
|
+
"List all the doors on the ground floor",
|
|
4433
|
+
"Which doors are currently selected?",
|
|
4434
|
+
"Find every door in building B\n\n# Example\n```ts\n// Ground-floor doors, then read each one's width via design.doors.*\nconst doors = await snaptrude.design.query.listDoors({ storeys: [1] })\nfor (const door of doors) {\nconst width = await snaptrude.design.doors.getWidth(door)\n}\n```"
|
|
4435
|
+
],
|
|
2724
4436
|
"argsType": "PluginEntityFilter",
|
|
2725
4437
|
"resultType": "ComponentHandle[]"
|
|
2726
4438
|
},
|
|
@@ -2728,103 +4440,172 @@
|
|
|
2728
4440
|
"path": "design.query.listEntities",
|
|
2729
4441
|
"namespace": "design.query",
|
|
2730
4442
|
"summary": "List **all** BIM entities in the project matching the filter.",
|
|
2731
|
-
"examplePrompts": [
|
|
4443
|
+
"examplePrompts": [
|
|
4444
|
+
"Show me everything in the model",
|
|
4445
|
+
"How many objects are on the ground floor?",
|
|
4446
|
+
"List all the doors and windows on level 2",
|
|
4447
|
+
"What elements are currently selected?",
|
|
4448
|
+
"Find every hidden object in the project\n\n# Example\n```ts\n// Doors and windows on the ground storey (fields AND-combine)\nconst doorsAndWindows = await snaptrude.design.query.listEntities({\ntypes: [\"door\", \"window\"],\nstoreys: [1],\n})\n\n// Everything the user currently has selected\nconst selected = await snaptrude.design.query.listEntities({ isSelected: true })\n\n// Everything inside a world-space region (axis-aligned box, Snaptrude units)\nconst inRegion = await snaptrude.design.query.listEntities({\nwithin: { min: { x: 0, y: 0, z: 0 }, max: { x: 10, y: 4, z: 8 } },\n})\n```"
|
|
4449
|
+
],
|
|
2732
4450
|
"argsType": "PluginEntityFilter",
|
|
2733
4451
|
"resultType": "ComponentHandle[]"
|
|
2734
4452
|
},
|
|
2735
4453
|
{
|
|
2736
4454
|
"path": "design.query.listFloors",
|
|
2737
4455
|
"namespace": "design.query",
|
|
2738
|
-
"summary": "List all
|
|
2739
|
-
"examplePrompts": [
|
|
4456
|
+
"summary": "List all the floor elements (floor plates / finishes) in the project, optionally filtered by storey, building, lock state, or region.",
|
|
4457
|
+
"examplePrompts": [
|
|
4458
|
+
"List all the floor elements in the model",
|
|
4459
|
+
"How many floor plates are on the second storey?",
|
|
4460
|
+
"Which floors are locked?",
|
|
4461
|
+
"Show the floor finishes on level 0\n\n# Example\n```ts\nconst lockedFloors = await snaptrude.design.query.listFloors({ isLocked: true })\n```"
|
|
4462
|
+
],
|
|
2740
4463
|
"argsType": "PluginEntityFilter",
|
|
2741
4464
|
"resultType": "ComponentHandle[]"
|
|
2742
4465
|
},
|
|
2743
4466
|
{
|
|
2744
4467
|
"path": "design.query.listFurniture",
|
|
2745
4468
|
"namespace": "design.query",
|
|
2746
|
-
"summary": "List all
|
|
2747
|
-
"examplePrompts": [
|
|
4469
|
+
"summary": "List all the furniture in the project, optionally filtered by storey, building, label, selection state, or region.",
|
|
4470
|
+
"examplePrompts": [
|
|
4471
|
+
"List all the furniture in the project",
|
|
4472
|
+
"How many furniture items are on this floor?",
|
|
4473
|
+
"Show the furniture inside the selected room",
|
|
4474
|
+
"Which furniture is on storey 2?\n\n# Example\n```ts\n// Furniture whose plan footprint overlaps a room (`overlaps` is plan-only —\n// scope the storey too, or furniture stacked on other floors matches)\nconst [kitchen] = await snaptrude.design.query.listSpaces({ label: \"Kitchen\" })\nif (kitchen) {\nconst inKitchen = await snaptrude.design.query.listFurniture({\noverlaps: kitchen,\nstoreys: [1],\n})\n}\n```"
|
|
4475
|
+
],
|
|
2748
4476
|
"argsType": "PluginEntityFilter",
|
|
2749
4477
|
"resultType": "ComponentHandle[]"
|
|
2750
4478
|
},
|
|
2751
4479
|
{
|
|
2752
4480
|
"path": "design.query.listMasses",
|
|
2753
4481
|
"namespace": "design.query",
|
|
2754
|
-
"summary": "List all
|
|
2755
|
-
"examplePrompts": [
|
|
4482
|
+
"summary": "List all the generic masses (non-room massing volumes) in the project, optionally filtered by storey, building, label, mass type, or region.",
|
|
4483
|
+
"examplePrompts": [
|
|
4484
|
+
"List all the masses in the model",
|
|
4485
|
+
"How many massing blocks are on the site?",
|
|
4486
|
+
"Show the generic masses on level 1",
|
|
4487
|
+
"Find every mass that isn't a room\n\n# Example\n```ts\n// Only certain mass kinds — massTypes matches any of the given values\nconst massing = await snaptrude.design.query.listMasses({\nmassTypes: [\"Generic mass\", \"Plinth\"],\n})\n```"
|
|
4488
|
+
],
|
|
2756
4489
|
"argsType": "PluginEntityFilter",
|
|
2757
4490
|
"resultType": "ComponentHandle[]"
|
|
2758
4491
|
},
|
|
2759
4492
|
{
|
|
2760
4493
|
"path": "design.query.listMullions",
|
|
2761
4494
|
"namespace": "design.query",
|
|
2762
|
-
"summary": "List all
|
|
2763
|
-
"examplePrompts": [
|
|
4495
|
+
"summary": "List all the curtain-wall mullions in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4496
|
+
"examplePrompts": [
|
|
4497
|
+
"List all the mullions in the curtain wall",
|
|
4498
|
+
"How many mullions are on the facade?",
|
|
4499
|
+
"Show every curtain wall mullion on level 5",
|
|
4500
|
+
"Which mullions are currently selected?\n\n# Example\n```ts\nconst level5Mullions = await snaptrude.design.query.listMullions({ storeys: [5] })\n```"
|
|
4501
|
+
],
|
|
2764
4502
|
"argsType": "PluginEntityFilter",
|
|
2765
4503
|
"resultType": "ComponentHandle[]"
|
|
2766
4504
|
},
|
|
2767
4505
|
{
|
|
2768
4506
|
"path": "design.query.listReferenceLines",
|
|
2769
4507
|
"namespace": "design.query",
|
|
2770
|
-
"summary": "List all
|
|
2771
|
-
"examplePrompts": [
|
|
4508
|
+
"summary": "List all the reference lines in the project, optionally filtered by storey, building, or region.",
|
|
4509
|
+
"examplePrompts": [
|
|
4510
|
+
"List all the reference lines in the model",
|
|
4511
|
+
"Show the guide lines on the ground floor",
|
|
4512
|
+
"How many reference lines are on this storey?",
|
|
4513
|
+
"Find the setting-out lines in building A\n\n# Example\n```ts\nconst groundFloorRefLines = await snaptrude.design.query.listReferenceLines({ storeys: [1] })\n```"
|
|
4514
|
+
],
|
|
2772
4515
|
"argsType": "PluginEntityFilter",
|
|
2773
4516
|
"resultType": "ComponentHandle[]"
|
|
2774
4517
|
},
|
|
2775
4518
|
{
|
|
2776
4519
|
"path": "design.query.listRoofs",
|
|
2777
4520
|
"namespace": "design.query",
|
|
2778
|
-
"summary": "List all
|
|
2779
|
-
"examplePrompts": [
|
|
4521
|
+
"summary": "List all the roofs in the project, optionally filtered by storey, building, visibility, or region.",
|
|
4522
|
+
"examplePrompts": [
|
|
4523
|
+
"How many roofs does the model have?",
|
|
4524
|
+
"List all the roof elements",
|
|
4525
|
+
"Show the roofs on the top storey",
|
|
4526
|
+
"Find every hidden roof\n\n# Example\n```ts\nconst hiddenRoofs = await snaptrude.design.query.listRoofs({ isHidden: true })\n```"
|
|
4527
|
+
],
|
|
2780
4528
|
"argsType": "PluginEntityFilter",
|
|
2781
4529
|
"resultType": "ComponentHandle[]"
|
|
2782
4530
|
},
|
|
2783
4531
|
{
|
|
2784
4532
|
"path": "design.query.listSlabs",
|
|
2785
4533
|
"namespace": "design.query",
|
|
2786
|
-
"summary": "List all
|
|
2787
|
-
"examplePrompts": [
|
|
4534
|
+
"summary": "List all the slabs in the project, optionally filtered by storey, building, lock state, or region.",
|
|
4535
|
+
"examplePrompts": [
|
|
4536
|
+
"List all the slabs in the project",
|
|
4537
|
+
"How many slabs are on level 2?",
|
|
4538
|
+
"Which slabs are locked?",
|
|
4539
|
+
"Show the slabs in the selected building\n\n# Example\n```ts\nconst storey2Slabs = await snaptrude.design.query.listSlabs({ storeys: [2] })\n```"
|
|
4540
|
+
],
|
|
2788
4541
|
"argsType": "PluginEntityFilter",
|
|
2789
4542
|
"resultType": "ComponentHandle[]"
|
|
2790
4543
|
},
|
|
2791
4544
|
{
|
|
2792
4545
|
"path": "design.query.listSpaces",
|
|
2793
4546
|
"namespace": "design.query",
|
|
2794
|
-
"summary": "List all
|
|
2795
|
-
"examplePrompts": [
|
|
4547
|
+
"summary": "List all the spaces (rooms) in the project, optionally filtered by storey, department, space type, label, selection state, or region.",
|
|
4548
|
+
"examplePrompts": [
|
|
4549
|
+
"How many rooms are in this project?",
|
|
4550
|
+
"List all the spaces on the second storey",
|
|
4551
|
+
"Which rooms are in the Bedrooms department?",
|
|
4552
|
+
"Find every room labelled Kitchen",
|
|
4553
|
+
"Show the spaces that are currently selected\n\n# Example\n```ts\n// Balconies and decks on storey 2 (`label` is an exact match on room_type)\nconst outdoor = await snaptrude.design.query.listSpaces({\nstoreys: [2],\nspaceTypes: [\"Balcony\", \"Deck\"],\n})\n\n// Rooms in a department: resolve its id first, then filter and total the area\nconst { departments } = await snaptrude.program.departments.list()\nconst bedrooms = departments.find((d) => d.name === \"Bedrooms\")\nif (bedrooms) {\nconst rooms = await snaptrude.design.query.listSpaces({ departmentId: bedrooms.id })\nlet total = 0\nfor (const room of rooms) {\nconst m = await snaptrude.design.query.measure(room)\ntotal += m?.area ?? 0\n}\n}\n```"
|
|
4554
|
+
],
|
|
2796
4555
|
"argsType": "PluginEntityFilter",
|
|
2797
4556
|
"resultType": "ComponentHandle[]"
|
|
2798
4557
|
},
|
|
2799
4558
|
{
|
|
2800
4559
|
"path": "design.query.listStaircases",
|
|
2801
4560
|
"namespace": "design.query",
|
|
2802
|
-
"summary": "List all
|
|
2803
|
-
"examplePrompts": [
|
|
4561
|
+
"summary": "List all the staircases in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4562
|
+
"examplePrompts": [
|
|
4563
|
+
"How many staircases are in the building?",
|
|
4564
|
+
"List all the stairs in the project",
|
|
4565
|
+
"Show the staircases on the ground floor",
|
|
4566
|
+
"Which stairs are currently selected?\n\n# Example\n```ts\nconst groundFloorStairs = await snaptrude.design.query.listStaircases({ storeys: [1] })\n```"
|
|
4567
|
+
],
|
|
2804
4568
|
"argsType": "PluginEntityFilter",
|
|
2805
4569
|
"resultType": "ComponentHandle[]"
|
|
2806
4570
|
},
|
|
2807
4571
|
{
|
|
2808
4572
|
"path": "design.query.listWalls",
|
|
2809
4573
|
"namespace": "design.query",
|
|
2810
|
-
"summary": "List all
|
|
2811
|
-
"examplePrompts": [
|
|
4574
|
+
"summary": "List all the walls in the project, optionally filtered by storey, building, label, selection state, or region.",
|
|
4575
|
+
"examplePrompts": [
|
|
4576
|
+
"How many walls are in the project?",
|
|
4577
|
+
"List all the walls on the ground floor",
|
|
4578
|
+
"Which walls are currently selected?",
|
|
4579
|
+
"Find the walls on level 2 of building A",
|
|
4580
|
+
"Show me every hidden wall\n\n# Example\n```ts\nconst groundFloorWalls = await snaptrude.design.query.listWalls({ storeys: [1] })\n```"
|
|
4581
|
+
],
|
|
2812
4582
|
"argsType": "PluginEntityFilter",
|
|
2813
4583
|
"resultType": "ComponentHandle[]"
|
|
2814
4584
|
},
|
|
2815
4585
|
{
|
|
2816
4586
|
"path": "design.query.listWindows",
|
|
2817
4587
|
"namespace": "design.query",
|
|
2818
|
-
"summary": "List all
|
|
2819
|
-
"examplePrompts": [
|
|
4588
|
+
"summary": "List all the windows in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4589
|
+
"examplePrompts": [
|
|
4590
|
+
"How many windows does this building have?",
|
|
4591
|
+
"List every window on level 3",
|
|
4592
|
+
"Which windows are on the ground floor?",
|
|
4593
|
+
"Show all the windows that are currently selected\n\n# Example\n```ts\nconst level3Windows = await snaptrude.design.query.listWindows({ storeys: [3] })\n```"
|
|
4594
|
+
],
|
|
2820
4595
|
"argsType": "PluginEntityFilter",
|
|
2821
4596
|
"resultType": "ComponentHandle[]"
|
|
2822
4597
|
},
|
|
2823
4598
|
{
|
|
2824
4599
|
"path": "design.query.measure",
|
|
2825
4600
|
"namespace": "design.query",
|
|
2826
|
-
"summary": "Measure an entity —
|
|
2827
|
-
"examplePrompts": [
|
|
4601
|
+
"summary": "Measure an entity — read its area, volume, and/or running length (whichever its type supports) together with its world-space bounding box in one call.",
|
|
4602
|
+
"examplePrompts": [
|
|
4603
|
+
"What's the area of this room?",
|
|
4604
|
+
"How long is the selected wall?",
|
|
4605
|
+
"Get the volume of this mass",
|
|
4606
|
+
"Give me the dimensions of the selected element",
|
|
4607
|
+
"What's the floor area of the kitchen?\n\n# Example\n```ts\nconst [space] = await snaptrude.design.query.listSpaces()\nconst m = await snaptrude.design.query.measure(space)\nconsole.log(m?.area, m?.volume)\n```"
|
|
4608
|
+
],
|
|
2828
4609
|
"argsType": "ComponentHandle",
|
|
2829
4610
|
"resultType": "PluginEntityMeasurements | null"
|
|
2830
4611
|
},
|
|
@@ -2832,7 +4613,13 @@
|
|
|
2832
4613
|
"path": "design.query.spaces.get",
|
|
2833
4614
|
"namespace": "design.query.spaces",
|
|
2834
4615
|
"summary": "Get selected properties of a space — the selective multi-property read.",
|
|
2835
|
-
"examplePrompts": [
|
|
4616
|
+
"examplePrompts": [
|
|
4617
|
+
"What is the area of this room?",
|
|
4618
|
+
"Get the name, storey and height of the selected space",
|
|
4619
|
+
"Which department does this room belong to?",
|
|
4620
|
+
"Where is this space positioned on the plan?",
|
|
4621
|
+
"Read the room type and dimensions of the selected room\n\n# Example\n```ts\nconst [space] = await snaptrude.design.query.listSpaces()\nconst info = await snaptrude.design.query.spaces.get(space, [\"name\", \"area\", \"position\"])\nconsole.log(info.name, info.area, info.position)\n```"
|
|
4622
|
+
],
|
|
2836
4623
|
"argsType": "ComponentHandle",
|
|
2837
4624
|
"resultType": "PluginDesignQuerySpacesGetResult"
|
|
2838
4625
|
},
|
|
@@ -2840,47 +4627,107 @@
|
|
|
2840
4627
|
"path": "design.query.spaces.getFootprint",
|
|
2841
4628
|
"namespace": "design.query.spaces",
|
|
2842
4629
|
"summary": "Get the **footprint** of a space — its bottom-face contour (outer profile + holes) as a reusable {@linkcode ContourHandle}. Equivalent to {@linkcode PluginDesignQueryGeometryApi.getBottomContour} narrowed to spaces.",
|
|
2843
|
-
"examplePrompts": [
|
|
4630
|
+
"examplePrompts": [
|
|
4631
|
+
"Get the footprint of this room",
|
|
4632
|
+
"Trace the floor outline of the selected space",
|
|
4633
|
+
"What is the plan boundary of this room, including any holes?",
|
|
4634
|
+
"Give me the base profile of the selected room mass\n\n# Example\n```ts\nconst [space] = await snaptrude.design.query.listSpaces()\nconst footprint = await snaptrude.design.query.spaces.getFootprint(space)\n```"
|
|
4635
|
+
],
|
|
2844
4636
|
"argsType": "ComponentHandle",
|
|
2845
4637
|
"resultType": "ContourHandle | null"
|
|
2846
4638
|
},
|
|
2847
4639
|
{
|
|
2848
4640
|
"path": "design.selection.add",
|
|
2849
4641
|
"namespace": "design.selection",
|
|
2850
|
-
"summary": "Add entities to the current selection.",
|
|
2851
|
-
"examplePrompts": [
|
|
4642
|
+
"summary": "Add entities to the current selection without deselecting anything — the selection grows to include the given entities alongside whatever was already selected.",
|
|
4643
|
+
"examplePrompts": [
|
|
4644
|
+
"Add the corridor to my current selection",
|
|
4645
|
+
"Select these columns too, keeping what's already selected",
|
|
4646
|
+
"Also select the roof",
|
|
4647
|
+
"Extend the selection to include all the doors on this floor\n\n# Example\n```ts\n// Grow the selection to include every roof, keeping what's already selected\nconst roofs = await snaptrude.design.query.listRoofs()\nawait snaptrude.design.selection.add(roofs)\n```"
|
|
4648
|
+
],
|
|
2852
4649
|
"argsType": "ComponentHandle[]",
|
|
2853
4650
|
"resultType": "PluginDesignChangeResult"
|
|
2854
4651
|
},
|
|
2855
4652
|
{
|
|
2856
4653
|
"path": "design.selection.clear",
|
|
2857
4654
|
"namespace": "design.selection",
|
|
2858
|
-
"summary": "Clear the selection (
|
|
2859
|
-
"examplePrompts": [
|
|
4655
|
+
"summary": "Clear the selection so nothing is selected (equivalent to `set([])`).",
|
|
4656
|
+
"examplePrompts": [
|
|
4657
|
+
"Deselect everything",
|
|
4658
|
+
"Clear my current selection",
|
|
4659
|
+
"Unselect all objects in the scene",
|
|
4660
|
+
"Make sure nothing is selected before we start\n\n# Example\n```ts\nconst { affected } = await snaptrude.design.selection.clear()\n// affected is the resulting selection — always [] here\n```"
|
|
4661
|
+
],
|
|
2860
4662
|
"argsType": null,
|
|
2861
4663
|
"resultType": "PluginDesignChangeResult"
|
|
2862
4664
|
},
|
|
2863
4665
|
{
|
|
2864
4666
|
"path": "design.selection.get",
|
|
2865
4667
|
"namespace": "design.selection",
|
|
2866
|
-
"summary": "
|
|
2867
|
-
"examplePrompts": [
|
|
4668
|
+
"summary": "Read the current scene selection — the entities the user (or a previous call) has selected, returned as handles you can pass straight into other API calls.",
|
|
4669
|
+
"examplePrompts": [
|
|
4670
|
+
"What do I have selected right now?",
|
|
4671
|
+
"List the currently selected objects",
|
|
4672
|
+
"Which rooms are selected in the scene?",
|
|
4673
|
+
"Get the ids of everything I've selected",
|
|
4674
|
+
"Is anything selected?\n\n# Example\n```ts\n// Selection handles feed straight into other API calls\nconst selection = await snaptrude.design.selection.get()\nif (selection.length > 0) {\nconst props = await snaptrude.design.query.getProperties(selection[0])\n}\n```"
|
|
4675
|
+
],
|
|
2868
4676
|
"argsType": null,
|
|
2869
4677
|
"resultType": "ComponentHandle[]"
|
|
2870
4678
|
},
|
|
2871
4679
|
{
|
|
2872
4680
|
"path": "design.selection.remove",
|
|
2873
4681
|
"namespace": "design.selection",
|
|
2874
|
-
"summary": "Remove entities from the current selection.",
|
|
2875
|
-
"examplePrompts": [
|
|
4682
|
+
"summary": "Remove entities from the current selection — the given entities are deselected while everything else stays selected.",
|
|
4683
|
+
"examplePrompts": [
|
|
4684
|
+
"Deselect the stair core but keep the rest selected",
|
|
4685
|
+
"Remove these walls from my selection",
|
|
4686
|
+
"Take the furniture out of the current selection",
|
|
4687
|
+
"Unselect the two smaller rooms\n\n# Example\n```ts\n// Deselect the furniture while keeping everything else selected\nconst furniture = await snaptrude.design.query.listFurniture({ isSelected: true })\nawait snaptrude.design.selection.remove(furniture)\n```"
|
|
4688
|
+
],
|
|
2876
4689
|
"argsType": "ComponentHandle[]",
|
|
2877
4690
|
"resultType": "PluginDesignChangeResult"
|
|
2878
4691
|
},
|
|
2879
4692
|
{
|
|
2880
4693
|
"path": "design.selection.set",
|
|
2881
4694
|
"namespace": "design.selection",
|
|
2882
|
-
"summary": "Replace the selection with exactly the given entities.",
|
|
2883
|
-
"examplePrompts": [
|
|
4695
|
+
"summary": "Replace the selection with exactly the given entities — anything previously selected is deselected first, so afterwards only these entities are selected.",
|
|
4696
|
+
"examplePrompts": [
|
|
4697
|
+
"Select these three walls",
|
|
4698
|
+
"Select only the kitchen and deselect everything else",
|
|
4699
|
+
"Change the selection to just these rooms",
|
|
4700
|
+
"Highlight the spaces on the second storey\n\n# Example\n```ts\n// Select only the ground-storey walls (replaces the previous selection)\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\nconst { affected } = await snaptrude.design.selection.set(walls)\n```"
|
|
4701
|
+
],
|
|
4702
|
+
"argsType": "ComponentHandle[]",
|
|
4703
|
+
"resultType": "PluginDesignChangeResult"
|
|
4704
|
+
},
|
|
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
|
+
],
|
|
2884
4731
|
"argsType": "ComponentHandle[]",
|
|
2885
4732
|
"resultType": "PluginDesignChangeResult"
|
|
2886
4733
|
},
|
|
@@ -2888,7 +4735,13 @@
|
|
|
2888
4735
|
"path": "design.transform.move",
|
|
2889
4736
|
"namespace": "design.transform",
|
|
2890
4737
|
"summary": "Translate entities by a **relative** displacement vector (added to the first component's absolute position as the anchor). Undoable.",
|
|
2891
|
-
"examplePrompts": [
|
|
4738
|
+
"examplePrompts": [
|
|
4739
|
+
"Move the selected room 5 metres to the right",
|
|
4740
|
+
"Shift these walls 3m along the x axis",
|
|
4741
|
+
"Nudge this space 500mm north",
|
|
4742
|
+
"Translate the furniture block by (10, 0, 5)",
|
|
4743
|
+
"Move these masses up one storey\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\nawait snaptrude.design.transform.move([\"space-id\"], vec3.new(10, 0, 0))\n```"
|
|
4744
|
+
],
|
|
2892
4745
|
"argsType": "ComponentHandle[]",
|
|
2893
4746
|
"resultType": "PluginDesignChangeResult"
|
|
2894
4747
|
},
|
|
@@ -2896,95 +4749,252 @@
|
|
|
2896
4749
|
"path": "design.transform.rotate",
|
|
2897
4750
|
"namespace": "design.transform",
|
|
2898
4751
|
"summary": "Rotate entities by a **signed angle in DEGREES**, anchored at the combined bounding-box centre (positive = CCW about +Y). NOTE: unlike the removed `tools.transform.rotate` (radians + caller pivot), this canonical form takes DEGREES and has NO caller pivot — the pivot is always the bbox centre. Undoable.",
|
|
2899
|
-
"examplePrompts": [
|
|
4752
|
+
"examplePrompts": [
|
|
4753
|
+
"Rotate the selected building 90 degrees",
|
|
4754
|
+
"Turn this room 45 degrees clockwise",
|
|
4755
|
+
"Spin the furniture block 180 degrees about its centre",
|
|
4756
|
+
"Rotate these masses 30 degrees around the vertical axis\n\n# Example\n```ts\nawait snaptrude.design.transform.rotate([\"space-id\"], 90)\n```"
|
|
4757
|
+
],
|
|
2900
4758
|
"argsType": "ComponentHandle[]",
|
|
2901
4759
|
"resultType": "PluginDesignChangeResult"
|
|
2902
4760
|
},
|
|
2903
4761
|
{
|
|
2904
4762
|
"path": "design.unlock",
|
|
2905
4763
|
"namespace": "design",
|
|
2906
|
-
"summary": "Unlock entities. Undoable. Paired with {@linkcode PluginDesignApi.lock}.",
|
|
2907
|
-
"examplePrompts": [
|
|
4764
|
+
"summary": "Unlock previously locked entities so they can be edited again. Undoable. Paired with {@linkcode PluginDesignApi.lock}.",
|
|
4765
|
+
"examplePrompts": [
|
|
4766
|
+
"Unlock the selected objects",
|
|
4767
|
+
"Make this locked wall editable again",
|
|
4768
|
+
"Unfreeze the masses I locked earlier",
|
|
4769
|
+
"Remove the lock from these doors\n\n# Example\n```ts\n// Unlock everything that is explicitly locked\nconst locked = await snaptrude.design.listLocked()\nconst { affected } = await snaptrude.design.unlock(locked)\n```"
|
|
4770
|
+
],
|
|
4771
|
+
"argsType": "ComponentHandle[]",
|
|
4772
|
+
"resultType": "PluginDesignChangeResult"
|
|
4773
|
+
},
|
|
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
|
+
],
|
|
2908
4784
|
"argsType": "ComponentHandle[]",
|
|
2909
4785
|
"resultType": "PluginDesignChangeResult"
|
|
2910
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
|
+
},
|
|
2911
4800
|
{
|
|
2912
4801
|
"path": "design.update.space",
|
|
2913
4802
|
"namespace": "design.update",
|
|
2914
|
-
"summary": "Update
|
|
2915
|
-
"examplePrompts": [
|
|
4803
|
+
"summary": "Update a single space (room) — change its properties (room label, space type, mass type, area class, department) and/or replace its geometry by re-extruding a profile to a new height. Sparse and undoable: only the fields you provide change.",
|
|
4804
|
+
"examplePrompts": [
|
|
4805
|
+
"Rename this room to Office",
|
|
4806
|
+
"Change this space's room type to Meeting Room",
|
|
4807
|
+
"Set the height of this room to 3 metres",
|
|
4808
|
+
"Move this space into the Circulation department",
|
|
4809
|
+
"Exclude this room from the area calculations\n\n# Example\n```ts\nawait snaptrude.design.update.space(\"space-id\", { properties: { room_type: \"Office\" } })\n```"
|
|
4810
|
+
],
|
|
2916
4811
|
"argsType": "ComponentHandle",
|
|
2917
4812
|
"resultType": "PluginSpaceUpdateResult"
|
|
2918
4813
|
},
|
|
2919
4814
|
{
|
|
2920
4815
|
"path": "design.update.spaces",
|
|
2921
4816
|
"namespace": "design.update",
|
|
2922
|
-
"summary": "Update
|
|
2923
|
-
"examplePrompts": [
|
|
4817
|
+
"summary": "Update many spaces (rooms) in one undoable operation — the bulk form of {@linkcode space}. Each item pairs a space with the sparse property changes and/or geometry re-extrude to apply; every item is validated up front, then all changes are applied as a single command.",
|
|
4818
|
+
"examplePrompts": [
|
|
4819
|
+
"Label all the selected rooms as Bedrooms",
|
|
4820
|
+
"Change the room type of these five spaces at once",
|
|
4821
|
+
"Set every room on this floor to a 3m height in one go",
|
|
4822
|
+
"Bulk-assign these spaces to the Service department",
|
|
4823
|
+
"Mark all of these rooms as excluded from area in one update\n\n# Example\n```ts\n// Re-label every selected room and mark it NET area — one undoable bulk update\nconst rooms = await snaptrude.design.query.listSpaces({ isSelected: true })\nconst results = await snaptrude.design.update.spaces(\nrooms.map((space) => ({\nspace,\nproperties: { room_type: \"Bedroom\", areaClass: \"NET\" },\n})),\n)\n// One result per item, in input order\nconsole.log(results.map((r) => r.spaceId))\n```"
|
|
4824
|
+
],
|
|
2924
4825
|
"argsType": "PluginUpdateSpaceItem[]",
|
|
2925
4826
|
"resultType": "PluginSpaceUpdateResult[]"
|
|
2926
4827
|
},
|
|
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
|
+
},
|
|
2927
4868
|
{
|
|
2928
4869
|
"path": "design.windows.getDimensions",
|
|
2929
4870
|
"namespace": "design.windows",
|
|
2930
|
-
"summary": "Get a window's dimensions
|
|
2931
|
-
"examplePrompts": [
|
|
4871
|
+
"summary": "Get a window's full dimensions in one call — width along the wall, vertical height, and thickness through the wall — measured in the window's local oriented space.",
|
|
4872
|
+
"examplePrompts": [
|
|
4873
|
+
"What are the dimensions of this window?",
|
|
4874
|
+
"How big is the selected window?",
|
|
4875
|
+
"Give me the width, height and depth of this window",
|
|
4876
|
+
"Measure the living room window",
|
|
4877
|
+
"Get the window size including its thickness through the wall\n\n# Example\n```ts\nconst [win] = await snaptrude.design.query.listWindows({ isSelected: true })\nconst dims = await snaptrude.design.windows.getDimensions(win)\nif (dims) console.log(dims.width, dims.height, dims.thickness)\n```"
|
|
4878
|
+
],
|
|
2932
4879
|
"argsType": "ComponentHandle",
|
|
2933
4880
|
"resultType": "PluginWindowDimensions | null"
|
|
2934
4881
|
},
|
|
2935
4882
|
{
|
|
2936
4883
|
"path": "design.windows.getHeight",
|
|
2937
4884
|
"namespace": "design.windows",
|
|
2938
|
-
"summary": "Get a window
|
|
2939
|
-
"examplePrompts": [
|
|
4885
|
+
"summary": "Get the height of a window — how tall its opening is on the host wall.",
|
|
4886
|
+
"examplePrompts": [
|
|
4887
|
+
"How tall is this window?",
|
|
4888
|
+
"What's the height of the selected window?",
|
|
4889
|
+
"Check the window height on this wall",
|
|
4890
|
+
"Is the bedroom window 1.5m high?\n\n# Example\n```ts\nconst [win] = await snaptrude.design.query.listWindows()\nconst height = await snaptrude.design.windows.getHeight(win)\nif (height !== null) console.log(\"window height:\", height)\n```"
|
|
4891
|
+
],
|
|
2940
4892
|
"argsType": "ComponentHandle",
|
|
2941
4893
|
"resultType": "number | null"
|
|
2942
4894
|
},
|
|
2943
4895
|
{
|
|
2944
4896
|
"path": "design.windows.getType",
|
|
2945
4897
|
"namespace": "design.windows",
|
|
2946
|
-
"summary": "Get a window
|
|
2947
|
-
"examplePrompts": [
|
|
4898
|
+
"summary": "Get the type name of a window — the label that identifies which kind of window the instance is, as shown in its properties.",
|
|
4899
|
+
"examplePrompts": [
|
|
4900
|
+
"What type of window is this?",
|
|
4901
|
+
"Is the selected window a casement or a slider?",
|
|
4902
|
+
"Tell me the window type used on this wall",
|
|
4903
|
+
"Check what kind of window the living room has\n\n# Example\n```ts\nconst [win] = await snaptrude.design.query.listWindows({ isSelected: true })\nconst type = await snaptrude.design.windows.getType(win)\nif (type) console.log(\"window type:\", type)\n```"
|
|
4904
|
+
],
|
|
2948
4905
|
"argsType": "ComponentHandle",
|
|
2949
4906
|
"resultType": "string | null"
|
|
2950
4907
|
},
|
|
2951
4908
|
{
|
|
2952
4909
|
"path": "design.windows.getWidth",
|
|
2953
4910
|
"namespace": "design.windows",
|
|
2954
|
-
"summary": "Get a window
|
|
2955
|
-
"examplePrompts": [
|
|
4911
|
+
"summary": "Get the width of a window — how wide its opening is along the host wall.",
|
|
4912
|
+
"examplePrompts": [
|
|
4913
|
+
"How wide is this window?",
|
|
4914
|
+
"What's the width of the selected window?",
|
|
4915
|
+
"Measure the width of the kitchen window",
|
|
4916
|
+
"Check whether this window is 1200mm wide\n\n# Example\n```ts\nconst [win] = await snaptrude.design.query.listWindows()\nconst width = await snaptrude.design.windows.getWidth(win)\nif (width !== null) console.log(\"window width:\", width)\n```"
|
|
4917
|
+
],
|
|
2956
4918
|
"argsType": "ComponentHandle",
|
|
2957
4919
|
"resultType": "number | null"
|
|
2958
4920
|
},
|
|
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
|
+
},
|
|
2959
4947
|
{
|
|
2960
4948
|
"path": "design.windows.setHeight",
|
|
2961
4949
|
"namespace": "design.windows",
|
|
2962
|
-
"summary": "Set a window
|
|
2963
|
-
"examplePrompts": [
|
|
4950
|
+
"summary": "Set the height of a window, resizing its opening and re-cutting the host wall. Height is in engine units; the change is undoable.",
|
|
4951
|
+
"examplePrompts": [
|
|
4952
|
+
"Make this window 1.5m tall",
|
|
4953
|
+
"Change the window height to 4 feet",
|
|
4954
|
+
"Shorten the selected window to 900mm high",
|
|
4955
|
+
"Set the bedroom window height to 1200\n\n# Example\n```ts\nconst [win] = await snaptrude.design.query.listWindows({ isSelected: true })\nawait snaptrude.design.windows.setHeight(win, 1500)\n```"
|
|
4956
|
+
],
|
|
2964
4957
|
"argsType": "ComponentHandle",
|
|
2965
4958
|
"resultType": "PluginDesignChangeResult"
|
|
2966
4959
|
},
|
|
2967
4960
|
{
|
|
2968
4961
|
"path": "design.windows.setWidth",
|
|
2969
4962
|
"namespace": "design.windows",
|
|
2970
|
-
"summary": "Set a window
|
|
2971
|
-
"examplePrompts": [
|
|
4963
|
+
"summary": "Set the width of a window, resizing its opening and re-cutting the host wall. Width is in engine units; the change is undoable.",
|
|
4964
|
+
"examplePrompts": [
|
|
4965
|
+
"Make this window 1200mm wide",
|
|
4966
|
+
"Widen the selected window to 4 feet",
|
|
4967
|
+
"Change the window width to 1.5m",
|
|
4968
|
+
"Resize the kitchen window to 900 wide\n\n# Example\n```ts\n// Takes a single window (unlike design.doors.setWidth, which takes an array)\nconst [win] = await snaptrude.design.query.listWindows({ isSelected: true })\nconst { affected } = await snaptrude.design.windows.setWidth(win, 1200)\n```"
|
|
4969
|
+
],
|
|
2972
4970
|
"argsType": "ComponentHandle",
|
|
2973
4971
|
"resultType": "PluginDesignChangeResult"
|
|
2974
4972
|
},
|
|
2975
4973
|
{
|
|
2976
4974
|
"path": "entity.buildableEnvelope.create",
|
|
2977
4975
|
"namespace": "entity.buildableEnvelope",
|
|
2978
|
-
"summary": "Create a new parametric buildable envelope.",
|
|
2979
|
-
"examplePrompts": [
|
|
4976
|
+
"summary": "Create a new parametric buildable envelope — the zoning-regulated volume a building may occupy — generated from a site polygon, tiered setbacks, a height or floor-count cap, and optional FAR and lot-coverage limits.",
|
|
4977
|
+
"examplePrompts": [
|
|
4978
|
+
"Create a buildable envelope for my site",
|
|
4979
|
+
"Generate the zoning envelope with 10ft front setbacks",
|
|
4980
|
+
"Show the maximum buildable volume with a 150ft height limit",
|
|
4981
|
+
"Model the allowable massing from the setback rules",
|
|
4982
|
+
"Create a zoning envelope capped at 12 floors with FAR 3\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.create(\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[\n{ aboveHeight: 0, front: 10, side: 5, rear: 10 },\n{ aboveHeight: 100, front: 20, side: 10, rear: 20 },\n],\n{ kind: \"max_height\", maxHeight: 150 },\n12,\n)\n```"
|
|
4983
|
+
],
|
|
2980
4984
|
"argsType": "PluginBuildableEnvelopePolygonVertex[]",
|
|
2981
4985
|
"resultType": "PluginBuildableEnvelopeCreateResult"
|
|
2982
4986
|
},
|
|
2983
4987
|
{
|
|
2984
4988
|
"path": "entity.buildableEnvelope.update",
|
|
2985
4989
|
"namespace": "entity.buildableEnvelope",
|
|
2986
|
-
"summary": "Update an existing parametric buildable envelope.",
|
|
2987
|
-
"examplePrompts": [
|
|
4990
|
+
"summary": "Update an existing parametric buildable envelope — regenerate the zoning volume from a revised site polygon, setbacks, vertical cap, or FAR and lot-coverage limits, keeping the same envelope id.",
|
|
4991
|
+
"examplePrompts": [
|
|
4992
|
+
"Change the envelope's height limit to 175 feet",
|
|
4993
|
+
"Update the setbacks on the buildable envelope",
|
|
4994
|
+
"Regenerate the zoning envelope with a new site boundary",
|
|
4995
|
+
"Increase the FAR on the buildable volume",
|
|
4996
|
+
"Modify the envelope to allow 15 storeys instead\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.update(\nexistingId,\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[{ aboveHeight: 0, front: 10, side: 5, rear: 10 }],\n{ kind: \"max_height\", maxHeight: 175 },\n12,\n)\n```"
|
|
4997
|
+
],
|
|
2988
4998
|
"argsType": "string",
|
|
2989
4999
|
"resultType": "PluginBuildableEnvelopeUpdateResult"
|
|
2990
5000
|
},
|
|
@@ -2992,7 +5002,13 @@
|
|
|
2992
5002
|
"path": "entity.referenceLine.createMulti",
|
|
2993
5003
|
"namespace": "entity.referenceLine",
|
|
2994
5004
|
"summary": "Create multiple reference lines from a profile.",
|
|
2995
|
-
"examplePrompts": [
|
|
5005
|
+
"examplePrompts": [
|
|
5006
|
+
"Draw grid lines across the site",
|
|
5007
|
+
"Create reference lines from these curves",
|
|
5008
|
+
"Add alignment guides along the building edge",
|
|
5009
|
+
"Set up a structural grid using guide lines",
|
|
5010
|
+
"Turn this profile into reference lines\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\n\nconst start = await vec3.new(0, 0, 0)\nconst mid = await vec3.new(10, 0, 0)\nconst end = await vec3.new(10, 0, 10)\nconst l1 = await snaptrude.core.geom.create.line(start, mid)\nconst l2 = await snaptrude.core.geom.create.line(mid, end)\nconst profile = await snaptrude.core.geom.create.profileFromCurves([l1, l2])\n\nconst { referenceLineIds } = await snaptrude.entity.referenceLine.createMulti(profile)\n```"
|
|
5011
|
+
],
|
|
2996
5012
|
"argsType": "ProfileHandle",
|
|
2997
5013
|
"resultType": "PluginReferenceLineCreateMultiResult"
|
|
2998
5014
|
},
|
|
@@ -3000,7 +5016,12 @@
|
|
|
3000
5016
|
"path": "entity.referenceLine.delete",
|
|
3001
5017
|
"namespace": "entity.referenceLine",
|
|
3002
5018
|
"summary": "Delete a reference line by its ID.",
|
|
3003
|
-
"examplePrompts": [
|
|
5019
|
+
"examplePrompts": [
|
|
5020
|
+
"Delete this reference line",
|
|
5021
|
+
"Remove the grid line I just drew",
|
|
5022
|
+
"Get rid of the alignment guide on the left",
|
|
5023
|
+
"Erase a reference line by its id\n\n# Example\n```ts\nawait snaptrude.entity.referenceLine.delete(\"some-ref-line-id\")\n```"
|
|
5024
|
+
],
|
|
3004
5025
|
"argsType": "string",
|
|
3005
5026
|
"resultType": "PluginReferenceLineDeleteResult"
|
|
3006
5027
|
},
|
|
@@ -3008,7 +5029,12 @@
|
|
|
3008
5029
|
"path": "entity.referenceLine.get",
|
|
3009
5030
|
"namespace": "entity.referenceLine",
|
|
3010
5031
|
"summary": "Get properties of a reference line by its ID.",
|
|
3011
|
-
"examplePrompts": [
|
|
5032
|
+
"examplePrompts": [
|
|
5033
|
+
"Get the curve geometry of this reference line",
|
|
5034
|
+
"Where does this grid line run?",
|
|
5035
|
+
"Read the geometry of a guide line by its id",
|
|
5036
|
+
"Look up the curve of the selected reference line\n\n# Example\n```ts\nconst result = await snaptrude.entity.referenceLine.get(\"some-ref-line-id\", [\"curve\"])\n// result.curve is an opaque CurveHandle; a dedicated curve read API for its\n// coordinates is exposed separately via `snaptrude.core.geom.curve`.\n```"
|
|
5037
|
+
],
|
|
3012
5038
|
"argsType": "string",
|
|
3013
5039
|
"resultType": "PluginReferenceLineGetResult"
|
|
3014
5040
|
},
|
|
@@ -3016,7 +5042,12 @@
|
|
|
3016
5042
|
"path": "entity.referenceLine.getAll",
|
|
3017
5043
|
"namespace": "entity.referenceLine",
|
|
3018
5044
|
"summary": "Get the IDs of all reference lines in the current project.",
|
|
3019
|
-
"examplePrompts": [
|
|
5045
|
+
"examplePrompts": [
|
|
5046
|
+
"How many grid lines are in the project?",
|
|
5047
|
+
"List all the reference lines in my model",
|
|
5048
|
+
"Show every guide line in the file",
|
|
5049
|
+
"Do I have any reference lines in this project?\n\n# Example\n```ts\nconst { referenceLineIds } = await snaptrude.entity.referenceLine.getAll()\nconsole.log(`Project has ${referenceLineIds.length} reference lines`)\n```"
|
|
5050
|
+
],
|
|
3020
5051
|
"argsType": null,
|
|
3021
5052
|
"resultType": "PluginReferenceLineGetAllResult"
|
|
3022
5053
|
},
|
|
@@ -3024,15 +5055,40 @@
|
|
|
3024
5055
|
"path": "entity.story.create",
|
|
3025
5056
|
"namespace": "entity.story",
|
|
3026
5057
|
"summary": "Create a new story (floor) in the project.",
|
|
3027
|
-
"examplePrompts": [
|
|
5058
|
+
"examplePrompts": [
|
|
5059
|
+
"Add a third floor to the building",
|
|
5060
|
+
"Create a new storey above the second floor",
|
|
5061
|
+
"Add a basement level to this project",
|
|
5062
|
+
"Insert a new level with a custom floor height",
|
|
5063
|
+
"Add another floor on top of the building\n\n# Example\n```ts\n// Create a new third floor with custom height\nconst { storyId } = await snaptrude.entity.story.create(3, 4.5)\n```"
|
|
5064
|
+
],
|
|
3028
5065
|
"argsType": "number",
|
|
3029
5066
|
"resultType": "PluginStoryCreateResult"
|
|
3030
5067
|
},
|
|
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
|
+
},
|
|
3031
5081
|
{
|
|
3032
5082
|
"path": "entity.story.get",
|
|
3033
5083
|
"namespace": "entity.story",
|
|
3034
5084
|
"summary": "Get properties of a story by its storey number.",
|
|
3035
|
-
"examplePrompts": [
|
|
5085
|
+
"examplePrompts": [
|
|
5086
|
+
"What is the height of the ground floor?",
|
|
5087
|
+
"How many rooms are on the second storey?",
|
|
5088
|
+
"Get the total floor area of level 3",
|
|
5089
|
+
"Is the first floor hidden in the viewport?",
|
|
5090
|
+
"Show me the name and height of story 2\n\n# Example\n```ts\nconst info = await snaptrude.entity.story.get(1, [\"height\", \"name\", \"spacesCount\"])\nconsole.log(info.name, info.height, info.spacesCount)\n```"
|
|
5091
|
+
],
|
|
3036
5092
|
"argsType": "number",
|
|
3037
5093
|
"resultType": "PluginStoryGetResult"
|
|
3038
5094
|
},
|
|
@@ -3040,15 +5096,25 @@
|
|
|
3040
5096
|
"path": "entity.story.getAll",
|
|
3041
5097
|
"namespace": "entity.story",
|
|
3042
5098
|
"summary": "Get all stories in the current project.",
|
|
3043
|
-
"examplePrompts": [
|
|
5099
|
+
"examplePrompts": [
|
|
5100
|
+
"How many floors does this building have?",
|
|
5101
|
+
"List all the storeys in the project",
|
|
5102
|
+
"Show me every level with its name",
|
|
5103
|
+
"Which stories exist in this model?\n\n# Example\n```ts\nconst { stories } = await snaptrude.entity.story.getAll()\nfor (const s of stories) {\nconsole.log(`Story ${s.value}: ${s.name} (id: ${s.id})`)\n}\n```"
|
|
5104
|
+
],
|
|
3044
5105
|
"argsType": null,
|
|
3045
5106
|
"resultType": "PluginStoryGetAllResult"
|
|
3046
5107
|
},
|
|
3047
5108
|
{
|
|
3048
5109
|
"path": "entity.story.update",
|
|
3049
5110
|
"namespace": "entity.story",
|
|
3050
|
-
"summary": "Update a story's height.",
|
|
3051
|
-
"examplePrompts": [
|
|
5111
|
+
"summary": "Update a story's floor-to-floor height, cascading the full geometry change.",
|
|
5112
|
+
"examplePrompts": [
|
|
5113
|
+
"Change the ground floor height to 3.5 metres",
|
|
5114
|
+
"Make the second storey taller",
|
|
5115
|
+
"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 — walls stretch and the\n// floors above move up to match, all in a single undo step.\nconst result = await snaptrude.entity.story.update(1, 5)\n```"
|
|
5117
|
+
],
|
|
3052
5118
|
"argsType": "number",
|
|
3053
5119
|
"resultType": "PluginStoryUpdateResult"
|
|
3054
5120
|
},
|
|
@@ -3090,6 +5156,19 @@
|
|
|
3090
5156
|
"argsType": "{ url?: string; dataUrl?: string }",
|
|
3091
5157
|
"resultType": "PluginPresentationImportResult"
|
|
3092
5158
|
},
|
|
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
|
+
},
|
|
3093
5172
|
{
|
|
3094
5173
|
"path": "presentation.sheets.create",
|
|
3095
5174
|
"namespace": "presentation.sheets",
|
|
@@ -3190,6 +5269,19 @@
|
|
|
3190
5269
|
"argsType": null,
|
|
3191
5270
|
"resultType": "PluginPresentationViewsGetResult"
|
|
3192
5271
|
},
|
|
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
|
+
},
|
|
3193
5285
|
{
|
|
3194
5286
|
"path": "presentation.views.list",
|
|
3195
5287
|
"namespace": "presentation.views",
|
|
@@ -3217,6 +5309,20 @@
|
|
|
3217
5309
|
"argsType": "string",
|
|
3218
5310
|
"resultType": "PluginPresentationViewsSetActiveResult"
|
|
3219
5311
|
},
|
|
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
|
+
},
|
|
3220
5326
|
{
|
|
3221
5327
|
"path": "program.adjacency.compute",
|
|
3222
5328
|
"namespace": "program.adjacency",
|
|
@@ -3250,6 +5356,8 @@
|
|
|
3250
5356
|
"examplePrompts": [
|
|
3251
5357
|
"What's my FAR right now?",
|
|
3252
5358
|
"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?",
|
|
3253
5361
|
"How much built-up area have I used against the site area?",
|
|
3254
5362
|
"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```"
|
|
3255
5363
|
],
|
|
@@ -3262,6 +5370,7 @@
|
|
|
3262
5370
|
"summary": "List the program area rollup grouped by a facet.",
|
|
3263
5371
|
"examplePrompts": [
|
|
3264
5372
|
"Break down the area by storey",
|
|
5373
|
+
"Break down net vs gross area by storey",
|
|
3265
5374
|
"Show the area rollup per department",
|
|
3266
5375
|
"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```"
|
|
3267
5376
|
],
|
|
@@ -3274,6 +5383,7 @@
|
|
|
3274
5383
|
"summary": "List the spaces that make up one area group.",
|
|
3275
5384
|
"examplePrompts": [
|
|
3276
5385
|
"List the spaces on this storey with their areas",
|
|
5386
|
+
"Which spaces are net and which are gross on this storey?",
|
|
3277
5387
|
"What rooms are in the Bedrooms department bucket?",
|
|
3278
5388
|
"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```"
|
|
3279
5389
|
],
|
|
@@ -3434,6 +5544,54 @@
|
|
|
3434
5544
|
"argsType": "string",
|
|
3435
5545
|
"resultType": "PluginProgramDepartmentsUpdateResult"
|
|
3436
5546
|
},
|
|
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
|
+
},
|
|
3437
5595
|
{
|
|
3438
5596
|
"path": "program.metrics.get",
|
|
3439
5597
|
"namespace": "program.metrics",
|
|
@@ -3488,6 +5646,30 @@
|
|
|
3488
5646
|
"argsType": null,
|
|
3489
5647
|
"resultType": "PluginProgramSiteContextResult"
|
|
3490
5648
|
},
|
|
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
|
+
},
|
|
3491
5673
|
{
|
|
3492
5674
|
"path": "program.site.listGeoPolygons",
|
|
3493
5675
|
"namespace": "program.site",
|