@snaptrude/plugin-core 0.5.0 → 0.6.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 +52 -0
- package/api-manifest.full.json +2044 -443
- package/api-manifest.json +2051 -394
- 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 +5 -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/design/create/index.d.ts +9 -0
- package/dist/api/design/create/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/entity/space.d.ts +2 -2
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.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/handles.d.ts +33 -0
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +1335 -987
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1278 -983
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/generate-manifest.test.mjs +26 -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 +5 -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/design/create/index.ts +9 -0
- package/src/api/design/erase/index.ts +1 -1
- package/src/api/design/selection/index.ts +129 -0
- package/src/api/index.ts +5 -0
- package/src/api/program/site.ts +93 -0
- package/src/handles.ts +46 -0
package/api-manifest.full.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,10 +517,24 @@
|
|
|
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
|
},
|
|
527
|
+
{
|
|
528
|
+
"path": "core.geom.create.profileRect",
|
|
529
|
+
"namespace": "core.geom.create",
|
|
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.",
|
|
531
|
+
"examplePrompts": [
|
|
532
|
+
"Draw a 4m by 3m rectangle",
|
|
533
|
+
"Make a rectangular outline for a room footprint"
|
|
534
|
+
],
|
|
535
|
+
"argsType": "number",
|
|
536
|
+
"resultType": "ProfileHandle"
|
|
537
|
+
},
|
|
230
538
|
{
|
|
231
539
|
"path": "core.geom.delete.contour",
|
|
232
540
|
"namespace": "core.geom.delete",
|
|
@@ -255,7 +563,10 @@
|
|
|
255
563
|
"path": "core.geom.query.arc.getCentre",
|
|
256
564
|
"namespace": "core.geom.query.arc",
|
|
257
565
|
"summary": "Read the centre point of an arc.",
|
|
258
|
-
"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
|
+
],
|
|
259
570
|
"argsType": "ArcHandle",
|
|
260
571
|
"resultType": "Vec3Components"
|
|
261
572
|
},
|
|
@@ -263,7 +574,10 @@
|
|
|
263
574
|
"path": "core.geom.query.arc.getRadius",
|
|
264
575
|
"namespace": "core.geom.query.arc",
|
|
265
576
|
"summary": "Read the radius of an arc.",
|
|
266
|
-
"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
|
+
],
|
|
267
581
|
"argsType": "ArcHandle",
|
|
268
582
|
"resultType": "number"
|
|
269
583
|
},
|
|
@@ -271,7 +585,10 @@
|
|
|
271
585
|
"path": "core.geom.query.arc.getSweepAngle",
|
|
272
586
|
"namespace": "core.geom.query.arc",
|
|
273
587
|
"summary": "Read the sweep angle of an arc (the angle subtended at its centre).",
|
|
274
|
-
"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
|
+
],
|
|
275
592
|
"argsType": "ArcHandle",
|
|
276
593
|
"resultType": "number"
|
|
277
594
|
},
|
|
@@ -287,7 +604,10 @@
|
|
|
287
604
|
"path": "core.geom.query.brep.getBoundingBox",
|
|
288
605
|
"namespace": "core.geom.query.brep",
|
|
289
606
|
"summary": "Get the axis-aligned bounding box of a brep.",
|
|
290
|
-
"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
|
+
],
|
|
291
611
|
"argsType": "BrepHandle",
|
|
292
612
|
"resultType": "BBoxComponents"
|
|
293
613
|
},
|
|
@@ -295,7 +615,10 @@
|
|
|
295
615
|
"path": "core.geom.query.brep.getCentroid",
|
|
296
616
|
"namespace": "core.geom.query.brep",
|
|
297
617
|
"summary": "Get the centroid (mean of all vertex positions) of a brep.",
|
|
298
|
-
"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
|
+
],
|
|
299
622
|
"argsType": "BrepHandle",
|
|
300
623
|
"resultType": "Vec3Components"
|
|
301
624
|
},
|
|
@@ -359,7 +682,10 @@
|
|
|
359
682
|
"path": "core.geom.query.brep.isEqual",
|
|
360
683
|
"namespace": "core.geom.query.brep",
|
|
361
684
|
"summary": "Test whether two breps are geometrically equal.",
|
|
362
|
-
"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
|
+
],
|
|
363
689
|
"argsType": "BrepHandle",
|
|
364
690
|
"resultType": "boolean"
|
|
365
691
|
},
|
|
@@ -399,7 +725,10 @@
|
|
|
399
725
|
"path": "core.geom.query.brep.listVertexPositions",
|
|
400
726
|
"namespace": "core.geom.query.brep",
|
|
401
727
|
"summary": "List the positions of all vertices in a brep (ordered as {@linkcode PluginGeomQueryBrepApi.listVertices}).",
|
|
402
|
-
"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
|
+
],
|
|
403
732
|
"argsType": "BrepHandle",
|
|
404
733
|
"resultType": "Vec3Components[]"
|
|
405
734
|
},
|
|
@@ -423,7 +752,10 @@
|
|
|
423
752
|
"path": "core.geom.query.circle.getCentre",
|
|
424
753
|
"namespace": "core.geom.query.circle",
|
|
425
754
|
"summary": "Read the centre point of a circle.",
|
|
426
|
-
"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
|
+
],
|
|
427
759
|
"argsType": "CircleHandle",
|
|
428
760
|
"resultType": "Vec3Components"
|
|
429
761
|
},
|
|
@@ -431,7 +763,10 @@
|
|
|
431
763
|
"path": "core.geom.query.circle.getLength",
|
|
432
764
|
"namespace": "core.geom.query.circle",
|
|
433
765
|
"summary": "Read the length (circumference, `2πr`) of a circle.",
|
|
434
|
-
"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
|
+
],
|
|
435
770
|
"argsType": "CircleHandle",
|
|
436
771
|
"resultType": "number"
|
|
437
772
|
},
|
|
@@ -439,7 +774,9 @@
|
|
|
439
774
|
"path": "core.geom.query.circle.getNearestPoint",
|
|
440
775
|
"namespace": "core.geom.query.circle",
|
|
441
776
|
"summary": "Get the point on a circle nearest to an arbitrary point.",
|
|
442
|
-
"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
|
+
],
|
|
443
780
|
"argsType": "CircleHandle",
|
|
444
781
|
"resultType": "Vec3Components"
|
|
445
782
|
},
|
|
@@ -455,7 +792,9 @@
|
|
|
455
792
|
"path": "core.geom.query.circle.getPointAtDistance",
|
|
456
793
|
"namespace": "core.geom.query.circle",
|
|
457
794
|
"summary": "Get the point reached by travelling a signed arc-distance along the circle from a reference point that lies on it.",
|
|
458
|
-
"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
|
+
],
|
|
459
798
|
"argsType": "CircleHandle",
|
|
460
799
|
"resultType": "Vec3Components"
|
|
461
800
|
},
|
|
@@ -463,7 +802,10 @@
|
|
|
463
802
|
"path": "core.geom.query.circle.getRadius",
|
|
464
803
|
"namespace": "core.geom.query.circle",
|
|
465
804
|
"summary": "Read the radius of a circle.",
|
|
466
|
-
"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
|
+
],
|
|
467
809
|
"argsType": "CircleHandle",
|
|
468
810
|
"resultType": "number"
|
|
469
811
|
},
|
|
@@ -479,7 +821,9 @@
|
|
|
479
821
|
"path": "core.geom.query.circle.hasPoint",
|
|
480
822
|
"namespace": "core.geom.query.circle",
|
|
481
823
|
"summary": "Test whether a point lies on a circle.",
|
|
482
|
-
"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
|
+
],
|
|
483
827
|
"argsType": "CircleHandle",
|
|
484
828
|
"resultType": "boolean"
|
|
485
829
|
},
|
|
@@ -503,7 +847,10 @@
|
|
|
503
847
|
"path": "core.geom.query.circle.listPoints",
|
|
504
848
|
"namespace": "core.geom.query.circle",
|
|
505
849
|
"summary": "Sample a circle into an ordered list of points.",
|
|
506
|
-
"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
|
+
],
|
|
507
854
|
"argsType": "CircleHandle",
|
|
508
855
|
"resultType": "Vec3Components[]"
|
|
509
856
|
},
|
|
@@ -511,7 +858,10 @@
|
|
|
511
858
|
"path": "core.geom.query.contour.getArea",
|
|
512
859
|
"namespace": "core.geom.query.contour",
|
|
513
860
|
"summary": "Get the (approximate) net enclosed area of a contour — the outer profile area minus the area of every hole.",
|
|
514
|
-
"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
|
+
],
|
|
515
865
|
"argsType": "ContourHandle",
|
|
516
866
|
"resultType": "number"
|
|
517
867
|
},
|
|
@@ -519,7 +869,9 @@
|
|
|
519
869
|
"path": "core.geom.query.contour.getBoundingBox",
|
|
520
870
|
"namespace": "core.geom.query.contour",
|
|
521
871
|
"summary": "Get the axis-aligned bounding box of a contour.",
|
|
522
|
-
"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
|
+
],
|
|
523
875
|
"argsType": "ContourHandle",
|
|
524
876
|
"resultType": "BBoxComponents"
|
|
525
877
|
},
|
|
@@ -527,7 +879,10 @@
|
|
|
527
879
|
"path": "core.geom.query.contour.getHoleCount",
|
|
528
880
|
"namespace": "core.geom.query.contour",
|
|
529
881
|
"summary": "Get the number of inner profiles (holes) in a contour.",
|
|
530
|
-
"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
|
+
],
|
|
531
886
|
"argsType": "ContourHandle",
|
|
532
887
|
"resultType": "number"
|
|
533
888
|
},
|
|
@@ -535,7 +890,9 @@
|
|
|
535
890
|
"path": "core.geom.query.contour.getNearestPoint",
|
|
536
891
|
"namespace": "core.geom.query.contour",
|
|
537
892
|
"summary": "Get the point on a contour nearest to an arbitrary point.",
|
|
538
|
-
"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
|
+
],
|
|
539
896
|
"argsType": "ContourHandle",
|
|
540
897
|
"resultType": "Vec3Components"
|
|
541
898
|
},
|
|
@@ -559,7 +916,10 @@
|
|
|
559
916
|
"path": "core.geom.query.contour.getPerimeter",
|
|
560
917
|
"namespace": "core.geom.query.contour",
|
|
561
918
|
"summary": "Get the perimeter (total length of every curve) of a contour, including holes.",
|
|
562
|
-
"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
|
+
],
|
|
563
923
|
"argsType": "ContourHandle",
|
|
564
924
|
"resultType": "number"
|
|
565
925
|
},
|
|
@@ -567,7 +927,10 @@
|
|
|
567
927
|
"path": "core.geom.query.contour.hasPoint",
|
|
568
928
|
"namespace": "core.geom.query.contour",
|
|
569
929
|
"summary": "Test whether a point lies inside a contour (inside the outer profile and outside every hole).",
|
|
570
|
-
"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
|
+
],
|
|
571
934
|
"argsType": "ContourHandle",
|
|
572
935
|
"resultType": "boolean"
|
|
573
936
|
},
|
|
@@ -639,7 +1002,9 @@
|
|
|
639
1002
|
"path": "core.geom.query.curve.getChordLength",
|
|
640
1003
|
"namespace": "core.geom.query.curve",
|
|
641
1004
|
"summary": "Get the straight-line chord length between a curve's endpoints.",
|
|
642
|
-
"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
|
+
],
|
|
643
1008
|
"argsType": "CurveHandle",
|
|
644
1009
|
"resultType": "number"
|
|
645
1010
|
},
|
|
@@ -647,7 +1012,9 @@
|
|
|
647
1012
|
"path": "core.geom.query.curve.getCommonPart",
|
|
648
1013
|
"namespace": "core.geom.query.curve",
|
|
649
1014
|
"summary": "Get the common (overlapping) part of two curves.",
|
|
650
|
-
"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
|
+
],
|
|
651
1018
|
"argsType": "CurveHandle",
|
|
652
1019
|
"resultType": "CurveHandle | null"
|
|
653
1020
|
},
|
|
@@ -663,7 +1030,9 @@
|
|
|
663
1030
|
"path": "core.geom.query.curve.getDistanceAlong",
|
|
664
1031
|
"namespace": "core.geom.query.curve",
|
|
665
1032
|
"summary": "Get the arc-length distance along a curve between two points on it.",
|
|
666
|
-
"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
|
+
],
|
|
667
1036
|
"argsType": "CurveHandle",
|
|
668
1037
|
"resultType": "number"
|
|
669
1038
|
},
|
|
@@ -671,7 +1040,10 @@
|
|
|
671
1040
|
"path": "core.geom.query.curve.getDistanceBetween",
|
|
672
1041
|
"namespace": "core.geom.query.curve",
|
|
673
1042
|
"summary": "Get the perpendicular distance between two parallel lines.",
|
|
674
|
-
"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
|
+
],
|
|
675
1047
|
"argsType": "LineHandle",
|
|
676
1048
|
"resultType": "number"
|
|
677
1049
|
},
|
|
@@ -679,7 +1051,10 @@
|
|
|
679
1051
|
"path": "core.geom.query.curve.getDistanceToPoint",
|
|
680
1052
|
"namespace": "core.geom.query.curve",
|
|
681
1053
|
"summary": "Get the shortest distance from an arbitrary point to a curve.",
|
|
682
|
-
"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
|
+
],
|
|
683
1058
|
"argsType": "CurveHandle",
|
|
684
1059
|
"resultType": "number"
|
|
685
1060
|
},
|
|
@@ -687,7 +1062,9 @@
|
|
|
687
1062
|
"path": "core.geom.query.curve.getEndPoint",
|
|
688
1063
|
"namespace": "core.geom.query.curve",
|
|
689
1064
|
"summary": "Get the end point of a curve.",
|
|
690
|
-
"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
|
+
],
|
|
691
1068
|
"argsType": "CurveHandle",
|
|
692
1069
|
"resultType": "Vec3Components"
|
|
693
1070
|
},
|
|
@@ -695,7 +1072,10 @@
|
|
|
695
1072
|
"path": "core.geom.query.curve.getLength",
|
|
696
1073
|
"namespace": "core.geom.query.curve",
|
|
697
1074
|
"summary": "Get the arc-length of a curve.",
|
|
698
|
-
"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
|
+
],
|
|
699
1079
|
"argsType": "CurveHandle",
|
|
700
1080
|
"resultType": "number"
|
|
701
1081
|
},
|
|
@@ -703,7 +1083,9 @@
|
|
|
703
1083
|
"path": "core.geom.query.curve.getMergedCurve",
|
|
704
1084
|
"namespace": "core.geom.query.curve",
|
|
705
1085
|
"summary": "Merge two curves into a single curve when they are mergeable.",
|
|
706
|
-
"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
|
+
],
|
|
707
1089
|
"argsType": "CurveHandle",
|
|
708
1090
|
"resultType": "CurveHandle | null"
|
|
709
1091
|
},
|
|
@@ -711,7 +1093,10 @@
|
|
|
711
1093
|
"path": "core.geom.query.curve.getMidPoint",
|
|
712
1094
|
"namespace": "core.geom.query.curve",
|
|
713
1095
|
"summary": "Get the mid point of a curve.",
|
|
714
|
-
"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
|
+
],
|
|
715
1100
|
"argsType": "CurveHandle",
|
|
716
1101
|
"resultType": "Vec3Components"
|
|
717
1102
|
},
|
|
@@ -719,7 +1104,9 @@
|
|
|
719
1104
|
"path": "core.geom.query.curve.getNearestPoint",
|
|
720
1105
|
"namespace": "core.geom.query.curve",
|
|
721
1106
|
"summary": "Get the point on a curve nearest to an arbitrary point.",
|
|
722
|
-
"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
|
+
],
|
|
723
1110
|
"argsType": "CurveHandle",
|
|
724
1111
|
"resultType": "Vec3Components"
|
|
725
1112
|
},
|
|
@@ -743,7 +1130,10 @@
|
|
|
743
1130
|
"path": "core.geom.query.curve.getPointAtDistance",
|
|
744
1131
|
"namespace": "core.geom.query.curve",
|
|
745
1132
|
"summary": "Get the point at a given distance along a curve from a reference point.",
|
|
746
|
-
"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
|
+
],
|
|
747
1137
|
"argsType": "CurveHandle",
|
|
748
1138
|
"resultType": "Vec3Components"
|
|
749
1139
|
},
|
|
@@ -759,7 +1149,10 @@
|
|
|
759
1149
|
"path": "core.geom.query.curve.getShortestGap",
|
|
760
1150
|
"namespace": "core.geom.query.curve",
|
|
761
1151
|
"summary": "Get the shortest gap between two curves, optionally including their endpoints.",
|
|
762
|
-
"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
|
+
],
|
|
763
1156
|
"argsType": "CurveHandle",
|
|
764
1157
|
"resultType": "number"
|
|
765
1158
|
},
|
|
@@ -767,8 +1160,10 @@
|
|
|
767
1160
|
"path": "core.geom.query.curve.getStartPoint",
|
|
768
1161
|
"namespace": "core.geom.query.curve",
|
|
769
1162
|
"summary": "Get the start point of a curve.",
|
|
770
|
-
"examplePrompts": [
|
|
771
|
-
|
|
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
|
+
],
|
|
1166
|
+
"argsType": "CurveHandle",
|
|
772
1167
|
"resultType": "Vec3Components"
|
|
773
1168
|
},
|
|
774
1169
|
{
|
|
@@ -791,7 +1186,9 @@
|
|
|
791
1186
|
"path": "core.geom.query.curve.isContinuous",
|
|
792
1187
|
"namespace": "core.geom.query.curve",
|
|
793
1188
|
"summary": "Test whether two curves are continuous (share an endpoint without a gap).",
|
|
794
|
-
"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
|
+
],
|
|
795
1192
|
"argsType": "CurveHandle",
|
|
796
1193
|
"resultType": "boolean"
|
|
797
1194
|
},
|
|
@@ -807,7 +1204,9 @@
|
|
|
807
1204
|
"path": "core.geom.query.curve.isLinear",
|
|
808
1205
|
"namespace": "core.geom.query.curve",
|
|
809
1206
|
"summary": "Test whether a curve is a straight line.",
|
|
810
|
-
"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
|
+
],
|
|
811
1210
|
"argsType": "CurveHandle",
|
|
812
1211
|
"resultType": "boolean"
|
|
813
1212
|
},
|
|
@@ -815,7 +1214,9 @@
|
|
|
815
1214
|
"path": "core.geom.query.curve.isOnCurve",
|
|
816
1215
|
"namespace": "core.geom.query.curve",
|
|
817
1216
|
"summary": "Test whether a point lies on a curve within an optional threshold.",
|
|
818
|
-
"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
|
+
],
|
|
819
1220
|
"argsType": "CurveHandle",
|
|
820
1221
|
"resultType": "boolean"
|
|
821
1222
|
},
|
|
@@ -823,7 +1224,9 @@
|
|
|
823
1224
|
"path": "core.geom.query.curve.isOverlapping",
|
|
824
1225
|
"namespace": "core.geom.query.curve",
|
|
825
1226
|
"summary": "Test whether two curves overlap (share a collinear/concentric span), optionally including their endpoints.",
|
|
826
|
-
"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
|
+
],
|
|
827
1230
|
"argsType": "CurveHandle",
|
|
828
1231
|
"resultType": "boolean"
|
|
829
1232
|
},
|
|
@@ -831,7 +1234,10 @@
|
|
|
831
1234
|
"path": "core.geom.query.curve.isParallel",
|
|
832
1235
|
"namespace": "core.geom.query.curve",
|
|
833
1236
|
"summary": "Test whether two lines are parallel within an optional tolerance.",
|
|
834
|
-
"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
|
+
],
|
|
835
1241
|
"argsType": "LineHandle",
|
|
836
1242
|
"resultType": "boolean"
|
|
837
1243
|
},
|
|
@@ -839,7 +1245,10 @@
|
|
|
839
1245
|
"path": "core.geom.query.curve.listIntersections",
|
|
840
1246
|
"namespace": "core.geom.query.curve",
|
|
841
1247
|
"summary": "List the intersection points between two curves.",
|
|
842
|
-
"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
|
+
],
|
|
843
1252
|
"argsType": "CurveHandle",
|
|
844
1253
|
"resultType": "Vec3Components[]"
|
|
845
1254
|
},
|
|
@@ -855,7 +1264,10 @@
|
|
|
855
1264
|
"path": "core.geom.query.curve.listSubdivisions",
|
|
856
1265
|
"namespace": "core.geom.query.curve",
|
|
857
1266
|
"summary": "List the points produced by subdividing a curve into equal segments.",
|
|
858
|
-
"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
|
+
],
|
|
859
1271
|
"argsType": "CurveHandle",
|
|
860
1272
|
"resultType": "Vec3Components[]"
|
|
861
1273
|
},
|
|
@@ -943,7 +1355,9 @@
|
|
|
943
1355
|
"path": "core.geom.query.face.hasHoles",
|
|
944
1356
|
"namespace": "core.geom.query.face",
|
|
945
1357
|
"summary": "Test whether a face has any holes.",
|
|
946
|
-
"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
|
+
],
|
|
947
1361
|
"argsType": "FaceHandle",
|
|
948
1362
|
"resultType": "boolean"
|
|
949
1363
|
},
|
|
@@ -951,7 +1365,10 @@
|
|
|
951
1365
|
"path": "core.geom.query.face.listAdjacentFaces",
|
|
952
1366
|
"namespace": "core.geom.query.face",
|
|
953
1367
|
"summary": "List the faces adjacent to a face (sharing an edge). Boundary edges are skipped.",
|
|
954
|
-
"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
|
+
],
|
|
955
1372
|
"argsType": "FaceHandle",
|
|
956
1373
|
"resultType": "FaceHandle[]"
|
|
957
1374
|
},
|
|
@@ -991,7 +1408,10 @@
|
|
|
991
1408
|
"path": "core.geom.query.face.listVertexPositions",
|
|
992
1409
|
"namespace": "core.geom.query.face",
|
|
993
1410
|
"summary": "List the positions of a face's outer-loop vertices (needs the parent brep for coordinates).",
|
|
994
|
-
"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
|
+
],
|
|
995
1415
|
"argsType": "FaceHandle",
|
|
996
1416
|
"resultType": "Vec3Components[]"
|
|
997
1417
|
},
|
|
@@ -999,7 +1419,9 @@
|
|
|
999
1419
|
"path": "core.geom.query.face.listVertexPositionsWithCurves",
|
|
1000
1420
|
"namespace": "core.geom.query.face",
|
|
1001
1421
|
"summary": "List the tessellated boundary points of a face's outer loop (arcs sampled, sense-corrected). Not cardinality-equal to {@linkcode PluginGeomQueryFaceApi.listVertexPositions}.",
|
|
1002
|
-
"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
|
+
],
|
|
1003
1425
|
"argsType": "FaceHandle",
|
|
1004
1426
|
"resultType": "Vec3Components[]"
|
|
1005
1427
|
},
|
|
@@ -1079,7 +1501,10 @@
|
|
|
1079
1501
|
"path": "core.geom.query.profile.getArea",
|
|
1080
1502
|
"namespace": "core.geom.query.profile",
|
|
1081
1503
|
"summary": "Get the (approximate) enclosed area of a profile.",
|
|
1082
|
-
"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
|
+
],
|
|
1083
1508
|
"argsType": "ProfileHandle",
|
|
1084
1509
|
"resultType": "number"
|
|
1085
1510
|
},
|
|
@@ -1087,7 +1512,9 @@
|
|
|
1087
1512
|
"path": "core.geom.query.profile.getBoundingBox",
|
|
1088
1513
|
"namespace": "core.geom.query.profile",
|
|
1089
1514
|
"summary": "Get the axis-aligned bounding box of a profile.",
|
|
1090
|
-
"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
|
+
],
|
|
1091
1518
|
"argsType": "ProfileHandle",
|
|
1092
1519
|
"resultType": "BBoxComponents"
|
|
1093
1520
|
},
|
|
@@ -1095,7 +1522,9 @@
|
|
|
1095
1522
|
"path": "core.geom.query.profile.getNearestPoint",
|
|
1096
1523
|
"namespace": "core.geom.query.profile",
|
|
1097
1524
|
"summary": "Get the point on a profile nearest to an arbitrary point.",
|
|
1098
|
-
"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
|
+
],
|
|
1099
1528
|
"argsType": "ProfileHandle",
|
|
1100
1529
|
"resultType": "Vec3Components"
|
|
1101
1530
|
},
|
|
@@ -1111,7 +1540,10 @@
|
|
|
1111
1540
|
"path": "core.geom.query.profile.getPerimeter",
|
|
1112
1541
|
"namespace": "core.geom.query.profile",
|
|
1113
1542
|
"summary": "Get the perimeter (total curve length) of a profile.",
|
|
1114
|
-
"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
|
+
],
|
|
1115
1547
|
"argsType": "ProfileHandle",
|
|
1116
1548
|
"resultType": "number"
|
|
1117
1549
|
},
|
|
@@ -1119,7 +1551,10 @@
|
|
|
1119
1551
|
"path": "core.geom.query.profile.hasPoint",
|
|
1120
1552
|
"namespace": "core.geom.query.profile",
|
|
1121
1553
|
"summary": "Test whether a point lies inside a profile.",
|
|
1122
|
-
"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
|
+
],
|
|
1123
1558
|
"argsType": "ProfileHandle",
|
|
1124
1559
|
"resultType": "boolean"
|
|
1125
1560
|
},
|
|
@@ -1135,7 +1570,10 @@
|
|
|
1135
1570
|
"path": "core.geom.query.profile.isClosed",
|
|
1136
1571
|
"namespace": "core.geom.query.profile",
|
|
1137
1572
|
"summary": "Test whether a profile forms a closed loop.",
|
|
1138
|
-
"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
|
+
],
|
|
1139
1577
|
"argsType": "ProfileHandle",
|
|
1140
1578
|
"resultType": "boolean"
|
|
1141
1579
|
},
|
|
@@ -1191,7 +1629,10 @@
|
|
|
1191
1629
|
"path": "core.geom.query.profile.listPoints",
|
|
1192
1630
|
"namespace": "core.geom.query.profile",
|
|
1193
1631
|
"summary": "List the tessellated points along a profile.",
|
|
1194
|
-
"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
|
+
],
|
|
1195
1636
|
"argsType": "ProfileHandle",
|
|
1196
1637
|
"resultType": "Vec3Components[]"
|
|
1197
1638
|
},
|
|
@@ -1215,7 +1656,10 @@
|
|
|
1215
1656
|
"path": "core.geom.query.vertex.getPosition",
|
|
1216
1657
|
"namespace": "core.geom.query.vertex",
|
|
1217
1658
|
"summary": "Get the position of a vertex (needs the parent brep for coordinates).",
|
|
1218
|
-
"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
|
+
],
|
|
1219
1663
|
"argsType": "BrepHandle",
|
|
1220
1664
|
"resultType": "Vec3Components"
|
|
1221
1665
|
},
|
|
@@ -1255,7 +1699,10 @@
|
|
|
1255
1699
|
"path": "core.geom.update.contour.addHole",
|
|
1256
1700
|
"namespace": "core.geom.update.contour",
|
|
1257
1701
|
"summary": "Add a hole to a contour by appending an inner profile. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1258
|
-
"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
|
+
],
|
|
1259
1706
|
"argsType": "ContourHandle",
|
|
1260
1707
|
"resultType": "ContourHandle"
|
|
1261
1708
|
},
|
|
@@ -1263,7 +1710,10 @@
|
|
|
1263
1710
|
"path": "core.geom.update.contour.mirror",
|
|
1264
1711
|
"namespace": "core.geom.update.contour",
|
|
1265
1712
|
"summary": "Mirror a contour across a plane. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1266
|
-
"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
|
+
],
|
|
1267
1717
|
"argsType": "ContourHandle",
|
|
1268
1718
|
"resultType": "ContourHandle"
|
|
1269
1719
|
},
|
|
@@ -1271,7 +1721,10 @@
|
|
|
1271
1721
|
"path": "core.geom.update.contour.move",
|
|
1272
1722
|
"namespace": "core.geom.update.contour",
|
|
1273
1723
|
"summary": "Translate a contour by a vector. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1274
|
-
"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
|
+
],
|
|
1275
1728
|
"argsType": "ContourHandle",
|
|
1276
1729
|
"resultType": "ContourHandle"
|
|
1277
1730
|
},
|
|
@@ -1279,7 +1732,10 @@
|
|
|
1279
1732
|
"path": "core.geom.update.contour.offset",
|
|
1280
1733
|
"namespace": "core.geom.update.contour",
|
|
1281
1734
|
"summary": "Offset a contour inward/outward by a signed distance. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1282
|
-
"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
|
+
],
|
|
1283
1739
|
"argsType": "ContourHandle",
|
|
1284
1740
|
"resultType": "ContourHandle"
|
|
1285
1741
|
},
|
|
@@ -1287,7 +1743,10 @@
|
|
|
1287
1743
|
"path": "core.geom.update.contour.removeHole",
|
|
1288
1744
|
"namespace": "core.geom.update.contour",
|
|
1289
1745
|
"summary": "Remove a hole from a contour by inner-profile index. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1290
|
-
"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
|
+
],
|
|
1291
1750
|
"argsType": "ContourHandle",
|
|
1292
1751
|
"resultType": "ContourHandle"
|
|
1293
1752
|
},
|
|
@@ -1295,7 +1754,10 @@
|
|
|
1295
1754
|
"path": "core.geom.update.contour.rotate",
|
|
1296
1755
|
"namespace": "core.geom.update.contour",
|
|
1297
1756
|
"summary": "Rotate a contour about an axis through an optional pivot. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1298
|
-
"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
|
+
],
|
|
1299
1761
|
"argsType": "ContourHandle",
|
|
1300
1762
|
"resultType": "ContourHandle"
|
|
1301
1763
|
},
|
|
@@ -1303,7 +1765,10 @@
|
|
|
1303
1765
|
"path": "core.geom.update.contour.scale",
|
|
1304
1766
|
"namespace": "core.geom.update.contour",
|
|
1305
1767
|
"summary": "Scale a contour uniformly or per-axis about an optional pivot. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
1306
|
-
"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
|
+
],
|
|
1307
1772
|
"argsType": "ContourHandle",
|
|
1308
1773
|
"resultType": "ContourHandle"
|
|
1309
1774
|
},
|
|
@@ -1311,7 +1776,10 @@
|
|
|
1311
1776
|
"path": "core.geom.update.curve.extend",
|
|
1312
1777
|
"namespace": "core.geom.update.curve",
|
|
1313
1778
|
"summary": "Extend a curve by a distance from one of its ends. Host API call — returns a handle.",
|
|
1314
|
-
"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
|
+
],
|
|
1315
1783
|
"argsType": "CurveHandle",
|
|
1316
1784
|
"resultType": "CurveHandle"
|
|
1317
1785
|
},
|
|
@@ -1319,7 +1787,10 @@
|
|
|
1319
1787
|
"path": "core.geom.update.curve.offset",
|
|
1320
1788
|
"namespace": "core.geom.update.curve",
|
|
1321
1789
|
"summary": "Offset a curve by a translation vector. Host API call — returns a handle.",
|
|
1322
|
-
"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
|
+
],
|
|
1323
1794
|
"argsType": "CurveHandle",
|
|
1324
1795
|
"resultType": "CurveHandle"
|
|
1325
1796
|
},
|
|
@@ -1335,7 +1806,10 @@
|
|
|
1335
1806
|
"path": "core.geom.update.curve.split",
|
|
1336
1807
|
"namespace": "core.geom.update.curve",
|
|
1337
1808
|
"summary": "Split a curve at a point into separate segments. Host API call — returns handles.",
|
|
1338
|
-
"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
|
+
],
|
|
1339
1813
|
"argsType": "CurveHandle",
|
|
1340
1814
|
"resultType": "CurveHandle[]"
|
|
1341
1815
|
},
|
|
@@ -1343,7 +1817,10 @@
|
|
|
1343
1817
|
"path": "core.geom.update.curve.trim",
|
|
1344
1818
|
"namespace": "core.geom.update.curve",
|
|
1345
1819
|
"summary": "Trim a curve to the portion between two parameter values. Host API call — returns a handle.",
|
|
1346
|
-
"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
|
+
],
|
|
1347
1824
|
"argsType": "CurveHandle",
|
|
1348
1825
|
"resultType": "CurveHandle"
|
|
1349
1826
|
},
|
|
@@ -1359,7 +1836,10 @@
|
|
|
1359
1836
|
"path": "core.geom.update.profile.mirror",
|
|
1360
1837
|
"namespace": "core.geom.update.profile",
|
|
1361
1838
|
"summary": "Mirror a profile across a plane. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1362
|
-
"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
|
+
],
|
|
1363
1843
|
"argsType": "ProfileHandle",
|
|
1364
1844
|
"resultType": "ProfileHandle"
|
|
1365
1845
|
},
|
|
@@ -1367,7 +1847,10 @@
|
|
|
1367
1847
|
"path": "core.geom.update.profile.move",
|
|
1368
1848
|
"namespace": "core.geom.update.profile",
|
|
1369
1849
|
"summary": "Translate a profile by a vector. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1370
|
-
"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
|
+
],
|
|
1371
1854
|
"argsType": "ProfileHandle",
|
|
1372
1855
|
"resultType": "ProfileHandle"
|
|
1373
1856
|
},
|
|
@@ -1375,7 +1858,10 @@
|
|
|
1375
1858
|
"path": "core.geom.update.profile.offset",
|
|
1376
1859
|
"namespace": "core.geom.update.profile",
|
|
1377
1860
|
"summary": "Offset a closed profile inward/outward by a signed distance. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1378
|
-
"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
|
+
],
|
|
1379
1865
|
"argsType": "ProfileHandle",
|
|
1380
1866
|
"resultType": "ProfileHandle"
|
|
1381
1867
|
},
|
|
@@ -1399,7 +1885,10 @@
|
|
|
1399
1885
|
"path": "core.geom.update.profile.rotate",
|
|
1400
1886
|
"namespace": "core.geom.update.profile",
|
|
1401
1887
|
"summary": "Rotate a profile about an axis through an optional pivot. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1402
|
-
"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
|
+
],
|
|
1403
1892
|
"argsType": "ProfileHandle",
|
|
1404
1893
|
"resultType": "ProfileHandle"
|
|
1405
1894
|
},
|
|
@@ -1407,7 +1896,10 @@
|
|
|
1407
1896
|
"path": "core.geom.update.profile.scale",
|
|
1408
1897
|
"namespace": "core.geom.update.profile",
|
|
1409
1898
|
"summary": "Scale a profile uniformly or per-axis about an optional pivot. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1410
|
-
"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
|
+
],
|
|
1411
1903
|
"argsType": "ProfileHandle",
|
|
1412
1904
|
"resultType": "ProfileHandle"
|
|
1413
1905
|
},
|
|
@@ -1415,7 +1907,10 @@
|
|
|
1415
1907
|
"path": "core.geom.update.profile.simplify",
|
|
1416
1908
|
"namespace": "core.geom.update.profile",
|
|
1417
1909
|
"summary": "Simplify a profile by merging collinear/redundant segments. Immutable — returns a NEW profile and leaves the input unchanged.",
|
|
1418
|
-
"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
|
+
],
|
|
1419
1914
|
"argsType": "ProfileHandle",
|
|
1420
1915
|
"resultType": "ProfileHandle"
|
|
1421
1916
|
},
|
|
@@ -1532,17 +2027,453 @@
|
|
|
1532
2027
|
"path": "core.history.redo",
|
|
1533
2028
|
"namespace": "core.history",
|
|
1534
2029
|
"summary": "Step forward over previously undone entries. Symmetric with {@linkcode PluginHistoryApi.undo}.",
|
|
1535
|
-
"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
|
+
],
|
|
2036
|
+
"argsType": "number",
|
|
2037
|
+
"resultType": "PluginHistoryStepResult"
|
|
2038
|
+
},
|
|
2039
|
+
{
|
|
2040
|
+
"path": "core.history.undo",
|
|
2041
|
+
"namespace": "core.history",
|
|
2042
|
+
"summary": "Step back over committed history entries.",
|
|
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
|
+
],
|
|
1536
2050
|
"argsType": "number",
|
|
1537
2051
|
"resultType": "PluginHistoryStepResult"
|
|
1538
2052
|
},
|
|
1539
2053
|
{
|
|
1540
|
-
"path": "core.
|
|
1541
|
-
"namespace": "core.
|
|
1542
|
-
"summary": "
|
|
1543
|
-
"examplePrompts": [
|
|
1544
|
-
|
|
1545
|
-
|
|
2054
|
+
"path": "core.io.import.cadJson",
|
|
2055
|
+
"namespace": "core.io.import",
|
|
2056
|
+
"summary": "Sketch a CAD underlay from **already-parsed CAD JSON** — synchronous, with no server round-trip. Use this when you hold parsed CAD data (e.g. produced by your own converter); use {@link PluginCoreIoImportApi.dwg} for raw `.dwg` files.",
|
|
2057
|
+
"examplePrompts": [
|
|
2058
|
+
"Sketch this parsed CAD JSON onto the active storey",
|
|
2059
|
+
"Draw these CAD curves as an underlay on storey 2",
|
|
2060
|
+
"Create a CAD sketch from this geometry data",
|
|
2061
|
+
"Import my converted CAD JSON onto the ground floor\n\n# Example\n```ts\nconst cad = await snaptrude.core.io.import.cadJson(\n{ unit: \"mm\", geometry: [{ type: \"line\", layer: \"WALLS\", ... }] },\n1,\n)\n```"
|
|
2062
|
+
],
|
|
2063
|
+
"argsType": "CadJsonInput",
|
|
2064
|
+
"resultType": "UnderlayHandle"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"path": "core.io.import.dwg",
|
|
2068
|
+
"namespace": "core.io.import",
|
|
2069
|
+
"summary": "Import a **DWG** CAD drawing as a scene underlay. `.dwg` only (no DXF).",
|
|
2070
|
+
"examplePrompts": [
|
|
2071
|
+
"Import this DWG floor plan onto storey 1",
|
|
2072
|
+
"Bring in a CAD drawing as an underlay and tell me when it's ready",
|
|
2073
|
+
"Start importing this CAD file onto the ground floor\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(\"https://example.com/plan.dwg\", 1)\n// Poll until the server-side conversion finishes — always with a timeout\n// (a UI-cancelled import stays \"processing\" forever).\nconst deadline = Date.now() + 5 * 60_000\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n// The DWG lands as a CAD underlay. CAD scaling isn't supported; manage it\n// (list / fade / delete) via core.io.underlay.*.\nconst cad = await snaptrude.core.io.job.getResult(job)\nif (cad) console.log(\"DWG imported as CAD underlay:\", cad)\n```"
|
|
2074
|
+
],
|
|
2075
|
+
"argsType": "string",
|
|
2076
|
+
"resultType": "ImportJobHandle"
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
"path": "core.io.import.image",
|
|
2080
|
+
"namespace": "core.io.import",
|
|
2081
|
+
"summary": "Import a raster image as a scene **underlay** — a flat, textured reference plane placed on a storey that you can trace over.",
|
|
2082
|
+
"examplePrompts": [
|
|
2083
|
+
"Import this floor plan image onto the ground floor to trace over",
|
|
2084
|
+
"Drop this survey PNG in as a reference underlay at 30% opacity",
|
|
2085
|
+
"Add a site plan image on storey 2",
|
|
2086
|
+
"Bring in a sketch to trace, faded to half opacity\n\n# Example\n```ts\n// Place a floor plan on storey 1, then calibrate it to a real-world size.\nconst plan = await snaptrude.core.io.import.image(\n\"https://example.com/floorplan.png\",\n1, // storey\nundefined, // scale\n0.4, // opacity\n\"Ground floor plan\",\n)\n// Make the plan's longest side exactly 40 project-units:\nawait snaptrude.core.io.underlay.setScale(plan, { planSize: 40 })\n```"
|
|
2087
|
+
],
|
|
2088
|
+
"argsType": "string",
|
|
2089
|
+
"resultType": "UnderlayHandle"
|
|
2090
|
+
},
|
|
2091
|
+
{
|
|
2092
|
+
"path": "core.io.import.model",
|
|
2093
|
+
"namespace": "core.io.import",
|
|
2094
|
+
"summary": "Import a **3D model** file and place it in the scene as a component.",
|
|
2095
|
+
"examplePrompts": [
|
|
2096
|
+
"Import this SketchUp model onto storey 1",
|
|
2097
|
+
"Bring in this OBJ file and place it at the origin",
|
|
2098
|
+
"Add this 3D model to the ground floor\n\n# Example\n```ts\nconst model = await snaptrude.core.io.import.model(\n\"https://example.com/tree.skp\",\n1, // storey\n\"skp\",\n)\n```"
|
|
2099
|
+
],
|
|
2100
|
+
"argsType": "string",
|
|
2101
|
+
"resultType": "ComponentHandle"
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
"path": "core.io.import.pdf",
|
|
2105
|
+
"namespace": "core.io.import",
|
|
2106
|
+
"summary": "Import one page of a PDF as a scene **underlay** (a traceable reference plane).",
|
|
2107
|
+
"examplePrompts": [
|
|
2108
|
+
"Import page 1 of this PDF floor plan onto storey 1",
|
|
2109
|
+
"Bring in the second page of this PDF as an underlay at 1:50",
|
|
2110
|
+
"Add this PDF plan to the ground floor to trace over",
|
|
2111
|
+
"Place page 3 of the drawing set on storey 3\n\n# Example\n```ts\nconst sheet = await snaptrude.core.io.import.pdf(\n\"https://example.com/plans.pdf\",\n1, // storey\n2, // page\n\"1:100\", // drawing scale\n)\n```"
|
|
2112
|
+
],
|
|
2113
|
+
"argsType": "string",
|
|
2114
|
+
"resultType": "UnderlayHandle"
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
"path": "core.io.import.terrain",
|
|
2118
|
+
"namespace": "core.io.import",
|
|
2119
|
+
"summary": "Import **site terrain** for a location — Mapbox topography (elevation + satellite/streets imagery, optional neighborhood buildings and parcels).",
|
|
2120
|
+
"examplePrompts": [
|
|
2121
|
+
"Import the site terrain for this location, about 500m across",
|
|
2122
|
+
"Load the topography at 40.7128, -74.0060 for a 300 by 300 meter site",
|
|
2123
|
+
"Bring in satellite terrain for the site with the surrounding buildings",
|
|
2124
|
+
"Add site elevation for a 1km by 1km area at these coordinates\n\n# Example\n```ts\n// 300m × 300m site with elevation + satellite imagery.\nconst terrain = await snaptrude.core.io.import.terrain(\n40.7128, // lat\n-74.006, // lng\n300, // width (metres)\n300, // length (metres)\ntrue, // elevation\ntrue, // satellite\n)\n```"
|
|
2125
|
+
],
|
|
2126
|
+
"argsType": "number",
|
|
2127
|
+
"resultType": "TerrainHandle"
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
"path": "core.io.job.getError",
|
|
2131
|
+
"namespace": "core.io.job",
|
|
2132
|
+
"summary": "The failure message if the job's status is `\"failed\"`; otherwise `null`.",
|
|
2133
|
+
"examplePrompts": [
|
|
2134
|
+
"Why did my DWG import fail?",
|
|
2135
|
+
"What went wrong with the CAD import?",
|
|
2136
|
+
"Show the error from the failed import job",
|
|
2137
|
+
"Did the import error out, and why?\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nif ((await snaptrude.core.io.job.getStatus(job)) === \"failed\") {\nconsole.error(await snaptrude.core.io.job.getError(job))\n}\n```"
|
|
2138
|
+
],
|
|
2139
|
+
"argsType": "ImportJobHandle",
|
|
2140
|
+
"resultType": "string | null"
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
"path": "core.io.job.getResult",
|
|
2144
|
+
"namespace": "core.io.job",
|
|
2145
|
+
"summary": "The imported result once the job is complete — the placed {@linkcode UnderlayHandle}. Returns `null` while the job is still pending/processing or if it failed (check {@link PluginCoreIoJobApi.getError}).",
|
|
2146
|
+
"examplePrompts": [
|
|
2147
|
+
"Get the underlay from my finished DWG import",
|
|
2148
|
+
"Give me the result of the CAD import job",
|
|
2149
|
+
"Fetch the imported CAD sketch once it's ready",
|
|
2150
|
+
"Return the handle for the completed import\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nconst deadline = Date.now() + 5 * 60_000\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n// DWG results are CAD underlays (CAD scaling isn't supported); manage them\n// via core.io.underlay.* (list / setOpacity / delete).\nconst cad = await snaptrude.core.io.job.getResult(job)\nif (cad) console.log(\"import complete:\", cad)\n```"
|
|
2151
|
+
],
|
|
2152
|
+
"argsType": "ImportJobHandle",
|
|
2153
|
+
"resultType": "UnderlayHandle | null"
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
"path": "core.io.job.getStatus",
|
|
2157
|
+
"namespace": "core.io.job",
|
|
2158
|
+
"summary": "Read a job's current status: `\"pending\"` (queued), `\"processing\"` (running), `\"complete\"` (result ready), or `\"failed\"`.",
|
|
2159
|
+
"examplePrompts": [
|
|
2160
|
+
"What's the status of my DWG import?",
|
|
2161
|
+
"Is the CAD import still processing?",
|
|
2162
|
+
"Check where the import job is up to",
|
|
2163
|
+
"Did the import job fail?\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nconsole.log(await snaptrude.core.io.job.getStatus(job)) // \"processing\"\n```"
|
|
2164
|
+
],
|
|
2165
|
+
"argsType": "ImportJobHandle",
|
|
2166
|
+
"resultType": "ImportJobStatus"
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
"path": "core.io.job.isComplete",
|
|
2170
|
+
"namespace": "core.io.job",
|
|
2171
|
+
"summary": "Whether the job has finished successfully (status is `\"complete\"` and a result is ready). Returns `false` while pending/processing and on failure.",
|
|
2172
|
+
"examplePrompts": [
|
|
2173
|
+
"Is the DWG import done yet?",
|
|
2174
|
+
"Has the CAD import finished?",
|
|
2175
|
+
"Tell me when the import job completes",
|
|
2176
|
+
"Is my import ready?\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nconst deadline = Date.now() + 5 * 60_000 // cap the poll — see getStatus limitation\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n```"
|
|
2177
|
+
],
|
|
2178
|
+
"argsType": "ImportJobHandle",
|
|
2179
|
+
"resultType": "boolean"
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
"path": "core.io.query.getPdfPageCount",
|
|
2183
|
+
"namespace": "core.io.query",
|
|
2184
|
+
"summary": "Count the pages of a PDF without importing it. `null` if the source can't be read as a PDF.",
|
|
2185
|
+
"examplePrompts": [
|
|
2186
|
+
"How many pages does this PDF have?",
|
|
2187
|
+
"Count the pages in the drawing set before importing",
|
|
2188
|
+
"Get the PDF page count",
|
|
2189
|
+
"Is this a multi-page PDF, and how many?\n\n# Example\n```ts\nconst pages = await snaptrude.core.io.query.getPdfPageCount(url)\nfor (let p = 1; p <= (pages ?? 0); p++) {\nawait snaptrude.core.io.import.pdf(url, p, p) // one page per storey\n}\n```"
|
|
2190
|
+
],
|
|
2191
|
+
"argsType": "string",
|
|
2192
|
+
"resultType": "number | null"
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
"path": "core.io.query.listCadLayers",
|
|
2196
|
+
"namespace": "core.io.query",
|
|
2197
|
+
"summary": "List the distinct CAD layer names tagged on a parsed CAD JSON's entities. Read-only inspection: imports always bring in **every** layer (there is no layer filter on {@link core.io.import.dwg} / {@link core.io.import.cadJson}) — use the names to decide whether to import at all, or what to tell the user.",
|
|
2198
|
+
"examplePrompts": [
|
|
2199
|
+
"What CAD layers are in this drawing?",
|
|
2200
|
+
"List the layers before importing the CAD",
|
|
2201
|
+
"Show the DWG layer names so I can pick which to import",
|
|
2202
|
+
"Enumerate the CAD JSON layers\n\n# Example\n```ts\nconst layers = await snaptrude.core.io.query.listCadLayers(cad)\nif (layers.some((l) => l.toUpperCase().includes(\"WALL\"))) {\nawait snaptrude.core.io.import.cadJson(cad, 1) // all layers import together\n}\n```"
|
|
2203
|
+
],
|
|
2204
|
+
"argsType": "CadJsonInput",
|
|
2205
|
+
"resultType": "string[]"
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
"path": "core.io.terrain.delete",
|
|
2209
|
+
"namespace": "core.io.terrain",
|
|
2210
|
+
"summary": "Delete the site terrain. Undoable.",
|
|
2211
|
+
"examplePrompts": [
|
|
2212
|
+
"Delete the site terrain",
|
|
2213
|
+
"Remove the topography",
|
|
2214
|
+
"Clear the imported site",
|
|
2215
|
+
"Get rid of the terrain"
|
|
2216
|
+
],
|
|
2217
|
+
"argsType": null,
|
|
2218
|
+
"resultType": "void"
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
"path": "core.io.terrain.disableElevation",
|
|
2222
|
+
"namespace": "core.io.terrain",
|
|
2223
|
+
"summary": "Turn terrain elevation OFF — flatten to a plane. Undoable.",
|
|
2224
|
+
"examplePrompts": [
|
|
2225
|
+
"Flatten the terrain",
|
|
2226
|
+
"Turn off site elevation",
|
|
2227
|
+
"Disable the heightmap",
|
|
2228
|
+
"Make the terrain flat"
|
|
2229
|
+
],
|
|
2230
|
+
"argsType": null,
|
|
2231
|
+
"resultType": "void"
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
"path": "core.io.terrain.disableSatellite",
|
|
2235
|
+
"namespace": "core.io.terrain",
|
|
2236
|
+
"summary": "Turn satellite imagery OFF. Undoable.",
|
|
2237
|
+
"examplePrompts": [
|
|
2238
|
+
"Hide the satellite imagery",
|
|
2239
|
+
"Turn off the aerial texture",
|
|
2240
|
+
"Disable satellite on the site",
|
|
2241
|
+
"Remove the satellite drape"
|
|
2242
|
+
],
|
|
2243
|
+
"argsType": null,
|
|
2244
|
+
"resultType": "void"
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
"path": "core.io.terrain.enableElevation",
|
|
2248
|
+
"namespace": "core.io.terrain",
|
|
2249
|
+
"summary": "Turn terrain elevation (DEM height) ON — a real 3D topography surface. Undoable.",
|
|
2250
|
+
"examplePrompts": [
|
|
2251
|
+
"Turn on terrain elevation",
|
|
2252
|
+
"Enable the site heightmap",
|
|
2253
|
+
"Make the terrain 3D",
|
|
2254
|
+
"Show the topography relief"
|
|
2255
|
+
],
|
|
2256
|
+
"argsType": null,
|
|
2257
|
+
"resultType": "void"
|
|
2258
|
+
},
|
|
2259
|
+
{
|
|
2260
|
+
"path": "core.io.terrain.enableSatellite",
|
|
2261
|
+
"namespace": "core.io.terrain",
|
|
2262
|
+
"summary": "Turn satellite imagery ON. Undoable.",
|
|
2263
|
+
"examplePrompts": [
|
|
2264
|
+
"Show satellite imagery on the site",
|
|
2265
|
+
"Enable the satellite texture",
|
|
2266
|
+
"Turn on aerial imagery",
|
|
2267
|
+
"Drape satellite over the terrain"
|
|
2268
|
+
],
|
|
2269
|
+
"argsType": null,
|
|
2270
|
+
"resultType": "void"
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
"path": "core.io.terrain.exists",
|
|
2274
|
+
"namespace": "core.io.terrain",
|
|
2275
|
+
"summary": "Whether the project has a site terrain.",
|
|
2276
|
+
"examplePrompts": [
|
|
2277
|
+
"Does this project have site terrain?",
|
|
2278
|
+
"Is there a terrain imported?",
|
|
2279
|
+
"Check if the site topography exists",
|
|
2280
|
+
"Has a terrain been added yet?\n\n# Example\n```ts\nif (!(await snaptrude.core.io.terrain.exists())) {\nawait snaptrude.core.io.import.terrain(40.7128, -74.006, 300, 300)\n}\n```"
|
|
2281
|
+
],
|
|
2282
|
+
"argsType": null,
|
|
2283
|
+
"resultType": "boolean"
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
"path": "core.io.terrain.get",
|
|
2287
|
+
"namespace": "core.io.terrain",
|
|
2288
|
+
"summary": "Resolve the project's terrain handle, or `null` if there is none. The same handle {@link core.io.import.terrain} returns — use it to obtain the handle without re-importing.",
|
|
2289
|
+
"examplePrompts": [
|
|
2290
|
+
"Get the terrain handle",
|
|
2291
|
+
"Give me the site terrain",
|
|
2292
|
+
"Fetch the current terrain",
|
|
2293
|
+
"Return the topography handle if it exists"
|
|
2294
|
+
],
|
|
2295
|
+
"argsType": null,
|
|
2296
|
+
"resultType": "TerrainHandle | null"
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
"path": "core.io.terrain.getDatum",
|
|
2300
|
+
"namespace": "core.io.terrain",
|
|
2301
|
+
"summary": "Read the terrain's current vertical position (world Y, internal units). `null` if there is no terrain. Import places the terrain so its highest point sits at `y = 0`, so a never-shifted terrain reads a negative baseline, not `0`; each {@link PluginCoreIoTerrainApi.setDatum} shift moves this value.",
|
|
2302
|
+
"examplePrompts": [
|
|
2303
|
+
"What's the terrain's datum?",
|
|
2304
|
+
"Read the current site elevation reference",
|
|
2305
|
+
"Get the terrain vertical offset",
|
|
2306
|
+
"How far has the datum been shifted?"
|
|
2307
|
+
],
|
|
2308
|
+
"argsType": null,
|
|
2309
|
+
"resultType": "number | null"
|
|
2310
|
+
},
|
|
2311
|
+
{
|
|
2312
|
+
"path": "core.io.terrain.getOpacity",
|
|
2313
|
+
"namespace": "core.io.terrain",
|
|
2314
|
+
"summary": "Read the terrain opacity, `0`..`1`, or `null` if no terrain.",
|
|
2315
|
+
"examplePrompts": [],
|
|
2316
|
+
"argsType": null,
|
|
2317
|
+
"resultType": "number | null"
|
|
2318
|
+
},
|
|
2319
|
+
{
|
|
2320
|
+
"path": "core.io.terrain.getReport",
|
|
2321
|
+
"namespace": "core.io.terrain",
|
|
2322
|
+
"summary": "The terrain cut/fill earthwork report — cut, fill, and net volumes — or `null` if there is no terrain.",
|
|
2323
|
+
"examplePrompts": [
|
|
2324
|
+
"What are the cut and fill volumes for the site?",
|
|
2325
|
+
"Get the terrain earthwork report",
|
|
2326
|
+
"How much cut and fill does the grading need?",
|
|
2327
|
+
"Show the net volume of the terrain edits\n\n# Example\n```ts\nconst r = await snaptrude.core.io.terrain.getReport()\nif (r) console.log(`cut ${r.cutVolume}, fill ${r.fillVolume}, net ${r.netVolume}`)\n```"
|
|
2328
|
+
],
|
|
2329
|
+
"argsType": null,
|
|
2330
|
+
"resultType": "TerrainReport | null"
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
"path": "core.io.terrain.isElevationEnabled",
|
|
2334
|
+
"namespace": "core.io.terrain",
|
|
2335
|
+
"summary": "Whether terrain elevation (DEM height) is on. `null` if no terrain.",
|
|
2336
|
+
"examplePrompts": [],
|
|
2337
|
+
"argsType": null,
|
|
2338
|
+
"resultType": "boolean | null"
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
"path": "core.io.terrain.isSatelliteEnabled",
|
|
2342
|
+
"namespace": "core.io.terrain",
|
|
2343
|
+
"summary": "Whether satellite imagery is draped on the terrain. `null` if no terrain.",
|
|
2344
|
+
"examplePrompts": [],
|
|
2345
|
+
"argsType": null,
|
|
2346
|
+
"resultType": "boolean | null"
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
"path": "core.io.terrain.setDatum",
|
|
2350
|
+
"namespace": "core.io.terrain",
|
|
2351
|
+
"summary": "Shift the terrain's **datum** — move the whole terrain vertically DOWN by `offset` (internal units) from its current position; pass a negative value to raise it. Undoable.",
|
|
2352
|
+
"examplePrompts": [
|
|
2353
|
+
"Shift the terrain datum down by 12",
|
|
2354
|
+
"Lower the site terrain by 10",
|
|
2355
|
+
"Raise the terrain a little",
|
|
2356
|
+
"Nudge the terrain datum down\n\n# Example\n```ts\nawait snaptrude.core.io.terrain.setDatum(12) // shift terrain down by 12 (relative)\n```"
|
|
2357
|
+
],
|
|
2358
|
+
"argsType": "number",
|
|
2359
|
+
"resultType": "void"
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
"path": "core.io.terrain.setOpacity",
|
|
2363
|
+
"namespace": "core.io.terrain",
|
|
2364
|
+
"summary": "Set the terrain opacity (`0` transparent .. `1` opaque). Undoable.",
|
|
2365
|
+
"examplePrompts": [
|
|
2366
|
+
"Fade the terrain to 50%",
|
|
2367
|
+
"Make the site semi-transparent",
|
|
2368
|
+
"Set terrain opacity to 0.3",
|
|
2369
|
+
"Dim the topography\n\n# Example\n```ts\nawait snaptrude.core.io.terrain.setOpacity(0.5)\n```"
|
|
2370
|
+
],
|
|
2371
|
+
"argsType": "number",
|
|
2372
|
+
"resultType": "void"
|
|
2373
|
+
},
|
|
2374
|
+
{
|
|
2375
|
+
"path": "core.io.underlay.delete",
|
|
2376
|
+
"namespace": "core.io.underlay",
|
|
2377
|
+
"summary": "Delete an underlay from the scene (and its backend record). Applies to image, PDF, and CAD underlays.",
|
|
2378
|
+
"examplePrompts": [
|
|
2379
|
+
"Delete this floor plan underlay",
|
|
2380
|
+
"Remove the imported PDF from the scene",
|
|
2381
|
+
"Get rid of the CAD sketch I traced over",
|
|
2382
|
+
"Clear the reference image off storey 1\n\n# Example\n```ts\nconst [first] = await snaptrude.core.io.underlay.list(1)\nif (first) await snaptrude.core.io.underlay.delete(first)\n```"
|
|
2383
|
+
],
|
|
2384
|
+
"argsType": "UnderlayHandle",
|
|
2385
|
+
"resultType": "void"
|
|
2386
|
+
},
|
|
2387
|
+
{
|
|
2388
|
+
"path": "core.io.underlay.getBounds",
|
|
2389
|
+
"namespace": "core.io.underlay",
|
|
2390
|
+
"summary": "Read an underlay's world-space bounding box (image, PDF, or CAD). `null` if the underlay no longer resolves or has no measurable mesh. Useful for fitting drawn geometry to a reference, or computing a plan size before scaling.",
|
|
2391
|
+
"examplePrompts": [
|
|
2392
|
+
"How big is this floor plan in the scene?",
|
|
2393
|
+
"Get the bounding box of the underlay",
|
|
2394
|
+
"What's the extent of the imported PDF?",
|
|
2395
|
+
"Measure the CAD sketch's size\n\n# Example\n```ts\nconst bb = await snaptrude.core.io.underlay.getBounds(plan)\nif (bb) console.log(`width ${bb.max.x - bb.min.x}`)\n```"
|
|
2396
|
+
],
|
|
2397
|
+
"argsType": "UnderlayHandle",
|
|
2398
|
+
"resultType": "BBoxComponents | null"
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
"path": "core.io.underlay.getOpacity",
|
|
2402
|
+
"namespace": "core.io.underlay",
|
|
2403
|
+
"summary": "Read an underlay's opacity (`0`..`1`), or `null` if it has no material.",
|
|
2404
|
+
"examplePrompts": [
|
|
2405
|
+
"How transparent is this underlay?",
|
|
2406
|
+
"Get the opacity of the floor plan",
|
|
2407
|
+
"What's the fade level on the reference image?",
|
|
2408
|
+
"Read the underlay's opacity\n\n# Example\n```ts\nconst o = await snaptrude.core.io.underlay.getOpacity(plan)\n```"
|
|
2409
|
+
],
|
|
2410
|
+
"argsType": "UnderlayHandle",
|
|
2411
|
+
"resultType": "number | null"
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
"path": "core.io.underlay.getScale",
|
|
2415
|
+
"namespace": "core.io.underlay",
|
|
2416
|
+
"summary": "Read an underlay's scale. Works for **image and PDF** underlays. Returns `null` for CAD (scaling not supported) or if the handle no longer resolves.",
|
|
2417
|
+
"examplePrompts": [
|
|
2418
|
+
"What scale is this floor plan set to?",
|
|
2419
|
+
"Get the current and original scale of the underlay",
|
|
2420
|
+
"How much has this image been scaled since import?",
|
|
2421
|
+
"Read the scale factor of the reference plan\n\n# Example\n```ts\nconst s = await snaptrude.core.io.underlay.getScale(plan)\nif (s) console.log(`scale ${s.scaleFactor} (was ${s.initialScaleFactor})`)\n```"
|
|
2422
|
+
],
|
|
2423
|
+
"argsType": "UnderlayHandle",
|
|
2424
|
+
"resultType": "{ scaleFactor: number; initialScaleFactor: number } | null"
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
"path": "core.io.underlay.list",
|
|
2428
|
+
"namespace": "core.io.underlay",
|
|
2429
|
+
"summary": "List the underlays in the scene, optionally limited to one storey.",
|
|
2430
|
+
"examplePrompts": [
|
|
2431
|
+
"List all the reference underlays in the model",
|
|
2432
|
+
"What underlays are on the ground floor?",
|
|
2433
|
+
"Show every imported floor plan and PDF",
|
|
2434
|
+
"How many trace-over images are on storey 2?\n\n# Example\n```ts\nconst underlays = await snaptrude.core.io.underlay.list(1)\nconsole.log(`${underlays.length} underlays on storey 1`)\n```"
|
|
2435
|
+
],
|
|
2436
|
+
"argsType": "number",
|
|
2437
|
+
"resultType": "UnderlayHandle[]"
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
"path": "core.io.underlay.resetScale",
|
|
2441
|
+
"namespace": "core.io.underlay",
|
|
2442
|
+
"summary": "Reset an underlay's scale back to its import-time size (image or PDF; CAD scaling is not supported — throws). Equivalent to `setScale(underlay, 1)`.",
|
|
2443
|
+
"examplePrompts": [
|
|
2444
|
+
"Reset this floor plan's scale to how it was imported",
|
|
2445
|
+
"Undo the scaling on the underlay",
|
|
2446
|
+
"Put the reference image back to its original size",
|
|
2447
|
+
"Restore the plan's default scale\n\n# Example\n```ts\nawait snaptrude.core.io.underlay.resetScale(plan)\n```"
|
|
2448
|
+
],
|
|
2449
|
+
"argsType": "UnderlayHandle",
|
|
2450
|
+
"resultType": "{ scaleFactor: number }"
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
"path": "core.io.underlay.setOpacity",
|
|
2454
|
+
"namespace": "core.io.underlay",
|
|
2455
|
+
"summary": "Set an underlay's opacity (`0` = transparent .. `1` = opaque). Undoable. The engine keeps underlays faintly visible: values below `0.01` clamp to `0.01`, so `setOpacity(u, 0)` reads back as `0.01`, not `0`.",
|
|
2456
|
+
"examplePrompts": [
|
|
2457
|
+
"Fade this floor plan to 30% so I can see through it",
|
|
2458
|
+
"Make the underlay half transparent",
|
|
2459
|
+
"Set the reference image opacity to 0.2",
|
|
2460
|
+
"Dim the trace-over plan\n\n# Example\n```ts\nawait snaptrude.core.io.underlay.setOpacity(plan, 0.3)\n```"
|
|
2461
|
+
],
|
|
2462
|
+
"argsType": "UnderlayHandle",
|
|
2463
|
+
"resultType": "void"
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
"path": "core.io.underlay.setScale",
|
|
2467
|
+
"namespace": "core.io.underlay",
|
|
2468
|
+
"summary": "Set an underlay's scale — the **calibration** step after import. Works for **image and PDF** underlays (CAD scaling is not supported — throws).",
|
|
2469
|
+
"examplePrompts": [
|
|
2470
|
+
"Scale this floor plan so it's 50 meters across",
|
|
2471
|
+
"Set the plan size to 30m — it's imported too small",
|
|
2472
|
+
"Make the reference image twice its imported size",
|
|
2473
|
+
"Calibrate the PDF: the site is 120 meters long\n\n# Example\n```ts\n// Absolute factor — set the underlay to 2× its imported size:\nawait snaptrude.core.io.underlay.setScale(plan, 2)\n\n// Fit to a real-world size — make the plan's longest side 50 project-units:\nawait snaptrude.core.io.underlay.setScale(plan, { planSize: 50 })\n```"
|
|
2474
|
+
],
|
|
2475
|
+
"argsType": "UnderlayHandle",
|
|
2476
|
+
"resultType": "{ scaleFactor: number }"
|
|
1546
2477
|
},
|
|
1547
2478
|
{
|
|
1548
2479
|
"path": "core.layers.get",
|
|
@@ -1615,7 +2546,7 @@
|
|
|
1615
2546
|
{
|
|
1616
2547
|
"path": "core.math.quat.conjugate",
|
|
1617
2548
|
"namespace": "core.math.quat",
|
|
1618
|
-
"summary": "
|
|
2549
|
+
"summary": "Compute the conjugate of a quaternion (negated vector part).",
|
|
1619
2550
|
"examplePrompts": [],
|
|
1620
2551
|
"argsType": "QuatHandle",
|
|
1621
2552
|
"resultType": "QuatHandle"
|
|
@@ -1623,7 +2554,7 @@
|
|
|
1623
2554
|
{
|
|
1624
2555
|
"path": "core.math.quat.dot",
|
|
1625
2556
|
"namespace": "core.math.quat",
|
|
1626
|
-
"summary": "
|
|
2557
|
+
"summary": "Compute the dot product of two quaternions.",
|
|
1627
2558
|
"examplePrompts": [],
|
|
1628
2559
|
"argsType": "QuatHandle",
|
|
1629
2560
|
"resultType": "number"
|
|
@@ -1631,7 +2562,7 @@
|
|
|
1631
2562
|
{
|
|
1632
2563
|
"path": "core.math.quat.equals",
|
|
1633
2564
|
"namespace": "core.math.quat",
|
|
1634
|
-
"summary": "
|
|
2565
|
+
"summary": "Test whether two quaternions have exactly equal components.",
|
|
1635
2566
|
"examplePrompts": [],
|
|
1636
2567
|
"argsType": "QuatHandle",
|
|
1637
2568
|
"resultType": "boolean"
|
|
@@ -1639,7 +2570,7 @@
|
|
|
1639
2570
|
{
|
|
1640
2571
|
"path": "core.math.quat.equalsApprox",
|
|
1641
2572
|
"namespace": "core.math.quat",
|
|
1642
|
-
"summary": "
|
|
2573
|
+
"summary": "Test whether two quaternions are equal within a tolerance `epsilon` (default `1e-6`).",
|
|
1643
2574
|
"examplePrompts": [],
|
|
1644
2575
|
"argsType": "QuatHandle",
|
|
1645
2576
|
"resultType": "boolean"
|
|
@@ -1647,7 +2578,7 @@
|
|
|
1647
2578
|
{
|
|
1648
2579
|
"path": "core.math.quat.fromAxisAngle",
|
|
1649
2580
|
"namespace": "core.math.quat",
|
|
1650
|
-
"summary": "Build from a rotation axis and angle
|
|
2581
|
+
"summary": "Build a quaternion from a rotation axis and an angle in radians.",
|
|
1651
2582
|
"examplePrompts": [],
|
|
1652
2583
|
"argsType": "Vec3Handle",
|
|
1653
2584
|
"resultType": "QuatHandle"
|
|
@@ -1655,7 +2586,7 @@
|
|
|
1655
2586
|
{
|
|
1656
2587
|
"path": "core.math.quat.fromEuler",
|
|
1657
2588
|
"namespace": "core.math.quat",
|
|
1658
|
-
"summary": "Build from Euler angles
|
|
2589
|
+
"summary": "Build a quaternion from Euler angles in radians.",
|
|
1659
2590
|
"examplePrompts": [],
|
|
1660
2591
|
"argsType": "number",
|
|
1661
2592
|
"resultType": "QuatHandle"
|
|
@@ -1663,7 +2594,7 @@
|
|
|
1663
2594
|
{
|
|
1664
2595
|
"path": "core.math.quat.identity",
|
|
1665
2596
|
"namespace": "core.math.quat",
|
|
1666
|
-
"summary": "
|
|
2597
|
+
"summary": "Return the identity quaternion (no rotation).",
|
|
1667
2598
|
"examplePrompts": [],
|
|
1668
2599
|
"argsType": null,
|
|
1669
2600
|
"resultType": "QuatHandle"
|
|
@@ -1671,7 +2602,7 @@
|
|
|
1671
2602
|
{
|
|
1672
2603
|
"path": "core.math.quat.inverse",
|
|
1673
2604
|
"namespace": "core.math.quat",
|
|
1674
|
-
"summary": "
|
|
2605
|
+
"summary": "Compute the inverse quaternion — the rotation that undoes `q`.",
|
|
1675
2606
|
"examplePrompts": [],
|
|
1676
2607
|
"argsType": "QuatHandle",
|
|
1677
2608
|
"resultType": "QuatHandle"
|
|
@@ -1679,7 +2610,7 @@
|
|
|
1679
2610
|
{
|
|
1680
2611
|
"path": "core.math.quat.length",
|
|
1681
2612
|
"namespace": "core.math.quat",
|
|
1682
|
-
"summary": "
|
|
2613
|
+
"summary": "Compute the magnitude (norm) of a quaternion.",
|
|
1683
2614
|
"examplePrompts": [],
|
|
1684
2615
|
"argsType": "QuatHandle",
|
|
1685
2616
|
"resultType": "number"
|
|
@@ -1687,7 +2618,7 @@
|
|
|
1687
2618
|
{
|
|
1688
2619
|
"path": "core.math.quat.multiply",
|
|
1689
2620
|
"namespace": "core.math.quat",
|
|
1690
|
-
"summary": "Hamilton product `a * b` (apply `b` then `a`).",
|
|
2621
|
+
"summary": "Compose two rotations with the Hamilton product `a * b` (apply `b` then `a`).",
|
|
1691
2622
|
"examplePrompts": [],
|
|
1692
2623
|
"argsType": "QuatHandle",
|
|
1693
2624
|
"resultType": "QuatHandle"
|
|
@@ -1703,7 +2634,7 @@
|
|
|
1703
2634
|
{
|
|
1704
2635
|
"path": "core.math.quat.normalize",
|
|
1705
2636
|
"namespace": "core.math.quat",
|
|
1706
|
-
"summary": "
|
|
2637
|
+
"summary": "Normalize a quaternion to unit length.",
|
|
1707
2638
|
"examplePrompts": [],
|
|
1708
2639
|
"argsType": "QuatHandle",
|
|
1709
2640
|
"resultType": "QuatHandle"
|
|
@@ -1711,7 +2642,7 @@
|
|
|
1711
2642
|
{
|
|
1712
2643
|
"path": "core.math.quat.slerp",
|
|
1713
2644
|
"namespace": "core.math.quat",
|
|
1714
|
-
"summary": "
|
|
2645
|
+
"summary": "Spherically interpolate (slerp) between two rotations by factor `t`.",
|
|
1715
2646
|
"examplePrompts": [],
|
|
1716
2647
|
"argsType": "QuatHandle",
|
|
1717
2648
|
"resultType": "QuatHandle"
|
|
@@ -1719,7 +2650,7 @@
|
|
|
1719
2650
|
{
|
|
1720
2651
|
"path": "core.math.quat.toAxisAngle",
|
|
1721
2652
|
"namespace": "core.math.quat",
|
|
1722
|
-
"summary": "Decompose into axis
|
|
2653
|
+
"summary": "Decompose a quaternion into its rotation axis and angle (radians).",
|
|
1723
2654
|
"examplePrompts": [],
|
|
1724
2655
|
"argsType": "QuatHandle",
|
|
1725
2656
|
"resultType": "{ axis: Vec3Handle; angle: number }"
|
|
@@ -1727,7 +2658,7 @@
|
|
|
1727
2658
|
{
|
|
1728
2659
|
"path": "core.math.vec3.add",
|
|
1729
2660
|
"namespace": "core.math.vec3",
|
|
1730
|
-
"summary": "
|
|
2661
|
+
"summary": "Add two vectors component-wise (`a + b`).",
|
|
1731
2662
|
"examplePrompts": [],
|
|
1732
2663
|
"argsType": "Vec3Handle",
|
|
1733
2664
|
"resultType": "Vec3Handle"
|
|
@@ -1743,7 +2674,7 @@
|
|
|
1743
2674
|
{
|
|
1744
2675
|
"path": "core.math.vec3.cross",
|
|
1745
2676
|
"namespace": "core.math.vec3",
|
|
1746
|
-
"summary": "
|
|
2677
|
+
"summary": "Compute the cross product `a × b` — the vector perpendicular to both.",
|
|
1747
2678
|
"examplePrompts": [],
|
|
1748
2679
|
"argsType": "Vec3Handle",
|
|
1749
2680
|
"resultType": "Vec3Handle"
|
|
@@ -1751,15 +2682,18 @@
|
|
|
1751
2682
|
{
|
|
1752
2683
|
"path": "core.math.vec3.distance",
|
|
1753
2684
|
"namespace": "core.math.vec3",
|
|
1754
|
-
"summary": "Euclidean distance between two points.",
|
|
1755
|
-
"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
|
+
],
|
|
1756
2690
|
"argsType": "Vec3Handle",
|
|
1757
2691
|
"resultType": "number"
|
|
1758
2692
|
},
|
|
1759
2693
|
{
|
|
1760
2694
|
"path": "core.math.vec3.dot",
|
|
1761
2695
|
"namespace": "core.math.vec3",
|
|
1762
|
-
"summary": "
|
|
2696
|
+
"summary": "Compute the dot product of two vectors.",
|
|
1763
2697
|
"examplePrompts": [],
|
|
1764
2698
|
"argsType": "Vec3Handle",
|
|
1765
2699
|
"resultType": "number"
|
|
@@ -1767,7 +2701,7 @@
|
|
|
1767
2701
|
{
|
|
1768
2702
|
"path": "core.math.vec3.equals",
|
|
1769
2703
|
"namespace": "core.math.vec3",
|
|
1770
|
-
"summary": "
|
|
2704
|
+
"summary": "Test whether two vectors have exactly equal components.",
|
|
1771
2705
|
"examplePrompts": [],
|
|
1772
2706
|
"argsType": "Vec3Handle",
|
|
1773
2707
|
"resultType": "boolean"
|
|
@@ -1775,7 +2709,7 @@
|
|
|
1775
2709
|
{
|
|
1776
2710
|
"path": "core.math.vec3.equalsApprox",
|
|
1777
2711
|
"namespace": "core.math.vec3",
|
|
1778
|
-
"summary": "
|
|
2712
|
+
"summary": "Test whether two vectors are equal within a tolerance `epsilon` (default `1e-6`).",
|
|
1779
2713
|
"examplePrompts": [],
|
|
1780
2714
|
"argsType": "Vec3Handle",
|
|
1781
2715
|
"resultType": "boolean"
|
|
@@ -1783,7 +2717,7 @@
|
|
|
1783
2717
|
{
|
|
1784
2718
|
"path": "core.math.vec3.length",
|
|
1785
2719
|
"namespace": "core.math.vec3",
|
|
1786
|
-
"summary": "Euclidean length.",
|
|
2720
|
+
"summary": "Compute the Euclidean length (magnitude) of a vector.",
|
|
1787
2721
|
"examplePrompts": [],
|
|
1788
2722
|
"argsType": "Vec3Handle",
|
|
1789
2723
|
"resultType": "number"
|
|
@@ -1791,7 +2725,7 @@
|
|
|
1791
2725
|
{
|
|
1792
2726
|
"path": "core.math.vec3.lengthSquared",
|
|
1793
2727
|
"namespace": "core.math.vec3",
|
|
1794
|
-
"summary": "
|
|
2728
|
+
"summary": "Compute the squared Euclidean length of a vector (avoids the sqrt).",
|
|
1795
2729
|
"examplePrompts": [],
|
|
1796
2730
|
"argsType": "Vec3Handle",
|
|
1797
2731
|
"resultType": "number"
|
|
@@ -1799,7 +2733,7 @@
|
|
|
1799
2733
|
{
|
|
1800
2734
|
"path": "core.math.vec3.lerp",
|
|
1801
2735
|
"namespace": "core.math.vec3",
|
|
1802
|
-
"summary": "
|
|
2736
|
+
"summary": "Linearly interpolate between two vectors: `a + (b - a) * t`.",
|
|
1803
2737
|
"examplePrompts": [],
|
|
1804
2738
|
"argsType": "Vec3Handle",
|
|
1805
2739
|
"resultType": "Vec3Handle"
|
|
@@ -1807,7 +2741,7 @@
|
|
|
1807
2741
|
{
|
|
1808
2742
|
"path": "core.math.vec3.negate",
|
|
1809
2743
|
"namespace": "core.math.vec3",
|
|
1810
|
-
"summary": "Negate
|
|
2744
|
+
"summary": "Negate a vector, reversing its direction.",
|
|
1811
2745
|
"examplePrompts": [],
|
|
1812
2746
|
"argsType": "Vec3Handle",
|
|
1813
2747
|
"resultType": "Vec3Handle"
|
|
@@ -1823,7 +2757,7 @@
|
|
|
1823
2757
|
{
|
|
1824
2758
|
"path": "core.math.vec3.normalize",
|
|
1825
2759
|
"namespace": "core.math.vec3",
|
|
1826
|
-
"summary": "
|
|
2760
|
+
"summary": "Return the unit vector in the same direction (the zero vector if length is 0).",
|
|
1827
2761
|
"examplePrompts": [],
|
|
1828
2762
|
"argsType": "Vec3Handle",
|
|
1829
2763
|
"resultType": "Vec3Handle"
|
|
@@ -1839,7 +2773,7 @@
|
|
|
1839
2773
|
{
|
|
1840
2774
|
"path": "core.math.vec3.subtract",
|
|
1841
2775
|
"namespace": "core.math.vec3",
|
|
1842
|
-
"summary": "
|
|
2776
|
+
"summary": "Subtract vector `b` from `a` component-wise (`a - b`).",
|
|
1843
2777
|
"examplePrompts": [],
|
|
1844
2778
|
"argsType": "Vec3Handle",
|
|
1845
2779
|
"resultType": "Vec3Handle"
|
|
@@ -1848,39 +2782,64 @@
|
|
|
1848
2782
|
"path": "core.project.settings.getTolerance",
|
|
1849
2783
|
"namespace": "core.project.settings",
|
|
1850
2784
|
"summary": "Get the project tolerance as a numeric magnitude.",
|
|
1851
|
-
"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
|
+
],
|
|
1852
2791
|
"argsType": null,
|
|
1853
2792
|
"resultType": "number"
|
|
1854
2793
|
},
|
|
1855
2794
|
{
|
|
1856
2795
|
"path": "core.project.settings.grid.disable",
|
|
1857
2796
|
"namespace": "core.project.settings.grid",
|
|
1858
|
-
"summary": "Turn the grid off.",
|
|
1859
|
-
"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
|
+
],
|
|
1860
2804
|
"argsType": null,
|
|
1861
2805
|
"resultType": "boolean"
|
|
1862
2806
|
},
|
|
1863
2807
|
{
|
|
1864
2808
|
"path": "core.project.settings.grid.enable",
|
|
1865
2809
|
"namespace": "core.project.settings.grid",
|
|
1866
|
-
"summary": "Turn the grid on.",
|
|
1867
|
-
"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
|
+
],
|
|
1868
2817
|
"argsType": null,
|
|
1869
2818
|
"resultType": "boolean"
|
|
1870
2819
|
},
|
|
1871
2820
|
{
|
|
1872
2821
|
"path": "core.project.settings.grid.getValue",
|
|
1873
2822
|
"namespace": "core.project.settings.grid",
|
|
1874
|
-
"summary": "Get the grid cell value.",
|
|
1875
|
-
"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
|
+
],
|
|
1876
2830
|
"argsType": null,
|
|
1877
2831
|
"resultType": "number"
|
|
1878
2832
|
},
|
|
1879
2833
|
{
|
|
1880
2834
|
"path": "core.project.settings.grid.setValue",
|
|
1881
2835
|
"namespace": "core.project.settings.grid",
|
|
1882
|
-
"summary": "Set the grid cell value.",
|
|
1883
|
-
"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
|
+
],
|
|
1884
2843
|
"argsType": "number",
|
|
1885
2844
|
"resultType": "boolean"
|
|
1886
2845
|
},
|
|
@@ -1888,119 +2847,194 @@
|
|
|
1888
2847
|
"path": "core.project.settings.setTolerance",
|
|
1889
2848
|
"namespace": "core.project.settings",
|
|
1890
2849
|
"summary": "Set the project tolerance. The value snaps to the **nearest allowed** per-unit precision option (tolerance is a discrete dropdown, not arbitrary).",
|
|
1891
|
-
"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
|
+
],
|
|
1892
2856
|
"argsType": "number",
|
|
1893
2857
|
"resultType": "boolean"
|
|
1894
2858
|
},
|
|
1895
2859
|
{
|
|
1896
2860
|
"path": "core.project.settings.snaps.disableAngle",
|
|
1897
2861
|
"namespace": "core.project.settings.snaps",
|
|
1898
|
-
"summary": "Turn angle snapping off.",
|
|
1899
|
-
"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
|
+
],
|
|
1900
2869
|
"argsType": null,
|
|
1901
2870
|
"resultType": "boolean"
|
|
1902
2871
|
},
|
|
1903
2872
|
{
|
|
1904
2873
|
"path": "core.project.settings.snaps.disableDimension",
|
|
1905
2874
|
"namespace": "core.project.settings.snaps",
|
|
1906
|
-
"summary": "Turn dimension snapping off.",
|
|
1907
|
-
"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
|
+
],
|
|
1908
2882
|
"argsType": null,
|
|
1909
2883
|
"resultType": "boolean"
|
|
1910
2884
|
},
|
|
1911
2885
|
{
|
|
1912
2886
|
"path": "core.project.settings.snaps.disableMagnetic",
|
|
1913
2887
|
"namespace": "core.project.settings.snaps",
|
|
1914
|
-
"summary": "Turn magnetic snapping off.",
|
|
1915
|
-
"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
|
+
],
|
|
1916
2895
|
"argsType": null,
|
|
1917
2896
|
"resultType": "boolean"
|
|
1918
2897
|
},
|
|
1919
2898
|
{
|
|
1920
2899
|
"path": "core.project.settings.snaps.disableNormal",
|
|
1921
2900
|
"namespace": "core.project.settings.snaps",
|
|
1922
|
-
"summary": "Turn normal (perpendicular) snapping off.",
|
|
1923
|
-
"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
|
+
],
|
|
1924
2908
|
"argsType": null,
|
|
1925
2909
|
"resultType": "boolean"
|
|
1926
2910
|
},
|
|
1927
2911
|
{
|
|
1928
2912
|
"path": "core.project.settings.snaps.disableParallel",
|
|
1929
2913
|
"namespace": "core.project.settings.snaps",
|
|
1930
|
-
"summary": "Turn parallel snapping off.",
|
|
1931
|
-
"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
|
+
],
|
|
1932
2921
|
"argsType": null,
|
|
1933
2922
|
"resultType": "boolean"
|
|
1934
2923
|
},
|
|
1935
2924
|
{
|
|
1936
2925
|
"path": "core.project.settings.snaps.enableAngle",
|
|
1937
2926
|
"namespace": "core.project.settings.snaps",
|
|
1938
|
-
"summary": "Turn angle snapping on.",
|
|
1939
|
-
"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
|
+
],
|
|
1940
2934
|
"argsType": null,
|
|
1941
2935
|
"resultType": "boolean"
|
|
1942
2936
|
},
|
|
1943
2937
|
{
|
|
1944
2938
|
"path": "core.project.settings.snaps.enableDimension",
|
|
1945
2939
|
"namespace": "core.project.settings.snaps",
|
|
1946
|
-
"summary": "Turn dimension snapping on.",
|
|
1947
|
-
"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
|
+
],
|
|
1948
2947
|
"argsType": null,
|
|
1949
2948
|
"resultType": "boolean"
|
|
1950
2949
|
},
|
|
1951
2950
|
{
|
|
1952
2951
|
"path": "core.project.settings.snaps.enableMagnetic",
|
|
1953
2952
|
"namespace": "core.project.settings.snaps",
|
|
1954
|
-
"summary": "Turn magnetic snapping on.",
|
|
1955
|
-
"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
|
+
],
|
|
1956
2960
|
"argsType": null,
|
|
1957
2961
|
"resultType": "boolean"
|
|
1958
2962
|
},
|
|
1959
2963
|
{
|
|
1960
2964
|
"path": "core.project.settings.snaps.enableNormal",
|
|
1961
2965
|
"namespace": "core.project.settings.snaps",
|
|
1962
|
-
"summary": "Turn normal (perpendicular) snapping on.",
|
|
1963
|
-
"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
|
+
],
|
|
1964
2973
|
"argsType": null,
|
|
1965
2974
|
"resultType": "boolean"
|
|
1966
2975
|
},
|
|
1967
2976
|
{
|
|
1968
2977
|
"path": "core.project.settings.snaps.enableParallel",
|
|
1969
2978
|
"namespace": "core.project.settings.snaps",
|
|
1970
|
-
"summary": "Turn parallel snapping on.",
|
|
1971
|
-
"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
|
+
],
|
|
1972
2986
|
"argsType": null,
|
|
1973
2987
|
"resultType": "boolean"
|
|
1974
2988
|
},
|
|
1975
2989
|
{
|
|
1976
2990
|
"path": "core.project.settings.snaps.getAngle",
|
|
1977
2991
|
"namespace": "core.project.settings.snaps",
|
|
1978
|
-
"summary": "Get the angle-snap threshold
|
|
1979
|
-
"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
|
+
],
|
|
1980
2999
|
"argsType": null,
|
|
1981
3000
|
"resultType": "number"
|
|
1982
3001
|
},
|
|
1983
3002
|
{
|
|
1984
3003
|
"path": "core.project.settings.snaps.getDimension",
|
|
1985
3004
|
"namespace": "core.project.settings.snaps",
|
|
1986
|
-
"summary": "Get the dimension-snap threshold.",
|
|
1987
|
-
"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
|
+
],
|
|
1988
3012
|
"argsType": null,
|
|
1989
3013
|
"resultType": "number"
|
|
1990
3014
|
},
|
|
1991
3015
|
{
|
|
1992
3016
|
"path": "core.project.settings.snaps.setAngle",
|
|
1993
3017
|
"namespace": "core.project.settings.snaps",
|
|
1994
|
-
"summary": "Set the angle-snap threshold
|
|
1995
|
-
"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
|
+
],
|
|
1996
3025
|
"argsType": "number",
|
|
1997
3026
|
"resultType": "boolean"
|
|
1998
3027
|
},
|
|
1999
3028
|
{
|
|
2000
3029
|
"path": "core.project.settings.snaps.setDimension",
|
|
2001
3030
|
"namespace": "core.project.settings.snaps",
|
|
2002
|
-
"summary": "Set the dimension-snap threshold.",
|
|
2003
|
-
"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
|
+
],
|
|
2004
3038
|
"argsType": "number",
|
|
2005
3039
|
"resultType": "boolean"
|
|
2006
3040
|
},
|
|
@@ -2176,23 +3210,38 @@
|
|
|
2176
3210
|
"path": "core.units.convert",
|
|
2177
3211
|
"namespace": "core.units",
|
|
2178
3212
|
"summary": "Convert a value between two unit types.",
|
|
2179
|
-
"examplePrompts": [
|
|
3213
|
+
"examplePrompts": [
|
|
3214
|
+
"Convert 5 meters to feet and inches",
|
|
3215
|
+
"How many millimetres is 12 feet?",
|
|
3216
|
+
"Change this area from internal units to square metres",
|
|
3217
|
+
"Turn 2500 mm into meters",
|
|
3218
|
+
"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```"
|
|
3219
|
+
],
|
|
2180
3220
|
"argsType": "number",
|
|
2181
3221
|
"resultType": "number"
|
|
2182
3222
|
},
|
|
2183
3223
|
{
|
|
2184
3224
|
"path": "core.units.getBabylonType",
|
|
2185
3225
|
"namespace": "core.units",
|
|
2186
|
-
"summary": "
|
|
2187
|
-
"examplePrompts": [
|
|
3226
|
+
"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.",
|
|
3227
|
+
"examplePrompts": [
|
|
3228
|
+
"What unit does Snaptrude store geometry in internally?",
|
|
3229
|
+
"Get the internal babylon unit type",
|
|
3230
|
+
"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```"
|
|
3231
|
+
],
|
|
2188
3232
|
"argsType": null,
|
|
2189
3233
|
"resultType": "PUnitType"
|
|
2190
3234
|
},
|
|
2191
3235
|
{
|
|
2192
3236
|
"path": "core.units.getType",
|
|
2193
3237
|
"namespace": "core.units",
|
|
2194
|
-
"summary": "
|
|
2195
|
-
"examplePrompts": [
|
|
3238
|
+
"summary": "Get the current project's unit type — the unit lengths are displayed and entered in. Paired with {@linkcode PluginUnitsApi.setType}.",
|
|
3239
|
+
"examplePrompts": [
|
|
3240
|
+
"What units is this project using?",
|
|
3241
|
+
"Are we working in metric or imperial?",
|
|
3242
|
+
"Check the current measurement unit of the model",
|
|
3243
|
+
"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```"
|
|
3244
|
+
],
|
|
2196
3245
|
"argsType": null,
|
|
2197
3246
|
"resultType": "PUnitType"
|
|
2198
3247
|
},
|
|
@@ -2200,7 +3249,12 @@
|
|
|
2200
3249
|
"path": "core.units.listTypes",
|
|
2201
3250
|
"namespace": "core.units",
|
|
2202
3251
|
"summary": "List the selectable real-world unit types (excludes the internal `babylon` storage type, which is read via {@linkcode PluginUnitsApi.getBabylonType}).",
|
|
2203
|
-
"examplePrompts": [
|
|
3252
|
+
"examplePrompts": [
|
|
3253
|
+
"What units can I use in this project?",
|
|
3254
|
+
"List all the available measurement units",
|
|
3255
|
+
"Which unit systems does Snaptrude support?",
|
|
3256
|
+
"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```"
|
|
3257
|
+
],
|
|
2204
3258
|
"argsType": null,
|
|
2205
3259
|
"resultType": "PUnitType[]"
|
|
2206
3260
|
},
|
|
@@ -2208,7 +3262,12 @@
|
|
|
2208
3262
|
"path": "core.units.setType",
|
|
2209
3263
|
"namespace": "core.units",
|
|
2210
3264
|
"summary": "Set the current project's unit type. Paired with {@linkcode PluginUnitsApi.getType}.",
|
|
2211
|
-
"examplePrompts": [
|
|
3265
|
+
"examplePrompts": [
|
|
3266
|
+
"Change the project units to millimeters",
|
|
3267
|
+
"Switch this model to feet and inches",
|
|
3268
|
+
"Set the working units to metric",
|
|
3269
|
+
"Make the drawing use centimetres instead of meters\n\n# Example\n```ts\nawait snaptrude.core.units.setType(\"meters\")\n```"
|
|
3270
|
+
],
|
|
2212
3271
|
"argsType": "PUnitType",
|
|
2213
3272
|
"resultType": "boolean"
|
|
2214
3273
|
},
|
|
@@ -2216,7 +3275,13 @@
|
|
|
2216
3275
|
"path": "core.zoom.extents",
|
|
2217
3276
|
"namespace": "core.zoom",
|
|
2218
3277
|
"summary": "Zoom (fit) the camera to all geometry in the scene — the \"zoom extents\" action.",
|
|
2219
|
-
"examplePrompts": [
|
|
3278
|
+
"examplePrompts": [
|
|
3279
|
+
"Zoom out so I can see the whole model",
|
|
3280
|
+
"Fit everything in the view",
|
|
3281
|
+
"Frame the entire building in the viewport",
|
|
3282
|
+
"Do a zoom extents on the canvas",
|
|
3283
|
+
"Show me the full scene\n\n# Example\n```ts\nawait snaptrude.core.zoom.extents()\n```"
|
|
3284
|
+
],
|
|
2220
3285
|
"argsType": null,
|
|
2221
3286
|
"resultType": "boolean"
|
|
2222
3287
|
},
|
|
@@ -2224,31 +3289,53 @@
|
|
|
2224
3289
|
"path": "core.zoom.selection",
|
|
2225
3290
|
"namespace": "core.zoom",
|
|
2226
3291
|
"summary": "Zoom (fit) the camera to the current selection.",
|
|
2227
|
-
"examplePrompts": [
|
|
3292
|
+
"examplePrompts": [
|
|
3293
|
+
"Zoom in on what I have selected",
|
|
3294
|
+
"Frame the selected walls in the view",
|
|
3295
|
+
"Focus the camera on my current selection",
|
|
3296
|
+
"Fit the view to the selected room\n\n# Example\n```ts\nawait snaptrude.core.zoom.selection()\n```"
|
|
3297
|
+
],
|
|
2228
3298
|
"argsType": null,
|
|
2229
3299
|
"resultType": "boolean"
|
|
2230
3300
|
},
|
|
2231
3301
|
{
|
|
2232
3302
|
"path": "design.boolean.intersect",
|
|
2233
3303
|
"namespace": "design.boolean",
|
|
2234
|
-
"summary": "Keep only the
|
|
2235
|
-
"examplePrompts": [
|
|
3304
|
+
"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.",
|
|
3305
|
+
"examplePrompts": [
|
|
3306
|
+
"Keep only the part where these two masses overlap",
|
|
3307
|
+
"Intersect the two selected volumes",
|
|
3308
|
+
"Give me the common volume between the tower and the zoning envelope",
|
|
3309
|
+
"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```"
|
|
3310
|
+
],
|
|
2236
3311
|
"argsType": "ComponentHandle[]",
|
|
2237
3312
|
"resultType": "BooleanOutcome"
|
|
2238
3313
|
},
|
|
2239
3314
|
{
|
|
2240
3315
|
"path": "design.boolean.subtract",
|
|
2241
3316
|
"namespace": "design.boolean",
|
|
2242
|
-
"summary": "
|
|
2243
|
-
"examplePrompts": [
|
|
3317
|
+
"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.",
|
|
3318
|
+
"examplePrompts": [
|
|
3319
|
+
"Cut this shape out of the bigger mass",
|
|
3320
|
+
"Subtract the cylinder from the building volume",
|
|
3321
|
+
"Punch an opening through this block using the small box",
|
|
3322
|
+
"Carve the courtyard volume out of the main massing",
|
|
3323
|
+
"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```"
|
|
3324
|
+
],
|
|
2244
3325
|
"argsType": "ComponentHandle",
|
|
2245
3326
|
"resultType": "BooleanOutcome"
|
|
2246
3327
|
},
|
|
2247
3328
|
{
|
|
2248
3329
|
"path": "design.boolean.union",
|
|
2249
3330
|
"namespace": "design.boolean",
|
|
2250
|
-
"summary": "Fuse
|
|
2251
|
-
"examplePrompts": [
|
|
3331
|
+
"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.",
|
|
3332
|
+
"examplePrompts": [
|
|
3333
|
+
"Merge these two masses into one",
|
|
3334
|
+
"Union the selected volumes into a single mass",
|
|
3335
|
+
"Combine the overlapping rooms into one shape",
|
|
3336
|
+
"Join the tower and podium blocks together",
|
|
3337
|
+
"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```"
|
|
3338
|
+
],
|
|
2252
3339
|
"argsType": "ComponentHandle[]",
|
|
2253
3340
|
"resultType": "BooleanOutcome"
|
|
2254
3341
|
},
|
|
@@ -2256,7 +3343,12 @@
|
|
|
2256
3343
|
"path": "design.create.beam",
|
|
2257
3344
|
"namespace": "design.create",
|
|
2258
3345
|
"summary": "Create a **beam** by extruding a cross-section contour along `direction` by `length`.",
|
|
2259
|
-
"examplePrompts": [
|
|
3346
|
+
"examplePrompts": [
|
|
3347
|
+
"Add a beam spanning 6 metres between the columns",
|
|
3348
|
+
"Create a horizontal beam along the X axis",
|
|
3349
|
+
"Run a 300x600 beam across the room",
|
|
3350
|
+
"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```"
|
|
3351
|
+
],
|
|
2260
3352
|
"argsType": "ContourHandle",
|
|
2261
3353
|
"resultType": "ComponentHandle"
|
|
2262
3354
|
},
|
|
@@ -2264,7 +3356,12 @@
|
|
|
2264
3356
|
"path": "design.create.ceiling",
|
|
2265
3357
|
"namespace": "design.create",
|
|
2266
3358
|
"summary": "Create a **ceiling** by extruding a footprint contour by `thickness`, lifted `heightFromFloor` above the floor.",
|
|
2267
|
-
"examplePrompts": [
|
|
3359
|
+
"examplePrompts": [
|
|
3360
|
+
"Add a false ceiling 2.7m above the floor",
|
|
3361
|
+
"Create a ceiling over this room footprint",
|
|
3362
|
+
"Put a dropped ceiling in the living room at 3 metres",
|
|
3363
|
+
"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```"
|
|
3364
|
+
],
|
|
2268
3365
|
"argsType": "ContourHandle",
|
|
2269
3366
|
"resultType": "ComponentHandle"
|
|
2270
3367
|
},
|
|
@@ -2272,15 +3369,39 @@
|
|
|
2272
3369
|
"path": "design.create.column",
|
|
2273
3370
|
"namespace": "design.create",
|
|
2274
3371
|
"summary": "Create a **column** by extruding a cross-section contour upward by `height` from a base `position`.",
|
|
2275
|
-
"examplePrompts": [
|
|
3372
|
+
"examplePrompts": [
|
|
3373
|
+
"Add a 3m tall column at this point",
|
|
3374
|
+
"Place a column at the grid intersection",
|
|
3375
|
+
"Create a 450mm square concrete column 4 metres high",
|
|
3376
|
+
"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```"
|
|
3377
|
+
],
|
|
2276
3378
|
"argsType": "Vec3Handle",
|
|
2277
3379
|
"resultType": "ComponentHandle"
|
|
2278
3380
|
},
|
|
3381
|
+
{
|
|
3382
|
+
"path": "design.create.copy",
|
|
3383
|
+
"namespace": "design.create",
|
|
3384
|
+
"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.",
|
|
3385
|
+
"examplePrompts": [
|
|
3386
|
+
"Copy this room 3 times spaced 6m apart",
|
|
3387
|
+
"Duplicate the selected furniture along the X axis",
|
|
3388
|
+
"Make 5 copies of this column at 4 metre intervals",
|
|
3389
|
+
"Array these walls with a 3m offset",
|
|
3390
|
+
"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```"
|
|
3391
|
+
],
|
|
3392
|
+
"argsType": "ComponentHandle[]",
|
|
3393
|
+
"resultType": "ComponentHandle[]"
|
|
3394
|
+
},
|
|
2279
3395
|
{
|
|
2280
3396
|
"path": "design.create.floor",
|
|
2281
3397
|
"namespace": "design.create",
|
|
2282
3398
|
"summary": "Create a **floor** by extruding a footprint contour by `thickness` (extruded upward).",
|
|
2283
|
-
"examplePrompts": [
|
|
3399
|
+
"examplePrompts": [
|
|
3400
|
+
"Create a floor from this room outline",
|
|
3401
|
+
"Add a 100mm thick floor over the footprint",
|
|
3402
|
+
"Lay flooring across the selected outline",
|
|
3403
|
+
"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```"
|
|
3404
|
+
],
|
|
2284
3405
|
"argsType": "ContourHandle",
|
|
2285
3406
|
"resultType": "ComponentHandle"
|
|
2286
3407
|
},
|
|
@@ -2288,7 +3409,13 @@
|
|
|
2288
3409
|
"path": "design.create.furniture",
|
|
2289
3410
|
"namespace": "design.create",
|
|
2290
3411
|
"summary": "Place a **furniture** item from the project library at a world position.",
|
|
2291
|
-
"examplePrompts": [
|
|
3412
|
+
"examplePrompts": [
|
|
3413
|
+
"Place a chair from the library at this spot",
|
|
3414
|
+
"Add a sofa from the furniture catalog to the living room",
|
|
3415
|
+
"Drop a desk into the scene at 3, 0, 5",
|
|
3416
|
+
"Insert the uploaded bed model in the bedroom",
|
|
3417
|
+
"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```"
|
|
3418
|
+
],
|
|
2292
3419
|
"argsType": "string",
|
|
2293
3420
|
"resultType": "ComponentHandle"
|
|
2294
3421
|
},
|
|
@@ -2296,7 +3423,12 @@
|
|
|
2296
3423
|
"path": "design.create.mass",
|
|
2297
3424
|
"namespace": "design.create",
|
|
2298
3425
|
"summary": "Create a **mass** — a generic extruded prism (default `massType` \"Generic mass\"). Same footprint-extrude path as {@linkcode PluginDesignCreateApi.space}.",
|
|
2299
|
-
"examplePrompts": [
|
|
3426
|
+
"examplePrompts": [
|
|
3427
|
+
"Create a generic mass 30m tall from this footprint",
|
|
3428
|
+
"Block out a conceptual massing volume for the site",
|
|
3429
|
+
"Extrude this shape into a building mass",
|
|
3430
|
+
"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```"
|
|
3431
|
+
],
|
|
2300
3432
|
"argsType": "ContourHandle",
|
|
2301
3433
|
"resultType": "ComponentHandle"
|
|
2302
3434
|
},
|
|
@@ -2304,7 +3436,13 @@
|
|
|
2304
3436
|
"path": "design.create.referenceLines",
|
|
2305
3437
|
"namespace": "design.create",
|
|
2306
3438
|
"summary": "Create **reference lines** from a profile — one reference line per curve in the profile's ordered chain. Returns a handle per created line.",
|
|
2307
|
-
"examplePrompts": [
|
|
3439
|
+
"examplePrompts": [
|
|
3440
|
+
"Draw a reference line between these two points",
|
|
3441
|
+
"Add dashed guide lines along this path",
|
|
3442
|
+
"Create grid lines tagged A through the plan",
|
|
3443
|
+
"Set up construction lines for the column grid",
|
|
3444
|
+
"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```"
|
|
3445
|
+
],
|
|
2308
3446
|
"argsType": "ProfileHandle",
|
|
2309
3447
|
"resultType": "ComponentHandle[]"
|
|
2310
3448
|
},
|
|
@@ -2312,7 +3450,12 @@
|
|
|
2312
3450
|
"path": "design.create.roof",
|
|
2313
3451
|
"namespace": "design.create",
|
|
2314
3452
|
"summary": "Create a **roof** by extruding a footprint contour by `thickness`. Created flat (extruded downward); pitch/slope is a separate post-creation edit.",
|
|
2315
|
-
"examplePrompts": [
|
|
3453
|
+
"examplePrompts": [
|
|
3454
|
+
"Add a flat roof over the building footprint",
|
|
3455
|
+
"Create a roof 200mm thick from this outline",
|
|
3456
|
+
"Cover the top storey with a roof slab",
|
|
3457
|
+
"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```"
|
|
3458
|
+
],
|
|
2316
3459
|
"argsType": "ContourHandle",
|
|
2317
3460
|
"resultType": "ComponentHandle"
|
|
2318
3461
|
},
|
|
@@ -2320,7 +3463,13 @@
|
|
|
2320
3463
|
"path": "design.create.slab",
|
|
2321
3464
|
"namespace": "design.create",
|
|
2322
3465
|
"summary": "Create a **slab** by extruding a footprint contour by `thickness` (default direction: down).",
|
|
2323
|
-
"examplePrompts": [
|
|
3466
|
+
"examplePrompts": [
|
|
3467
|
+
"Add a 150mm thick slab under this footprint",
|
|
3468
|
+
"Create a floor slab from this outline",
|
|
3469
|
+
"Pour a plinth slab over the building footprint",
|
|
3470
|
+
"Make a basement slab that extrudes downward",
|
|
3471
|
+
"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```"
|
|
3472
|
+
],
|
|
2324
3473
|
"argsType": "ContourHandle",
|
|
2325
3474
|
"resultType": "ComponentHandle"
|
|
2326
3475
|
},
|
|
@@ -2328,15 +3477,40 @@
|
|
|
2328
3477
|
"path": "design.create.space",
|
|
2329
3478
|
"namespace": "design.create",
|
|
2330
3479
|
"summary": "Create a **space** (a room / mass) by extruding a footprint contour upward.",
|
|
2331
|
-
"examplePrompts": [
|
|
3480
|
+
"examplePrompts": [
|
|
3481
|
+
"Create a room called Living Room that's 3m tall from this outline",
|
|
3482
|
+
"Add a new space on the current storey using this footprint",
|
|
3483
|
+
"Make a bedroom here and assign it to the Residential department",
|
|
3484
|
+
"Extrude this closed outline into a 10 foot high room",
|
|
3485
|
+
"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```"
|
|
3486
|
+
],
|
|
2332
3487
|
"argsType": "ContourHandle",
|
|
2333
3488
|
"resultType": "ComponentHandle"
|
|
2334
3489
|
},
|
|
3490
|
+
{
|
|
3491
|
+
"path": "design.create.spaces",
|
|
3492
|
+
"namespace": "design.create",
|
|
3493
|
+
"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.",
|
|
3494
|
+
"examplePrompts": [
|
|
3495
|
+
"Create several rooms at once from these footprints",
|
|
3496
|
+
"Generate all the bedrooms in one operation",
|
|
3497
|
+
"Bulk create the spaces for this floor plan",
|
|
3498
|
+
"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```"
|
|
3499
|
+
],
|
|
3500
|
+
"argsType": "PluginCreateSpaceItem[]",
|
|
3501
|
+
"resultType": "ComponentHandle[]"
|
|
3502
|
+
},
|
|
2335
3503
|
{
|
|
2336
3504
|
"path": "design.create.staircase",
|
|
2337
3505
|
"namespace": "design.create",
|
|
2338
3506
|
"summary": "Create a **staircase** from a parametric preset, placed at a point.",
|
|
2339
|
-
"examplePrompts": [
|
|
3507
|
+
"examplePrompts": [
|
|
3508
|
+
"Add a dog-legged staircase at this location",
|
|
3509
|
+
"Place a straight stair on level 01",
|
|
3510
|
+
"Create an L-shaped staircase in the lobby",
|
|
3511
|
+
"Insert a staircase near the entrance",
|
|
3512
|
+
"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```"
|
|
3513
|
+
],
|
|
2340
3514
|
"argsType": "PluginStaircasePreset",
|
|
2341
3515
|
"resultType": "ComponentHandle"
|
|
2342
3516
|
},
|
|
@@ -2344,7 +3518,13 @@
|
|
|
2344
3518
|
"path": "design.create.walls",
|
|
2345
3519
|
"namespace": "design.create",
|
|
2346
3520
|
"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.",
|
|
2347
|
-
"examplePrompts": [
|
|
3521
|
+
"examplePrompts": [
|
|
3522
|
+
"Draw walls along this centerline",
|
|
3523
|
+
"Create 3m high, 200mm thick walls from these points",
|
|
3524
|
+
"Build a wall run around the room outline",
|
|
3525
|
+
"Turn this polyline sketch into walls",
|
|
3526
|
+
"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```"
|
|
3527
|
+
],
|
|
2348
3528
|
"argsType": "ProfileHandle",
|
|
2349
3529
|
"resultType": "ComponentHandle[]"
|
|
2350
3530
|
},
|
|
@@ -2352,87 +3532,159 @@
|
|
|
2352
3532
|
"path": "design.delete.entities",
|
|
2353
3533
|
"namespace": "design.delete",
|
|
2354
3534
|
"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.",
|
|
2355
|
-
"examplePrompts": [
|
|
3535
|
+
"examplePrompts": [
|
|
3536
|
+
"Delete the selected objects",
|
|
3537
|
+
"Remove these walls from the model",
|
|
3538
|
+
"Get rid of this mass entirely",
|
|
3539
|
+
"Delete all the furniture I picked",
|
|
3540
|
+
"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```"
|
|
3541
|
+
],
|
|
2356
3542
|
"argsType": "ComponentHandle[]",
|
|
2357
3543
|
"resultType": "PluginDesignChangeResult"
|
|
2358
3544
|
},
|
|
2359
3545
|
{
|
|
2360
3546
|
"path": "design.doors.getFamily",
|
|
2361
3547
|
"namespace": "design.doors",
|
|
2362
|
-
"summary": "Get a door
|
|
2363
|
-
"examplePrompts": [
|
|
3548
|
+
"summary": "Get the family name of a door — the Revit or native family the door instance comes from.",
|
|
3549
|
+
"examplePrompts": [
|
|
3550
|
+
"Which family does this door belong to?",
|
|
3551
|
+
"What's the Revit family of the selected door?",
|
|
3552
|
+
"Show the family name for this door",
|
|
3553
|
+
"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```"
|
|
3554
|
+
],
|
|
2364
3555
|
"argsType": "ComponentHandle",
|
|
2365
3556
|
"resultType": "string | null"
|
|
2366
3557
|
},
|
|
2367
3558
|
{
|
|
2368
3559
|
"path": "design.doors.getHeight",
|
|
2369
3560
|
"namespace": "design.doors",
|
|
2370
|
-
"summary": "Get a door
|
|
2371
|
-
"examplePrompts": [
|
|
3561
|
+
"summary": "Get the height of a door — how tall its opening is from base to head.",
|
|
3562
|
+
"examplePrompts": [
|
|
3563
|
+
"How tall is this door?",
|
|
3564
|
+
"What's the height of the selected door?",
|
|
3565
|
+
"Check the door height for this opening",
|
|
3566
|
+
"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```"
|
|
3567
|
+
],
|
|
2372
3568
|
"argsType": "ComponentHandle",
|
|
2373
3569
|
"resultType": "number | null"
|
|
2374
3570
|
},
|
|
2375
3571
|
{
|
|
2376
3572
|
"path": "design.doors.getSupportFloor",
|
|
2377
3573
|
"namespace": "design.doors",
|
|
2378
|
-
"summary": "Get the floor a door is hosted on.",
|
|
2379
|
-
"examplePrompts": [
|
|
3574
|
+
"summary": "Get the floor a door is hosted on — the storey/level component that supports the door.",
|
|
3575
|
+
"examplePrompts": [
|
|
3576
|
+
"Which floor is this door on?",
|
|
3577
|
+
"What storey does the selected door belong to?",
|
|
3578
|
+
"Find the level that hosts this door",
|
|
3579
|
+
"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```"
|
|
3580
|
+
],
|
|
2380
3581
|
"argsType": "ComponentHandle",
|
|
2381
3582
|
"resultType": "ComponentHandle | null"
|
|
2382
3583
|
},
|
|
2383
3584
|
{
|
|
2384
3585
|
"path": "design.doors.getSwingDirection",
|
|
2385
3586
|
"namespace": "design.doors",
|
|
2386
|
-
"summary": "Get a door's swing (hinge) handedness —
|
|
2387
|
-
"examplePrompts": [
|
|
3587
|
+
"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.",
|
|
3588
|
+
"examplePrompts": [
|
|
3589
|
+
"Which way does this door swing?",
|
|
3590
|
+
"Is the selected door left-handed or right-handed?",
|
|
3591
|
+
"Check the hinge side of this door",
|
|
3592
|
+
"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```"
|
|
3593
|
+
],
|
|
2388
3594
|
"argsType": "ComponentHandle",
|
|
2389
3595
|
"resultType": "\"left\" | \"right\" | null"
|
|
2390
3596
|
},
|
|
2391
3597
|
{
|
|
2392
3598
|
"path": "design.doors.getType",
|
|
2393
3599
|
"namespace": "design.doors",
|
|
2394
|
-
"summary": "Get a door
|
|
2395
|
-
"examplePrompts": [
|
|
3600
|
+
"summary": "Get the type name of a door — the label that identifies which kind of door the instance is, as shown in its properties.",
|
|
3601
|
+
"examplePrompts": [
|
|
3602
|
+
"What type of door is this?",
|
|
3603
|
+
"Tell me the door type of the selected door",
|
|
3604
|
+
"Is this a single or a double door?",
|
|
3605
|
+
"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```"
|
|
3606
|
+
],
|
|
2396
3607
|
"argsType": "ComponentHandle",
|
|
2397
3608
|
"resultType": "string | null"
|
|
2398
3609
|
},
|
|
2399
3610
|
{
|
|
2400
3611
|
"path": "design.doors.getWidth",
|
|
2401
3612
|
"namespace": "design.doors",
|
|
2402
|
-
"summary": "Get a door
|
|
2403
|
-
"examplePrompts": [
|
|
3613
|
+
"summary": "Get the width of a door — how wide its opening is along the host wall.",
|
|
3614
|
+
"examplePrompts": [
|
|
3615
|
+
"How wide is this door?",
|
|
3616
|
+
"What's the width of the selected door?",
|
|
3617
|
+
"Measure the width of the entrance door",
|
|
3618
|
+
"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```"
|
|
3619
|
+
],
|
|
2404
3620
|
"argsType": "ComponentHandle",
|
|
2405
3621
|
"resultType": "number | null"
|
|
2406
3622
|
},
|
|
2407
3623
|
{
|
|
2408
3624
|
"path": "design.doors.mirror",
|
|
2409
3625
|
"namespace": "design.doors",
|
|
2410
|
-
"summary": "Mirror a door across an axis
|
|
2411
|
-
"examplePrompts": [
|
|
3626
|
+
"summary": "Mirror a door across an axis, flipping its swing so it opens from the other side. Undoable as a single command.",
|
|
3627
|
+
"examplePrompts": [
|
|
3628
|
+
"Flip this door's swing",
|
|
3629
|
+
"Mirror the selected door",
|
|
3630
|
+
"Make this door open the other way",
|
|
3631
|
+
"Reverse the hinge side of the entrance door",
|
|
3632
|
+
"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```"
|
|
3633
|
+
],
|
|
2412
3634
|
"argsType": "ComponentHandle",
|
|
2413
3635
|
"resultType": "PluginDesignChangeResult"
|
|
2414
3636
|
},
|
|
2415
3637
|
{
|
|
2416
3638
|
"path": "design.doors.setHeight",
|
|
2417
3639
|
"namespace": "design.doors",
|
|
2418
|
-
"summary": "Set the height of one or more doors
|
|
2419
|
-
"examplePrompts": [
|
|
3640
|
+
"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.",
|
|
3641
|
+
"examplePrompts": [
|
|
3642
|
+
"Make this door 2100mm tall",
|
|
3643
|
+
"Change the door height to 7 feet",
|
|
3644
|
+
"Raise the selected doors to 2.4m high",
|
|
3645
|
+
"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```"
|
|
3646
|
+
],
|
|
2420
3647
|
"argsType": "ComponentHandle[]",
|
|
2421
3648
|
"resultType": "PluginDesignChangeResult"
|
|
2422
3649
|
},
|
|
2423
3650
|
{
|
|
2424
3651
|
"path": "design.doors.setWidth",
|
|
2425
3652
|
"namespace": "design.doors",
|
|
2426
|
-
"summary": "Set the width of one or more doors
|
|
2427
|
-
"examplePrompts": [
|
|
3653
|
+
"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.",
|
|
3654
|
+
"examplePrompts": [
|
|
3655
|
+
"Make this door 900mm wide",
|
|
3656
|
+
"Widen the selected doors to 1 metre",
|
|
3657
|
+
"Change the door width to 3 feet",
|
|
3658
|
+
"Resize all the bathroom doors to 750 wide",
|
|
3659
|
+
"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```"
|
|
3660
|
+
],
|
|
2428
3661
|
"argsType": "ComponentHandle[]",
|
|
2429
3662
|
"resultType": "PluginDesignChangeResult"
|
|
2430
3663
|
},
|
|
3664
|
+
{
|
|
3665
|
+
"path": "design.edit.offsetSplit",
|
|
3666
|
+
"namespace": "design.edit",
|
|
3667
|
+
"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).",
|
|
3668
|
+
"examplePrompts": [
|
|
3669
|
+
"Offset the top face of this mass inward by 2 metres and split it",
|
|
3670
|
+
"Create a 1m setback border on top of the selected mass",
|
|
3671
|
+
"Split the roof profile with a 500mm inward offset",
|
|
3672
|
+
"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```"
|
|
3673
|
+
],
|
|
3674
|
+
"argsType": "ComponentHandle",
|
|
3675
|
+
"resultType": "OffsetSplitOutcome"
|
|
3676
|
+
},
|
|
2431
3677
|
{
|
|
2432
3678
|
"path": "design.erase.edge",
|
|
2433
3679
|
"namespace": "design.erase",
|
|
2434
3680
|
"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.",
|
|
2435
|
-
"examplePrompts": [
|
|
3681
|
+
"examplePrompts": [
|
|
3682
|
+
"Erase the edge between these two rooms so they merge",
|
|
3683
|
+
"Remove the shared boundary between the kitchen and the dining space",
|
|
3684
|
+
"Merge the two adjacent rooms by erasing their common edge",
|
|
3685
|
+
"Knock through the partition line between these spaces",
|
|
3686
|
+
"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```"
|
|
3687
|
+
],
|
|
2436
3688
|
"argsType": "ErasableEdgeRef",
|
|
2437
3689
|
"resultType": "PluginDesignEraseEdgeResult"
|
|
2438
3690
|
},
|
|
@@ -2440,7 +3692,12 @@
|
|
|
2440
3692
|
"path": "design.erase.listErasableEdges",
|
|
2441
3693
|
"namespace": "design.erase",
|
|
2442
3694
|
"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.",
|
|
2443
|
-
"examplePrompts": [
|
|
3695
|
+
"examplePrompts": [
|
|
3696
|
+
"Which edges in my floor plan can be erased?",
|
|
3697
|
+
"List the erasable edges on this storey",
|
|
3698
|
+
"Show me the shared edges I could erase to merge rooms",
|
|
3699
|
+
"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```"
|
|
3700
|
+
],
|
|
2444
3701
|
"argsType": "PluginDesignListErasableEdgesArgs",
|
|
2445
3702
|
"resultType": "ErasableEdgeRef[]"
|
|
2446
3703
|
},
|
|
@@ -2448,7 +3705,12 @@
|
|
|
2448
3705
|
"path": "design.furniture.exists",
|
|
2449
3706
|
"namespace": "design.furniture",
|
|
2450
3707
|
"summary": "Test whether a catalog item exists for the given library id.",
|
|
2451
|
-
"examplePrompts": [
|
|
3708
|
+
"examplePrompts": [
|
|
3709
|
+
"Is this furniture item still in the library?",
|
|
3710
|
+
"Check whether a catalog item with this id exists",
|
|
3711
|
+
"Does my team library have this chair?",
|
|
3712
|
+
"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```"
|
|
3713
|
+
],
|
|
2452
3714
|
"argsType": "string",
|
|
2453
3715
|
"resultType": "boolean"
|
|
2454
3716
|
},
|
|
@@ -2456,7 +3718,12 @@
|
|
|
2456
3718
|
"path": "design.furniture.getCatalogItem",
|
|
2457
3719
|
"namespace": "design.furniture",
|
|
2458
3720
|
"summary": "Get a single catalog item by its library id.",
|
|
2459
|
-
"examplePrompts": [
|
|
3721
|
+
"examplePrompts": [
|
|
3722
|
+
"Get the details of this furniture item from the library",
|
|
3723
|
+
"Look up the catalog entry for this chair id",
|
|
3724
|
+
"What is the cost of this furniture item?",
|
|
3725
|
+
"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```"
|
|
3726
|
+
],
|
|
2460
3727
|
"argsType": "string",
|
|
2461
3728
|
"resultType": "PluginFurnitureCatalogItem | null"
|
|
2462
3729
|
},
|
|
@@ -2464,7 +3731,13 @@
|
|
|
2464
3731
|
"path": "design.furniture.listCatalog",
|
|
2465
3732
|
"namespace": "design.furniture",
|
|
2466
3733
|
"summary": "List the placeable furniture catalog (team + general libraries).",
|
|
2467
|
-
"examplePrompts": [
|
|
3734
|
+
"examplePrompts": [
|
|
3735
|
+
"What furniture can I place in this project?",
|
|
3736
|
+
"Show me all the furniture available in the library",
|
|
3737
|
+
"List the chairs and tables I can add to the model",
|
|
3738
|
+
"Which furniture items are in my team's library?",
|
|
3739
|
+
"Browse the furniture catalog\n\n# Example\n```ts\nconst teamItems = await snaptrude.design.furniture.listCatalog(\"team\")\nfor (const item of teamItems) console.log(item.id, item.name, item.cost)\n```"
|
|
3740
|
+
],
|
|
2468
3741
|
"argsType": "\"team\" | \"general\"",
|
|
2469
3742
|
"resultType": "PluginFurnitureCatalogItem[]"
|
|
2470
3743
|
},
|
|
@@ -2472,7 +3745,12 @@
|
|
|
2472
3745
|
"path": "design.isLocked",
|
|
2473
3746
|
"namespace": "design",
|
|
2474
3747
|
"summary": "Test whether an entity is locked (folds group + bucket lock unless `includeInherited: false`).",
|
|
2475
|
-
"examplePrompts": [
|
|
3748
|
+
"examplePrompts": [
|
|
3749
|
+
"Is this wall locked?",
|
|
3750
|
+
"Check whether the selected mass is locked or editable",
|
|
3751
|
+
"Why can't I move this object? Check if it is locked",
|
|
3752
|
+
"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```"
|
|
3753
|
+
],
|
|
2476
3754
|
"argsType": "ComponentHandle",
|
|
2477
3755
|
"resultType": "boolean"
|
|
2478
3756
|
},
|
|
@@ -2480,31 +3758,52 @@
|
|
|
2480
3758
|
"path": "design.listLocked",
|
|
2481
3759
|
"namespace": "design",
|
|
2482
3760
|
"summary": "List the explicitly-locked entities (excludes purely group/bucket-inherited locks).",
|
|
2483
|
-
"examplePrompts": [
|
|
3761
|
+
"examplePrompts": [
|
|
3762
|
+
"Which objects in the model are locked?",
|
|
3763
|
+
"List all the locked entities in this project",
|
|
3764
|
+
"Show everything that has been locked",
|
|
3765
|
+
"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```"
|
|
3766
|
+
],
|
|
2484
3767
|
"argsType": null,
|
|
2485
3768
|
"resultType": "ComponentHandle[]"
|
|
2486
3769
|
},
|
|
2487
3770
|
{
|
|
2488
3771
|
"path": "design.lock",
|
|
2489
3772
|
"namespace": "design",
|
|
2490
|
-
"summary": "Lock entities
|
|
2491
|
-
"examplePrompts": [
|
|
3773
|
+
"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.",
|
|
3774
|
+
"examplePrompts": [
|
|
3775
|
+
"Lock the selected walls so they can't be edited",
|
|
3776
|
+
"Freeze these masses so nobody moves them by accident",
|
|
3777
|
+
"Lock everything on the ground floor",
|
|
3778
|
+
"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```"
|
|
3779
|
+
],
|
|
2492
3780
|
"argsType": "ComponentHandle[]",
|
|
2493
3781
|
"resultType": "PluginDesignChangeResult"
|
|
2494
3782
|
},
|
|
2495
3783
|
{
|
|
2496
3784
|
"path": "design.materials.apply",
|
|
2497
3785
|
"namespace": "design.materials",
|
|
2498
|
-
"summary": "Apply a material
|
|
2499
|
-
"examplePrompts": [
|
|
3786
|
+
"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).",
|
|
3787
|
+
"examplePrompts": [
|
|
3788
|
+
"Paint the selected walls red",
|
|
3789
|
+
"Apply the brick material to these walls",
|
|
3790
|
+
"Put a wood finish on the floor",
|
|
3791
|
+
"Change the colour of this room's walls to #ff8800",
|
|
3792
|
+
"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```"
|
|
3793
|
+
],
|
|
2500
3794
|
"argsType": "ComponentHandle[]",
|
|
2501
3795
|
"resultType": "PluginMaterialResult"
|
|
2502
3796
|
},
|
|
2503
3797
|
{
|
|
2504
3798
|
"path": "design.materials.create",
|
|
2505
3799
|
"namespace": "design.materials",
|
|
2506
|
-
"summary": "Create
|
|
2507
|
-
"examplePrompts": [
|
|
3800
|
+
"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.",
|
|
3801
|
+
"examplePrompts": [
|
|
3802
|
+
"Create a new red material called Accent",
|
|
3803
|
+
"Make a material from this texture image URL",
|
|
3804
|
+
"Add a semi-transparent glass material to the project",
|
|
3805
|
+
"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```"
|
|
3806
|
+
],
|
|
2508
3807
|
"argsType": "PluginMaterialSpec",
|
|
2509
3808
|
"resultType": "MaterialHandle"
|
|
2510
3809
|
},
|
|
@@ -2512,15 +3811,25 @@
|
|
|
2512
3811
|
"path": "design.materials.getDefault",
|
|
2513
3812
|
"namespace": "design.materials",
|
|
2514
3813
|
"summary": "Get the default material for a component's type.",
|
|
2515
|
-
"examplePrompts": [
|
|
3814
|
+
"examplePrompts": [
|
|
3815
|
+
"What is the default material for walls?",
|
|
3816
|
+
"Get the standard material this floor type uses",
|
|
3817
|
+
"Which material would this roof have out of the box?",
|
|
3818
|
+
"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```"
|
|
3819
|
+
],
|
|
2516
3820
|
"argsType": "ComponentHandle",
|
|
2517
3821
|
"resultType": "MaterialHandle | null"
|
|
2518
3822
|
},
|
|
2519
3823
|
{
|
|
2520
3824
|
"path": "design.materials.getInfo",
|
|
2521
3825
|
"namespace": "design.materials",
|
|
2522
|
-
"summary": "Read a material's descriptor.",
|
|
2523
|
-
"examplePrompts": [
|
|
3826
|
+
"summary": "Read a material's descriptor — its name, color, opacity, and texture (when it has one).",
|
|
3827
|
+
"examplePrompts": [
|
|
3828
|
+
"What colour is the Brick material?",
|
|
3829
|
+
"Show me the details of this material",
|
|
3830
|
+
"Get the opacity of the glass finish",
|
|
3831
|
+
"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```"
|
|
3832
|
+
],
|
|
2524
3833
|
"argsType": "MaterialHandle",
|
|
2525
3834
|
"resultType": "PluginMaterialInfo | null"
|
|
2526
3835
|
},
|
|
@@ -2528,7 +3837,12 @@
|
|
|
2528
3837
|
"path": "design.materials.hasTexture",
|
|
2529
3838
|
"namespace": "design.materials",
|
|
2530
3839
|
"summary": "Test whether a material has a texture.",
|
|
2531
|
-
"examplePrompts": [
|
|
3840
|
+
"examplePrompts": [
|
|
3841
|
+
"Does this material have a texture image?",
|
|
3842
|
+
"Is the brick material textured or just a flat colour?",
|
|
3843
|
+
"Check whether the wood finish uses an image map",
|
|
3844
|
+
"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```"
|
|
3845
|
+
],
|
|
2532
3846
|
"argsType": "MaterialHandle",
|
|
2533
3847
|
"resultType": "boolean"
|
|
2534
3848
|
},
|
|
@@ -2536,7 +3850,12 @@
|
|
|
2536
3850
|
"path": "design.materials.isDefault",
|
|
2537
3851
|
"namespace": "design.materials",
|
|
2538
3852
|
"summary": "Test whether a component carries its (type) default material.",
|
|
2539
|
-
"examplePrompts": [
|
|
3853
|
+
"examplePrompts": [
|
|
3854
|
+
"Is this wall still using its default material?",
|
|
3855
|
+
"Has the material on this floor been changed?",
|
|
3856
|
+
"Check if the selected object still has its original finish",
|
|
3857
|
+
"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```"
|
|
3858
|
+
],
|
|
2540
3859
|
"argsType": "ComponentHandle",
|
|
2541
3860
|
"resultType": "boolean"
|
|
2542
3861
|
},
|
|
@@ -2544,7 +3863,12 @@
|
|
|
2544
3863
|
"path": "design.materials.isUniform",
|
|
2545
3864
|
"namespace": "design.materials",
|
|
2546
3865
|
"summary": "Test whether a component has a single (uniform) material across all faces.",
|
|
2547
|
-
"examplePrompts": [
|
|
3866
|
+
"examplePrompts": [
|
|
3867
|
+
"Does this wall have the same material on every face?",
|
|
3868
|
+
"Is the floor finished uniformly or face by face?",
|
|
3869
|
+
"Check if this column is a single material all over",
|
|
3870
|
+
"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```"
|
|
3871
|
+
],
|
|
2548
3872
|
"argsType": "ComponentHandle",
|
|
2549
3873
|
"resultType": "boolean"
|
|
2550
3874
|
},
|
|
@@ -2552,15 +3876,26 @@
|
|
|
2552
3876
|
"path": "design.materials.list",
|
|
2553
3877
|
"namespace": "design.materials",
|
|
2554
3878
|
"summary": "List the project materials.",
|
|
2555
|
-
"examplePrompts": [
|
|
3879
|
+
"examplePrompts": [
|
|
3880
|
+
"List all the materials in this project",
|
|
3881
|
+
"What materials do I have available to apply?",
|
|
3882
|
+
"Show me the preset materials library",
|
|
3883
|
+
"Which finishes exist in this model?",
|
|
3884
|
+
"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```"
|
|
3885
|
+
],
|
|
2556
3886
|
"argsType": "\"project\" | \"preset\"",
|
|
2557
3887
|
"resultType": "MaterialHandle[]"
|
|
2558
3888
|
},
|
|
2559
3889
|
{
|
|
2560
3890
|
"path": "design.materials.reset",
|
|
2561
3891
|
"namespace": "design.materials",
|
|
2562
|
-
"summary": "Reset one or more components to
|
|
2563
|
-
"examplePrompts": [
|
|
3892
|
+
"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).",
|
|
3893
|
+
"examplePrompts": [
|
|
3894
|
+
"Remove the paint from these walls",
|
|
3895
|
+
"Reset the selected objects to their default material",
|
|
3896
|
+
"Clear the custom finish on the floor",
|
|
3897
|
+
"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```"
|
|
3898
|
+
],
|
|
2564
3899
|
"argsType": "ComponentHandle[]",
|
|
2565
3900
|
"resultType": "PluginMaterialResult"
|
|
2566
3901
|
},
|
|
@@ -2568,7 +3903,12 @@
|
|
|
2568
3903
|
"path": "design.query.exists",
|
|
2569
3904
|
"namespace": "design.query",
|
|
2570
3905
|
"summary": "Test whether an entity id resolves to a live scene entity.",
|
|
2571
|
-
"examplePrompts": [
|
|
3906
|
+
"examplePrompts": [
|
|
3907
|
+
"Does this element still exist in the scene?",
|
|
3908
|
+
"Check whether the wall I stored earlier is still there",
|
|
3909
|
+
"Is id cmp_42 still valid?",
|
|
3910
|
+
"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```"
|
|
3911
|
+
],
|
|
2572
3912
|
"argsType": "ComponentHandle",
|
|
2573
3913
|
"resultType": "boolean"
|
|
2574
3914
|
},
|
|
@@ -2576,23 +3916,53 @@
|
|
|
2576
3916
|
"path": "design.query.geometry.getBottomContour",
|
|
2577
3917
|
"namespace": "design.query.geometry",
|
|
2578
3918
|
"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}.",
|
|
2579
|
-
"examplePrompts": [
|
|
3919
|
+
"examplePrompts": [
|
|
3920
|
+
"Get the footprint of the selected mass",
|
|
3921
|
+
"What is the plan outline of this building volume?",
|
|
3922
|
+
"Trace the base profile of this wall",
|
|
3923
|
+
"Find the ground-level outline of the slab, including any openings",
|
|
3924
|
+
"Work out the footprint area of the selected component"
|
|
3925
|
+
],
|
|
3926
|
+
"argsType": "ComponentHandle",
|
|
3927
|
+
"resultType": "ContourHandle | null"
|
|
3928
|
+
},
|
|
3929
|
+
{
|
|
3930
|
+
"path": "design.query.geometry.getBrep",
|
|
3931
|
+
"namespace": "design.query.geometry",
|
|
3932
|
+
"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.",
|
|
3933
|
+
"examplePrompts": [
|
|
3934
|
+
"Get the 3D solid geometry of the selected wall",
|
|
3935
|
+
"How many faces does this mass have?",
|
|
3936
|
+
"Inspect the mesh of this slab so I can look at its faces and edges",
|
|
3937
|
+
"Read the vertices of the selected column's geometry"
|
|
3938
|
+
],
|
|
2580
3939
|
"argsType": "ComponentHandle",
|
|
2581
|
-
"resultType": "
|
|
3940
|
+
"resultType": "BrepHandle | null"
|
|
2582
3941
|
},
|
|
2583
3942
|
{
|
|
2584
|
-
"path": "design.query.geometry.
|
|
3943
|
+
"path": "design.query.geometry.getCenterline",
|
|
2585
3944
|
"namespace": "design.query.geometry",
|
|
2586
|
-
"summary": "Get the
|
|
2587
|
-
"examplePrompts": [
|
|
3945
|
+
"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).",
|
|
3946
|
+
"examplePrompts": [
|
|
3947
|
+
"Get the centerline of the selected wall",
|
|
3948
|
+
"How long is this wall along its centre line?",
|
|
3949
|
+
"Find the axis running down the middle of this wall",
|
|
3950
|
+
"Give me the core curve of that curved wall",
|
|
3951
|
+
"Where does the wall's centreline start and end?"
|
|
3952
|
+
],
|
|
2588
3953
|
"argsType": "ComponentHandle",
|
|
2589
|
-
"resultType": "
|
|
3954
|
+
"resultType": "CurveHandle | null"
|
|
2590
3955
|
},
|
|
2591
3956
|
{
|
|
2592
3957
|
"path": "design.query.getBoundingBox",
|
|
2593
3958
|
"namespace": "design.query",
|
|
2594
3959
|
"summary": "Get the **union** axis-aligned bounding box enclosing a set of entities.",
|
|
2595
|
-
"examplePrompts": [
|
|
3960
|
+
"examplePrompts": [
|
|
3961
|
+
"Get the bounding box around the selected objects",
|
|
3962
|
+
"What is the overall extent of these walls?",
|
|
3963
|
+
"How big is the region these elements cover together?",
|
|
3964
|
+
"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```"
|
|
3965
|
+
],
|
|
2596
3966
|
"argsType": "ComponentHandle[]",
|
|
2597
3967
|
"resultType": "BBoxComponents | null"
|
|
2598
3968
|
},
|
|
@@ -2600,7 +3970,12 @@
|
|
|
2600
3970
|
"path": "design.query.getById",
|
|
2601
3971
|
"namespace": "design.query",
|
|
2602
3972
|
"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}).",
|
|
2603
|
-
"examplePrompts": [
|
|
3973
|
+
"examplePrompts": [
|
|
3974
|
+
"Look up an object by its id",
|
|
3975
|
+
"Does id cmp_42 still point to something in the model?",
|
|
3976
|
+
"Fetch the element with this id",
|
|
3977
|
+
"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```"
|
|
3978
|
+
],
|
|
2604
3979
|
"argsType": "ComponentHandle",
|
|
2605
3980
|
"resultType": "ComponentHandle | null"
|
|
2606
3981
|
},
|
|
@@ -2608,15 +3983,24 @@
|
|
|
2608
3983
|
"path": "design.query.getEntityRef",
|
|
2609
3984
|
"namespace": "design.query",
|
|
2610
3985
|
"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.",
|
|
2611
|
-
"examplePrompts": [
|
|
3986
|
+
"examplePrompts": [
|
|
3987
|
+
"Give me a reference I can save for this element",
|
|
3988
|
+
"Get a persistent id for the selected wall",
|
|
3989
|
+
"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```"
|
|
3990
|
+
],
|
|
2612
3991
|
"argsType": "ComponentHandle",
|
|
2613
3992
|
"resultType": "ComponentHandle"
|
|
2614
3993
|
},
|
|
2615
3994
|
{
|
|
2616
3995
|
"path": "design.query.getEntityType",
|
|
2617
3996
|
"namespace": "design.query",
|
|
2618
|
-
"summary": "Get
|
|
2619
|
-
"examplePrompts": [
|
|
3997
|
+
"summary": "Get the kind of BIM entity a handle refers to — wall, door, space, slab, and so on (its {@linkcode PluginEntityType}).",
|
|
3998
|
+
"examplePrompts": [
|
|
3999
|
+
"What kind of element is this?",
|
|
4000
|
+
"Is the selected object a wall or a mass?",
|
|
4001
|
+
"Tell me the type of this component",
|
|
4002
|
+
"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```"
|
|
4003
|
+
],
|
|
2620
4004
|
"argsType": "ComponentHandle",
|
|
2621
4005
|
"resultType": "PluginEntityType | null"
|
|
2622
4006
|
},
|
|
@@ -2624,7 +4008,12 @@
|
|
|
2624
4008
|
"path": "design.query.getHost",
|
|
2625
4009
|
"namespace": "design.query",
|
|
2626
4010
|
"summary": "Get an entity's host/parent entity (e.g. the wall a door is cut into).",
|
|
2627
|
-
"examplePrompts": [
|
|
4011
|
+
"examplePrompts": [
|
|
4012
|
+
"Which wall is this door in?",
|
|
4013
|
+
"Find the parent of the selected window",
|
|
4014
|
+
"What is this element attached to?",
|
|
4015
|
+
"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```"
|
|
4016
|
+
],
|
|
2628
4017
|
"argsType": "ComponentHandle",
|
|
2629
4018
|
"resultType": "ComponentHandle | null"
|
|
2630
4019
|
},
|
|
@@ -2632,7 +4021,12 @@
|
|
|
2632
4021
|
"path": "design.query.getLabel",
|
|
2633
4022
|
"namespace": "design.query",
|
|
2634
4023
|
"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`).",
|
|
2635
|
-
"examplePrompts": [
|
|
4024
|
+
"examplePrompts": [
|
|
4025
|
+
"What is this room called?",
|
|
4026
|
+
"Get the name of the selected object",
|
|
4027
|
+
"Show the label on this wall",
|
|
4028
|
+
"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```"
|
|
4029
|
+
],
|
|
2636
4030
|
"argsType": "ComponentHandle",
|
|
2637
4031
|
"resultType": "string"
|
|
2638
4032
|
},
|
|
@@ -2640,55 +4034,91 @@
|
|
|
2640
4034
|
"path": "design.query.getProperties",
|
|
2641
4035
|
"namespace": "design.query",
|
|
2642
4036
|
"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`).",
|
|
2643
|
-
"examplePrompts": [
|
|
4037
|
+
"examplePrompts": [
|
|
4038
|
+
"Show me all the details of the selected object",
|
|
4039
|
+
"What storey is this wall on?",
|
|
4040
|
+
"Which department does this room belong to?",
|
|
4041
|
+
"Is this element locked or hidden?",
|
|
4042
|
+
"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```"
|
|
4043
|
+
],
|
|
2644
4044
|
"argsType": "ComponentHandle",
|
|
2645
4045
|
"resultType": "PluginEntityProperties"
|
|
2646
4046
|
},
|
|
2647
4047
|
{
|
|
2648
4048
|
"path": "design.query.listBeams",
|
|
2649
4049
|
"namespace": "design.query",
|
|
2650
|
-
"summary": "List all
|
|
2651
|
-
"examplePrompts": [
|
|
4050
|
+
"summary": "List all the beams in the project, optionally filtered by storey, building, lock state, or region.",
|
|
4051
|
+
"examplePrompts": [
|
|
4052
|
+
"List all the beams in the project",
|
|
4053
|
+
"How many beams are on the second storey?",
|
|
4054
|
+
"Show the beams in this structure",
|
|
4055
|
+
"Find every locked beam\n\n# Example\n```ts\nconst storey2Beams = await snaptrude.design.query.listBeams({ storeys: [2] })\n```"
|
|
4056
|
+
],
|
|
2652
4057
|
"argsType": "PluginEntityFilter",
|
|
2653
4058
|
"resultType": "ComponentHandle[]"
|
|
2654
4059
|
},
|
|
2655
4060
|
{
|
|
2656
4061
|
"path": "design.query.listByType",
|
|
2657
4062
|
"namespace": "design.query",
|
|
2658
|
-
"summary": "List entities of
|
|
2659
|
-
"examplePrompts": [
|
|
4063
|
+
"summary": "List all entities of one BIM object type — wall, door, slab, panel, and so on — optionally narrowed by the shared filter.",
|
|
4064
|
+
"examplePrompts": [
|
|
4065
|
+
"List all the curtain walls in the project",
|
|
4066
|
+
"Show every curtain wall panel on this storey",
|
|
4067
|
+
"Get all the elements of a single type, like columns",
|
|
4068
|
+
"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```"
|
|
4069
|
+
],
|
|
2660
4070
|
"argsType": "PluginEntityType",
|
|
2661
4071
|
"resultType": "ComponentHandle[]"
|
|
2662
4072
|
},
|
|
2663
4073
|
{
|
|
2664
4074
|
"path": "design.query.listCeilings",
|
|
2665
4075
|
"namespace": "design.query",
|
|
2666
|
-
"summary": "List all
|
|
2667
|
-
"examplePrompts": [
|
|
4076
|
+
"summary": "List all the ceilings in the project, optionally filtered by storey, building, visibility, or region.",
|
|
4077
|
+
"examplePrompts": [
|
|
4078
|
+
"List all the ceilings in the model",
|
|
4079
|
+
"How many ceilings are on level 1?",
|
|
4080
|
+
"Which ceilings are hidden?",
|
|
4081
|
+
"Show the ceilings in building B\n\n# Example\n```ts\nconst hiddenCeilings = await snaptrude.design.query.listCeilings({ isHidden: true })\n```"
|
|
4082
|
+
],
|
|
2668
4083
|
"argsType": "PluginEntityFilter",
|
|
2669
4084
|
"resultType": "ComponentHandle[]"
|
|
2670
4085
|
},
|
|
2671
4086
|
{
|
|
2672
4087
|
"path": "design.query.listChildren",
|
|
2673
4088
|
"namespace": "design.query",
|
|
2674
|
-
"summary": "List an entity's direct child entities.",
|
|
2675
|
-
"examplePrompts": [
|
|
4089
|
+
"summary": "List an entity's direct child entities — for example the doors and windows hosted in a wall.",
|
|
4090
|
+
"examplePrompts": [
|
|
4091
|
+
"What's inside this wall — list its doors and windows",
|
|
4092
|
+
"Show the child elements of the selected object",
|
|
4093
|
+
"Which openings belong to this wall?",
|
|
4094
|
+
"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```"
|
|
4095
|
+
],
|
|
2676
4096
|
"argsType": "ComponentHandle",
|
|
2677
4097
|
"resultType": "ComponentHandle[]"
|
|
2678
4098
|
},
|
|
2679
4099
|
{
|
|
2680
4100
|
"path": "design.query.listColumns",
|
|
2681
4101
|
"namespace": "design.query",
|
|
2682
|
-
"summary": "List all
|
|
2683
|
-
"examplePrompts": [
|
|
4102
|
+
"summary": "List all the columns in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4103
|
+
"examplePrompts": [
|
|
4104
|
+
"How many columns are on the ground floor?",
|
|
4105
|
+
"List all the columns in building A",
|
|
4106
|
+
"Show every column on level 3",
|
|
4107
|
+
"Which columns are currently selected?\n\n# Example\n```ts\nconst groundFloorColumns = await snaptrude.design.query.listColumns({ storeys: [1] })\n```"
|
|
4108
|
+
],
|
|
2684
4109
|
"argsType": "PluginEntityFilter",
|
|
2685
4110
|
"resultType": "ComponentHandle[]"
|
|
2686
4111
|
},
|
|
2687
4112
|
{
|
|
2688
4113
|
"path": "design.query.listDoors",
|
|
2689
4114
|
"namespace": "design.query",
|
|
2690
|
-
"summary": "List all
|
|
2691
|
-
"examplePrompts": [
|
|
4115
|
+
"summary": "List all the doors in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4116
|
+
"examplePrompts": [
|
|
4117
|
+
"How many doors are in the project?",
|
|
4118
|
+
"List all the doors on the ground floor",
|
|
4119
|
+
"Which doors are currently selected?",
|
|
4120
|
+
"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```"
|
|
4121
|
+
],
|
|
2692
4122
|
"argsType": "PluginEntityFilter",
|
|
2693
4123
|
"resultType": "ComponentHandle[]"
|
|
2694
4124
|
},
|
|
@@ -2696,103 +4126,172 @@
|
|
|
2696
4126
|
"path": "design.query.listEntities",
|
|
2697
4127
|
"namespace": "design.query",
|
|
2698
4128
|
"summary": "List **all** BIM entities in the project matching the filter.",
|
|
2699
|
-
"examplePrompts": [
|
|
4129
|
+
"examplePrompts": [
|
|
4130
|
+
"Show me everything in the model",
|
|
4131
|
+
"How many objects are on the ground floor?",
|
|
4132
|
+
"List all the doors and windows on level 2",
|
|
4133
|
+
"What elements are currently selected?",
|
|
4134
|
+
"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```"
|
|
4135
|
+
],
|
|
2700
4136
|
"argsType": "PluginEntityFilter",
|
|
2701
4137
|
"resultType": "ComponentHandle[]"
|
|
2702
4138
|
},
|
|
2703
4139
|
{
|
|
2704
4140
|
"path": "design.query.listFloors",
|
|
2705
4141
|
"namespace": "design.query",
|
|
2706
|
-
"summary": "List all
|
|
2707
|
-
"examplePrompts": [
|
|
4142
|
+
"summary": "List all the floor elements (floor plates / finishes) in the project, optionally filtered by storey, building, lock state, or region.",
|
|
4143
|
+
"examplePrompts": [
|
|
4144
|
+
"List all the floor elements in the model",
|
|
4145
|
+
"How many floor plates are on the second storey?",
|
|
4146
|
+
"Which floors are locked?",
|
|
4147
|
+
"Show the floor finishes on level 0\n\n# Example\n```ts\nconst lockedFloors = await snaptrude.design.query.listFloors({ isLocked: true })\n```"
|
|
4148
|
+
],
|
|
2708
4149
|
"argsType": "PluginEntityFilter",
|
|
2709
4150
|
"resultType": "ComponentHandle[]"
|
|
2710
4151
|
},
|
|
2711
4152
|
{
|
|
2712
4153
|
"path": "design.query.listFurniture",
|
|
2713
4154
|
"namespace": "design.query",
|
|
2714
|
-
"summary": "List all
|
|
2715
|
-
"examplePrompts": [
|
|
4155
|
+
"summary": "List all the furniture in the project, optionally filtered by storey, building, label, selection state, or region.",
|
|
4156
|
+
"examplePrompts": [
|
|
4157
|
+
"List all the furniture in the project",
|
|
4158
|
+
"How many furniture items are on this floor?",
|
|
4159
|
+
"Show the furniture inside the selected room",
|
|
4160
|
+
"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```"
|
|
4161
|
+
],
|
|
2716
4162
|
"argsType": "PluginEntityFilter",
|
|
2717
4163
|
"resultType": "ComponentHandle[]"
|
|
2718
4164
|
},
|
|
2719
4165
|
{
|
|
2720
4166
|
"path": "design.query.listMasses",
|
|
2721
4167
|
"namespace": "design.query",
|
|
2722
|
-
"summary": "List all
|
|
2723
|
-
"examplePrompts": [
|
|
4168
|
+
"summary": "List all the generic masses (non-room massing volumes) in the project, optionally filtered by storey, building, label, mass type, or region.",
|
|
4169
|
+
"examplePrompts": [
|
|
4170
|
+
"List all the masses in the model",
|
|
4171
|
+
"How many massing blocks are on the site?",
|
|
4172
|
+
"Show the generic masses on level 1",
|
|
4173
|
+
"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```"
|
|
4174
|
+
],
|
|
2724
4175
|
"argsType": "PluginEntityFilter",
|
|
2725
4176
|
"resultType": "ComponentHandle[]"
|
|
2726
4177
|
},
|
|
2727
4178
|
{
|
|
2728
4179
|
"path": "design.query.listMullions",
|
|
2729
4180
|
"namespace": "design.query",
|
|
2730
|
-
"summary": "List all
|
|
2731
|
-
"examplePrompts": [
|
|
4181
|
+
"summary": "List all the curtain-wall mullions in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4182
|
+
"examplePrompts": [
|
|
4183
|
+
"List all the mullions in the curtain wall",
|
|
4184
|
+
"How many mullions are on the facade?",
|
|
4185
|
+
"Show every curtain wall mullion on level 5",
|
|
4186
|
+
"Which mullions are currently selected?\n\n# Example\n```ts\nconst level5Mullions = await snaptrude.design.query.listMullions({ storeys: [5] })\n```"
|
|
4187
|
+
],
|
|
2732
4188
|
"argsType": "PluginEntityFilter",
|
|
2733
4189
|
"resultType": "ComponentHandle[]"
|
|
2734
4190
|
},
|
|
2735
4191
|
{
|
|
2736
4192
|
"path": "design.query.listReferenceLines",
|
|
2737
4193
|
"namespace": "design.query",
|
|
2738
|
-
"summary": "List all
|
|
2739
|
-
"examplePrompts": [
|
|
4194
|
+
"summary": "List all the reference lines in the project, optionally filtered by storey, building, or region.",
|
|
4195
|
+
"examplePrompts": [
|
|
4196
|
+
"List all the reference lines in the model",
|
|
4197
|
+
"Show the guide lines on the ground floor",
|
|
4198
|
+
"How many reference lines are on this storey?",
|
|
4199
|
+
"Find the setting-out lines in building A\n\n# Example\n```ts\nconst groundFloorRefLines = await snaptrude.design.query.listReferenceLines({ storeys: [1] })\n```"
|
|
4200
|
+
],
|
|
2740
4201
|
"argsType": "PluginEntityFilter",
|
|
2741
4202
|
"resultType": "ComponentHandle[]"
|
|
2742
4203
|
},
|
|
2743
4204
|
{
|
|
2744
4205
|
"path": "design.query.listRoofs",
|
|
2745
4206
|
"namespace": "design.query",
|
|
2746
|
-
"summary": "List all
|
|
2747
|
-
"examplePrompts": [
|
|
4207
|
+
"summary": "List all the roofs in the project, optionally filtered by storey, building, visibility, or region.",
|
|
4208
|
+
"examplePrompts": [
|
|
4209
|
+
"How many roofs does the model have?",
|
|
4210
|
+
"List all the roof elements",
|
|
4211
|
+
"Show the roofs on the top storey",
|
|
4212
|
+
"Find every hidden roof\n\n# Example\n```ts\nconst hiddenRoofs = await snaptrude.design.query.listRoofs({ isHidden: true })\n```"
|
|
4213
|
+
],
|
|
2748
4214
|
"argsType": "PluginEntityFilter",
|
|
2749
4215
|
"resultType": "ComponentHandle[]"
|
|
2750
4216
|
},
|
|
2751
4217
|
{
|
|
2752
4218
|
"path": "design.query.listSlabs",
|
|
2753
4219
|
"namespace": "design.query",
|
|
2754
|
-
"summary": "List all
|
|
2755
|
-
"examplePrompts": [
|
|
4220
|
+
"summary": "List all the slabs in the project, optionally filtered by storey, building, lock state, or region.",
|
|
4221
|
+
"examplePrompts": [
|
|
4222
|
+
"List all the slabs in the project",
|
|
4223
|
+
"How many slabs are on level 2?",
|
|
4224
|
+
"Which slabs are locked?",
|
|
4225
|
+
"Show the slabs in the selected building\n\n# Example\n```ts\nconst storey2Slabs = await snaptrude.design.query.listSlabs({ storeys: [2] })\n```"
|
|
4226
|
+
],
|
|
2756
4227
|
"argsType": "PluginEntityFilter",
|
|
2757
4228
|
"resultType": "ComponentHandle[]"
|
|
2758
4229
|
},
|
|
2759
4230
|
{
|
|
2760
4231
|
"path": "design.query.listSpaces",
|
|
2761
4232
|
"namespace": "design.query",
|
|
2762
|
-
"summary": "List all
|
|
2763
|
-
"examplePrompts": [
|
|
4233
|
+
"summary": "List all the spaces (rooms) in the project, optionally filtered by storey, department, space type, label, selection state, or region.",
|
|
4234
|
+
"examplePrompts": [
|
|
4235
|
+
"How many rooms are in this project?",
|
|
4236
|
+
"List all the spaces on the second storey",
|
|
4237
|
+
"Which rooms are in the Bedrooms department?",
|
|
4238
|
+
"Find every room labelled Kitchen",
|
|
4239
|
+
"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```"
|
|
4240
|
+
],
|
|
2764
4241
|
"argsType": "PluginEntityFilter",
|
|
2765
4242
|
"resultType": "ComponentHandle[]"
|
|
2766
4243
|
},
|
|
2767
4244
|
{
|
|
2768
4245
|
"path": "design.query.listStaircases",
|
|
2769
4246
|
"namespace": "design.query",
|
|
2770
|
-
"summary": "List all
|
|
2771
|
-
"examplePrompts": [
|
|
4247
|
+
"summary": "List all the staircases in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4248
|
+
"examplePrompts": [
|
|
4249
|
+
"How many staircases are in the building?",
|
|
4250
|
+
"List all the stairs in the project",
|
|
4251
|
+
"Show the staircases on the ground floor",
|
|
4252
|
+
"Which stairs are currently selected?\n\n# Example\n```ts\nconst groundFloorStairs = await snaptrude.design.query.listStaircases({ storeys: [1] })\n```"
|
|
4253
|
+
],
|
|
2772
4254
|
"argsType": "PluginEntityFilter",
|
|
2773
4255
|
"resultType": "ComponentHandle[]"
|
|
2774
4256
|
},
|
|
2775
4257
|
{
|
|
2776
4258
|
"path": "design.query.listWalls",
|
|
2777
4259
|
"namespace": "design.query",
|
|
2778
|
-
"summary": "List all
|
|
2779
|
-
"examplePrompts": [
|
|
4260
|
+
"summary": "List all the walls in the project, optionally filtered by storey, building, label, selection state, or region.",
|
|
4261
|
+
"examplePrompts": [
|
|
4262
|
+
"How many walls are in the project?",
|
|
4263
|
+
"List all the walls on the ground floor",
|
|
4264
|
+
"Which walls are currently selected?",
|
|
4265
|
+
"Find the walls on level 2 of building A",
|
|
4266
|
+
"Show me every hidden wall\n\n# Example\n```ts\nconst groundFloorWalls = await snaptrude.design.query.listWalls({ storeys: [1] })\n```"
|
|
4267
|
+
],
|
|
2780
4268
|
"argsType": "PluginEntityFilter",
|
|
2781
4269
|
"resultType": "ComponentHandle[]"
|
|
2782
4270
|
},
|
|
2783
4271
|
{
|
|
2784
4272
|
"path": "design.query.listWindows",
|
|
2785
4273
|
"namespace": "design.query",
|
|
2786
|
-
"summary": "List all
|
|
2787
|
-
"examplePrompts": [
|
|
4274
|
+
"summary": "List all the windows in the project, optionally filtered by storey, building, selection state, or region.",
|
|
4275
|
+
"examplePrompts": [
|
|
4276
|
+
"How many windows does this building have?",
|
|
4277
|
+
"List every window on level 3",
|
|
4278
|
+
"Which windows are on the ground floor?",
|
|
4279
|
+
"Show all the windows that are currently selected\n\n# Example\n```ts\nconst level3Windows = await snaptrude.design.query.listWindows({ storeys: [3] })\n```"
|
|
4280
|
+
],
|
|
2788
4281
|
"argsType": "PluginEntityFilter",
|
|
2789
4282
|
"resultType": "ComponentHandle[]"
|
|
2790
4283
|
},
|
|
2791
4284
|
{
|
|
2792
4285
|
"path": "design.query.measure",
|
|
2793
4286
|
"namespace": "design.query",
|
|
2794
|
-
"summary": "Measure an entity —
|
|
2795
|
-
"examplePrompts": [
|
|
4287
|
+
"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.",
|
|
4288
|
+
"examplePrompts": [
|
|
4289
|
+
"What's the area of this room?",
|
|
4290
|
+
"How long is the selected wall?",
|
|
4291
|
+
"Get the volume of this mass",
|
|
4292
|
+
"Give me the dimensions of the selected element",
|
|
4293
|
+
"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```"
|
|
4294
|
+
],
|
|
2796
4295
|
"argsType": "ComponentHandle",
|
|
2797
4296
|
"resultType": "PluginEntityMeasurements | null"
|
|
2798
4297
|
},
|
|
@@ -2800,7 +4299,13 @@
|
|
|
2800
4299
|
"path": "design.query.spaces.get",
|
|
2801
4300
|
"namespace": "design.query.spaces",
|
|
2802
4301
|
"summary": "Get selected properties of a space — the selective multi-property read.",
|
|
2803
|
-
"examplePrompts": [
|
|
4302
|
+
"examplePrompts": [
|
|
4303
|
+
"What is the area of this room?",
|
|
4304
|
+
"Get the name, storey and height of the selected space",
|
|
4305
|
+
"Which department does this room belong to?",
|
|
4306
|
+
"Where is this space positioned on the plan?",
|
|
4307
|
+
"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```"
|
|
4308
|
+
],
|
|
2804
4309
|
"argsType": "ComponentHandle",
|
|
2805
4310
|
"resultType": "PluginDesignQuerySpacesGetResult"
|
|
2806
4311
|
},
|
|
@@ -2808,119 +4313,268 @@
|
|
|
2808
4313
|
"path": "design.query.spaces.getFootprint",
|
|
2809
4314
|
"namespace": "design.query.spaces",
|
|
2810
4315
|
"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.",
|
|
2811
|
-
"examplePrompts": [
|
|
4316
|
+
"examplePrompts": [
|
|
4317
|
+
"Get the footprint of this room",
|
|
4318
|
+
"Trace the floor outline of the selected space",
|
|
4319
|
+
"What is the plan boundary of this room, including any holes?",
|
|
4320
|
+
"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```"
|
|
4321
|
+
],
|
|
2812
4322
|
"argsType": "ComponentHandle",
|
|
2813
4323
|
"resultType": "ContourHandle | null"
|
|
2814
4324
|
},
|
|
2815
4325
|
{
|
|
2816
4326
|
"path": "design.selection.add",
|
|
2817
4327
|
"namespace": "design.selection",
|
|
2818
|
-
"summary": "Add entities to the current selection.",
|
|
2819
|
-
"examplePrompts": [
|
|
4328
|
+
"summary": "Add entities to the current selection without deselecting anything — the selection grows to include the given entities alongside whatever was already selected.",
|
|
4329
|
+
"examplePrompts": [
|
|
4330
|
+
"Add the corridor to my current selection",
|
|
4331
|
+
"Select these columns too, keeping what's already selected",
|
|
4332
|
+
"Also select the roof",
|
|
4333
|
+
"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```"
|
|
4334
|
+
],
|
|
2820
4335
|
"argsType": "ComponentHandle[]",
|
|
2821
4336
|
"resultType": "PluginDesignChangeResult"
|
|
2822
4337
|
},
|
|
2823
4338
|
{
|
|
2824
4339
|
"path": "design.selection.clear",
|
|
2825
4340
|
"namespace": "design.selection",
|
|
2826
|
-
"summary": "Clear the selection (
|
|
2827
|
-
"examplePrompts": [
|
|
4341
|
+
"summary": "Clear the selection so nothing is selected (equivalent to `set([])`).",
|
|
4342
|
+
"examplePrompts": [
|
|
4343
|
+
"Deselect everything",
|
|
4344
|
+
"Clear my current selection",
|
|
4345
|
+
"Unselect all objects in the scene",
|
|
4346
|
+
"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```"
|
|
4347
|
+
],
|
|
2828
4348
|
"argsType": null,
|
|
2829
4349
|
"resultType": "PluginDesignChangeResult"
|
|
2830
4350
|
},
|
|
2831
4351
|
{
|
|
2832
4352
|
"path": "design.selection.get",
|
|
2833
4353
|
"namespace": "design.selection",
|
|
2834
|
-
"summary": "
|
|
2835
|
-
"examplePrompts": [
|
|
4354
|
+
"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.",
|
|
4355
|
+
"examplePrompts": [
|
|
4356
|
+
"What do I have selected right now?",
|
|
4357
|
+
"List the currently selected objects",
|
|
4358
|
+
"Which rooms are selected in the scene?",
|
|
4359
|
+
"Get the ids of everything I've selected",
|
|
4360
|
+
"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```"
|
|
4361
|
+
],
|
|
2836
4362
|
"argsType": null,
|
|
2837
4363
|
"resultType": "ComponentHandle[]"
|
|
2838
4364
|
},
|
|
2839
4365
|
{
|
|
2840
4366
|
"path": "design.selection.remove",
|
|
2841
4367
|
"namespace": "design.selection",
|
|
2842
|
-
"summary": "Remove entities from the current selection.",
|
|
2843
|
-
"examplePrompts": [
|
|
4368
|
+
"summary": "Remove entities from the current selection — the given entities are deselected while everything else stays selected.",
|
|
4369
|
+
"examplePrompts": [
|
|
4370
|
+
"Deselect the stair core but keep the rest selected",
|
|
4371
|
+
"Remove these walls from my selection",
|
|
4372
|
+
"Take the furniture out of the current selection",
|
|
4373
|
+
"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```"
|
|
4374
|
+
],
|
|
2844
4375
|
"argsType": "ComponentHandle[]",
|
|
2845
4376
|
"resultType": "PluginDesignChangeResult"
|
|
2846
4377
|
},
|
|
2847
4378
|
{
|
|
2848
4379
|
"path": "design.selection.set",
|
|
2849
4380
|
"namespace": "design.selection",
|
|
2850
|
-
"summary": "Replace the selection with exactly the given entities.",
|
|
2851
|
-
"examplePrompts": [
|
|
4381
|
+
"summary": "Replace the selection with exactly the given entities — anything previously selected is deselected first, so afterwards only these entities are selected.",
|
|
4382
|
+
"examplePrompts": [
|
|
4383
|
+
"Select these three walls",
|
|
4384
|
+
"Select only the kitchen and deselect everything else",
|
|
4385
|
+
"Change the selection to just these rooms",
|
|
4386
|
+
"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```"
|
|
4387
|
+
],
|
|
4388
|
+
"argsType": "ComponentHandle[]",
|
|
4389
|
+
"resultType": "PluginDesignChangeResult"
|
|
4390
|
+
},
|
|
4391
|
+
{
|
|
4392
|
+
"path": "design.selection.setByFilter",
|
|
4393
|
+
"namespace": "design.selection",
|
|
4394
|
+
"summary": "Replace the selection with every visible entity of the active building that matches the filter — the programmatic equivalent of the editor's **Story selection** (`storeys`) and **Filter selection** (`types`) menus under the select tool, including their combination (fields AND, values within a field OR). Reaches selection-only kinds the query surface cannot (sites, terrain, CAD/PDF/image imports, dimension lines, 3D models, neighborhood buildings) and selects whole groups the way the editor does.",
|
|
4395
|
+
"examplePrompts": [
|
|
4396
|
+
"Select everything on storey 2",
|
|
4397
|
+
"Select all the walls and doors",
|
|
4398
|
+
"Story selection: select the ground floor and first floor",
|
|
4399
|
+
"Filter selection: select all furniture in the model",
|
|
4400
|
+
"Select only the furniture on the second storey",
|
|
4401
|
+
"Select all the spaces so I can recolor them\n\n# Example\n```ts\n// \"Story selection\": everything on storeys 1 and 2\nawait snaptrude.design.selection.setByFilter({ storeys: [1, 2] })\n\n// \"Filter selection\": all walls and doors\nawait snaptrude.design.selection.setByFilter({ types: [\"wall\", \"door\"] })\n\n// Combined: only the furniture on storey 2\nconst { affected } = await snaptrude.design.selection.setByFilter({\nstoreys: [2],\ntypes: [\"furniture\"],\n})\n```"
|
|
4402
|
+
],
|
|
4403
|
+
"argsType": "PluginSelectionFilter",
|
|
4404
|
+
"resultType": "PluginDesignChangeResult"
|
|
4405
|
+
},
|
|
4406
|
+
{
|
|
4407
|
+
"path": "design.transform.move",
|
|
4408
|
+
"namespace": "design.transform",
|
|
4409
|
+
"summary": "Translate entities by a **relative** displacement vector (added to the first component's absolute position as the anchor). Undoable.",
|
|
4410
|
+
"examplePrompts": [
|
|
4411
|
+
"Move the selected room 5 metres to the right",
|
|
4412
|
+
"Shift these walls 3m along the x axis",
|
|
4413
|
+
"Nudge this space 500mm north",
|
|
4414
|
+
"Translate the furniture block by (10, 0, 5)",
|
|
4415
|
+
"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```"
|
|
4416
|
+
],
|
|
4417
|
+
"argsType": "ComponentHandle[]",
|
|
4418
|
+
"resultType": "PluginDesignChangeResult"
|
|
4419
|
+
},
|
|
4420
|
+
{
|
|
4421
|
+
"path": "design.transform.rotate",
|
|
4422
|
+
"namespace": "design.transform",
|
|
4423
|
+
"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.",
|
|
4424
|
+
"examplePrompts": [
|
|
4425
|
+
"Rotate the selected building 90 degrees",
|
|
4426
|
+
"Turn this room 45 degrees clockwise",
|
|
4427
|
+
"Spin the furniture block 180 degrees about its centre",
|
|
4428
|
+
"Rotate these masses 30 degrees around the vertical axis\n\n# Example\n```ts\nawait snaptrude.design.transform.rotate([\"space-id\"], 90)\n```"
|
|
4429
|
+
],
|
|
2852
4430
|
"argsType": "ComponentHandle[]",
|
|
2853
4431
|
"resultType": "PluginDesignChangeResult"
|
|
2854
4432
|
},
|
|
2855
4433
|
{
|
|
2856
4434
|
"path": "design.unlock",
|
|
2857
4435
|
"namespace": "design",
|
|
2858
|
-
"summary": "Unlock entities. Undoable. Paired with {@linkcode PluginDesignApi.lock}.",
|
|
2859
|
-
"examplePrompts": [
|
|
4436
|
+
"summary": "Unlock previously locked entities so they can be edited again. Undoable. Paired with {@linkcode PluginDesignApi.lock}.",
|
|
4437
|
+
"examplePrompts": [
|
|
4438
|
+
"Unlock the selected objects",
|
|
4439
|
+
"Make this locked wall editable again",
|
|
4440
|
+
"Unfreeze the masses I locked earlier",
|
|
4441
|
+
"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```"
|
|
4442
|
+
],
|
|
2860
4443
|
"argsType": "ComponentHandle[]",
|
|
2861
4444
|
"resultType": "PluginDesignChangeResult"
|
|
2862
4445
|
},
|
|
4446
|
+
{
|
|
4447
|
+
"path": "design.update.space",
|
|
4448
|
+
"namespace": "design.update",
|
|
4449
|
+
"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.",
|
|
4450
|
+
"examplePrompts": [
|
|
4451
|
+
"Rename this room to Office",
|
|
4452
|
+
"Change this space's room type to Meeting Room",
|
|
4453
|
+
"Set the height of this room to 3 metres",
|
|
4454
|
+
"Move this space into the Circulation department",
|
|
4455
|
+
"Exclude this room from the area calculations\n\n# Example\n```ts\nawait snaptrude.design.update.space(\"space-id\", { properties: { room_type: \"Office\" } })\n```"
|
|
4456
|
+
],
|
|
4457
|
+
"argsType": "ComponentHandle",
|
|
4458
|
+
"resultType": "PluginSpaceUpdateResult"
|
|
4459
|
+
},
|
|
4460
|
+
{
|
|
4461
|
+
"path": "design.update.spaces",
|
|
4462
|
+
"namespace": "design.update",
|
|
4463
|
+
"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.",
|
|
4464
|
+
"examplePrompts": [
|
|
4465
|
+
"Label all the selected rooms as Bedrooms",
|
|
4466
|
+
"Change the room type of these five spaces at once",
|
|
4467
|
+
"Set every room on this floor to a 3m height in one go",
|
|
4468
|
+
"Bulk-assign these spaces to the Service department",
|
|
4469
|
+
"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```"
|
|
4470
|
+
],
|
|
4471
|
+
"argsType": "PluginUpdateSpaceItem[]",
|
|
4472
|
+
"resultType": "PluginSpaceUpdateResult[]"
|
|
4473
|
+
},
|
|
2863
4474
|
{
|
|
2864
4475
|
"path": "design.windows.getDimensions",
|
|
2865
4476
|
"namespace": "design.windows",
|
|
2866
|
-
"summary": "Get a window's dimensions
|
|
2867
|
-
"examplePrompts": [
|
|
4477
|
+
"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.",
|
|
4478
|
+
"examplePrompts": [
|
|
4479
|
+
"What are the dimensions of this window?",
|
|
4480
|
+
"How big is the selected window?",
|
|
4481
|
+
"Give me the width, height and depth of this window",
|
|
4482
|
+
"Measure the living room window",
|
|
4483
|
+
"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```"
|
|
4484
|
+
],
|
|
2868
4485
|
"argsType": "ComponentHandle",
|
|
2869
4486
|
"resultType": "PluginWindowDimensions | null"
|
|
2870
4487
|
},
|
|
2871
4488
|
{
|
|
2872
4489
|
"path": "design.windows.getHeight",
|
|
2873
4490
|
"namespace": "design.windows",
|
|
2874
|
-
"summary": "Get a window
|
|
2875
|
-
"examplePrompts": [
|
|
4491
|
+
"summary": "Get the height of a window — how tall its opening is on the host wall.",
|
|
4492
|
+
"examplePrompts": [
|
|
4493
|
+
"How tall is this window?",
|
|
4494
|
+
"What's the height of the selected window?",
|
|
4495
|
+
"Check the window height on this wall",
|
|
4496
|
+
"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```"
|
|
4497
|
+
],
|
|
2876
4498
|
"argsType": "ComponentHandle",
|
|
2877
4499
|
"resultType": "number | null"
|
|
2878
4500
|
},
|
|
2879
4501
|
{
|
|
2880
4502
|
"path": "design.windows.getType",
|
|
2881
4503
|
"namespace": "design.windows",
|
|
2882
|
-
"summary": "Get a window
|
|
2883
|
-
"examplePrompts": [
|
|
4504
|
+
"summary": "Get the type name of a window — the label that identifies which kind of window the instance is, as shown in its properties.",
|
|
4505
|
+
"examplePrompts": [
|
|
4506
|
+
"What type of window is this?",
|
|
4507
|
+
"Is the selected window a casement or a slider?",
|
|
4508
|
+
"Tell me the window type used on this wall",
|
|
4509
|
+
"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```"
|
|
4510
|
+
],
|
|
2884
4511
|
"argsType": "ComponentHandle",
|
|
2885
4512
|
"resultType": "string | null"
|
|
2886
4513
|
},
|
|
2887
4514
|
{
|
|
2888
4515
|
"path": "design.windows.getWidth",
|
|
2889
4516
|
"namespace": "design.windows",
|
|
2890
|
-
"summary": "Get a window
|
|
2891
|
-
"examplePrompts": [
|
|
4517
|
+
"summary": "Get the width of a window — how wide its opening is along the host wall.",
|
|
4518
|
+
"examplePrompts": [
|
|
4519
|
+
"How wide is this window?",
|
|
4520
|
+
"What's the width of the selected window?",
|
|
4521
|
+
"Measure the width of the kitchen window",
|
|
4522
|
+
"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```"
|
|
4523
|
+
],
|
|
2892
4524
|
"argsType": "ComponentHandle",
|
|
2893
4525
|
"resultType": "number | null"
|
|
2894
4526
|
},
|
|
2895
4527
|
{
|
|
2896
4528
|
"path": "design.windows.setHeight",
|
|
2897
4529
|
"namespace": "design.windows",
|
|
2898
|
-
"summary": "Set a window
|
|
2899
|
-
"examplePrompts": [
|
|
4530
|
+
"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.",
|
|
4531
|
+
"examplePrompts": [
|
|
4532
|
+
"Make this window 1.5m tall",
|
|
4533
|
+
"Change the window height to 4 feet",
|
|
4534
|
+
"Shorten the selected window to 900mm high",
|
|
4535
|
+
"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```"
|
|
4536
|
+
],
|
|
2900
4537
|
"argsType": "ComponentHandle",
|
|
2901
4538
|
"resultType": "PluginDesignChangeResult"
|
|
2902
4539
|
},
|
|
2903
4540
|
{
|
|
2904
4541
|
"path": "design.windows.setWidth",
|
|
2905
4542
|
"namespace": "design.windows",
|
|
2906
|
-
"summary": "Set a window
|
|
2907
|
-
"examplePrompts": [
|
|
4543
|
+
"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.",
|
|
4544
|
+
"examplePrompts": [
|
|
4545
|
+
"Make this window 1200mm wide",
|
|
4546
|
+
"Widen the selected window to 4 feet",
|
|
4547
|
+
"Change the window width to 1.5m",
|
|
4548
|
+
"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```"
|
|
4549
|
+
],
|
|
2908
4550
|
"argsType": "ComponentHandle",
|
|
2909
4551
|
"resultType": "PluginDesignChangeResult"
|
|
2910
4552
|
},
|
|
2911
4553
|
{
|
|
2912
4554
|
"path": "entity.buildableEnvelope.create",
|
|
2913
4555
|
"namespace": "entity.buildableEnvelope",
|
|
2914
|
-
"summary": "Create a new parametric buildable envelope.",
|
|
2915
|
-
"examplePrompts": [
|
|
4556
|
+
"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.",
|
|
4557
|
+
"examplePrompts": [
|
|
4558
|
+
"Create a buildable envelope for my site",
|
|
4559
|
+
"Generate the zoning envelope with 10ft front setbacks",
|
|
4560
|
+
"Show the maximum buildable volume with a 150ft height limit",
|
|
4561
|
+
"Model the allowable massing from the setback rules",
|
|
4562
|
+
"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```"
|
|
4563
|
+
],
|
|
2916
4564
|
"argsType": "PluginBuildableEnvelopePolygonVertex[]",
|
|
2917
4565
|
"resultType": "PluginBuildableEnvelopeCreateResult"
|
|
2918
4566
|
},
|
|
2919
4567
|
{
|
|
2920
4568
|
"path": "entity.buildableEnvelope.update",
|
|
2921
4569
|
"namespace": "entity.buildableEnvelope",
|
|
2922
|
-
"summary": "Update an existing parametric buildable envelope.",
|
|
2923
|
-
"examplePrompts": [
|
|
4570
|
+
"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.",
|
|
4571
|
+
"examplePrompts": [
|
|
4572
|
+
"Change the envelope's height limit to 175 feet",
|
|
4573
|
+
"Update the setbacks on the buildable envelope",
|
|
4574
|
+
"Regenerate the zoning envelope with a new site boundary",
|
|
4575
|
+
"Increase the FAR on the buildable volume",
|
|
4576
|
+
"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```"
|
|
4577
|
+
],
|
|
2924
4578
|
"argsType": "string",
|
|
2925
4579
|
"resultType": "PluginBuildableEnvelopeUpdateResult"
|
|
2926
4580
|
},
|
|
@@ -2928,7 +4582,13 @@
|
|
|
2928
4582
|
"path": "entity.referenceLine.createMulti",
|
|
2929
4583
|
"namespace": "entity.referenceLine",
|
|
2930
4584
|
"summary": "Create multiple reference lines from a profile.",
|
|
2931
|
-
"examplePrompts": [
|
|
4585
|
+
"examplePrompts": [
|
|
4586
|
+
"Draw grid lines across the site",
|
|
4587
|
+
"Create reference lines from these curves",
|
|
4588
|
+
"Add alignment guides along the building edge",
|
|
4589
|
+
"Set up a structural grid using guide lines",
|
|
4590
|
+
"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```"
|
|
4591
|
+
],
|
|
2932
4592
|
"argsType": "ProfileHandle",
|
|
2933
4593
|
"resultType": "PluginReferenceLineCreateMultiResult"
|
|
2934
4594
|
},
|
|
@@ -2936,7 +4596,12 @@
|
|
|
2936
4596
|
"path": "entity.referenceLine.delete",
|
|
2937
4597
|
"namespace": "entity.referenceLine",
|
|
2938
4598
|
"summary": "Delete a reference line by its ID.",
|
|
2939
|
-
"examplePrompts": [
|
|
4599
|
+
"examplePrompts": [
|
|
4600
|
+
"Delete this reference line",
|
|
4601
|
+
"Remove the grid line I just drew",
|
|
4602
|
+
"Get rid of the alignment guide on the left",
|
|
4603
|
+
"Erase a reference line by its id\n\n# Example\n```ts\nawait snaptrude.entity.referenceLine.delete(\"some-ref-line-id\")\n```"
|
|
4604
|
+
],
|
|
2940
4605
|
"argsType": "string",
|
|
2941
4606
|
"resultType": "PluginReferenceLineDeleteResult"
|
|
2942
4607
|
},
|
|
@@ -2944,7 +4609,12 @@
|
|
|
2944
4609
|
"path": "entity.referenceLine.get",
|
|
2945
4610
|
"namespace": "entity.referenceLine",
|
|
2946
4611
|
"summary": "Get properties of a reference line by its ID.",
|
|
2947
|
-
"examplePrompts": [
|
|
4612
|
+
"examplePrompts": [
|
|
4613
|
+
"Get the curve geometry of this reference line",
|
|
4614
|
+
"Where does this grid line run?",
|
|
4615
|
+
"Read the geometry of a guide line by its id",
|
|
4616
|
+
"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```"
|
|
4617
|
+
],
|
|
2948
4618
|
"argsType": "string",
|
|
2949
4619
|
"resultType": "PluginReferenceLineGetResult"
|
|
2950
4620
|
},
|
|
@@ -2952,95 +4622,26 @@
|
|
|
2952
4622
|
"path": "entity.referenceLine.getAll",
|
|
2953
4623
|
"namespace": "entity.referenceLine",
|
|
2954
4624
|
"summary": "Get the IDs of all reference lines in the current project.",
|
|
2955
|
-
"examplePrompts": [
|
|
4625
|
+
"examplePrompts": [
|
|
4626
|
+
"How many grid lines are in the project?",
|
|
4627
|
+
"List all the reference lines in my model",
|
|
4628
|
+
"Show every guide line in the file",
|
|
4629
|
+
"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```"
|
|
4630
|
+
],
|
|
2956
4631
|
"argsType": null,
|
|
2957
4632
|
"resultType": "PluginReferenceLineGetAllResult"
|
|
2958
4633
|
},
|
|
2959
|
-
{
|
|
2960
|
-
"path": "entity.space.bulkCreate",
|
|
2961
|
-
"namespace": "entity.space",
|
|
2962
|
-
"summary": "Create many spaces in a single undoable operation.",
|
|
2963
|
-
"examplePrompts": [],
|
|
2964
|
-
"argsType": "PluginSpaceBulkCreateItem[]",
|
|
2965
|
-
"resultType": "PluginSpaceBulkCreateResult"
|
|
2966
|
-
},
|
|
2967
|
-
{
|
|
2968
|
-
"path": "entity.space.bulkDelete",
|
|
2969
|
-
"namespace": "entity.space",
|
|
2970
|
-
"summary": "Delete many spaces in a single undoable operation.",
|
|
2971
|
-
"examplePrompts": [],
|
|
2972
|
-
"argsType": "string[]",
|
|
2973
|
-
"resultType": "PluginSpaceBulkDeleteResult"
|
|
2974
|
-
},
|
|
2975
|
-
{
|
|
2976
|
-
"path": "entity.space.bulkUpdate",
|
|
2977
|
-
"namespace": "entity.space",
|
|
2978
|
-
"summary": "Update many existing spaces in a single undoable operation.",
|
|
2979
|
-
"examplePrompts": [],
|
|
2980
|
-
"argsType": "PluginSpaceBulkUpdateItem[]",
|
|
2981
|
-
"resultType": "PluginSpaceBulkUpdateResult"
|
|
2982
|
-
},
|
|
2983
|
-
{
|
|
2984
|
-
"path": "entity.space.createFromProfile",
|
|
2985
|
-
"namespace": "entity.space",
|
|
2986
|
-
"summary": "Create a space by extruding a 2D profile.",
|
|
2987
|
-
"examplePrompts": [],
|
|
2988
|
-
"argsType": "ProfileHandle",
|
|
2989
|
-
"resultType": "PluginSpaceCreateFromProfileResult"
|
|
2990
|
-
},
|
|
2991
|
-
{
|
|
2992
|
-
"path": "entity.space.createRectangular",
|
|
2993
|
-
"namespace": "entity.space",
|
|
2994
|
-
"summary": "Create a rectangular (box) space.",
|
|
2995
|
-
"examplePrompts": [],
|
|
2996
|
-
"argsType": "Vec3Handle",
|
|
2997
|
-
"resultType": "PluginSpaceCreateRectangularResult"
|
|
2998
|
-
},
|
|
2999
|
-
{
|
|
3000
|
-
"path": "entity.space.delete",
|
|
3001
|
-
"namespace": "entity.space",
|
|
3002
|
-
"summary": "Delete a space by its ID.",
|
|
3003
|
-
"examplePrompts": [],
|
|
3004
|
-
"argsType": "string",
|
|
3005
|
-
"resultType": "PluginSpaceDeleteResult"
|
|
3006
|
-
},
|
|
3007
|
-
{
|
|
3008
|
-
"path": "entity.space.get",
|
|
3009
|
-
"namespace": "entity.space",
|
|
3010
|
-
"summary": "Get properties of a space by its ID.",
|
|
3011
|
-
"examplePrompts": [],
|
|
3012
|
-
"argsType": "string",
|
|
3013
|
-
"resultType": "PluginSpaceGetResult"
|
|
3014
|
-
},
|
|
3015
|
-
{
|
|
3016
|
-
"path": "entity.space.getAll",
|
|
3017
|
-
"namespace": "entity.space",
|
|
3018
|
-
"summary": "Get the IDs of all spaces in the current project.",
|
|
3019
|
-
"examplePrompts": [],
|
|
3020
|
-
"argsType": null,
|
|
3021
|
-
"resultType": "PluginSpaceGetAllResult"
|
|
3022
|
-
},
|
|
3023
|
-
{
|
|
3024
|
-
"path": "entity.space.update",
|
|
3025
|
-
"namespace": "entity.space",
|
|
3026
|
-
"summary": "Update properties of a space by its ID.",
|
|
3027
|
-
"examplePrompts": [],
|
|
3028
|
-
"argsType": "string",
|
|
3029
|
-
"resultType": "PluginSpaceUpdateResult"
|
|
3030
|
-
},
|
|
3031
|
-
{
|
|
3032
|
-
"path": "entity.space.updateGeometryFromProfile",
|
|
3033
|
-
"namespace": "entity.space",
|
|
3034
|
-
"summary": "Update a space's BRep and mesh geometry by extruding a 2D profile.",
|
|
3035
|
-
"examplePrompts": [],
|
|
3036
|
-
"argsType": "string",
|
|
3037
|
-
"resultType": "PluginSpaceUpdateGeometryFromProfileResult"
|
|
3038
|
-
},
|
|
3039
4634
|
{
|
|
3040
4635
|
"path": "entity.story.create",
|
|
3041
4636
|
"namespace": "entity.story",
|
|
3042
4637
|
"summary": "Create a new story (floor) in the project.",
|
|
3043
|
-
"examplePrompts": [
|
|
4638
|
+
"examplePrompts": [
|
|
4639
|
+
"Add a third floor to the building",
|
|
4640
|
+
"Create a new storey above the second floor",
|
|
4641
|
+
"Add a basement level to this project",
|
|
4642
|
+
"Insert a new level with a custom floor height",
|
|
4643
|
+
"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```"
|
|
4644
|
+
],
|
|
3044
4645
|
"argsType": "number",
|
|
3045
4646
|
"resultType": "PluginStoryCreateResult"
|
|
3046
4647
|
},
|
|
@@ -3048,7 +4649,13 @@
|
|
|
3048
4649
|
"path": "entity.story.get",
|
|
3049
4650
|
"namespace": "entity.story",
|
|
3050
4651
|
"summary": "Get properties of a story by its storey number.",
|
|
3051
|
-
"examplePrompts": [
|
|
4652
|
+
"examplePrompts": [
|
|
4653
|
+
"What is the height of the ground floor?",
|
|
4654
|
+
"How many rooms are on the second storey?",
|
|
4655
|
+
"Get the total floor area of level 3",
|
|
4656
|
+
"Is the first floor hidden in the viewport?",
|
|
4657
|
+
"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```"
|
|
4658
|
+
],
|
|
3052
4659
|
"argsType": "number",
|
|
3053
4660
|
"resultType": "PluginStoryGetResult"
|
|
3054
4661
|
},
|
|
@@ -3056,7 +4663,12 @@
|
|
|
3056
4663
|
"path": "entity.story.getAll",
|
|
3057
4664
|
"namespace": "entity.story",
|
|
3058
4665
|
"summary": "Get all stories in the current project.",
|
|
3059
|
-
"examplePrompts": [
|
|
4666
|
+
"examplePrompts": [
|
|
4667
|
+
"How many floors does this building have?",
|
|
4668
|
+
"List all the storeys in the project",
|
|
4669
|
+
"Show me every level with its name",
|
|
4670
|
+
"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```"
|
|
4671
|
+
],
|
|
3060
4672
|
"argsType": null,
|
|
3061
4673
|
"resultType": "PluginStoryGetAllResult"
|
|
3062
4674
|
},
|
|
@@ -3064,7 +4676,12 @@
|
|
|
3064
4676
|
"path": "entity.story.update",
|
|
3065
4677
|
"namespace": "entity.story",
|
|
3066
4678
|
"summary": "Update a story's height.",
|
|
3067
|
-
"examplePrompts": [
|
|
4679
|
+
"examplePrompts": [
|
|
4680
|
+
"Change the ground floor height to 3.5 metres",
|
|
4681
|
+
"Make the second storey taller",
|
|
4682
|
+
"Set the floor-to-floor height of level 1",
|
|
4683
|
+
"Increase the height of the third floor\n\n# Example\n```ts\n// Set ground floor height to 5 Babylon units\nconst result = await snaptrude.entity.story.update(1, 5)\n```"
|
|
4684
|
+
],
|
|
3068
4685
|
"argsType": "number",
|
|
3069
4686
|
"resultType": "PluginStoryUpdateResult"
|
|
3070
4687
|
},
|
|
@@ -3077,7 +4694,7 @@
|
|
|
3077
4694
|
"Render the selected view as a photorealistic image",
|
|
3078
4695
|
"Make an AI image of a modern facade from this source",
|
|
3079
4696
|
"Generate a video from this image",
|
|
3080
|
-
"Turn this massing into a rendered street view"
|
|
4697
|
+
"Turn this massing into a rendered street view\n\n# Example\n```ts\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({})\nconst [source, ...refs] = sources\nconst { outputs } = await snaptrude.presentation.aiInspiration.generate({\nsourceShapeId: source.shapeId,\nprompt: \"Photorealistic render of a modern timber facade at dusk\",\nreferenceShapeIds: refs.slice(0, 2).map((r) => r.shapeId),\nreferenceStrength: \"medium\",\n})\nfor (const out of outputs) console.log(out.outputType, out.shapeId, out.outputUrl)\n```"
|
|
3081
4698
|
],
|
|
3082
4699
|
"argsType": "PluginAIInspirationGenerateArgs",
|
|
3083
4700
|
"resultType": "PluginAIInspirationRunResult"
|
|
@@ -3089,7 +4706,7 @@
|
|
|
3089
4706
|
"examplePrompts": [
|
|
3090
4707
|
"What AI inspiration models can I use?",
|
|
3091
4708
|
"List the available image and video models",
|
|
3092
|
-
"Which generation model is the default
|
|
4709
|
+
"Which generation model is the default?\n\n# Example\n```ts\nconst { defaultModelId, models } = await snaptrude.presentation.aiInspiration.listModels()\nconst videoModels = models.filter((m) => m.output === \"video\")\nconsole.log(defaultModelId, videoModels.map((m) => m.id))\n```"
|
|
3093
4710
|
],
|
|
3094
4711
|
"argsType": null,
|
|
3095
4712
|
"resultType": "PluginAIInspirationListModelsResult"
|
|
@@ -3101,7 +4718,7 @@
|
|
|
3101
4718
|
"examplePrompts": [
|
|
3102
4719
|
"List the images I can generate from on this page",
|
|
3103
4720
|
"What source shapes are on the present canvas?",
|
|
3104
|
-
"Show me the reference images available for AI generation"
|
|
4721
|
+
"Show me the reference images available for AI generation\n\n# Example\n```ts\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({ includeGenerated: true })\nfor (const s of sources) console.log(s.kind, s.shapeId, s.name)\n```"
|
|
3105
4722
|
],
|
|
3106
4723
|
"argsType": "PluginAIInspirationListSourcesArgs",
|
|
3107
4724
|
"resultType": "PluginAIInspirationListSourcesResult"
|
|
@@ -3113,7 +4730,7 @@
|
|
|
3113
4730
|
"examplePrompts": [
|
|
3114
4731
|
"Upscale this AI image",
|
|
3115
4732
|
"Refine and sharpen the selected render",
|
|
3116
|
-
"Make this generated image higher resolution"
|
|
4733
|
+
"Make this generated image higher resolution\n\n# Example\n```ts\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({ includeGenerated: true })\nconst image = sources.find((s) => s.kind === \"image\")\nif (image) {\nconst { outputs } = await snaptrude.presentation.aiInspiration.refine({\nsourceShapeId: image.shapeId,\nupscaleFactor: 2,\n})\nconsole.log(outputs[0].shapeId)\n}\n```"
|
|
3117
4734
|
],
|
|
3118
4735
|
"argsType": "PluginAIInspirationRefineArgs",
|
|
3119
4736
|
"resultType": "PluginAIInspirationRunResult"
|
|
@@ -3531,7 +5148,7 @@
|
|
|
3531
5148
|
"examplePrompts": [
|
|
3532
5149
|
"Arrange the rooms in the envelope",
|
|
3533
5150
|
"Lay out the departments inside the building envelope",
|
|
3534
|
-
"Auto-arrange the program spaces"
|
|
5151
|
+
"Auto-arrange the program spaces\n\n# Example\n```ts\nconst { success, error } = await snaptrude.program.layout.arrange()\nif (!success) console.log(\"Arrange failed:\", error)\n```"
|
|
3535
5152
|
],
|
|
3536
5153
|
"argsType": null,
|
|
3537
5154
|
"resultType": "PluginProgramLayoutRunResult"
|
|
@@ -3543,7 +5160,7 @@
|
|
|
3543
5160
|
"examplePrompts": [
|
|
3544
5161
|
"Pack the rooms into the envelope",
|
|
3545
5162
|
"Fit the program spaces tightly into the building",
|
|
3546
|
-
"Run pack-in-envelope on this storey"
|
|
5163
|
+
"Run pack-in-envelope on this storey\n\n# Example\n```ts\nconst { success, error } = await snaptrude.program.layout.pack()\nif (!success) console.log(\"Pack failed:\", error)\n```"
|
|
3547
5164
|
],
|
|
3548
5165
|
"argsType": null,
|
|
3549
5166
|
"resultType": "PluginProgramLayoutRunResult"
|
|
@@ -3602,6 +5219,30 @@
|
|
|
3602
5219
|
"argsType": null,
|
|
3603
5220
|
"resultType": "PluginProgramSiteContextResult"
|
|
3604
5221
|
},
|
|
5222
|
+
{
|
|
5223
|
+
"path": "program.site.getLocation",
|
|
5224
|
+
"namespace": "program.site",
|
|
5225
|
+
"summary": "Get the project's geographic location.",
|
|
5226
|
+
"examplePrompts": [
|
|
5227
|
+
"What's the project's latitude and longitude?",
|
|
5228
|
+
"Where is this site located?",
|
|
5229
|
+
"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```"
|
|
5230
|
+
],
|
|
5231
|
+
"argsType": null,
|
|
5232
|
+
"resultType": "PluginProgramSiteLocationResult"
|
|
5233
|
+
},
|
|
5234
|
+
{
|
|
5235
|
+
"path": "program.site.getNorthAngle",
|
|
5236
|
+
"namespace": "program.site",
|
|
5237
|
+
"summary": "Get the site's true-north angle.",
|
|
5238
|
+
"examplePrompts": [
|
|
5239
|
+
"What's the north angle of the site?",
|
|
5240
|
+
"How far is the model rotated from true north?",
|
|
5241
|
+
"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```"
|
|
5242
|
+
],
|
|
5243
|
+
"argsType": null,
|
|
5244
|
+
"resultType": "PluginProgramSiteNorthAngleResult"
|
|
5245
|
+
},
|
|
3605
5246
|
{
|
|
3606
5247
|
"path": "program.site.listGeoPolygons",
|
|
3607
5248
|
"namespace": "program.site",
|
|
@@ -3955,45 +5596,5 @@
|
|
|
3955
5596
|
],
|
|
3956
5597
|
"argsType": "PluginSpreadsheetTransactionOp[]",
|
|
3957
5598
|
"resultType": "PluginProgramSpreadsheetTransactionResult"
|
|
3958
|
-
},
|
|
3959
|
-
{
|
|
3960
|
-
"path": "tools.copy",
|
|
3961
|
-
"namespace": "tools",
|
|
3962
|
-
"summary": "Copy components by ID.",
|
|
3963
|
-
"examplePrompts": [],
|
|
3964
|
-
"argsType": "string[]",
|
|
3965
|
-
"resultType": "PluginCopyResult"
|
|
3966
|
-
},
|
|
3967
|
-
{
|
|
3968
|
-
"path": "tools.offset",
|
|
3969
|
-
"namespace": "tools",
|
|
3970
|
-
"summary": "Offset or split a component profile.",
|
|
3971
|
-
"examplePrompts": [],
|
|
3972
|
-
"argsType": "string",
|
|
3973
|
-
"resultType": "PluginOffsetResult"
|
|
3974
|
-
},
|
|
3975
|
-
{
|
|
3976
|
-
"path": "tools.selection.get",
|
|
3977
|
-
"namespace": "tools.selection",
|
|
3978
|
-
"summary": "Get the IDs of all currently selected components.",
|
|
3979
|
-
"examplePrompts": [],
|
|
3980
|
-
"argsType": null,
|
|
3981
|
-
"resultType": "PluginSelectionGetResult"
|
|
3982
|
-
},
|
|
3983
|
-
{
|
|
3984
|
-
"path": "tools.transform.move",
|
|
3985
|
-
"namespace": "tools.transform",
|
|
3986
|
-
"summary": "Translate components by a displacement vector.",
|
|
3987
|
-
"examplePrompts": [],
|
|
3988
|
-
"argsType": "string[]",
|
|
3989
|
-
"resultType": "void"
|
|
3990
|
-
},
|
|
3991
|
-
{
|
|
3992
|
-
"path": "tools.transform.rotate",
|
|
3993
|
-
"namespace": "tools.transform",
|
|
3994
|
-
"summary": "Rotate components around an axis through a pivot point.",
|
|
3995
|
-
"examplePrompts": [],
|
|
3996
|
-
"argsType": "string[]",
|
|
3997
|
-
"resultType": "void"
|
|
3998
5599
|
}
|
|
3999
5600
|
]
|