@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.
Files changed (67) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/api-manifest.full.json +2044 -443
  3. package/api-manifest.json +2051 -394
  4. package/dist/api/analysis/heatmaps.d.ts +234 -0
  5. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  6. package/dist/api/analysis/illuminance.d.ts +145 -0
  7. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  8. package/dist/api/analysis/index.d.ts +44 -0
  9. package/dist/api/analysis/index.d.ts.map +1 -0
  10. package/dist/api/analysis/shadows.d.ts +165 -0
  11. package/dist/api/analysis/shadows.d.ts.map +1 -0
  12. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  13. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  14. package/dist/api/analysis/sunpath.d.ts +80 -0
  15. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  16. package/dist/api/core/index.d.ts +5 -0
  17. package/dist/api/core/index.d.ts.map +1 -1
  18. package/dist/api/core/io/import/index.d.ts +392 -0
  19. package/dist/api/core/io/import/index.d.ts.map +1 -0
  20. package/dist/api/core/io/index.d.ts +35 -0
  21. package/dist/api/core/io/index.d.ts.map +1 -0
  22. package/dist/api/core/io/job/index.d.ts +139 -0
  23. package/dist/api/core/io/job/index.d.ts.map +1 -0
  24. package/dist/api/core/io/query/index.d.ts +74 -0
  25. package/dist/api/core/io/query/index.d.ts.map +1 -0
  26. package/dist/api/core/io/terrain/index.d.ts +206 -0
  27. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  28. package/dist/api/core/io/underlay/index.d.ts +286 -0
  29. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  30. package/dist/api/core/layers.d.ts +7 -7
  31. package/dist/api/design/create/index.d.ts +9 -0
  32. package/dist/api/design/create/index.d.ts.map +1 -1
  33. package/dist/api/design/query/spaces.d.ts +3 -3
  34. package/dist/api/design/selection/index.d.ts +144 -0
  35. package/dist/api/design/selection/index.d.ts.map +1 -1
  36. package/dist/api/entity/space.d.ts +2 -2
  37. package/dist/api/index.d.ts +5 -0
  38. package/dist/api/index.d.ts.map +1 -1
  39. package/dist/api/program/site.d.ts +84 -0
  40. package/dist/api/program/site.d.ts.map +1 -1
  41. package/dist/handles.d.ts +33 -0
  42. package/dist/handles.d.ts.map +1 -1
  43. package/dist/index.cjs +1335 -987
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.js +1278 -983
  46. package/dist/index.js.map +1 -1
  47. package/package.json +1 -1
  48. package/scripts/generate-manifest.test.mjs +26 -4
  49. package/src/api/analysis/heatmaps.ts +256 -0
  50. package/src/api/analysis/illuminance.ts +155 -0
  51. package/src/api/analysis/index.ts +46 -0
  52. package/src/api/analysis/shadows.ts +183 -0
  53. package/src/api/analysis/sunlightHours.ts +211 -0
  54. package/src/api/analysis/sunpath.ts +83 -0
  55. package/src/api/core/index.ts +5 -0
  56. package/src/api/core/io/import/index.ts +432 -0
  57. package/src/api/core/io/index.ts +37 -0
  58. package/src/api/core/io/job/index.ts +140 -0
  59. package/src/api/core/io/query/index.ts +71 -0
  60. package/src/api/core/io/terrain/index.ts +214 -0
  61. package/src/api/core/io/underlay/index.ts +295 -0
  62. package/src/api/design/create/index.ts +9 -0
  63. package/src/api/design/erase/index.ts +1 -1
  64. package/src/api/design/selection/index.ts +129 -0
  65. package/src/api/index.ts +5 -0
  66. package/src/api/program/site.ts +93 -0
  67. package/src/handles.ts +46 -0
package/api-manifest.json CHANGED
@@ -1,4 +1,244 @@
1
1
  [
2
+ {
3
+ "path": "analysis.heatmaps.isActive",
4
+ "namespace": "analysis.heatmaps",
5
+ "summary": "Is a plugin heatmap currently showing?",
6
+ "examplePrompts": [
7
+ "Is my heatmap still showing?",
8
+ "Check whether the custom heatmap is active",
9
+ "Do I need to re-render the wind overlay?\n\n# Example\n```ts\nif (!(await snaptrude.analysis.heatmaps.isActive())) {\nawait snaptrude.analysis.heatmaps.renderGrid(cells, 2)\n}\n```"
10
+ ],
11
+ "argsType": null,
12
+ "resultType": "boolean"
13
+ },
14
+ {
15
+ "path": "analysis.heatmaps.renderGrid",
16
+ "namespace": "analysis.heatmaps",
17
+ "summary": "Render a grid heatmap — a coloured mesh from point samples.",
18
+ "examplePrompts": [
19
+ "Overlay my CFD wind simulation results on the site",
20
+ "Render a noise-level grid around the building",
21
+ "Show these sampled microclimate values as a colored grid\n\n# Example\n```ts\n// World coordinates are y-up: a ground-level field varies in x/z at y = 0.\nawait snaptrude.analysis.heatmaps.renderGrid(\nsamples.map((s) => ({ position: { x: s.x, y: 0, z: s.z }, value: s.windSpeed })),\n2, // 2-unit square cells\n{ title: \"Wind speed\", unit: \"m/s\", colors: [\"#0000ff\", \"#00ff00\", \"#ff0000\"] },\n)\n```"
22
+ ],
23
+ "argsType": "PluginAnalysisHeatmapGridCell[]",
24
+ "resultType": "PluginAnalysisHeatmapsRenderResult"
25
+ },
26
+ {
27
+ "path": "analysis.heatmaps.renderSpaces",
28
+ "namespace": "analysis.heatmaps",
29
+ "summary": "Render a per-space heatmap — one flat colour per space's top face.",
30
+ "examplePrompts": [
31
+ "Color each room by its occupancy count",
32
+ "Show my energy simulation results as a heatmap per space",
33
+ "Paint the rooms red to blue by temperature\n\n# Example\n```ts\nconst spaces = await snaptrude.design.query.listSpaces()\nawait snaptrude.analysis.heatmaps.renderSpaces(\nspaces.map((space) => ({ space, value: occupancy[space] ?? 0 })),\n{ title: \"Occupancy\", unit: \"people\", min: 0, max: 50 },\n)\n```"
34
+ ],
35
+ "argsType": "PluginAnalysisHeatmapSpaceEntry[]",
36
+ "resultType": "PluginAnalysisHeatmapsRenderResult"
37
+ },
38
+ {
39
+ "path": "analysis.heatmaps.reset",
40
+ "namespace": "analysis.heatmaps",
41
+ "summary": "Clear the plugin heatmap from the scene.",
42
+ "examplePrompts": [
43
+ "Clear my custom heatmap",
44
+ "Remove the wind overlay from the model",
45
+ "Reset the plugin heatmap view\n\n# Example\n```ts\nawait snaptrude.analysis.heatmaps.reset()\n```"
46
+ ],
47
+ "argsType": null,
48
+ "resultType": "boolean"
49
+ },
50
+ {
51
+ "path": "analysis.illuminance.cancel",
52
+ "namespace": "analysis.illuminance",
53
+ "summary": "Cancel the in-flight illuminance run.",
54
+ "examplePrompts": [
55
+ "Cancel the illuminance analysis",
56
+ "Stop the running daylight computation",
57
+ "Abort the lux study\n\n# Example\n```ts\nawait snaptrude.analysis.illuminance.cancel()\n```"
58
+ ],
59
+ "argsType": null,
60
+ "resultType": "boolean"
61
+ },
62
+ {
63
+ "path": "analysis.illuminance.compute",
64
+ "namespace": "analysis.illuminance",
65
+ "summary": "Start a daylight-illuminance run for a date range.",
66
+ "examplePrompts": [
67
+ "Run a daylight illuminance analysis for December",
68
+ "Compute the lux levels inside the building for winter",
69
+ "How much daylight do the interior floors get?\n\n# Example\n```ts\nconst { success } = await snaptrude.analysis.illuminance.compute(\n\"2026-12-01\",\n\"2026-12-31\",\n)\n// poll until the heatmap is rendered\nlet job = await snaptrude.analysis.illuminance.get()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.analysis.illuminance.get()\n}\n```"
70
+ ],
71
+ "argsType": "string",
72
+ "resultType": "PluginAnalysisComputeResult"
73
+ },
74
+ {
75
+ "path": "analysis.illuminance.get",
76
+ "namespace": "analysis.illuminance",
77
+ "summary": "Get the state of the illuminance study.",
78
+ "examplePrompts": [
79
+ "Is the illuminance analysis done?",
80
+ "Check the status of the daylight lux run",
81
+ "What date range was the illuminance heatmap computed for?\n\n# Example\n```ts\nconst job = await snaptrude.analysis.illuminance.get()\nif (job?.status === \"active\") console.log(job.startDate, job.endDate)\n```"
82
+ ],
83
+ "argsType": null,
84
+ "resultType": "PluginAnalysisJobStateResult"
85
+ },
86
+ {
87
+ "path": "analysis.illuminance.reset",
88
+ "namespace": "analysis.illuminance",
89
+ "summary": "Clear the illuminance heatmap from the scene.",
90
+ "examplePrompts": [
91
+ "Clear the illuminance heatmap",
92
+ "Remove the daylight lux colours from the model",
93
+ "Reset the illuminance analysis view\n\n# Example\n```ts\nawait snaptrude.analysis.illuminance.reset()\n```"
94
+ ],
95
+ "argsType": null,
96
+ "resultType": "boolean"
97
+ },
98
+ {
99
+ "path": "analysis.shadows.disable",
100
+ "namespace": "analysis.shadows",
101
+ "summary": "Turn real-time sun shadows OFF.",
102
+ "examplePrompts": [
103
+ "Turn off shadows",
104
+ "Hide the sun shadows",
105
+ "Disable shadow rendering in the scene\n\n# Example\n```ts\nawait snaptrude.analysis.shadows.disable()\n```"
106
+ ],
107
+ "argsType": null,
108
+ "resultType": "boolean"
109
+ },
110
+ {
111
+ "path": "analysis.shadows.enable",
112
+ "namespace": "analysis.shadows",
113
+ "summary": "Turn real-time sun shadows ON, optionally at a specific date and time.",
114
+ "examplePrompts": [
115
+ "Turn on shadows",
116
+ "Show the shadows at 3pm on June 21st",
117
+ "Enable sun shadows for the summer solstice afternoon\n\n# Example\n```ts\nawait snaptrude.analysis.shadows.enable({ dateTime: \"2026-06-21T15:00\" })\n```"
118
+ ],
119
+ "argsType": "PluginAnalysisShadowsEnableOptions",
120
+ "resultType": "boolean"
121
+ },
122
+ {
123
+ "path": "analysis.shadows.getDateTime",
124
+ "namespace": "analysis.shadows",
125
+ "summary": "Get the sun's current date and time.",
126
+ "examplePrompts": [
127
+ "What date and time are the shadows set to?",
128
+ "Get the current sun position date",
129
+ "Which time of day is the shadow study showing?\n\n# Example\n```ts\nconst dateTime = await snaptrude.analysis.shadows.getDateTime()\n```"
130
+ ],
131
+ "argsType": null,
132
+ "resultType": "PluginAnalysisShadowsDateTimeResult"
133
+ },
134
+ {
135
+ "path": "analysis.shadows.isEnabled",
136
+ "namespace": "analysis.shadows",
137
+ "summary": "Whether real-time sun shadows are currently enabled.",
138
+ "examplePrompts": [
139
+ "Are shadows on?",
140
+ "Check whether sun shadows are enabled",
141
+ "Is the scene showing shadows right now?\n\n# Example\n```ts\nconst on = await snaptrude.analysis.shadows.isEnabled()\n```"
142
+ ],
143
+ "argsType": null,
144
+ "resultType": "boolean"
145
+ },
146
+ {
147
+ "path": "analysis.shadows.setDateTime",
148
+ "namespace": "analysis.shadows",
149
+ "summary": "Move the sun to a specific date and time.",
150
+ "examplePrompts": [
151
+ "Set the shadow time to 9:30 am on the winter solstice",
152
+ "Move the sun to noon on March 1st",
153
+ "Change the shadow study date to December 21\n\n# Example\n```ts\nconst applied = await snaptrude.analysis.shadows.setDateTime(\"2026-12-21T09:30\")\nconsole.log(applied) // \"2026-12-21T09:30\" (snapped to the half-hour grid)\n```"
154
+ ],
155
+ "argsType": "string",
156
+ "resultType": "PluginAnalysisShadowsDateTimeResult"
157
+ },
158
+ {
159
+ "path": "analysis.sunlightHours.cancel",
160
+ "namespace": "analysis.sunlightHours",
161
+ "summary": "Cancel the in-flight sunlight-hours run.",
162
+ "examplePrompts": [
163
+ "Cancel the sunlight analysis",
164
+ "Stop the running sunlight hours computation",
165
+ "Abort the sun study\n\n# Example\n```ts\nawait snaptrude.analysis.sunlightHours.cancel()\n```"
166
+ ],
167
+ "argsType": null,
168
+ "resultType": "boolean"
169
+ },
170
+ {
171
+ "path": "analysis.sunlightHours.compute",
172
+ "namespace": "analysis.sunlightHours",
173
+ "summary": "Start a direct-sunlight-hours run for a date range.",
174
+ "examplePrompts": [
175
+ "Run a sunlight hours analysis for June",
176
+ "Compute direct sunlight hours between March and September",
177
+ "How much sun does my building get over the summer?\n\n# Example\n```ts\nconst { success } = await snaptrude.analysis.sunlightHours.compute(\n\"2026-06-01\",\n\"2026-06-30\",\n)\n// poll until the heatmap is rendered\nlet job = await snaptrude.analysis.sunlightHours.get()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.analysis.sunlightHours.get()\n}\n```"
178
+ ],
179
+ "argsType": "string",
180
+ "resultType": "PluginAnalysisComputeResult"
181
+ },
182
+ {
183
+ "path": "analysis.sunlightHours.get",
184
+ "namespace": "analysis.sunlightHours",
185
+ "summary": "Get the state of the sunlight-hours study.",
186
+ "examplePrompts": [
187
+ "Is the sunlight analysis done?",
188
+ "Check the status of the sunlight hours run",
189
+ "What date range was the sunlight heatmap computed for?\n\n# Example\n```ts\nconst job = await snaptrude.analysis.sunlightHours.get()\nif (job?.status === \"active\") console.log(job.startDate, job.endDate)\n```"
190
+ ],
191
+ "argsType": null,
192
+ "resultType": "PluginAnalysisJobStateResult"
193
+ },
194
+ {
195
+ "path": "analysis.sunlightHours.reset",
196
+ "namespace": "analysis.sunlightHours",
197
+ "summary": "Clear the sunlight-hours heatmap from the scene.",
198
+ "examplePrompts": [
199
+ "Clear the sunlight heatmap",
200
+ "Remove the sun hours colours from the model",
201
+ "Reset the sunlight analysis view\n\n# Example\n```ts\nawait snaptrude.analysis.sunlightHours.reset()\n```"
202
+ ],
203
+ "argsType": null,
204
+ "resultType": "boolean"
205
+ },
206
+ {
207
+ "path": "analysis.sunpath.disable",
208
+ "namespace": "analysis.sunpath",
209
+ "summary": "Turn the sun-path diagram overlay OFF.",
210
+ "examplePrompts": [
211
+ "Hide the sun path diagram",
212
+ "Turn off the sunpath overlay",
213
+ "Remove the sun trajectory arcs from the scene\n\n# Example\n```ts\nawait snaptrude.analysis.sunpath.disable()\n```"
214
+ ],
215
+ "argsType": null,
216
+ "resultType": "boolean"
217
+ },
218
+ {
219
+ "path": "analysis.sunpath.enable",
220
+ "namespace": "analysis.sunpath",
221
+ "summary": "Turn the sun-path diagram overlay ON.",
222
+ "examplePrompts": [
223
+ "Show the sun path diagram",
224
+ "Turn on the sunpath overlay",
225
+ "Visualize the sun's trajectory over my building\n\n# Example\n```ts\nawait snaptrude.analysis.sunpath.enable()\nconst active = await snaptrude.analysis.sunpath.isActive() // true\n```"
226
+ ],
227
+ "argsType": null,
228
+ "resultType": "boolean"
229
+ },
230
+ {
231
+ "path": "analysis.sunpath.isActive",
232
+ "namespace": "analysis.sunpath",
233
+ "summary": "Whether the sun-path diagram overlay is currently active.",
234
+ "examplePrompts": [
235
+ "Is the sun path diagram on?",
236
+ "Check whether the sunpath overlay is active",
237
+ "Am I looking at the sun trajectory right now?\n\n# Example\n```ts\nif (!(await snaptrude.analysis.sunpath.isActive())) {\nawait snaptrude.analysis.sunpath.enable()\n}\n```"
238
+ ],
239
+ "argsType": null,
240
+ "resultType": "boolean"
241
+ },
2
242
  {
3
243
  "path": "core.buildings.copy",
4
244
  "namespace": "core.buildings",
@@ -110,32 +350,52 @@
110
350
  {
111
351
  "path": "core.comment.create",
112
352
  "namespace": "core.comment",
113
- "summary": "Create a comment.",
114
- "examplePrompts": [],
353
+ "summary": "Create a comment in the project — optionally pinned to a component at a 3D point — with optional",
354
+ "examplePrompts": [
355
+ "Add a comment on this wall saying the height looks wrong",
356
+ "Leave a note on the selected room for the design team",
357
+ "Comment \"verify the door swing\" and tag alex@acme.com",
358
+ "Pin a review note at this point on the slab\n\n# Example\n```ts\nconst c = await snaptrude.core.comment.create(\n\"Check this wall 🎉\",\nspaceId,\nundefined,\n[\"alex@acme.com\"],\n)\n```"
359
+ ],
115
360
  "argsType": "string",
116
361
  "resultType": "CommentHandle"
117
362
  },
118
363
  {
119
364
  "path": "core.comment.delete",
120
365
  "namespace": "core.comment",
121
- "summary": "Delete a comment.",
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": "Whether a comment is resolved.",
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 all (non-deleted) comment handles in the project.",
138
- "examplePrompts": [],
392
+ "summary": "List every comment in the project (deleted ones are excluded), returned as comment handles you can pass to the other comment methods.",
393
+ "examplePrompts": [
394
+ "List all the comments in this project",
395
+ "How many comments are on this model?",
396
+ "Show every note in the file",
397
+ "Get all comments so I can check which are resolved\n\n# Example\n```ts\nconst comments = await snaptrude.core.comment.list()\nconsole.log(`${comments.length} comments in the project`)\n```"
398
+ ],
139
399
  "argsType": null,
140
400
  "resultType": "CommentHandle[]"
141
401
  },
@@ -143,7 +403,12 @@
143
403
  "path": "core.comment.reopen",
144
404
  "namespace": "core.comment",
145
405
  "summary": "Reopen a resolved comment. Paired with {@link PluginCommentApi.resolve}.",
146
- "examplePrompts": [],
406
+ "examplePrompts": [
407
+ "Reopen this resolved comment",
408
+ "Mark the comment as unresolved again",
409
+ "Bring back the closed note about the window heights",
410
+ "Un-resolve that comment so we can keep discussing it\n\n# Example\n```ts\nconst [comment] = await snaptrude.core.comment.list()\nawait snaptrude.core.comment.reopen(comment)\n```"
411
+ ],
147
412
  "argsType": "CommentHandle",
148
413
  "resultType": "boolean"
149
414
  },
@@ -151,7 +416,12 @@
151
416
  "path": "core.comment.resolve",
152
417
  "namespace": "core.comment",
153
418
  "summary": "Mark a comment resolved. Paired with {@link PluginCommentApi.reopen}.",
154
- "examplePrompts": [],
419
+ "examplePrompts": [
420
+ "Mark this comment as resolved",
421
+ "Resolve the comment about the staircase",
422
+ "Close out this review note",
423
+ "Set that comment to done\n\n# Example\n```ts\nconst c = await snaptrude.core.comment.create(\"Verify the door swing\")\nawait snaptrude.core.comment.resolve(c)\n```"
424
+ ],
155
425
  "argsType": "CommentHandle",
156
426
  "resultType": "boolean"
157
427
  },
@@ -159,7 +429,12 @@
159
429
  "path": "core.comment.tag",
160
430
  "namespace": "core.comment",
161
431
  "summary": "Tag (mention) a user on an existing comment, by email.",
162
- "examplePrompts": [],
432
+ "examplePrompts": [
433
+ "Tag alex@acme.com on this comment",
434
+ "Mention the structural engineer in that note",
435
+ "Add priya@studio.com to the comment about the lobby",
436
+ "Notify a teammate about an existing comment\n\n# Example\n```ts\nconst [comment] = await snaptrude.core.comment.list()\nawait snaptrude.core.comment.tag(comment, \"alex@acme.com\")\n```"
437
+ ],
163
438
  "argsType": "CommentHandle",
164
439
  "resultType": "boolean"
165
440
  },
@@ -167,7 +442,12 @@
167
442
  "path": "core.comment.update",
168
443
  "namespace": "core.comment",
169
444
  "summary": "Edit a comment's message (and optional",
170
- "examplePrompts": [],
445
+ "examplePrompts": [
446
+ "Edit my comment to say the beam depth is 600mm",
447
+ "Change the text of this comment",
448
+ "Update the note on the wall and mention priya@studio.com",
449
+ "Reword the comment I just added\n\n# Example\n```ts\nconst c = await snaptrude.core.comment.create(\"Beam depth TBD\")\nawait snaptrude.core.comment.update(c, \"Beam depth is 600mm\", [\"priya@studio.com\"])\n```"
450
+ ],
171
451
  "argsType": "CommentHandle",
172
452
  "resultType": "boolean"
173
453
  },
@@ -175,7 +455,10 @@
175
455
  "path": "core.geom.create.arc",
176
456
  "namespace": "core.geom.create",
177
457
  "summary": "Create a circular arc from its start, end, centre, and axis point handles. Host API call — returns a handle.",
178
- "examplePrompts": [],
458
+ "examplePrompts": [
459
+ "Draw an arc between these two points around a centre",
460
+ "Add a curved segment from A to B"
461
+ ],
179
462
  "argsType": "Vec3Handle",
180
463
  "resultType": "ArcHandle"
181
464
  },
@@ -183,7 +466,10 @@
183
466
  "path": "core.geom.create.circle",
184
467
  "namespace": "core.geom.create",
185
468
  "summary": "Create a circle from a centre point, an axis (plane normal), and a radius. Host API call — returns a handle. A circle is a closed curve; read it back via `snaptrude.core.geom.query.circle.*`.",
186
- "examplePrompts": [],
469
+ "examplePrompts": [
470
+ "Make a circle of radius 2 at this point",
471
+ "Draw a circular outline 5m across"
472
+ ],
187
473
  "argsType": "Vec3Handle",
188
474
  "resultType": "CircleHandle"
189
475
  },
@@ -199,7 +485,10 @@
199
485
  "path": "core.geom.create.contourFromProfiles",
200
486
  "namespace": "core.geom.create",
201
487
  "summary": "Create a contour from an outer profile plus zero or more inner profiles (holes). Host API call — returns a handle.",
202
- "examplePrompts": [],
488
+ "examplePrompts": [
489
+ "Make a shape with a hole in the middle",
490
+ "Cut a courtyard opening out of this floor outline"
491
+ ],
203
492
  "argsType": "ProfileHandle",
204
493
  "resultType": "ContourHandle"
205
494
  },
@@ -207,7 +496,10 @@
207
496
  "path": "core.geom.create.line",
208
497
  "namespace": "core.geom.create",
209
498
  "summary": "Create a straight line segment between two point handles. Host API call — returns a handle.",
210
- "examplePrompts": [],
499
+ "examplePrompts": [
500
+ "Draw a line from point A to point B",
501
+ "Draw a straight edge between these two points"
502
+ ],
211
503
  "argsType": "Vec3Handle",
212
504
  "resultType": "LineHandle"
213
505
  },
@@ -215,7 +507,9 @@
215
507
  "path": "core.geom.create.profileFromCurves",
216
508
  "namespace": "core.geom.create",
217
509
  "summary": "Create a profile from an ordered list of curve handles forming a closed loop. Host API call — returns a handle.",
218
- "examplePrompts": [],
510
+ "examplePrompts": [
511
+ "Join these lines and arcs into one closed shape"
512
+ ],
219
513
  "argsType": "CurveHandle[]",
220
514
  "resultType": "ProfileHandle"
221
515
  },
@@ -223,7 +517,10 @@
223
517
  "path": "core.geom.create.profileFromLinePoints",
224
518
  "namespace": "core.geom.create",
225
519
  "summary": "Create a closed profile from an ordered list of point handles connected by line segments (last auto-connected to first). Host API call — returns a handle.",
226
- "examplePrompts": [],
520
+ "examplePrompts": [
521
+ "Draw a closed polygon through these corner points",
522
+ "Create an L-shaped outline from a list of points"
523
+ ],
227
524
  "argsType": "Vec3Handle[]",
228
525
  "resultType": "ProfileHandle"
229
526
  },
@@ -231,7 +528,10 @@
231
528
  "path": "core.geom.create.profileRect",
232
529
  "namespace": "core.geom.create",
233
530
  "summary": "Create an axis-aligned **rectangle** profile (XZ plane) of `width` × `depth`, centred at `center` (defaults to the origin). Host API call — returns a handle.",
234
- "examplePrompts": [],
531
+ "examplePrompts": [
532
+ "Draw a 4m by 3m rectangle",
533
+ "Make a rectangular outline for a room footprint"
534
+ ],
235
535
  "argsType": "number",
236
536
  "resultType": "ProfileHandle"
237
537
  },
@@ -263,7 +563,10 @@
263
563
  "path": "core.geom.query.arc.getCentre",
264
564
  "namespace": "core.geom.query.arc",
265
565
  "summary": "Read the centre point of an arc.",
266
- "examplePrompts": [],
566
+ "examplePrompts": [
567
+ "Where is the centre of this arc?",
568
+ "Find the center point of the curved wall\n\n# Example\n```ts\nconst start = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst end = await snaptrude.core.math.vec3.new(0, 0, 5)\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst arc = await snaptrude.core.geom.create.arc(start, end, origin, up)\nconst centre = await snaptrude.core.geom.query.arc.getCentre(arc)\nconsole.log(centre.x, centre.y, centre.z)\n```"
569
+ ],
267
570
  "argsType": "ArcHandle",
268
571
  "resultType": "Vec3Components"
269
572
  },
@@ -271,7 +574,10 @@
271
574
  "path": "core.geom.query.arc.getRadius",
272
575
  "namespace": "core.geom.query.arc",
273
576
  "summary": "Read the radius of an arc.",
274
- "examplePrompts": [],
577
+ "examplePrompts": [
578
+ "What is the radius of this curved wall segment?",
579
+ "Measure the radius of the selected arc\n\n# Example\n```ts\nconst start = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst end = await snaptrude.core.math.vec3.new(0, 0, 5)\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst arc = await snaptrude.core.geom.create.arc(start, end, origin, up)\nconst radius = await snaptrude.core.geom.query.arc.getRadius(arc)\n```"
580
+ ],
275
581
  "argsType": "ArcHandle",
276
582
  "resultType": "number"
277
583
  },
@@ -279,7 +585,10 @@
279
585
  "path": "core.geom.query.arc.getSweepAngle",
280
586
  "namespace": "core.geom.query.arc",
281
587
  "summary": "Read the sweep angle of an arc (the angle subtended at its centre).",
282
- "examplePrompts": [],
588
+ "examplePrompts": [
589
+ "What angle does this arc sweep through?",
590
+ "How many degrees does this curved wall turn?\n\n# Example\n```ts\nconst start = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst end = await snaptrude.core.math.vec3.new(0, 0, 5)\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst arc = await snaptrude.core.geom.create.arc(start, end, origin, up)\nconst sweep = await snaptrude.core.geom.query.arc.getSweepAngle(arc)\nconsole.log(\"degrees:\", (sweep * 180) / Math.PI)\n```"
591
+ ],
283
592
  "argsType": "ArcHandle",
284
593
  "resultType": "number"
285
594
  },
@@ -295,7 +604,10 @@
295
604
  "path": "core.geom.query.brep.getBoundingBox",
296
605
  "namespace": "core.geom.query.brep",
297
606
  "summary": "Get the axis-aligned bounding box of a brep.",
298
- "examplePrompts": [],
607
+ "examplePrompts": [
608
+ "What is the bounding box of this shape?",
609
+ "How big is this object overall — give me its min and max extents\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst { min, max } = await snaptrude.core.geom.query.brep.getBoundingBox(brep)\nconsole.log(\"size:\", max.x - min.x, max.y - min.y, max.z - min.z)\n}\n```"
610
+ ],
299
611
  "argsType": "BrepHandle",
300
612
  "resultType": "BBoxComponents"
301
613
  },
@@ -303,7 +615,10 @@
303
615
  "path": "core.geom.query.brep.getCentroid",
304
616
  "namespace": "core.geom.query.brep",
305
617
  "summary": "Get the centroid (mean of all vertex positions) of a brep.",
306
- "examplePrompts": [],
618
+ "examplePrompts": [
619
+ "Find the centre point of this shape",
620
+ "What is the centroid of the selected object?\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst centroid = await snaptrude.core.geom.query.brep.getCentroid(brep)\nconsole.log(centroid.x, centroid.y, centroid.z)\n}\n```"
621
+ ],
307
622
  "argsType": "BrepHandle",
308
623
  "resultType": "Vec3Components"
309
624
  },
@@ -367,7 +682,10 @@
367
682
  "path": "core.geom.query.brep.isEqual",
368
683
  "namespace": "core.geom.query.brep",
369
684
  "summary": "Test whether two breps are geometrically equal.",
370
- "examplePrompts": [],
685
+ "examplePrompts": [
686
+ "Are these two shapes geometrically identical?",
687
+ "Check whether these two objects have the same geometry\n\n# Example\n```ts\nconst [a, b] = await snaptrude.design.query.listMasses()\nconst brepA = await snaptrude.design.query.geometry.getBrep(a)\nconst brepB = await snaptrude.design.query.geometry.getBrep(b)\nif (brepA && brepB) {\nconst same = await snaptrude.core.geom.query.brep.isEqual(brepA, brepB)\n}\n```"
688
+ ],
371
689
  "argsType": "BrepHandle",
372
690
  "resultType": "boolean"
373
691
  },
@@ -407,7 +725,10 @@
407
725
  "path": "core.geom.query.brep.listVertexPositions",
408
726
  "namespace": "core.geom.query.brep",
409
727
  "summary": "List the positions of all vertices in a brep (ordered as {@linkcode PluginGeomQueryBrepApi.listVertices}).",
410
- "examplePrompts": [],
728
+ "examplePrompts": [
729
+ "Get the coordinates of every corner of this shape",
730
+ "Give me all the corner points of the selected mass as XYZ coordinates\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst positions = await snaptrude.core.geom.query.brep.listVertexPositions(brep)\nfor (const p of positions) console.log(p.x, p.y, p.z)\n}\n```"
731
+ ],
411
732
  "argsType": "BrepHandle",
412
733
  "resultType": "Vec3Components[]"
413
734
  },
@@ -431,7 +752,10 @@
431
752
  "path": "core.geom.query.circle.getCentre",
432
753
  "namespace": "core.geom.query.circle",
433
754
  "summary": "Read the centre point of a circle.",
434
- "examplePrompts": [],
755
+ "examplePrompts": [
756
+ "Where is the centre of this circle?",
757
+ "Find the center point of the circular courtyard outline\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst centre = await snaptrude.core.geom.query.circle.getCentre(circle)\nconsole.log(centre.x, centre.y, centre.z)\n```"
758
+ ],
435
759
  "argsType": "CircleHandle",
436
760
  "resultType": "Vec3Components"
437
761
  },
@@ -439,7 +763,10 @@
439
763
  "path": "core.geom.query.circle.getLength",
440
764
  "namespace": "core.geom.query.circle",
441
765
  "summary": "Read the length (circumference, `2πr`) of a circle.",
442
- "examplePrompts": [],
766
+ "examplePrompts": [
767
+ "What is the circumference of this circle?",
768
+ "How long is the circular path around the courtyard?\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst circumference = await snaptrude.core.geom.query.circle.getLength(circle)\n```"
769
+ ],
443
770
  "argsType": "CircleHandle",
444
771
  "resultType": "number"
445
772
  },
@@ -447,7 +774,9 @@
447
774
  "path": "core.geom.query.circle.getNearestPoint",
448
775
  "namespace": "core.geom.query.circle",
449
776
  "summary": "Get the point on a circle nearest to an arbitrary point.",
450
- "examplePrompts": [],
777
+ "examplePrompts": [
778
+ "Find the point on the circle closest to this column\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst target = await snaptrude.core.math.vec3.new(8, 0, 2)\nconst nearest = await snaptrude.core.geom.query.circle.getNearestPoint(circle, target)\nconsole.log(nearest.x, nearest.y, nearest.z)\n```"
779
+ ],
451
780
  "argsType": "CircleHandle",
452
781
  "resultType": "Vec3Components"
453
782
  },
@@ -463,7 +792,9 @@
463
792
  "path": "core.geom.query.circle.getPointAtDistance",
464
793
  "namespace": "core.geom.query.circle",
465
794
  "summary": "Get the point reached by travelling a signed arc-distance along the circle from a reference point that lies on it.",
466
- "examplePrompts": [],
795
+ "examplePrompts": [
796
+ "Mark a point 2 metres along the circle from this point\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst ref = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst ahead = await snaptrude.core.geom.query.circle.getPointAtDistance(circle, ref, 2)\nconst behind = await snaptrude.core.geom.query.circle.getPointAtDistance(circle, ref, 2, false)\n```"
797
+ ],
467
798
  "argsType": "CircleHandle",
468
799
  "resultType": "Vec3Components"
469
800
  },
@@ -471,7 +802,10 @@
471
802
  "path": "core.geom.query.circle.getRadius",
472
803
  "namespace": "core.geom.query.circle",
473
804
  "summary": "Read the radius of a circle.",
474
- "examplePrompts": [],
805
+ "examplePrompts": [
806
+ "What is the radius of this circle?",
807
+ "Measure the radius of the circular column grid\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst radius = await snaptrude.core.geom.query.circle.getRadius(circle)\n```"
808
+ ],
475
809
  "argsType": "CircleHandle",
476
810
  "resultType": "number"
477
811
  },
@@ -487,7 +821,9 @@
487
821
  "path": "core.geom.query.circle.hasPoint",
488
822
  "namespace": "core.geom.query.circle",
489
823
  "summary": "Test whether a point lies on a circle.",
490
- "examplePrompts": [],
824
+ "examplePrompts": [
825
+ "Check whether this point sits on the circle\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst pt = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst onCircle = await snaptrude.core.geom.query.circle.hasPoint(circle, pt)\n```"
826
+ ],
491
827
  "argsType": "CircleHandle",
492
828
  "resultType": "boolean"
493
829
  },
@@ -511,7 +847,10 @@
511
847
  "path": "core.geom.query.circle.listPoints",
512
848
  "namespace": "core.geom.query.circle",
513
849
  "summary": "Sample a circle into an ordered list of points.",
514
- "examplePrompts": [],
850
+ "examplePrompts": [
851
+ "Divide this circle into 12 equal points",
852
+ "Get evenly spaced points around the circle to place columns\n\n# Example\n```ts\nconst origin = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst up = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst circle = await snaptrude.core.geom.create.circle(origin, up, 5)\nconst points = await snaptrude.core.geom.query.circle.listPoints(circle, 12)\nfor (const p of points) console.log(p.x, p.y, p.z)\n```"
853
+ ],
515
854
  "argsType": "CircleHandle",
516
855
  "resultType": "Vec3Components[]"
517
856
  },
@@ -519,7 +858,10 @@
519
858
  "path": "core.geom.query.contour.getArea",
520
859
  "namespace": "core.geom.query.contour",
521
860
  "summary": "Get the (approximate) net enclosed area of a contour — the outer profile area minus the area of every hole.",
522
- "examplePrompts": [],
861
+ "examplePrompts": [
862
+ "What is the area of this shape?",
863
+ "Calculate the usable area of this outline after subtracting its holes\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(6, 4)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 1)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst area = await snaptrude.core.geom.query.contour.getArea(contour) // 24 - 2 = 22\n```"
864
+ ],
523
865
  "argsType": "ContourHandle",
524
866
  "resultType": "number"
525
867
  },
@@ -527,7 +869,9 @@
527
869
  "path": "core.geom.query.contour.getBoundingBox",
528
870
  "namespace": "core.geom.query.contour",
529
871
  "summary": "Get the axis-aligned bounding box of a contour.",
530
- "examplePrompts": [],
872
+ "examplePrompts": [
873
+ "What are the overall extents of this shape?\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst { min, max } = await snaptrude.core.geom.query.contour.getBoundingBox(contour)\nconsole.log(max.x - min.x, max.z - min.z) // 4 3\n```"
874
+ ],
531
875
  "argsType": "ContourHandle",
532
876
  "resultType": "BBoxComponents"
533
877
  },
@@ -535,7 +879,10 @@
535
879
  "path": "core.geom.query.contour.getHoleCount",
536
880
  "namespace": "core.geom.query.contour",
537
881
  "summary": "Get the number of inner profiles (holes) in a contour.",
538
- "examplePrompts": [],
882
+ "examplePrompts": [
883
+ "How many holes does this shape have?",
884
+ "Count the openings in this slab outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(6, 4)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 1)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst count = await snaptrude.core.geom.query.contour.getHoleCount(contour) // 1\n```"
885
+ ],
539
886
  "argsType": "ContourHandle",
540
887
  "resultType": "number"
541
888
  },
@@ -543,7 +890,9 @@
543
890
  "path": "core.geom.query.contour.getNearestPoint",
544
891
  "namespace": "core.geom.query.contour",
545
892
  "summary": "Get the point on a contour nearest to an arbitrary point.",
546
- "examplePrompts": [],
893
+ "examplePrompts": [
894
+ "Find the point on this boundary closest to a given location\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst point = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst nearest = await snaptrude.core.geom.query.contour.getNearestPoint(contour, point)\nconsole.log(nearest.x, nearest.y, nearest.z) // 2 0 0\n```"
895
+ ],
547
896
  "argsType": "ContourHandle",
548
897
  "resultType": "Vec3Components"
549
898
  },
@@ -567,7 +916,10 @@
567
916
  "path": "core.geom.query.contour.getPerimeter",
568
917
  "namespace": "core.geom.query.contour",
569
918
  "summary": "Get the perimeter (total length of every curve) of a contour, including holes.",
570
- "examplePrompts": [],
919
+ "examplePrompts": [
920
+ "What is the perimeter of this shape?",
921
+ "How long is the boundary of this outline, including its holes?\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst perimeter = await snaptrude.core.geom.query.contour.getPerimeter(contour) // 14\n```"
922
+ ],
571
923
  "argsType": "ContourHandle",
572
924
  "resultType": "number"
573
925
  },
@@ -575,7 +927,10 @@
575
927
  "path": "core.geom.query.contour.hasPoint",
576
928
  "namespace": "core.geom.query.contour",
577
929
  "summary": "Test whether a point lies inside a contour (inside the outer profile and outside every hole).",
578
- "examplePrompts": [],
930
+ "examplePrompts": [
931
+ "Is this point inside the shape?",
932
+ "Check whether a location falls within this boundary but not in a hole\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(6, 4)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 1)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst point = await snaptrude.core.math.vec3.new(2.5, 0, 1.5)\nconst inside = await snaptrude.core.geom.query.contour.hasPoint(contour, point) // true — outside the hole\n```"
933
+ ],
579
934
  "argsType": "ContourHandle",
580
935
  "resultType": "boolean"
581
936
  },
@@ -647,7 +1002,9 @@
647
1002
  "path": "core.geom.query.curve.getChordLength",
648
1003
  "namespace": "core.geom.query.curve",
649
1004
  "summary": "Get the straight-line chord length between a curve's endpoints.",
650
- "examplePrompts": [],
1005
+ "examplePrompts": [
1006
+ "What is the straight-line distance between the two ends of this arc?\n\n# Example\n```ts\nconst start = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst end = await snaptrude.core.math.vec3.new(-5, 0, 0)\nconst centre = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst axis = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst arc = await snaptrude.core.geom.create.arc(start, end, centre, axis)\nconst chord = await snaptrude.core.geom.query.curve.getChordLength(arc) // 10 (getLength gives the arc length)\n```"
1007
+ ],
651
1008
  "argsType": "CurveHandle",
652
1009
  "resultType": "number"
653
1010
  },
@@ -655,7 +1012,9 @@
655
1012
  "path": "core.geom.query.curve.getCommonPart",
656
1013
  "namespace": "core.geom.query.curve",
657
1014
  "summary": "Get the common (overlapping) part of two curves.",
658
- "examplePrompts": [],
1015
+ "examplePrompts": [
1016
+ "Get the shared segment where these two edges overlap\n\n# Example\n```ts\nconst p0 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst p5 = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst p10 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst p15 = await snaptrude.core.math.vec3.new(15, 0, 0)\nconst lineA = await snaptrude.core.geom.create.line(p0, p10)\nconst lineB = await snaptrude.core.geom.create.line(p5, p15)\nconst common = await snaptrude.core.geom.query.curve.getCommonPart(lineA, lineB)\nif (common) {\nconst length = await snaptrude.core.geom.query.curve.getLength(common) // 5\n}\n```"
1017
+ ],
659
1018
  "argsType": "CurveHandle",
660
1019
  "resultType": "CurveHandle | null"
661
1020
  },
@@ -671,7 +1030,9 @@
671
1030
  "path": "core.geom.query.curve.getDistanceAlong",
672
1031
  "namespace": "core.geom.query.curve",
673
1032
  "summary": "Get the arc-length distance along a curve between two points on it.",
674
- "examplePrompts": [],
1033
+ "examplePrompts": [
1034
+ "How far apart are these two points measured along the curved wall?\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst mid = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst d = await snaptrude.core.geom.query.curve.getDistanceAlong(line, a, mid) // 5\n```"
1035
+ ],
675
1036
  "argsType": "CurveHandle",
676
1037
  "resultType": "number"
677
1038
  },
@@ -679,7 +1040,10 @@
679
1040
  "path": "core.geom.query.curve.getDistanceBetween",
680
1041
  "namespace": "core.geom.query.curve",
681
1042
  "summary": "Get the perpendicular distance between two parallel lines.",
682
- "examplePrompts": [],
1043
+ "examplePrompts": [
1044
+ "How far apart are these two parallel walls?",
1045
+ "Measure the spacing between these two gridlines\n\n# Example\n```ts\nconst a1 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst a2 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst b1 = await snaptrude.core.math.vec3.new(0, 0, 4)\nconst b2 = await snaptrude.core.math.vec3.new(10, 0, 4)\nconst lineA = await snaptrude.core.geom.create.line(a1, a2)\nconst lineB = await snaptrude.core.geom.create.line(b1, b2)\nconst spacing = await snaptrude.core.geom.query.curve.getDistanceBetween(lineA, lineB) // 4\n```"
1046
+ ],
683
1047
  "argsType": "LineHandle",
684
1048
  "resultType": "number"
685
1049
  },
@@ -687,7 +1051,10 @@
687
1051
  "path": "core.geom.query.curve.getDistanceToPoint",
688
1052
  "namespace": "core.geom.query.curve",
689
1053
  "summary": "Get the shortest distance from an arbitrary point to a curve.",
690
- "examplePrompts": [],
1054
+ "examplePrompts": [
1055
+ "How far is this column from the wall edge?",
1056
+ "What is the shortest distance from this point to the boundary line?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nconst point = await snaptrude.core.math.vec3.new(2, 0, 3)\nif (centerline) {\nconst distance = await snaptrude.core.geom.query.curve.getDistanceToPoint(centerline, point)\n}\n```"
1057
+ ],
691
1058
  "argsType": "CurveHandle",
692
1059
  "resultType": "number"
693
1060
  },
@@ -695,7 +1062,9 @@
695
1062
  "path": "core.geom.query.curve.getEndPoint",
696
1063
  "namespace": "core.geom.query.curve",
697
1064
  "summary": "Get the end point of a curve.",
698
- "examplePrompts": [],
1065
+ "examplePrompts": [
1066
+ "Get the coordinates of the far end of this edge\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst end = await snaptrude.core.geom.query.curve.getEndPoint(line) // { x: 5, y: 0, z: 0 }\n```"
1067
+ ],
699
1068
  "argsType": "CurveHandle",
700
1069
  "resultType": "Vec3Components"
701
1070
  },
@@ -703,7 +1072,10 @@
703
1072
  "path": "core.geom.query.curve.getLength",
704
1073
  "namespace": "core.geom.query.curve",
705
1074
  "summary": "Get the arc-length of a curve.",
706
- "examplePrompts": [],
1075
+ "examplePrompts": [
1076
+ "How long is this wall edge?",
1077
+ "Measure the length of this curved boundary\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst length = await snaptrude.core.geom.query.curve.getLength(centerline)\n}\n```"
1078
+ ],
707
1079
  "argsType": "CurveHandle",
708
1080
  "resultType": "number"
709
1081
  },
@@ -711,7 +1083,9 @@
711
1083
  "path": "core.geom.query.curve.getMergedCurve",
712
1084
  "namespace": "core.geom.query.curve",
713
1085
  "summary": "Merge two curves into a single curve when they are mergeable.",
714
- "examplePrompts": [],
1086
+ "examplePrompts": [
1087
+ "Merge these two line segments into a single line\n\n# Example\n```ts\nconst p0 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst p5 = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst p10 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst lineA = await snaptrude.core.geom.create.line(p0, p5)\nconst lineB = await snaptrude.core.geom.create.line(p5, p10)\nconst merged = await snaptrude.core.geom.query.curve.getMergedCurve(lineA, lineB)\nif (merged) {\nconst length = await snaptrude.core.geom.query.curve.getLength(merged) // 10\n}\n```"
1088
+ ],
715
1089
  "argsType": "CurveHandle",
716
1090
  "resultType": "CurveHandle | null"
717
1091
  },
@@ -719,7 +1093,10 @@
719
1093
  "path": "core.geom.query.curve.getMidPoint",
720
1094
  "namespace": "core.geom.query.curve",
721
1095
  "summary": "Get the mid point of a curve.",
722
- "examplePrompts": [],
1096
+ "examplePrompts": [
1097
+ "Find the midpoint of this wall edge",
1098
+ "Where is the centre of this boundary line?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst mid = await snaptrude.core.geom.query.curve.getMidPoint(centerline)\nconsole.log(mid.x, mid.y, mid.z)\n}\n```"
1099
+ ],
723
1100
  "argsType": "CurveHandle",
724
1101
  "resultType": "Vec3Components"
725
1102
  },
@@ -727,7 +1104,9 @@
727
1104
  "path": "core.geom.query.curve.getNearestPoint",
728
1105
  "namespace": "core.geom.query.curve",
729
1106
  "summary": "Get the point on a curve nearest to an arbitrary point.",
730
- "examplePrompts": [],
1107
+ "examplePrompts": [
1108
+ "Find the point on this edge closest to the column\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nconst reference = await snaptrude.core.math.vec3.new(2, 0, 3)\nif (centerline) {\nconst nearest = await snaptrude.core.geom.query.curve.getNearestPoint(centerline, reference)\n}\n```"
1109
+ ],
731
1110
  "argsType": "CurveHandle",
732
1111
  "resultType": "Vec3Components"
733
1112
  },
@@ -751,7 +1130,10 @@
751
1130
  "path": "core.geom.query.curve.getPointAtDistance",
752
1131
  "namespace": "core.geom.query.curve",
753
1132
  "summary": "Get the point at a given distance along a curve from a reference point.",
754
- "examplePrompts": [],
1133
+ "examplePrompts": [
1134
+ "Find the point 2 metres along this edge from the corner",
1135
+ "Mark a spot 900mm from the start of the wall edge\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst p = await snaptrude.core.geom.query.curve.getPointAtDistance(line, a, 2) // { x: 2, y: 0, z: 0 }\nconst q = await snaptrude.core.geom.query.curve.getPointAtDistance(line, b, 2, false) // measured backwards from the end\n```"
1136
+ ],
755
1137
  "argsType": "CurveHandle",
756
1138
  "resultType": "Vec3Components"
757
1139
  },
@@ -767,7 +1149,10 @@
767
1149
  "path": "core.geom.query.curve.getShortestGap",
768
1150
  "namespace": "core.geom.query.curve",
769
1151
  "summary": "Get the shortest gap between two curves, optionally including their endpoints.",
770
- "examplePrompts": [],
1152
+ "examplePrompts": [
1153
+ "What is the gap between these two wall edges?",
1154
+ "How close do these two curves get to each other?\n\n# Example\n```ts\nconst a1 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst a2 = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst b1 = await snaptrude.core.math.vec3.new(0, 0, 2)\nconst b2 = await snaptrude.core.math.vec3.new(5, 0, 2)\nconst curveA = await snaptrude.core.geom.create.line(a1, a2)\nconst curveB = await snaptrude.core.geom.create.line(b1, b2)\nconst gap = await snaptrude.core.geom.query.curve.getShortestGap(curveA, curveB) // 2\n```"
1155
+ ],
771
1156
  "argsType": "CurveHandle",
772
1157
  "resultType": "number"
773
1158
  },
@@ -775,7 +1160,9 @@
775
1160
  "path": "core.geom.query.curve.getStartPoint",
776
1161
  "namespace": "core.geom.query.curve",
777
1162
  "summary": "Get the start point of a curve.",
778
- "examplePrompts": [],
1163
+ "examplePrompts": [
1164
+ "Where does this wall edge start?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst start = await snaptrude.core.geom.query.curve.getStartPoint(centerline)\nconsole.log(start.x, start.y, start.z)\n}\n```"
1165
+ ],
779
1166
  "argsType": "CurveHandle",
780
1167
  "resultType": "Vec3Components"
781
1168
  },
@@ -799,7 +1186,9 @@
799
1186
  "path": "core.geom.query.curve.isContinuous",
800
1187
  "namespace": "core.geom.query.curve",
801
1188
  "summary": "Test whether two curves are continuous (share an endpoint without a gap).",
802
- "examplePrompts": [],
1189
+ "examplePrompts": [
1190
+ "Do these two edges connect end to end without a gap?\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst c = await snaptrude.core.math.vec3.new(5, 0, 5)\nconst lineA = await snaptrude.core.geom.create.line(a, b)\nconst lineB = await snaptrude.core.geom.create.line(b, c)\nconst connected = await snaptrude.core.geom.query.curve.isContinuous(lineA, lineB) // true\n```"
1191
+ ],
803
1192
  "argsType": "CurveHandle",
804
1193
  "resultType": "boolean"
805
1194
  },
@@ -815,7 +1204,9 @@
815
1204
  "path": "core.geom.query.curve.isLinear",
816
1205
  "namespace": "core.geom.query.curve",
817
1206
  "summary": "Test whether a curve is a straight line.",
818
- "examplePrompts": [],
1207
+ "examplePrompts": [
1208
+ "Is this edge straight or curved?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst straight = await snaptrude.core.geom.query.curve.isLinear(centerline)\n}\n```"
1209
+ ],
819
1210
  "argsType": "CurveHandle",
820
1211
  "resultType": "boolean"
821
1212
  },
@@ -823,7 +1214,9 @@
823
1214
  "path": "core.geom.query.curve.isOnCurve",
824
1215
  "namespace": "core.geom.query.curve",
825
1216
  "summary": "Test whether a point lies on a curve within an optional threshold.",
826
- "examplePrompts": [],
1217
+ "examplePrompts": [
1218
+ "Check whether this point lies on the wall edge\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst point = await snaptrude.core.math.vec3.new(5, 0, 0.005)\nconst on = await snaptrude.core.geom.query.curve.isOnCurve(line, point, 0.01) // true within tolerance\n```"
1219
+ ],
827
1220
  "argsType": "CurveHandle",
828
1221
  "resultType": "boolean"
829
1222
  },
@@ -831,7 +1224,9 @@
831
1224
  "path": "core.geom.query.curve.isOverlapping",
832
1225
  "namespace": "core.geom.query.curve",
833
1226
  "summary": "Test whether two curves overlap (share a collinear/concentric span), optionally including their endpoints.",
834
- "examplePrompts": [],
1227
+ "examplePrompts": [
1228
+ "Do these two wall edges overlap?\n\n# Example\n```ts\nconst p0 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst p5 = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst p10 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst p15 = await snaptrude.core.math.vec3.new(15, 0, 0)\nconst lineA = await snaptrude.core.geom.create.line(p0, p10)\nconst lineB = await snaptrude.core.geom.create.line(p5, p15)\nconst overlaps = await snaptrude.core.geom.query.curve.isOverlapping(lineA, lineB) // true (share the 5..10 span)\n```"
1229
+ ],
835
1230
  "argsType": "CurveHandle",
836
1231
  "resultType": "boolean"
837
1232
  },
@@ -839,7 +1234,10 @@
839
1234
  "path": "core.geom.query.curve.isParallel",
840
1235
  "namespace": "core.geom.query.curve",
841
1236
  "summary": "Test whether two lines are parallel within an optional tolerance.",
842
- "examplePrompts": [],
1237
+ "examplePrompts": [
1238
+ "Are these two walls parallel?",
1239
+ "Check if these gridlines run parallel to each other\n\n# Example\n```ts\nconst a1 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst a2 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst b1 = await snaptrude.core.math.vec3.new(0, 0, 3)\nconst b2 = await snaptrude.core.math.vec3.new(10, 0, 3)\nconst lineA = await snaptrude.core.geom.create.line(a1, a2)\nconst lineB = await snaptrude.core.geom.create.line(b1, b2)\nconst parallel = await snaptrude.core.geom.query.curve.isParallel(lineA, lineB) // true\n```"
1240
+ ],
843
1241
  "argsType": "LineHandle",
844
1242
  "resultType": "boolean"
845
1243
  },
@@ -847,7 +1245,10 @@
847
1245
  "path": "core.geom.query.curve.listIntersections",
848
1246
  "namespace": "core.geom.query.curve",
849
1247
  "summary": "List the intersection points between two curves.",
850
- "examplePrompts": [],
1248
+ "examplePrompts": [
1249
+ "Where do these two lines cross?",
1250
+ "Find the intersection points of these two gridlines\n\n# Example\n```ts\nconst a1 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst a2 = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst b1 = await snaptrude.core.math.vec3.new(5, 0, -5)\nconst b2 = await snaptrude.core.math.vec3.new(5, 0, 5)\nconst lineA = await snaptrude.core.geom.create.line(a1, a2)\nconst lineB = await snaptrude.core.geom.create.line(b1, b2)\nconst points = await snaptrude.core.geom.query.curve.listIntersections(lineA, lineB) // [{ x: 5, y: 0, z: 0 }]\nconst unbounded = await snaptrude.core.geom.query.curve.listIntersections(lineA, lineB, false, false) // treat both as infinite\n```"
1251
+ ],
851
1252
  "argsType": "CurveHandle",
852
1253
  "resultType": "Vec3Components[]"
853
1254
  },
@@ -863,7 +1264,10 @@
863
1264
  "path": "core.geom.query.curve.listSubdivisions",
864
1265
  "namespace": "core.geom.query.curve",
865
1266
  "summary": "List the points produced by subdividing a curve into equal segments.",
866
- "examplePrompts": [],
1267
+ "examplePrompts": [
1268
+ "Divide this edge into 5 equal segments",
1269
+ "Split the wall line into equal parts for placing columns\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst centerline = await snaptrude.design.query.geometry.getCenterline(wall)\nif (centerline) {\nconst points = await snaptrude.core.geom.query.curve.listSubdivisions(centerline, 5)\n}\n```"
1270
+ ],
867
1271
  "argsType": "CurveHandle",
868
1272
  "resultType": "Vec3Components[]"
869
1273
  },
@@ -951,7 +1355,9 @@
951
1355
  "path": "core.geom.query.face.hasHoles",
952
1356
  "namespace": "core.geom.query.face",
953
1357
  "summary": "Test whether a face has any holes.",
954
- "examplePrompts": [],
1358
+ "examplePrompts": [
1359
+ "Does this face have any holes cut into it?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst brep = await snaptrude.design.query.geometry.getBrep(wall)\nif (brep) {\nconst [face] = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst pierced = await snaptrude.core.geom.query.face.hasHoles(face)\n}\n```"
1360
+ ],
955
1361
  "argsType": "FaceHandle",
956
1362
  "resultType": "boolean"
957
1363
  },
@@ -959,7 +1365,10 @@
959
1365
  "path": "core.geom.query.face.listAdjacentFaces",
960
1366
  "namespace": "core.geom.query.face",
961
1367
  "summary": "List the faces adjacent to a face (sharing an edge). Boundary edges are skipped.",
962
- "examplePrompts": [],
1368
+ "examplePrompts": [
1369
+ "Which faces are next to this one?",
1370
+ "Find the faces that share an edge with the selected face\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst [face] = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst neighbours = await snaptrude.core.geom.query.face.listAdjacentFaces(face)\n}\n```"
1371
+ ],
963
1372
  "argsType": "FaceHandle",
964
1373
  "resultType": "FaceHandle[]"
965
1374
  },
@@ -999,7 +1408,10 @@
999
1408
  "path": "core.geom.query.face.listVertexPositions",
1000
1409
  "namespace": "core.geom.query.face",
1001
1410
  "summary": "List the positions of a face's outer-loop vertices (needs the parent brep for coordinates).",
1002
- "examplePrompts": [],
1411
+ "examplePrompts": [
1412
+ "What are the corner coordinates of this face?",
1413
+ "Get the boundary points of the selected face\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst brep = await snaptrude.design.query.geometry.getBrep(wall)\nif (brep) {\nconst [face] = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst corners = await snaptrude.core.geom.query.face.listVertexPositions(face, brep)\nfor (const p of corners) console.log(p.x, p.y, p.z)\n}\n```"
1414
+ ],
1003
1415
  "argsType": "FaceHandle",
1004
1416
  "resultType": "Vec3Components[]"
1005
1417
  },
@@ -1007,7 +1419,9 @@
1007
1419
  "path": "core.geom.query.face.listVertexPositionsWithCurves",
1008
1420
  "namespace": "core.geom.query.face",
1009
1421
  "summary": "List the tessellated boundary points of a face's outer loop (arcs sampled, sense-corrected). Not cardinality-equal to {@linkcode PluginGeomQueryFaceApi.listVertexPositions}.",
1010
- "examplePrompts": [],
1422
+ "examplePrompts": [
1423
+ "Trace the outline of this face including its curved edges\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst brep = await snaptrude.design.query.geometry.getBrep(wall)\nif (brep) {\nconst [face] = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst outline = await snaptrude.core.geom.query.face.listVertexPositionsWithCurves(face)\n}\n```"
1424
+ ],
1011
1425
  "argsType": "FaceHandle",
1012
1426
  "resultType": "Vec3Components[]"
1013
1427
  },
@@ -1087,7 +1501,10 @@
1087
1501
  "path": "core.geom.query.profile.getArea",
1088
1502
  "namespace": "core.geom.query.profile",
1089
1503
  "summary": "Get the (approximate) enclosed area of a profile.",
1090
- "examplePrompts": [],
1504
+ "examplePrompts": [
1505
+ "What is the area enclosed by this outline?",
1506
+ "Measure the area of this shape\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst area = await snaptrude.core.geom.query.profile.getArea(rect) // 12\n```"
1507
+ ],
1091
1508
  "argsType": "ProfileHandle",
1092
1509
  "resultType": "number"
1093
1510
  },
@@ -1095,7 +1512,9 @@
1095
1512
  "path": "core.geom.query.profile.getBoundingBox",
1096
1513
  "namespace": "core.geom.query.profile",
1097
1514
  "summary": "Get the axis-aligned bounding box of a profile.",
1098
- "examplePrompts": [],
1515
+ "examplePrompts": [
1516
+ "How wide and long is this outline overall?\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst { min, max } = await snaptrude.core.geom.query.profile.getBoundingBox(rect)\nconsole.log(max.x - min.x, max.z - min.z) // 4 3\n```"
1517
+ ],
1099
1518
  "argsType": "ProfileHandle",
1100
1519
  "resultType": "BBoxComponents"
1101
1520
  },
@@ -1103,7 +1522,9 @@
1103
1522
  "path": "core.geom.query.profile.getNearestPoint",
1104
1523
  "namespace": "core.geom.query.profile",
1105
1524
  "summary": "Get the point on a profile nearest to an arbitrary point.",
1106
- "examplePrompts": [],
1525
+ "examplePrompts": [
1526
+ "Find the closest point on this outline to a given point\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst point = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst nearest = await snaptrude.core.geom.query.profile.getNearestPoint(rect, point)\nconsole.log(nearest.x, nearest.y, nearest.z) // 2 0 0\n```"
1527
+ ],
1107
1528
  "argsType": "ProfileHandle",
1108
1529
  "resultType": "Vec3Components"
1109
1530
  },
@@ -1119,7 +1540,10 @@
1119
1540
  "path": "core.geom.query.profile.getPerimeter",
1120
1541
  "namespace": "core.geom.query.profile",
1121
1542
  "summary": "Get the perimeter (total curve length) of a profile.",
1122
- "examplePrompts": [],
1543
+ "examplePrompts": [
1544
+ "How long is the boundary of this shape in total?",
1545
+ "Measure the perimeter of this outline\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst perimeter = await snaptrude.core.geom.query.profile.getPerimeter(rect) // 14\n```"
1546
+ ],
1123
1547
  "argsType": "ProfileHandle",
1124
1548
  "resultType": "number"
1125
1549
  },
@@ -1127,7 +1551,10 @@
1127
1551
  "path": "core.geom.query.profile.hasPoint",
1128
1552
  "namespace": "core.geom.query.profile",
1129
1553
  "summary": "Test whether a point lies inside a profile.",
1130
- "examplePrompts": [],
1554
+ "examplePrompts": [
1555
+ "Does this point fall inside the outline?",
1556
+ "Check if the column location lies within this room boundary\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst point = await snaptrude.core.math.vec3.new(1, 0, 1)\nconst inside = await snaptrude.core.geom.query.profile.hasPoint(rect, point) // true\n```"
1557
+ ],
1131
1558
  "argsType": "ProfileHandle",
1132
1559
  "resultType": "boolean"
1133
1560
  },
@@ -1143,7 +1570,10 @@
1143
1570
  "path": "core.geom.query.profile.isClosed",
1144
1571
  "namespace": "core.geom.query.profile",
1145
1572
  "summary": "Test whether a profile forms a closed loop.",
1146
- "examplePrompts": [],
1573
+ "examplePrompts": [
1574
+ "Is my sketch outline closed or still open?",
1575
+ "Check whether this boundary forms a complete loop\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst closed = await snaptrude.core.geom.query.profile.isClosed(rect) // true\n```"
1576
+ ],
1147
1577
  "argsType": "ProfileHandle",
1148
1578
  "resultType": "boolean"
1149
1579
  },
@@ -1199,7 +1629,10 @@
1199
1629
  "path": "core.geom.query.profile.listPoints",
1200
1630
  "namespace": "core.geom.query.profile",
1201
1631
  "summary": "List the tessellated points along a profile.",
1202
- "examplePrompts": [],
1632
+ "examplePrompts": [
1633
+ "Give me the corner coordinates of this shape",
1634
+ "List the vertex points along this outline\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst points = await snaptrude.core.geom.query.profile.listPoints(rect)\nfor (const p of points) console.log(p.x, p.y, p.z)\n```"
1635
+ ],
1203
1636
  "argsType": "ProfileHandle",
1204
1637
  "resultType": "Vec3Components[]"
1205
1638
  },
@@ -1223,7 +1656,10 @@
1223
1656
  "path": "core.geom.query.vertex.getPosition",
1224
1657
  "namespace": "core.geom.query.vertex",
1225
1658
  "summary": "Get the position of a vertex (needs the parent brep for coordinates).",
1226
- "examplePrompts": [],
1659
+ "examplePrompts": [
1660
+ "What are the coordinates of this corner point?",
1661
+ "Get the exact x, y, z position of the selected vertex\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst brep = await snaptrude.design.query.geometry.getBrep(wall)\nif (brep) {\nconst [vertex] = await snaptrude.core.geom.query.brep.listVertices(brep)\nconst pos = await snaptrude.core.geom.query.vertex.getPosition(brep, vertex)\nconsole.log(pos.x, pos.y, pos.z)\n}\n```"
1662
+ ],
1227
1663
  "argsType": "BrepHandle",
1228
1664
  "resultType": "Vec3Components"
1229
1665
  },
@@ -1263,7 +1699,10 @@
1263
1699
  "path": "core.geom.update.contour.addHole",
1264
1700
  "namespace": "core.geom.update.contour",
1265
1701
  "summary": "Add a hole to a contour by appending an inner profile. Immutable — returns a NEW contour and leaves the input unchanged.",
1266
- "examplePrompts": [],
1702
+ "examplePrompts": [
1703
+ "Cut a hole in this shape",
1704
+ "Punch an opening through this floor outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(10, 8)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(outer)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 2)\nconst withHole = await snaptrude.core.geom.update.contour.addHole(contour, hole)\nconst count = await snaptrude.core.geom.query.contour.getHoleCount(withHole) // 1\n```"
1705
+ ],
1267
1706
  "argsType": "ContourHandle",
1268
1707
  "resultType": "ContourHandle"
1269
1708
  },
@@ -1271,7 +1710,10 @@
1271
1710
  "path": "core.geom.update.contour.mirror",
1272
1711
  "namespace": "core.geom.update.contour",
1273
1712
  "summary": "Mirror a contour across a plane. Immutable — returns a NEW contour and leaves the input unchanged.",
1274
- "examplePrompts": [],
1713
+ "examplePrompts": [
1714
+ "Mirror this shape across the gridline",
1715
+ "Flip this outline to its mirror image\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst point = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst normal = await snaptrude.core.math.vec3.new(1, 0, 0)\nconst mirrored = await snaptrude.core.geom.update.contour.mirror(contour, { point, normal })\n```"
1716
+ ],
1275
1717
  "argsType": "ContourHandle",
1276
1718
  "resultType": "ContourHandle"
1277
1719
  },
@@ -1279,7 +1721,10 @@
1279
1721
  "path": "core.geom.update.contour.move",
1280
1722
  "namespace": "core.geom.update.contour",
1281
1723
  "summary": "Translate a contour by a vector. Immutable — returns a NEW contour and leaves the input unchanged.",
1282
- "examplePrompts": [],
1724
+ "examplePrompts": [
1725
+ "Move this shape 2 metres to the right",
1726
+ "Shift this outline over by 5 feet\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst shift = await snaptrude.core.math.vec3.new(2, 0, 0)\nconst moved = await snaptrude.core.geom.update.contour.move(contour, shift)\n```"
1727
+ ],
1283
1728
  "argsType": "ContourHandle",
1284
1729
  "resultType": "ContourHandle"
1285
1730
  },
@@ -1287,7 +1732,10 @@
1287
1732
  "path": "core.geom.update.contour.offset",
1288
1733
  "namespace": "core.geom.update.contour",
1289
1734
  "summary": "Offset a contour inward/outward by a signed distance. Immutable — returns a NEW contour and leaves the input unchanged.",
1290
- "examplePrompts": [],
1735
+ "examplePrompts": [
1736
+ "Offset this boundary 500mm inward",
1737
+ "Shrink this floor outline by half a metre all around\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(10, 8)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst inset = await snaptrude.core.geom.update.contour.offset(contour, -0.5)\nconst area = await snaptrude.core.geom.query.contour.getArea(inset)\n```"
1738
+ ],
1291
1739
  "argsType": "ContourHandle",
1292
1740
  "resultType": "ContourHandle"
1293
1741
  },
@@ -1295,7 +1743,10 @@
1295
1743
  "path": "core.geom.update.contour.removeHole",
1296
1744
  "namespace": "core.geom.update.contour",
1297
1745
  "summary": "Remove a hole from a contour by inner-profile index. Immutable — returns a NEW contour and leaves the input unchanged.",
1298
- "examplePrompts": [],
1746
+ "examplePrompts": [
1747
+ "Remove the hole from this shape",
1748
+ "Fill in the opening in this floor outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(10, 8)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 2)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst solid = await snaptrude.core.geom.update.contour.removeHole(contour, 0)\n```"
1749
+ ],
1299
1750
  "argsType": "ContourHandle",
1300
1751
  "resultType": "ContourHandle"
1301
1752
  },
@@ -1303,7 +1754,10 @@
1303
1754
  "path": "core.geom.update.contour.rotate",
1304
1755
  "namespace": "core.geom.update.contour",
1305
1756
  "summary": "Rotate a contour about an axis through an optional pivot. Immutable — returns a NEW contour and leaves the input unchanged.",
1306
- "examplePrompts": [],
1757
+ "examplePrompts": [
1758
+ "Rotate this shape 45 degrees",
1759
+ "Turn this outline 90 degrees about its corner\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst axis = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst pivot = await snaptrude.core.math.vec3.new(3, 0, 2)\nconst rotated = await snaptrude.core.geom.update.contour.rotate(contour, axis, Math.PI / 4, pivot)\n```"
1760
+ ],
1307
1761
  "argsType": "ContourHandle",
1308
1762
  "resultType": "ContourHandle"
1309
1763
  },
@@ -1311,7 +1765,10 @@
1311
1765
  "path": "core.geom.update.contour.scale",
1312
1766
  "namespace": "core.geom.update.contour",
1313
1767
  "summary": "Scale a contour uniformly or per-axis about an optional pivot. Immutable — returns a NEW contour and leaves the input unchanged.",
1314
- "examplePrompts": [],
1768
+ "examplePrompts": [
1769
+ "Scale this shape up by a factor of 2",
1770
+ "Make this outline half its current size\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst doubled = await snaptrude.core.geom.update.contour.scale(contour, 2)\nconst stretched = await snaptrude.core.geom.update.contour.scale(contour, { x: 2, y: 1, z: 1 })\n```"
1771
+ ],
1315
1772
  "argsType": "ContourHandle",
1316
1773
  "resultType": "ContourHandle"
1317
1774
  },
@@ -1319,7 +1776,10 @@
1319
1776
  "path": "core.geom.update.curve.extend",
1320
1777
  "namespace": "core.geom.update.curve",
1321
1778
  "summary": "Extend a curve by a distance from one of its ends. Host API call — returns a handle.",
1322
- "examplePrompts": [],
1779
+ "examplePrompts": [
1780
+ "Extend this line by 1 metre",
1781
+ "Lengthen this edge from its start point\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(5, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst longer = await snaptrude.core.geom.update.curve.extend(line, 1, false)\nconst length = await snaptrude.core.geom.query.curve.getLength(longer) // 6\n```"
1782
+ ],
1323
1783
  "argsType": "CurveHandle",
1324
1784
  "resultType": "CurveHandle"
1325
1785
  },
@@ -1327,7 +1787,10 @@
1327
1787
  "path": "core.geom.update.curve.offset",
1328
1788
  "namespace": "core.geom.update.curve",
1329
1789
  "summary": "Offset a curve by a translation vector. Host API call — returns a handle.",
1330
- "examplePrompts": [],
1790
+ "examplePrompts": [
1791
+ "Offset this line 500mm to the side",
1792
+ "Shift this edge over to make a parallel copy\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(8, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst sideways = await snaptrude.core.math.vec3.new(0, 0, 0.5)\nconst parallel = await snaptrude.core.geom.update.curve.offset(line, sideways)\n```"
1793
+ ],
1331
1794
  "argsType": "CurveHandle",
1332
1795
  "resultType": "CurveHandle"
1333
1796
  },
@@ -1343,7 +1806,10 @@
1343
1806
  "path": "core.geom.update.curve.split",
1344
1807
  "namespace": "core.geom.update.curve",
1345
1808
  "summary": "Split a curve at a point into separate segments. Host API call — returns handles.",
1346
- "examplePrompts": [],
1809
+ "examplePrompts": [
1810
+ "Split this line at its midpoint",
1811
+ "Break this edge into two pieces where it meets the gridline\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(6, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst mid = await snaptrude.core.math.vec3.new(3, 0, 0)\nconst [left, right] = await snaptrude.core.geom.update.curve.split(line, mid)\n```"
1812
+ ],
1347
1813
  "argsType": "CurveHandle",
1348
1814
  "resultType": "CurveHandle[]"
1349
1815
  },
@@ -1351,7 +1817,10 @@
1351
1817
  "path": "core.geom.update.curve.trim",
1352
1818
  "namespace": "core.geom.update.curve",
1353
1819
  "summary": "Trim a curve to the portion between two parameter values. Host API call — returns a handle.",
1354
- "examplePrompts": [],
1820
+ "examplePrompts": [
1821
+ "Trim this line back to a shorter segment",
1822
+ "Keep only the middle portion of this curve\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(10, 0, 0)\nconst line = await snaptrude.core.geom.create.line(a, b)\nconst middle = await snaptrude.core.geom.update.curve.trim(line, 0.25, 0.75)\n```"
1823
+ ],
1355
1824
  "argsType": "CurveHandle",
1356
1825
  "resultType": "CurveHandle"
1357
1826
  },
@@ -1367,7 +1836,10 @@
1367
1836
  "path": "core.geom.update.profile.mirror",
1368
1837
  "namespace": "core.geom.update.profile",
1369
1838
  "summary": "Mirror a profile across a plane. Immutable — returns a NEW profile and leaves the input unchanged.",
1370
- "examplePrompts": [],
1839
+ "examplePrompts": [
1840
+ "Mirror this outline across the vertical plane",
1841
+ "Flip this boundary to its mirror image\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst point = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst normal = await snaptrude.core.math.vec3.new(1, 0, 0)\nconst mirrored = await snaptrude.core.geom.update.profile.mirror(rect, { point, normal })\n```"
1842
+ ],
1371
1843
  "argsType": "ProfileHandle",
1372
1844
  "resultType": "ProfileHandle"
1373
1845
  },
@@ -1375,7 +1847,10 @@
1375
1847
  "path": "core.geom.update.profile.move",
1376
1848
  "namespace": "core.geom.update.profile",
1377
1849
  "summary": "Translate a profile by a vector. Immutable — returns a NEW profile and leaves the input unchanged.",
1378
- "examplePrompts": [],
1850
+ "examplePrompts": [
1851
+ "Move this outline 3 metres along the x axis",
1852
+ "Shift this boundary to a new position\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst shift = await snaptrude.core.math.vec3.new(3, 0, 0)\nconst moved = await snaptrude.core.geom.update.profile.move(rect, shift)\n```"
1853
+ ],
1379
1854
  "argsType": "ProfileHandle",
1380
1855
  "resultType": "ProfileHandle"
1381
1856
  },
@@ -1383,7 +1858,10 @@
1383
1858
  "path": "core.geom.update.profile.offset",
1384
1859
  "namespace": "core.geom.update.profile",
1385
1860
  "summary": "Offset a closed profile inward/outward by a signed distance. Immutable — returns a NEW profile and leaves the input unchanged.",
1386
- "examplePrompts": [],
1861
+ "examplePrompts": [
1862
+ "Offset this outline 300mm inward",
1863
+ "Inset this boundary by a foot all around\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(10, 8)\nconst inset = await snaptrude.core.geom.update.profile.offset(rect, -0.3)\nconst area = await snaptrude.core.geom.query.profile.getArea(inset)\n```"
1864
+ ],
1387
1865
  "argsType": "ProfileHandle",
1388
1866
  "resultType": "ProfileHandle"
1389
1867
  },
@@ -1407,7 +1885,10 @@
1407
1885
  "path": "core.geom.update.profile.rotate",
1408
1886
  "namespace": "core.geom.update.profile",
1409
1887
  "summary": "Rotate a profile about an axis through an optional pivot. Immutable — returns a NEW profile and leaves the input unchanged.",
1410
- "examplePrompts": [],
1888
+ "examplePrompts": [
1889
+ "Rotate this outline 30 degrees",
1890
+ "Turn this boundary about its centre point\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst axis = await snaptrude.core.math.vec3.new(0, 1, 0)\nconst rotated = await snaptrude.core.geom.update.profile.rotate(rect, axis, Math.PI / 6)\n```"
1891
+ ],
1411
1892
  "argsType": "ProfileHandle",
1412
1893
  "resultType": "ProfileHandle"
1413
1894
  },
@@ -1415,7 +1896,10 @@
1415
1896
  "path": "core.geom.update.profile.scale",
1416
1897
  "namespace": "core.geom.update.profile",
1417
1898
  "summary": "Scale a profile uniformly or per-axis about an optional pivot. Immutable — returns a NEW profile and leaves the input unchanged.",
1418
- "examplePrompts": [],
1899
+ "examplePrompts": [
1900
+ "Scale this outline down to half size",
1901
+ "Enlarge this boundary by 50 percent\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(6, 4)\nconst half = await snaptrude.core.geom.update.profile.scale(rect, 0.5)\nconst stretched = await snaptrude.core.geom.update.profile.scale(rect, { x: 2, y: 1, z: 1 })\n```"
1902
+ ],
1419
1903
  "argsType": "ProfileHandle",
1420
1904
  "resultType": "ProfileHandle"
1421
1905
  },
@@ -1423,7 +1907,10 @@
1423
1907
  "path": "core.geom.update.profile.simplify",
1424
1908
  "namespace": "core.geom.update.profile",
1425
1909
  "summary": "Simplify a profile by merging collinear/redundant segments. Immutable — returns a NEW profile and leaves the input unchanged.",
1426
- "examplePrompts": [],
1910
+ "examplePrompts": [
1911
+ "Clean up this outline by merging collinear segments",
1912
+ "Simplify this polyline and remove redundant points\n\n# Example\n```ts\nconst p0 = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst p1 = await snaptrude.core.math.vec3.new(2, 0, 0) // collinear with p0 and p2\nconst p2 = await snaptrude.core.math.vec3.new(4, 0, 0)\nconst p3 = await snaptrude.core.math.vec3.new(4, 0, 3)\nconst jagged = await snaptrude.core.geom.create.profileFromLinePoints([p0, p1, p2, p3])\nconst clean = await snaptrude.core.geom.update.profile.simplify(jagged)\nconst curves = await snaptrude.core.geom.query.profile.listCurves(clean) // p0→p2 merged\n```"
1913
+ ],
1427
1914
  "argsType": "ProfileHandle",
1428
1915
  "resultType": "ProfileHandle"
1429
1916
  },
@@ -1440,117 +1927,553 @@
1440
1927
  "resultType": "PluginCoreGroupsCreateResult"
1441
1928
  },
1442
1929
  {
1443
- "path": "core.groups.delete",
1444
- "namespace": "core.groups",
1445
- "summary": "Delete (dissolve) a group.",
1930
+ "path": "core.groups.delete",
1931
+ "namespace": "core.groups",
1932
+ "summary": "Delete (dissolve) a group.",
1933
+ "examplePrompts": [
1934
+ "Ungroup group-12",
1935
+ "Dissolve this group but keep its contents",
1936
+ "Delete the group without deleting its members\n\n# Example\n```ts\nawait snaptrude.core.groups.delete(\"group-12\")\n```"
1937
+ ],
1938
+ "argsType": "string",
1939
+ "resultType": "PluginCoreGroupsDeleteResult"
1940
+ },
1941
+ {
1942
+ "path": "core.groups.get",
1943
+ "namespace": "core.groups",
1944
+ "summary": "Get a single group by id.",
1945
+ "examplePrompts": [
1946
+ "Get the group with id group-12",
1947
+ "Look up a single group by its id",
1948
+ "Is group-3 locked and how many members does it have?\n\n# Example\n```ts\nconst group = await snaptrude.core.groups.get(\"group-12\")\nif (group) console.log(group.name, group.memberCount)\n```"
1949
+ ],
1950
+ "argsType": "string",
1951
+ "resultType": "PluginCoreGroupsGetResult"
1952
+ },
1953
+ {
1954
+ "path": "core.groups.getBounds",
1955
+ "namespace": "core.groups",
1956
+ "summary": "Get the axis-aligned bounds of a group.",
1957
+ "examplePrompts": [
1958
+ "How big is this group?",
1959
+ "Get the bounding box of group-12",
1960
+ "Where is the center of this group?\n\n# Example\n```ts\nconst bounds = await snaptrude.core.groups.getBounds(\"group-12\")\nif (bounds) console.log(bounds.center.x, bounds.center.y, bounds.center.z)\n```"
1961
+ ],
1962
+ "argsType": "string",
1963
+ "resultType": "PluginCoreGroupsGetBoundsResult"
1964
+ },
1965
+ {
1966
+ "path": "core.groups.getForComponent",
1967
+ "namespace": "core.groups",
1968
+ "summary": "Get the group a component belongs to.",
1969
+ "examplePrompts": [
1970
+ "Which group is this wall in?",
1971
+ "Find the group that contains component cmp_42",
1972
+ "Is this element grouped, and if so which group?\n\n# Example\n```ts\nconst group = await snaptrude.core.groups.getForComponent(\"cmp_42\")\nconsole.log(group ? group.name : \"ungrouped\")\n```"
1973
+ ],
1974
+ "argsType": "ComponentHandle",
1975
+ "resultType": "PluginCoreGroupsGetForComponentResult"
1976
+ },
1977
+ {
1978
+ "path": "core.groups.isLocked",
1979
+ "namespace": "core.groups",
1980
+ "summary": "Report whether a group is locked.",
1981
+ "examplePrompts": [
1982
+ "Is group-12 locked?",
1983
+ "Check whether this group is locked before editing it",
1984
+ "Tell me if the group is locked\n\n# Example\n```ts\nif (await snaptrude.core.groups.isLocked(\"group-12\")) {\nconsole.log(\"locked — unlock it first\")\n}\n```"
1985
+ ],
1986
+ "argsType": "string",
1987
+ "resultType": "PluginCoreGroupsIsLockedResult"
1988
+ },
1989
+ {
1990
+ "path": "core.groups.list",
1991
+ "namespace": "core.groups",
1992
+ "summary": "List every group in the active project.",
1993
+ "examplePrompts": [
1994
+ "List all the groups in my project",
1995
+ "What groups do I have and how many things are in each?",
1996
+ "Show every group with its lock state",
1997
+ "How many groups are in this model?\n\n# Example\n```ts\nconst { groups } = await snaptrude.core.groups.list()\nfor (const g of groups) console.log(g.name, g.memberCount, g.isLocked)\n```"
1998
+ ],
1999
+ "argsType": null,
2000
+ "resultType": "PluginCoreGroupsListResult"
2001
+ },
2002
+ {
2003
+ "path": "core.groups.listMembers",
2004
+ "namespace": "core.groups",
2005
+ "summary": "List the direct members of a group.",
2006
+ "examplePrompts": [
2007
+ "What's inside group-12?",
2008
+ "List the members of this group",
2009
+ "Show the components and subgroups in group-3\n\n# Example\n```ts\nconst { members } = await snaptrude.core.groups.listMembers(\"group-12\")\nfor (const m of members) console.log(m.type, m.id)\n```"
2010
+ ],
2011
+ "argsType": "string",
2012
+ "resultType": "PluginCoreGroupsListMembersResult"
2013
+ },
2014
+ {
2015
+ "path": "core.groups.update",
2016
+ "namespace": "core.groups",
2017
+ "summary": "Update a group's name and/or membership.",
2018
+ "examplePrompts": [
2019
+ "Rename group-12 to Kitchen",
2020
+ "Add these two walls to the group",
2021
+ "Remove cmp_7 from group-3\n\n# Example\n```ts\nconst group = await snaptrude.core.groups.update(\"group-12\", {\nname: \"Kitchen\",\naddComponentIds: [\"cmp_9\"],\n})\n```"
2022
+ ],
2023
+ "argsType": "string",
2024
+ "resultType": "PluginCoreGroupsUpdateResult"
2025
+ },
2026
+ {
2027
+ "path": "core.history.redo",
2028
+ "namespace": "core.history",
2029
+ "summary": "Step forward over previously undone entries. Symmetric with {@linkcode PluginHistoryApi.undo}.",
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
+ ],
2050
+ "argsType": "number",
2051
+ "resultType": "PluginHistoryStepResult"
2052
+ },
2053
+ {
2054
+ "path": "core.io.import.cadJson",
2055
+ "namespace": "core.io.import",
2056
+ "summary": "Sketch a CAD underlay from **already-parsed CAD JSON** — synchronous, with no server round-trip. Use this when you hold parsed CAD data (e.g. produced by your own converter); use {@link PluginCoreIoImportApi.dwg} for raw `.dwg` files.",
2057
+ "examplePrompts": [
2058
+ "Sketch this parsed CAD JSON onto the active storey",
2059
+ "Draw these CAD curves as an underlay on storey 2",
2060
+ "Create a CAD sketch from this geometry data",
2061
+ "Import my converted CAD JSON onto the ground floor\n\n# Example\n```ts\nconst cad = await snaptrude.core.io.import.cadJson(\n{ unit: \"mm\", geometry: [{ type: \"line\", layer: \"WALLS\", ... }] },\n1,\n)\n```"
2062
+ ],
2063
+ "argsType": "CadJsonInput",
2064
+ "resultType": "UnderlayHandle"
2065
+ },
2066
+ {
2067
+ "path": "core.io.import.dwg",
2068
+ "namespace": "core.io.import",
2069
+ "summary": "Import a **DWG** CAD drawing as a scene underlay. `.dwg` only (no DXF).",
2070
+ "examplePrompts": [
2071
+ "Import this DWG floor plan onto storey 1",
2072
+ "Bring in a CAD drawing as an underlay and tell me when it's ready",
2073
+ "Start importing this CAD file onto the ground floor\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(\"https://example.com/plan.dwg\", 1)\n// Poll until the server-side conversion finishes — always with a timeout\n// (a UI-cancelled import stays \"processing\" forever).\nconst deadline = Date.now() + 5 * 60_000\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n// The DWG lands as a CAD underlay. CAD scaling isn't supported; manage it\n// (list / fade / delete) via core.io.underlay.*.\nconst cad = await snaptrude.core.io.job.getResult(job)\nif (cad) console.log(\"DWG imported as CAD underlay:\", cad)\n```"
2074
+ ],
2075
+ "argsType": "string",
2076
+ "resultType": "ImportJobHandle"
2077
+ },
2078
+ {
2079
+ "path": "core.io.import.image",
2080
+ "namespace": "core.io.import",
2081
+ "summary": "Import a raster image as a scene **underlay** — a flat, textured reference plane placed on a storey that you can trace over.",
2082
+ "examplePrompts": [
2083
+ "Import this floor plan image onto the ground floor to trace over",
2084
+ "Drop this survey PNG in as a reference underlay at 30% opacity",
2085
+ "Add a site plan image on storey 2",
2086
+ "Bring in a sketch to trace, faded to half opacity\n\n# Example\n```ts\n// Place a floor plan on storey 1, then calibrate it to a real-world size.\nconst plan = await snaptrude.core.io.import.image(\n\"https://example.com/floorplan.png\",\n1, // storey\nundefined, // scale\n0.4, // opacity\n\"Ground floor plan\",\n)\n// Make the plan's longest side exactly 40 project-units:\nawait snaptrude.core.io.underlay.setScale(plan, { planSize: 40 })\n```"
2087
+ ],
2088
+ "argsType": "string",
2089
+ "resultType": "UnderlayHandle"
2090
+ },
2091
+ {
2092
+ "path": "core.io.import.model",
2093
+ "namespace": "core.io.import",
2094
+ "summary": "Import a **3D model** file and place it in the scene as a component.",
2095
+ "examplePrompts": [
2096
+ "Import this SketchUp model onto storey 1",
2097
+ "Bring in this OBJ file and place it at the origin",
2098
+ "Add this 3D model to the ground floor\n\n# Example\n```ts\nconst model = await snaptrude.core.io.import.model(\n\"https://example.com/tree.skp\",\n1, // storey\n\"skp\",\n)\n```"
2099
+ ],
2100
+ "argsType": "string",
2101
+ "resultType": "ComponentHandle"
2102
+ },
2103
+ {
2104
+ "path": "core.io.import.pdf",
2105
+ "namespace": "core.io.import",
2106
+ "summary": "Import one page of a PDF as a scene **underlay** (a traceable reference plane).",
2107
+ "examplePrompts": [
2108
+ "Import page 1 of this PDF floor plan onto storey 1",
2109
+ "Bring in the second page of this PDF as an underlay at 1:50",
2110
+ "Add this PDF plan to the ground floor to trace over",
2111
+ "Place page 3 of the drawing set on storey 3\n\n# Example\n```ts\nconst sheet = await snaptrude.core.io.import.pdf(\n\"https://example.com/plans.pdf\",\n1, // storey\n2, // page\n\"1:100\", // drawing scale\n)\n```"
2112
+ ],
2113
+ "argsType": "string",
2114
+ "resultType": "UnderlayHandle"
2115
+ },
2116
+ {
2117
+ "path": "core.io.import.terrain",
2118
+ "namespace": "core.io.import",
2119
+ "summary": "Import **site terrain** for a location — Mapbox topography (elevation + satellite/streets imagery, optional neighborhood buildings and parcels).",
2120
+ "examplePrompts": [
2121
+ "Import the site terrain for this location, about 500m across",
2122
+ "Load the topography at 40.7128, -74.0060 for a 300 by 300 meter site",
2123
+ "Bring in satellite terrain for the site with the surrounding buildings",
2124
+ "Add site elevation for a 1km by 1km area at these coordinates\n\n# Example\n```ts\n// 300m × 300m site with elevation + satellite imagery.\nconst terrain = await snaptrude.core.io.import.terrain(\n40.7128, // lat\n-74.006, // lng\n300, // width (metres)\n300, // length (metres)\ntrue, // elevation\ntrue, // satellite\n)\n```"
2125
+ ],
2126
+ "argsType": "number",
2127
+ "resultType": "TerrainHandle"
2128
+ },
2129
+ {
2130
+ "path": "core.io.job.getError",
2131
+ "namespace": "core.io.job",
2132
+ "summary": "The failure message if the job's status is `\"failed\"`; otherwise `null`.",
2133
+ "examplePrompts": [
2134
+ "Why did my DWG import fail?",
2135
+ "What went wrong with the CAD import?",
2136
+ "Show the error from the failed import job",
2137
+ "Did the import error out, and why?\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nif ((await snaptrude.core.io.job.getStatus(job)) === \"failed\") {\nconsole.error(await snaptrude.core.io.job.getError(job))\n}\n```"
2138
+ ],
2139
+ "argsType": "ImportJobHandle",
2140
+ "resultType": "string | null"
2141
+ },
2142
+ {
2143
+ "path": "core.io.job.getResult",
2144
+ "namespace": "core.io.job",
2145
+ "summary": "The imported result once the job is complete — the placed {@linkcode UnderlayHandle}. Returns `null` while the job is still pending/processing or if it failed (check {@link PluginCoreIoJobApi.getError}).",
2146
+ "examplePrompts": [
2147
+ "Get the underlay from my finished DWG import",
2148
+ "Give me the result of the CAD import job",
2149
+ "Fetch the imported CAD sketch once it's ready",
2150
+ "Return the handle for the completed import\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nconst deadline = Date.now() + 5 * 60_000\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n// DWG results are CAD underlays (CAD scaling isn't supported); manage them\n// via core.io.underlay.* (list / setOpacity / delete).\nconst cad = await snaptrude.core.io.job.getResult(job)\nif (cad) console.log(\"import complete:\", cad)\n```"
2151
+ ],
2152
+ "argsType": "ImportJobHandle",
2153
+ "resultType": "UnderlayHandle | null"
2154
+ },
2155
+ {
2156
+ "path": "core.io.job.getStatus",
2157
+ "namespace": "core.io.job",
2158
+ "summary": "Read a job's current status: `\"pending\"` (queued), `\"processing\"` (running), `\"complete\"` (result ready), or `\"failed\"`.",
2159
+ "examplePrompts": [
2160
+ "What's the status of my DWG import?",
2161
+ "Is the CAD import still processing?",
2162
+ "Check where the import job is up to",
2163
+ "Did the import job fail?\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nconsole.log(await snaptrude.core.io.job.getStatus(job)) // \"processing\"\n```"
2164
+ ],
2165
+ "argsType": "ImportJobHandle",
2166
+ "resultType": "ImportJobStatus"
2167
+ },
2168
+ {
2169
+ "path": "core.io.job.isComplete",
2170
+ "namespace": "core.io.job",
2171
+ "summary": "Whether the job has finished successfully (status is `\"complete\"` and a result is ready). Returns `false` while pending/processing and on failure.",
2172
+ "examplePrompts": [
2173
+ "Is the DWG import done yet?",
2174
+ "Has the CAD import finished?",
2175
+ "Tell me when the import job completes",
2176
+ "Is my import ready?\n\n# Example\n```ts\nconst job = await snaptrude.core.io.import.dwg(url, 1)\nconst deadline = Date.now() + 5 * 60_000 // cap the poll — see getStatus limitation\nwhile (!(await snaptrude.core.io.job.isComplete(job))) {\nif (Date.now() > deadline) throw new Error(\"DWG import timed out\")\nawait new Promise((r) => setTimeout(r, 2000))\n}\n```"
2177
+ ],
2178
+ "argsType": "ImportJobHandle",
2179
+ "resultType": "boolean"
2180
+ },
2181
+ {
2182
+ "path": "core.io.query.getPdfPageCount",
2183
+ "namespace": "core.io.query",
2184
+ "summary": "Count the pages of a PDF without importing it. `null` if the source can't be read as a PDF.",
2185
+ "examplePrompts": [
2186
+ "How many pages does this PDF have?",
2187
+ "Count the pages in the drawing set before importing",
2188
+ "Get the PDF page count",
2189
+ "Is this a multi-page PDF, and how many?\n\n# Example\n```ts\nconst pages = await snaptrude.core.io.query.getPdfPageCount(url)\nfor (let p = 1; p <= (pages ?? 0); p++) {\nawait snaptrude.core.io.import.pdf(url, p, p) // one page per storey\n}\n```"
2190
+ ],
2191
+ "argsType": "string",
2192
+ "resultType": "number | null"
2193
+ },
2194
+ {
2195
+ "path": "core.io.query.listCadLayers",
2196
+ "namespace": "core.io.query",
2197
+ "summary": "List the distinct CAD layer names tagged on a parsed CAD JSON's entities. Read-only inspection: imports always bring in **every** layer (there is no layer filter on {@link core.io.import.dwg} / {@link core.io.import.cadJson}) — use the names to decide whether to import at all, or what to tell the user.",
2198
+ "examplePrompts": [
2199
+ "What CAD layers are in this drawing?",
2200
+ "List the layers before importing the CAD",
2201
+ "Show the DWG layer names so I can pick which to import",
2202
+ "Enumerate the CAD JSON layers\n\n# Example\n```ts\nconst layers = await snaptrude.core.io.query.listCadLayers(cad)\nif (layers.some((l) => l.toUpperCase().includes(\"WALL\"))) {\nawait snaptrude.core.io.import.cadJson(cad, 1) // all layers import together\n}\n```"
2203
+ ],
2204
+ "argsType": "CadJsonInput",
2205
+ "resultType": "string[]"
2206
+ },
2207
+ {
2208
+ "path": "core.io.terrain.delete",
2209
+ "namespace": "core.io.terrain",
2210
+ "summary": "Delete the site terrain. Undoable.",
2211
+ "examplePrompts": [
2212
+ "Delete the site terrain",
2213
+ "Remove the topography",
2214
+ "Clear the imported site",
2215
+ "Get rid of the terrain"
2216
+ ],
2217
+ "argsType": null,
2218
+ "resultType": "void"
2219
+ },
2220
+ {
2221
+ "path": "core.io.terrain.disableElevation",
2222
+ "namespace": "core.io.terrain",
2223
+ "summary": "Turn terrain elevation OFF — flatten to a plane. Undoable.",
2224
+ "examplePrompts": [
2225
+ "Flatten the terrain",
2226
+ "Turn off site elevation",
2227
+ "Disable the heightmap",
2228
+ "Make the terrain flat"
2229
+ ],
2230
+ "argsType": null,
2231
+ "resultType": "void"
2232
+ },
2233
+ {
2234
+ "path": "core.io.terrain.disableSatellite",
2235
+ "namespace": "core.io.terrain",
2236
+ "summary": "Turn satellite imagery OFF. Undoable.",
2237
+ "examplePrompts": [
2238
+ "Hide the satellite imagery",
2239
+ "Turn off the aerial texture",
2240
+ "Disable satellite on the site",
2241
+ "Remove the satellite drape"
2242
+ ],
2243
+ "argsType": null,
2244
+ "resultType": "void"
2245
+ },
2246
+ {
2247
+ "path": "core.io.terrain.enableElevation",
2248
+ "namespace": "core.io.terrain",
2249
+ "summary": "Turn terrain elevation (DEM height) ON — a real 3D topography surface. Undoable.",
2250
+ "examplePrompts": [
2251
+ "Turn on terrain elevation",
2252
+ "Enable the site heightmap",
2253
+ "Make the terrain 3D",
2254
+ "Show the topography relief"
2255
+ ],
2256
+ "argsType": null,
2257
+ "resultType": "void"
2258
+ },
2259
+ {
2260
+ "path": "core.io.terrain.enableSatellite",
2261
+ "namespace": "core.io.terrain",
2262
+ "summary": "Turn satellite imagery ON. Undoable.",
2263
+ "examplePrompts": [
2264
+ "Show satellite imagery on the site",
2265
+ "Enable the satellite texture",
2266
+ "Turn on aerial imagery",
2267
+ "Drape satellite over the terrain"
2268
+ ],
2269
+ "argsType": null,
2270
+ "resultType": "void"
2271
+ },
2272
+ {
2273
+ "path": "core.io.terrain.exists",
2274
+ "namespace": "core.io.terrain",
2275
+ "summary": "Whether the project has a site terrain.",
2276
+ "examplePrompts": [
2277
+ "Does this project have site terrain?",
2278
+ "Is there a terrain imported?",
2279
+ "Check if the site topography exists",
2280
+ "Has a terrain been added yet?\n\n# Example\n```ts\nif (!(await snaptrude.core.io.terrain.exists())) {\nawait snaptrude.core.io.import.terrain(40.7128, -74.006, 300, 300)\n}\n```"
2281
+ ],
2282
+ "argsType": null,
2283
+ "resultType": "boolean"
2284
+ },
2285
+ {
2286
+ "path": "core.io.terrain.get",
2287
+ "namespace": "core.io.terrain",
2288
+ "summary": "Resolve the project's terrain handle, or `null` if there is none. The same handle {@link core.io.import.terrain} returns — use it to obtain the handle without re-importing.",
2289
+ "examplePrompts": [
2290
+ "Get the terrain handle",
2291
+ "Give me the site terrain",
2292
+ "Fetch the current terrain",
2293
+ "Return the topography handle if it exists"
2294
+ ],
2295
+ "argsType": null,
2296
+ "resultType": "TerrainHandle | null"
2297
+ },
2298
+ {
2299
+ "path": "core.io.terrain.getDatum",
2300
+ "namespace": "core.io.terrain",
2301
+ "summary": "Read the terrain's current vertical position (world Y, internal units). `null` if there is no terrain. Import places the terrain so its highest point sits at `y = 0`, so a never-shifted terrain reads a negative baseline, not `0`; each {@link PluginCoreIoTerrainApi.setDatum} shift moves this value.",
2302
+ "examplePrompts": [
2303
+ "What's the terrain's datum?",
2304
+ "Read the current site elevation reference",
2305
+ "Get the terrain vertical offset",
2306
+ "How far has the datum been shifted?"
2307
+ ],
2308
+ "argsType": null,
2309
+ "resultType": "number | null"
2310
+ },
2311
+ {
2312
+ "path": "core.io.terrain.getOpacity",
2313
+ "namespace": "core.io.terrain",
2314
+ "summary": "Read the terrain opacity, `0`..`1`, or `null` if no terrain.",
2315
+ "examplePrompts": [],
2316
+ "argsType": null,
2317
+ "resultType": "number | null"
2318
+ },
2319
+ {
2320
+ "path": "core.io.terrain.getReport",
2321
+ "namespace": "core.io.terrain",
2322
+ "summary": "The terrain cut/fill earthwork report — cut, fill, and net volumes — or `null` if there is no terrain.",
2323
+ "examplePrompts": [
2324
+ "What are the cut and fill volumes for the site?",
2325
+ "Get the terrain earthwork report",
2326
+ "How much cut and fill does the grading need?",
2327
+ "Show the net volume of the terrain edits\n\n# Example\n```ts\nconst r = await snaptrude.core.io.terrain.getReport()\nif (r) console.log(`cut ${r.cutVolume}, fill ${r.fillVolume}, net ${r.netVolume}`)\n```"
2328
+ ],
2329
+ "argsType": null,
2330
+ "resultType": "TerrainReport | null"
2331
+ },
2332
+ {
2333
+ "path": "core.io.terrain.isElevationEnabled",
2334
+ "namespace": "core.io.terrain",
2335
+ "summary": "Whether terrain elevation (DEM height) is on. `null` if no terrain.",
2336
+ "examplePrompts": [],
2337
+ "argsType": null,
2338
+ "resultType": "boolean | null"
2339
+ },
2340
+ {
2341
+ "path": "core.io.terrain.isSatelliteEnabled",
2342
+ "namespace": "core.io.terrain",
2343
+ "summary": "Whether satellite imagery is draped on the terrain. `null` if no terrain.",
2344
+ "examplePrompts": [],
2345
+ "argsType": null,
2346
+ "resultType": "boolean | null"
2347
+ },
2348
+ {
2349
+ "path": "core.io.terrain.setDatum",
2350
+ "namespace": "core.io.terrain",
2351
+ "summary": "Shift the terrain's **datum** — move the whole terrain vertically DOWN by `offset` (internal units) from its current position; pass a negative value to raise it. Undoable.",
1446
2352
  "examplePrompts": [
1447
- "Ungroup group-12",
1448
- "Dissolve this group but keep its contents",
1449
- "Delete the group without deleting its members\n\n# Example\n```ts\nawait snaptrude.core.groups.delete(\"group-12\")\n```"
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```"
1450
2357
  ],
1451
- "argsType": "string",
1452
- "resultType": "PluginCoreGroupsDeleteResult"
2358
+ "argsType": "number",
2359
+ "resultType": "void"
1453
2360
  },
1454
2361
  {
1455
- "path": "core.groups.get",
1456
- "namespace": "core.groups",
1457
- "summary": "Get a single group by id.",
2362
+ "path": "core.io.terrain.setOpacity",
2363
+ "namespace": "core.io.terrain",
2364
+ "summary": "Set the terrain opacity (`0` transparent .. `1` opaque). Undoable.",
1458
2365
  "examplePrompts": [
1459
- "Get the group with id group-12",
1460
- "Look up a single group by its id",
1461
- "Is group-3 locked and how many members does it have?\n\n# Example\n```ts\nconst group = await snaptrude.core.groups.get(\"group-12\")\nif (group) console.log(group.name, group.memberCount)\n```"
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```"
1462
2370
  ],
1463
- "argsType": "string",
1464
- "resultType": "PluginCoreGroupsGetResult"
2371
+ "argsType": "number",
2372
+ "resultType": "void"
1465
2373
  },
1466
2374
  {
1467
- "path": "core.groups.getBounds",
1468
- "namespace": "core.groups",
1469
- "summary": "Get the axis-aligned bounds of a group.",
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.",
1470
2378
  "examplePrompts": [
1471
- "How big is this group?",
1472
- "Get the bounding box of group-12",
1473
- "Where is the center of this group?\n\n# Example\n```ts\nconst bounds = await snaptrude.core.groups.getBounds(\"group-12\")\nif (bounds) console.log(bounds.center.x, bounds.center.y, bounds.center.z)\n```"
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```"
1474
2383
  ],
1475
- "argsType": "string",
1476
- "resultType": "PluginCoreGroupsGetBoundsResult"
2384
+ "argsType": "UnderlayHandle",
2385
+ "resultType": "void"
1477
2386
  },
1478
2387
  {
1479
- "path": "core.groups.getForComponent",
1480
- "namespace": "core.groups",
1481
- "summary": "Get the group a component belongs to.",
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.",
1482
2391
  "examplePrompts": [
1483
- "Which group is this wall in?",
1484
- "Find the group that contains component cmp_42",
1485
- "Is this element grouped, and if so which group?\n\n# Example\n```ts\nconst group = await snaptrude.core.groups.getForComponent(\"cmp_42\")\nconsole.log(group ? group.name : \"ungrouped\")\n```"
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```"
1486
2396
  ],
1487
- "argsType": "ComponentHandle",
1488
- "resultType": "PluginCoreGroupsGetForComponentResult"
2397
+ "argsType": "UnderlayHandle",
2398
+ "resultType": "BBoxComponents | null"
1489
2399
  },
1490
2400
  {
1491
- "path": "core.groups.isLocked",
1492
- "namespace": "core.groups",
1493
- "summary": "Report whether a group is locked.",
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.",
1494
2404
  "examplePrompts": [
1495
- "Is group-12 locked?",
1496
- "Check whether this group is locked before editing it",
1497
- "Tell me if the group is locked\n\n# Example\n```ts\nif (await snaptrude.core.groups.isLocked(\"group-12\")) {\nconsole.log(\"locked — unlock it first\")\n}\n```"
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```"
1498
2409
  ],
1499
- "argsType": "string",
1500
- "resultType": "PluginCoreGroupsIsLockedResult"
2410
+ "argsType": "UnderlayHandle",
2411
+ "resultType": "number | null"
1501
2412
  },
1502
2413
  {
1503
- "path": "core.groups.list",
1504
- "namespace": "core.groups",
1505
- "summary": "List every group in the active project.",
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.",
1506
2417
  "examplePrompts": [
1507
- "List all the groups in my project",
1508
- "What groups do I have and how many things are in each?",
1509
- "Show every group with its lock state",
1510
- "How many groups are in this model?\n\n# Example\n```ts\nconst { groups } = await snaptrude.core.groups.list()\nfor (const g of groups) console.log(g.name, g.memberCount, g.isLocked)\n```"
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```"
1511
2422
  ],
1512
- "argsType": null,
1513
- "resultType": "PluginCoreGroupsListResult"
2423
+ "argsType": "UnderlayHandle",
2424
+ "resultType": "{ scaleFactor: number; initialScaleFactor: number } | null"
1514
2425
  },
1515
2426
  {
1516
- "path": "core.groups.listMembers",
1517
- "namespace": "core.groups",
1518
- "summary": "List the direct members of a group.",
2427
+ "path": "core.io.underlay.list",
2428
+ "namespace": "core.io.underlay",
2429
+ "summary": "List the underlays in the scene, optionally limited to one storey.",
1519
2430
  "examplePrompts": [
1520
- "What's inside group-12?",
1521
- "List the members of this group",
1522
- "Show the components and subgroups in group-3\n\n# Example\n```ts\nconst { members } = await snaptrude.core.groups.listMembers(\"group-12\")\nfor (const m of members) console.log(m.type, m.id)\n```"
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```"
1523
2435
  ],
1524
- "argsType": "string",
1525
- "resultType": "PluginCoreGroupsListMembersResult"
2436
+ "argsType": "number",
2437
+ "resultType": "UnderlayHandle[]"
1526
2438
  },
1527
2439
  {
1528
- "path": "core.groups.update",
1529
- "namespace": "core.groups",
1530
- "summary": "Update a group's name and/or membership.",
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)`.",
1531
2443
  "examplePrompts": [
1532
- "Rename group-12 to Kitchen",
1533
- "Add these two walls to the group",
1534
- "Remove cmp_7 from group-3\n\n# Example\n```ts\nconst group = await snaptrude.core.groups.update(\"group-12\", {\nname: \"Kitchen\",\naddComponentIds: [\"cmp_9\"],\n})\n```"
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```"
1535
2448
  ],
1536
- "argsType": "string",
1537
- "resultType": "PluginCoreGroupsUpdateResult"
2449
+ "argsType": "UnderlayHandle",
2450
+ "resultType": "{ scaleFactor: number }"
1538
2451
  },
1539
2452
  {
1540
- "path": "core.history.redo",
1541
- "namespace": "core.history",
1542
- "summary": "Step forward over previously undone entries. Symmetric with {@linkcode PluginHistoryApi.undo}.",
1543
- "examplePrompts": [],
1544
- "argsType": "number",
1545
- "resultType": "PluginHistoryStepResult"
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"
1546
2464
  },
1547
2465
  {
1548
- "path": "core.history.undo",
1549
- "namespace": "core.history",
1550
- "summary": "Step back over committed history entries.",
1551
- "examplePrompts": [],
1552
- "argsType": "number",
1553
- "resultType": "PluginHistoryStepResult"
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 }"
1554
2477
  },
1555
2478
  {
1556
2479
  "path": "core.layers.get",
@@ -1623,7 +2546,7 @@
1623
2546
  {
1624
2547
  "path": "core.math.quat.conjugate",
1625
2548
  "namespace": "core.math.quat",
1626
- "summary": "Conjugate.",
2549
+ "summary": "Compute the conjugate of a quaternion (negated vector part).",
1627
2550
  "examplePrompts": [],
1628
2551
  "argsType": "QuatHandle",
1629
2552
  "resultType": "QuatHandle"
@@ -1631,7 +2554,7 @@
1631
2554
  {
1632
2555
  "path": "core.math.quat.dot",
1633
2556
  "namespace": "core.math.quat",
1634
- "summary": "Dot product.",
2557
+ "summary": "Compute the dot product of two quaternions.",
1635
2558
  "examplePrompts": [],
1636
2559
  "argsType": "QuatHandle",
1637
2560
  "resultType": "number"
@@ -1639,7 +2562,7 @@
1639
2562
  {
1640
2563
  "path": "core.math.quat.equals",
1641
2564
  "namespace": "core.math.quat",
1642
- "summary": "Exact component equality.",
2565
+ "summary": "Test whether two quaternions have exactly equal components.",
1643
2566
  "examplePrompts": [],
1644
2567
  "argsType": "QuatHandle",
1645
2568
  "resultType": "boolean"
@@ -1647,7 +2570,7 @@
1647
2570
  {
1648
2571
  "path": "core.math.quat.equalsApprox",
1649
2572
  "namespace": "core.math.quat",
1650
- "summary": "Approximate equality within `epsilon` (default `1e-6`).",
2573
+ "summary": "Test whether two quaternions are equal within a tolerance `epsilon` (default `1e-6`).",
1651
2574
  "examplePrompts": [],
1652
2575
  "argsType": "QuatHandle",
1653
2576
  "resultType": "boolean"
@@ -1655,7 +2578,7 @@
1655
2578
  {
1656
2579
  "path": "core.math.quat.fromAxisAngle",
1657
2580
  "namespace": "core.math.quat",
1658
- "summary": "Build from a rotation axis and angle (radians).",
2581
+ "summary": "Build a quaternion from a rotation axis and an angle in radians.",
1659
2582
  "examplePrompts": [],
1660
2583
  "argsType": "Vec3Handle",
1661
2584
  "resultType": "QuatHandle"
@@ -1663,7 +2586,7 @@
1663
2586
  {
1664
2587
  "path": "core.math.quat.fromEuler",
1665
2588
  "namespace": "core.math.quat",
1666
- "summary": "Build from Euler angles (radians).",
2589
+ "summary": "Build a quaternion from Euler angles in radians.",
1667
2590
  "examplePrompts": [],
1668
2591
  "argsType": "number",
1669
2592
  "resultType": "QuatHandle"
@@ -1671,7 +2594,7 @@
1671
2594
  {
1672
2595
  "path": "core.math.quat.identity",
1673
2596
  "namespace": "core.math.quat",
1674
- "summary": "The identity rotation.",
2597
+ "summary": "Return the identity quaternion (no rotation).",
1675
2598
  "examplePrompts": [],
1676
2599
  "argsType": null,
1677
2600
  "resultType": "QuatHandle"
@@ -1679,7 +2602,7 @@
1679
2602
  {
1680
2603
  "path": "core.math.quat.inverse",
1681
2604
  "namespace": "core.math.quat",
1682
- "summary": "Inverse rotation.",
2605
+ "summary": "Compute the inverse quaternion — the rotation that undoes `q`.",
1683
2606
  "examplePrompts": [],
1684
2607
  "argsType": "QuatHandle",
1685
2608
  "resultType": "QuatHandle"
@@ -1687,7 +2610,7 @@
1687
2610
  {
1688
2611
  "path": "core.math.quat.length",
1689
2612
  "namespace": "core.math.quat",
1690
- "summary": "Magnitude.",
2613
+ "summary": "Compute the magnitude (norm) of a quaternion.",
1691
2614
  "examplePrompts": [],
1692
2615
  "argsType": "QuatHandle",
1693
2616
  "resultType": "number"
@@ -1695,7 +2618,7 @@
1695
2618
  {
1696
2619
  "path": "core.math.quat.multiply",
1697
2620
  "namespace": "core.math.quat",
1698
- "summary": "Hamilton product `a * b` (apply `b` then `a`).",
2621
+ "summary": "Compose two rotations with the Hamilton product `a * b` (apply `b` then `a`).",
1699
2622
  "examplePrompts": [],
1700
2623
  "argsType": "QuatHandle",
1701
2624
  "resultType": "QuatHandle"
@@ -1711,7 +2634,7 @@
1711
2634
  {
1712
2635
  "path": "core.math.quat.normalize",
1713
2636
  "namespace": "core.math.quat",
1714
- "summary": "Unit quaternion.",
2637
+ "summary": "Normalize a quaternion to unit length.",
1715
2638
  "examplePrompts": [],
1716
2639
  "argsType": "QuatHandle",
1717
2640
  "resultType": "QuatHandle"
@@ -1719,7 +2642,7 @@
1719
2642
  {
1720
2643
  "path": "core.math.quat.slerp",
1721
2644
  "namespace": "core.math.quat",
1722
- "summary": "Spherical linear interpolation.",
2645
+ "summary": "Spherically interpolate (slerp) between two rotations by factor `t`.",
1723
2646
  "examplePrompts": [],
1724
2647
  "argsType": "QuatHandle",
1725
2648
  "resultType": "QuatHandle"
@@ -1727,7 +2650,7 @@
1727
2650
  {
1728
2651
  "path": "core.math.quat.toAxisAngle",
1729
2652
  "namespace": "core.math.quat",
1730
- "summary": "Decompose into axis + angle.",
2653
+ "summary": "Decompose a quaternion into its rotation axis and angle (radians).",
1731
2654
  "examplePrompts": [],
1732
2655
  "argsType": "QuatHandle",
1733
2656
  "resultType": "{ axis: Vec3Handle; angle: number }"
@@ -1735,7 +2658,7 @@
1735
2658
  {
1736
2659
  "path": "core.math.vec3.add",
1737
2660
  "namespace": "core.math.vec3",
1738
- "summary": "Component-wise sum `a + b`.",
2661
+ "summary": "Add two vectors component-wise (`a + b`).",
1739
2662
  "examplePrompts": [],
1740
2663
  "argsType": "Vec3Handle",
1741
2664
  "resultType": "Vec3Handle"
@@ -1751,7 +2674,7 @@
1751
2674
  {
1752
2675
  "path": "core.math.vec3.cross",
1753
2676
  "namespace": "core.math.vec3",
1754
- "summary": "Cross product `a × b`.",
2677
+ "summary": "Compute the cross product `a × b` — the vector perpendicular to both.",
1755
2678
  "examplePrompts": [],
1756
2679
  "argsType": "Vec3Handle",
1757
2680
  "resultType": "Vec3Handle"
@@ -1759,15 +2682,18 @@
1759
2682
  {
1760
2683
  "path": "core.math.vec3.distance",
1761
2684
  "namespace": "core.math.vec3",
1762
- "summary": "Euclidean distance between two points.",
1763
- "examplePrompts": [],
2685
+ "summary": "Measure the straight-line (Euclidean) distance between two points.",
2686
+ "examplePrompts": [
2687
+ "What is the distance between these two points?",
2688
+ "Measure how far apart these two points are\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(3, 4, 0)\nconst dist = await snaptrude.core.math.vec3.distance(a, b) // 5\n```"
2689
+ ],
1764
2690
  "argsType": "Vec3Handle",
1765
2691
  "resultType": "number"
1766
2692
  },
1767
2693
  {
1768
2694
  "path": "core.math.vec3.dot",
1769
2695
  "namespace": "core.math.vec3",
1770
- "summary": "Dot product.",
2696
+ "summary": "Compute the dot product of two vectors.",
1771
2697
  "examplePrompts": [],
1772
2698
  "argsType": "Vec3Handle",
1773
2699
  "resultType": "number"
@@ -1775,7 +2701,7 @@
1775
2701
  {
1776
2702
  "path": "core.math.vec3.equals",
1777
2703
  "namespace": "core.math.vec3",
1778
- "summary": "Exact component equality.",
2704
+ "summary": "Test whether two vectors have exactly equal components.",
1779
2705
  "examplePrompts": [],
1780
2706
  "argsType": "Vec3Handle",
1781
2707
  "resultType": "boolean"
@@ -1783,7 +2709,7 @@
1783
2709
  {
1784
2710
  "path": "core.math.vec3.equalsApprox",
1785
2711
  "namespace": "core.math.vec3",
1786
- "summary": "Approximate equality within `epsilon` (default `1e-6`).",
2712
+ "summary": "Test whether two vectors are equal within a tolerance `epsilon` (default `1e-6`).",
1787
2713
  "examplePrompts": [],
1788
2714
  "argsType": "Vec3Handle",
1789
2715
  "resultType": "boolean"
@@ -1791,7 +2717,7 @@
1791
2717
  {
1792
2718
  "path": "core.math.vec3.length",
1793
2719
  "namespace": "core.math.vec3",
1794
- "summary": "Euclidean length.",
2720
+ "summary": "Compute the Euclidean length (magnitude) of a vector.",
1795
2721
  "examplePrompts": [],
1796
2722
  "argsType": "Vec3Handle",
1797
2723
  "resultType": "number"
@@ -1799,7 +2725,7 @@
1799
2725
  {
1800
2726
  "path": "core.math.vec3.lengthSquared",
1801
2727
  "namespace": "core.math.vec3",
1802
- "summary": "Squared length (avoids the sqrt).",
2728
+ "summary": "Compute the squared Euclidean length of a vector (avoids the sqrt).",
1803
2729
  "examplePrompts": [],
1804
2730
  "argsType": "Vec3Handle",
1805
2731
  "resultType": "number"
@@ -1807,7 +2733,7 @@
1807
2733
  {
1808
2734
  "path": "core.math.vec3.lerp",
1809
2735
  "namespace": "core.math.vec3",
1810
- "summary": "Linear interpolation `a + (b - a) * t`.",
2736
+ "summary": "Linearly interpolate between two vectors: `a + (b - a) * t`.",
1811
2737
  "examplePrompts": [],
1812
2738
  "argsType": "Vec3Handle",
1813
2739
  "resultType": "Vec3Handle"
@@ -1815,7 +2741,7 @@
1815
2741
  {
1816
2742
  "path": "core.math.vec3.negate",
1817
2743
  "namespace": "core.math.vec3",
1818
- "summary": "Negate (reverse direction).",
2744
+ "summary": "Negate a vector, reversing its direction.",
1819
2745
  "examplePrompts": [],
1820
2746
  "argsType": "Vec3Handle",
1821
2747
  "resultType": "Vec3Handle"
@@ -1831,7 +2757,7 @@
1831
2757
  {
1832
2758
  "path": "core.math.vec3.normalize",
1833
2759
  "namespace": "core.math.vec3",
1834
- "summary": "Unit vector in the same direction (zero vector if length 0).",
2760
+ "summary": "Return the unit vector in the same direction (the zero vector if length is 0).",
1835
2761
  "examplePrompts": [],
1836
2762
  "argsType": "Vec3Handle",
1837
2763
  "resultType": "Vec3Handle"
@@ -1847,7 +2773,7 @@
1847
2773
  {
1848
2774
  "path": "core.math.vec3.subtract",
1849
2775
  "namespace": "core.math.vec3",
1850
- "summary": "Component-wise difference `a - b`.",
2776
+ "summary": "Subtract vector `b` from `a` component-wise (`a - b`).",
1851
2777
  "examplePrompts": [],
1852
2778
  "argsType": "Vec3Handle",
1853
2779
  "resultType": "Vec3Handle"
@@ -1856,39 +2782,64 @@
1856
2782
  "path": "core.project.settings.getTolerance",
1857
2783
  "namespace": "core.project.settings",
1858
2784
  "summary": "Get the project tolerance as a numeric magnitude.",
1859
- "examplePrompts": [],
2785
+ "examplePrompts": [
2786
+ "What is the tolerance setting in this project?",
2787
+ "Check the current dimension precision of the model",
2788
+ "How precise are the measurements in this project?",
2789
+ "Show me the project's tolerance value\n\n# Example\n```ts\nconst tolerance = await snaptrude.core.project.settings.getTolerance()\nconsole.log(tolerance) // e.g. 0.01\n```"
2790
+ ],
1860
2791
  "argsType": null,
1861
2792
  "resultType": "number"
1862
2793
  },
1863
2794
  {
1864
2795
  "path": "core.project.settings.grid.disable",
1865
2796
  "namespace": "core.project.settings.grid",
1866
- "summary": "Turn the grid off.",
1867
- "examplePrompts": [],
2797
+ "summary": "Turn the grid off, hiding the visual snap-to grid in the canvas.",
2798
+ "examplePrompts": [
2799
+ "Turn off the grid",
2800
+ "Hide the grid",
2801
+ "Disable the background grid in the canvas",
2802
+ "Remove the drawing grid from view\n\n# Example\n```ts\nawait snaptrude.core.project.settings.grid.disable()\n```"
2803
+ ],
1868
2804
  "argsType": null,
1869
2805
  "resultType": "boolean"
1870
2806
  },
1871
2807
  {
1872
2808
  "path": "core.project.settings.grid.enable",
1873
2809
  "namespace": "core.project.settings.grid",
1874
- "summary": "Turn the grid on.",
1875
- "examplePrompts": [],
2810
+ "summary": "Turn the grid on, showing the visual snap-to grid in the canvas.",
2811
+ "examplePrompts": [
2812
+ "Turn on the grid",
2813
+ "Show the grid in my project",
2814
+ "Enable the drawing grid",
2815
+ "Switch the snap grid back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.grid.enable()\n```"
2816
+ ],
1876
2817
  "argsType": null,
1877
2818
  "resultType": "boolean"
1878
2819
  },
1879
2820
  {
1880
2821
  "path": "core.project.settings.grid.getValue",
1881
2822
  "namespace": "core.project.settings.grid",
1882
- "summary": "Get the grid cell value.",
1883
- "examplePrompts": [],
2823
+ "summary": "Get the current grid cell value — the size of each cell in the visual snap-to grid.",
2824
+ "examplePrompts": [
2825
+ "What is the grid spacing?",
2826
+ "Check the current grid cell size",
2827
+ "How big are the grid squares?",
2828
+ "Show me the grid size setting\n\n# Example\n```ts\nconst cellSize = await snaptrude.core.project.settings.grid.getValue()\nconsole.log(cellSize)\n```"
2829
+ ],
1884
2830
  "argsType": null,
1885
2831
  "resultType": "number"
1886
2832
  },
1887
2833
  {
1888
2834
  "path": "core.project.settings.grid.setValue",
1889
2835
  "namespace": "core.project.settings.grid",
1890
- "summary": "Set the grid cell value.",
1891
- "examplePrompts": [],
2836
+ "summary": "Set the grid cell value — the size of each cell in the visual snap-to grid.",
2837
+ "examplePrompts": [
2838
+ "Set the grid spacing to 1 metre",
2839
+ "Change the grid cell size to 500mm",
2840
+ "Make the grid squares 2 feet wide",
2841
+ "Adjust the grid size in this project\n\n# Example\n```ts\nawait snaptrude.core.project.settings.grid.setValue(1)\nawait snaptrude.core.project.settings.grid.enable()\n```"
2842
+ ],
1892
2843
  "argsType": "number",
1893
2844
  "resultType": "boolean"
1894
2845
  },
@@ -1896,119 +2847,194 @@
1896
2847
  "path": "core.project.settings.setTolerance",
1897
2848
  "namespace": "core.project.settings",
1898
2849
  "summary": "Set the project tolerance. The value snaps to the **nearest allowed** per-unit precision option (tolerance is a discrete dropdown, not arbitrary).",
1899
- "examplePrompts": [],
2850
+ "examplePrompts": [
2851
+ "Set the project tolerance to 0.01",
2852
+ "Change the dimension precision to two decimal places",
2853
+ "Round dimensions to the nearest quarter inch",
2854
+ "Make the measurements in this project more precise\n\n# Example\n```ts\n// snaps to the nearest allowed precision option\nconst applied = await snaptrude.core.project.settings.setTolerance(0.01)\nif (!applied) console.log(\"no tolerance options available\")\n```"
2855
+ ],
1900
2856
  "argsType": "number",
1901
2857
  "resultType": "boolean"
1902
2858
  },
1903
2859
  {
1904
2860
  "path": "core.project.settings.snaps.disableAngle",
1905
2861
  "namespace": "core.project.settings.snaps",
1906
- "summary": "Turn angle snapping off.",
1907
- "examplePrompts": [],
2862
+ "summary": "Turn angle snapping off, so lines can be drawn at any angle without snapping to fixed increments.",
2863
+ "examplePrompts": [
2864
+ "Turn off angle snapping",
2865
+ "Stop lines snapping to fixed angles",
2866
+ "Disable the angle snap so I can draw at any angle",
2867
+ "Remove angle snapping while sketching\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableAngle()\n```"
2868
+ ],
1908
2869
  "argsType": null,
1909
2870
  "resultType": "boolean"
1910
2871
  },
1911
2872
  {
1912
2873
  "path": "core.project.settings.snaps.disableDimension",
1913
2874
  "namespace": "core.project.settings.snaps",
1914
- "summary": "Turn dimension snapping off.",
1915
- "examplePrompts": [],
2875
+ "summary": "Turn dimension snapping off, so lengths no longer snap to the configured increment while drawing.",
2876
+ "examplePrompts": [
2877
+ "Turn off dimension snapping",
2878
+ "Stop snapping to fixed lengths when I draw",
2879
+ "Disable the length snap so I can draw freely",
2880
+ "I don't want dimensions to snap anymore\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableDimension()\n```"
2881
+ ],
1916
2882
  "argsType": null,
1917
2883
  "resultType": "boolean"
1918
2884
  },
1919
2885
  {
1920
2886
  "path": "core.project.settings.snaps.disableMagnetic",
1921
2887
  "namespace": "core.project.settings.snaps",
1922
- "summary": "Turn magnetic snapping off.",
1923
- "examplePrompts": [],
2888
+ "summary": "Turn magnetic snapping off, so the cursor is no longer pulled to nearby geometry while drawing.",
2889
+ "examplePrompts": [
2890
+ "Turn off magnetic snapping",
2891
+ "Disable the magnet snap",
2892
+ "Stop the cursor sticking to nearby objects",
2893
+ "The magnetic snap is annoying, switch it off\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableMagnetic()\n```"
2894
+ ],
1924
2895
  "argsType": null,
1925
2896
  "resultType": "boolean"
1926
2897
  },
1927
2898
  {
1928
2899
  "path": "core.project.settings.snaps.disableNormal",
1929
2900
  "namespace": "core.project.settings.snaps",
1930
- "summary": "Turn normal (perpendicular) snapping off.",
1931
- "examplePrompts": [],
2901
+ "summary": "Turn normal (perpendicular) snapping off, so drawing no longer snaps at right angles to existing edges.",
2902
+ "examplePrompts": [
2903
+ "Turn off perpendicular snapping",
2904
+ "Disable the normal snap",
2905
+ "Stop snapping at right angles to edges",
2906
+ "Remove the 90 degree snap guide\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableNormal()\n```"
2907
+ ],
1932
2908
  "argsType": null,
1933
2909
  "resultType": "boolean"
1934
2910
  },
1935
2911
  {
1936
2912
  "path": "core.project.settings.snaps.disableParallel",
1937
2913
  "namespace": "core.project.settings.snaps",
1938
- "summary": "Turn parallel snapping off.",
1939
- "examplePrompts": [],
2914
+ "summary": "Turn parallel snapping off, so drawing no longer snaps to directions parallel to existing edges.",
2915
+ "examplePrompts": [
2916
+ "Turn off parallel snapping",
2917
+ "Stop snapping to parallel edges",
2918
+ "Disable the parallel snap guide",
2919
+ "I don't want my lines snapping parallel anymore\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.disableParallel()\n```"
2920
+ ],
1940
2921
  "argsType": null,
1941
2922
  "resultType": "boolean"
1942
2923
  },
1943
2924
  {
1944
2925
  "path": "core.project.settings.snaps.enableAngle",
1945
2926
  "namespace": "core.project.settings.snaps",
1946
- "summary": "Turn angle snapping on.",
1947
- "examplePrompts": [],
2927
+ "summary": "Turn angle snapping on, so drawn lines snap to the configured angle increment.",
2928
+ "examplePrompts": [
2929
+ "Turn on angle snapping",
2930
+ "Enable snapping to angles while drawing",
2931
+ "Make my lines snap to set angles",
2932
+ "Switch angle snap back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableAngle()\n```"
2933
+ ],
1948
2934
  "argsType": null,
1949
2935
  "resultType": "boolean"
1950
2936
  },
1951
2937
  {
1952
2938
  "path": "core.project.settings.snaps.enableDimension",
1953
2939
  "namespace": "core.project.settings.snaps",
1954
- "summary": "Turn dimension snapping on.",
1955
- "examplePrompts": [],
2940
+ "summary": "Turn dimension snapping on, so drawing and editing snap to the configured length increment.",
2941
+ "examplePrompts": [
2942
+ "Turn on dimension snapping",
2943
+ "Enable snapping to set lengths while I draw",
2944
+ "Make my walls snap to round dimensions",
2945
+ "Switch length snapping back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableDimension()\n```"
2946
+ ],
1956
2947
  "argsType": null,
1957
2948
  "resultType": "boolean"
1958
2949
  },
1959
2950
  {
1960
2951
  "path": "core.project.settings.snaps.enableMagnetic",
1961
2952
  "namespace": "core.project.settings.snaps",
1962
- "summary": "Turn magnetic snapping on.",
1963
- "examplePrompts": [],
2953
+ "summary": "Turn magnetic snapping on, so the cursor is pulled to nearby geometry while drawing.",
2954
+ "examplePrompts": [
2955
+ "Turn on magnetic snapping",
2956
+ "Enable the magnet snap",
2957
+ "Make the cursor stick to nearby geometry when drawing",
2958
+ "Switch magnetic snap back on\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableMagnetic()\n```"
2959
+ ],
1964
2960
  "argsType": null,
1965
2961
  "resultType": "boolean"
1966
2962
  },
1967
2963
  {
1968
2964
  "path": "core.project.settings.snaps.enableNormal",
1969
2965
  "namespace": "core.project.settings.snaps",
1970
- "summary": "Turn normal (perpendicular) snapping on.",
1971
- "examplePrompts": [],
2966
+ "summary": "Turn normal (perpendicular) snapping on, so drawing snaps when the cursor is at a right angle to existing edges.",
2967
+ "examplePrompts": [
2968
+ "Turn on perpendicular snapping",
2969
+ "Enable the normal snap so lines snap at right angles",
2970
+ "Snap to perpendicular when I draw walls",
2971
+ "Help me draw at 90 degrees to existing edges\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableNormal()\n```"
2972
+ ],
1972
2973
  "argsType": null,
1973
2974
  "resultType": "boolean"
1974
2975
  },
1975
2976
  {
1976
2977
  "path": "core.project.settings.snaps.enableParallel",
1977
2978
  "namespace": "core.project.settings.snaps",
1978
- "summary": "Turn parallel snapping on.",
1979
- "examplePrompts": [],
2979
+ "summary": "Turn parallel snapping on, so drawing snaps when the cursor lines up parallel to existing edges.",
2980
+ "examplePrompts": [
2981
+ "Turn on parallel snapping",
2982
+ "Enable snapping to parallel lines",
2983
+ "Help me draw walls parallel to existing ones",
2984
+ "Snap to parallel edges when drawing\n\n# Example\n```ts\nawait snaptrude.core.project.settings.snaps.enableParallel()\n```"
2985
+ ],
1980
2986
  "argsType": null,
1981
2987
  "resultType": "boolean"
1982
2988
  },
1983
2989
  {
1984
2990
  "path": "core.project.settings.snaps.getAngle",
1985
2991
  "namespace": "core.project.settings.snaps",
1986
- "summary": "Get the angle-snap threshold (degrees).",
1987
- "examplePrompts": [],
2992
+ "summary": "Get the current angle-snap threshold in degrees — the angular increment that drawing snaps to when angle snapping is on.",
2993
+ "examplePrompts": [
2994
+ "What angle does drawing snap to?",
2995
+ "Check the current angle snap in degrees",
2996
+ "Show me the angle snapping increment",
2997
+ "How many degrees is the angle snap set to?\n\n# Example\n```ts\nconst degrees = await snaptrude.core.project.settings.snaps.getAngle()\nconsole.log(degrees)\n```"
2998
+ ],
1988
2999
  "argsType": null,
1989
3000
  "resultType": "number"
1990
3001
  },
1991
3002
  {
1992
3003
  "path": "core.project.settings.snaps.getDimension",
1993
3004
  "namespace": "core.project.settings.snaps",
1994
- "summary": "Get the dimension-snap threshold.",
1995
- "examplePrompts": [],
3005
+ "summary": "Get the current dimension-snap threshold — the length increment that drawing and editing snap to when dimension snapping is on.",
3006
+ "examplePrompts": [
3007
+ "What is the dimension snap distance?",
3008
+ "Check the current snap increment for drawing",
3009
+ "How far apart are the length snaps set?",
3010
+ "Show me the snap spacing value\n\n# Example\n```ts\nconst increment = await snaptrude.core.project.settings.snaps.getDimension()\nconsole.log(increment)\n```"
3011
+ ],
1996
3012
  "argsType": null,
1997
3013
  "resultType": "number"
1998
3014
  },
1999
3015
  {
2000
3016
  "path": "core.project.settings.snaps.setAngle",
2001
3017
  "namespace": "core.project.settings.snaps",
2002
- "summary": "Set the angle-snap threshold (degrees).",
2003
- "examplePrompts": [],
3018
+ "summary": "Set the angle-snap threshold in degrees — the angular increment that drawing snaps to when angle snapping is on.",
3019
+ "examplePrompts": [
3020
+ "Set the angle snap to 15 degrees",
3021
+ "Change angle snapping to every 45 degrees",
3022
+ "Make drawing snap at 30 degree increments",
3023
+ "Adjust the rotation snap angle\n\n# Example\n```ts\n// snap drawing to 15-degree increments (applies while angle snapping is on)\nawait snaptrude.core.project.settings.snaps.setAngle(15)\nawait snaptrude.core.project.settings.snaps.enableAngle()\n```"
3024
+ ],
2004
3025
  "argsType": "number",
2005
3026
  "resultType": "boolean"
2006
3027
  },
2007
3028
  {
2008
3029
  "path": "core.project.settings.snaps.setDimension",
2009
3030
  "namespace": "core.project.settings.snaps",
2010
- "summary": "Set the dimension-snap threshold.",
2011
- "examplePrompts": [],
3031
+ "summary": "Set the dimension-snap threshold — the length increment that drawing and editing snap to when dimension snapping is on.",
3032
+ "examplePrompts": [
3033
+ "Set the dimension snap to 100mm",
3034
+ "Change the snap distance to half a metre",
3035
+ "Make the cursor snap every 6 inches when drawing",
3036
+ "Adjust the snapping increment for lengths\n\n# Example\n```ts\n// the threshold only applies while dimension snapping is on\nawait snaptrude.core.project.settings.snaps.setDimension(100)\nawait snaptrude.core.project.settings.snaps.enableDimension()\n```"
3037
+ ],
2012
3038
  "argsType": "number",
2013
3039
  "resultType": "boolean"
2014
3040
  },
@@ -2184,23 +3210,38 @@
2184
3210
  "path": "core.units.convert",
2185
3211
  "namespace": "core.units",
2186
3212
  "summary": "Convert a value between two unit types.",
2187
- "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
+ ],
2188
3220
  "argsType": "number",
2189
3221
  "resultType": "number"
2190
3222
  },
2191
3223
  {
2192
3224
  "path": "core.units.getBabylonType",
2193
3225
  "namespace": "core.units",
2194
- "summary": "The internal storage unit type all geometry is stored in (`\"babylon\"`).",
2195
- "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
+ ],
2196
3232
  "argsType": null,
2197
3233
  "resultType": "PUnitType"
2198
3234
  },
2199
3235
  {
2200
3236
  "path": "core.units.getType",
2201
3237
  "namespace": "core.units",
2202
- "summary": "The current project's unit type. Paired with {@linkcode PluginUnitsApi.setType}.",
2203
- "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
+ ],
2204
3245
  "argsType": null,
2205
3246
  "resultType": "PUnitType"
2206
3247
  },
@@ -2208,7 +3249,12 @@
2208
3249
  "path": "core.units.listTypes",
2209
3250
  "namespace": "core.units",
2210
3251
  "summary": "List the selectable real-world unit types (excludes the internal `babylon` storage type, which is read via {@linkcode PluginUnitsApi.getBabylonType}).",
2211
- "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
+ ],
2212
3258
  "argsType": null,
2213
3259
  "resultType": "PUnitType[]"
2214
3260
  },
@@ -2216,7 +3262,12 @@
2216
3262
  "path": "core.units.setType",
2217
3263
  "namespace": "core.units",
2218
3264
  "summary": "Set the current project's unit type. Paired with {@linkcode PluginUnitsApi.getType}.",
2219
- "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
+ ],
2220
3271
  "argsType": "PUnitType",
2221
3272
  "resultType": "boolean"
2222
3273
  },
@@ -2224,7 +3275,13 @@
2224
3275
  "path": "core.zoom.extents",
2225
3276
  "namespace": "core.zoom",
2226
3277
  "summary": "Zoom (fit) the camera to all geometry in the scene — the \"zoom extents\" action.",
2227
- "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
+ ],
2228
3285
  "argsType": null,
2229
3286
  "resultType": "boolean"
2230
3287
  },
@@ -2232,31 +3289,53 @@
2232
3289
  "path": "core.zoom.selection",
2233
3290
  "namespace": "core.zoom",
2234
3291
  "summary": "Zoom (fit) the camera to the current selection.",
2235
- "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
+ ],
2236
3298
  "argsType": null,
2237
3299
  "resultType": "boolean"
2238
3300
  },
2239
3301
  {
2240
3302
  "path": "design.boolean.intersect",
2241
3303
  "namespace": "design.boolean",
2242
- "summary": "Keep only the overlap of the inputs (`A ∩ B`). Order-independent. HARD constraint: **EXACTLY 2** components (schema `.length(2)`; the engine also throws `MoreThan2ComponentsForIntersect` on >2).",
2243
- "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
+ ],
2244
3311
  "argsType": "ComponentHandle[]",
2245
3312
  "resultType": "BooleanOutcome"
2246
3313
  },
2247
3314
  {
2248
3315
  "path": "design.boolean.subtract",
2249
3316
  "namespace": "design.boolean",
2250
- "summary": "Subtract `tools` from `target` (`target − ⋃tools`). ORDER-SENSITIVE: the host seeds `[target, ...tools]`; index 0 is the arg brep, the rest are tool breps. `deleted` includes the target AND every tool; `created` is the remainder mass(es).",
2251
- "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
+ ],
2252
3325
  "argsType": "ComponentHandle",
2253
3326
  "resultType": "BooleanOutcome"
2254
3327
  },
2255
3328
  {
2256
3329
  "path": "design.boolean.union",
2257
3330
  "namespace": "design.boolean",
2258
- "summary": "Fuse ≥2 components into a single mass (`A ∪ B ∪ …`). Order-independent.",
2259
- "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
+ ],
2260
3339
  "argsType": "ComponentHandle[]",
2261
3340
  "resultType": "BooleanOutcome"
2262
3341
  },
@@ -2264,7 +3343,12 @@
2264
3343
  "path": "design.create.beam",
2265
3344
  "namespace": "design.create",
2266
3345
  "summary": "Create a **beam** by extruding a cross-section contour along `direction` by `length`.",
2267
- "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
+ ],
2268
3352
  "argsType": "ContourHandle",
2269
3353
  "resultType": "ComponentHandle"
2270
3354
  },
@@ -2272,7 +3356,12 @@
2272
3356
  "path": "design.create.ceiling",
2273
3357
  "namespace": "design.create",
2274
3358
  "summary": "Create a **ceiling** by extruding a footprint contour by `thickness`, lifted `heightFromFloor` above the floor.",
2275
- "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
+ ],
2276
3365
  "argsType": "ContourHandle",
2277
3366
  "resultType": "ComponentHandle"
2278
3367
  },
@@ -2280,7 +3369,12 @@
2280
3369
  "path": "design.create.column",
2281
3370
  "namespace": "design.create",
2282
3371
  "summary": "Create a **column** by extruding a cross-section contour upward by `height` from a base `position`.",
2283
- "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
+ ],
2284
3378
  "argsType": "Vec3Handle",
2285
3379
  "resultType": "ComponentHandle"
2286
3380
  },
@@ -2288,7 +3382,13 @@
2288
3382
  "path": "design.create.copy",
2289
3383
  "namespace": "design.create",
2290
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.",
2291
- "examplePrompts": [],
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
+ ],
2292
3392
  "argsType": "ComponentHandle[]",
2293
3393
  "resultType": "ComponentHandle[]"
2294
3394
  },
@@ -2296,7 +3396,12 @@
2296
3396
  "path": "design.create.floor",
2297
3397
  "namespace": "design.create",
2298
3398
  "summary": "Create a **floor** by extruding a footprint contour by `thickness` (extruded upward).",
2299
- "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
+ ],
2300
3405
  "argsType": "ContourHandle",
2301
3406
  "resultType": "ComponentHandle"
2302
3407
  },
@@ -2304,7 +3409,13 @@
2304
3409
  "path": "design.create.furniture",
2305
3410
  "namespace": "design.create",
2306
3411
  "summary": "Place a **furniture** item from the project library at a world position.",
2307
- "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
+ ],
2308
3419
  "argsType": "string",
2309
3420
  "resultType": "ComponentHandle"
2310
3421
  },
@@ -2312,7 +3423,12 @@
2312
3423
  "path": "design.create.mass",
2313
3424
  "namespace": "design.create",
2314
3425
  "summary": "Create a **mass** — a generic extruded prism (default `massType` \"Generic mass\"). Same footprint-extrude path as {@linkcode PluginDesignCreateApi.space}.",
2315
- "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
+ ],
2316
3432
  "argsType": "ContourHandle",
2317
3433
  "resultType": "ComponentHandle"
2318
3434
  },
@@ -2320,7 +3436,13 @@
2320
3436
  "path": "design.create.referenceLines",
2321
3437
  "namespace": "design.create",
2322
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.",
2323
- "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
+ ],
2324
3446
  "argsType": "ProfileHandle",
2325
3447
  "resultType": "ComponentHandle[]"
2326
3448
  },
@@ -2328,7 +3450,12 @@
2328
3450
  "path": "design.create.roof",
2329
3451
  "namespace": "design.create",
2330
3452
  "summary": "Create a **roof** by extruding a footprint contour by `thickness`. Created flat (extruded downward); pitch/slope is a separate post-creation edit.",
2331
- "examplePrompts": [],
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
+ ],
2332
3459
  "argsType": "ContourHandle",
2333
3460
  "resultType": "ComponentHandle"
2334
3461
  },
@@ -2336,7 +3463,13 @@
2336
3463
  "path": "design.create.slab",
2337
3464
  "namespace": "design.create",
2338
3465
  "summary": "Create a **slab** by extruding a footprint contour by `thickness` (default direction: down).",
2339
- "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
+ ],
2340
3473
  "argsType": "ContourHandle",
2341
3474
  "resultType": "ComponentHandle"
2342
3475
  },
@@ -2344,7 +3477,13 @@
2344
3477
  "path": "design.create.space",
2345
3478
  "namespace": "design.create",
2346
3479
  "summary": "Create a **space** (a room / mass) by extruding a footprint contour upward.",
2347
- "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
+ ],
2348
3487
  "argsType": "ContourHandle",
2349
3488
  "resultType": "ComponentHandle"
2350
3489
  },
@@ -2352,7 +3491,12 @@
2352
3491
  "path": "design.create.spaces",
2353
3492
  "namespace": "design.create",
2354
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.",
2355
- "examplePrompts": [],
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
+ ],
2356
3500
  "argsType": "PluginCreateSpaceItem[]",
2357
3501
  "resultType": "ComponentHandle[]"
2358
3502
  },
@@ -2360,7 +3504,13 @@
2360
3504
  "path": "design.create.staircase",
2361
3505
  "namespace": "design.create",
2362
3506
  "summary": "Create a **staircase** from a parametric preset, placed at a point.",
2363
- "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
+ ],
2364
3514
  "argsType": "PluginStaircasePreset",
2365
3515
  "resultType": "ComponentHandle"
2366
3516
  },
@@ -2368,7 +3518,13 @@
2368
3518
  "path": "design.create.walls",
2369
3519
  "namespace": "design.create",
2370
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.",
2371
- "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
+ ],
2372
3528
  "argsType": "ProfileHandle",
2373
3529
  "resultType": "ComponentHandle[]"
2374
3530
  },
@@ -2376,87 +3532,145 @@
2376
3532
  "path": "design.delete.entities",
2377
3533
  "namespace": "design.delete",
2378
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.",
2379
- "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
+ ],
2380
3542
  "argsType": "ComponentHandle[]",
2381
3543
  "resultType": "PluginDesignChangeResult"
2382
3544
  },
2383
3545
  {
2384
3546
  "path": "design.doors.getFamily",
2385
3547
  "namespace": "design.doors",
2386
- "summary": "Get a door's family name (Revit/native).",
2387
- "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
+ ],
2388
3555
  "argsType": "ComponentHandle",
2389
3556
  "resultType": "string | null"
2390
3557
  },
2391
3558
  {
2392
3559
  "path": "design.doors.getHeight",
2393
3560
  "namespace": "design.doors",
2394
- "summary": "Get a door's height.",
2395
- "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
+ ],
2396
3568
  "argsType": "ComponentHandle",
2397
3569
  "resultType": "number | null"
2398
3570
  },
2399
3571
  {
2400
3572
  "path": "design.doors.getSupportFloor",
2401
3573
  "namespace": "design.doors",
2402
- "summary": "Get the floor a door is hosted on.",
2403
- "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
+ ],
2404
3581
  "argsType": "ComponentHandle",
2405
3582
  "resultType": "ComponentHandle | null"
2406
3583
  },
2407
3584
  {
2408
3585
  "path": "design.doors.getSwingDirection",
2409
3586
  "namespace": "design.doors",
2410
- "summary": "Get a door's swing (hinge) handedness — derived from the mesh reflection state.",
2411
- "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
+ ],
2412
3594
  "argsType": "ComponentHandle",
2413
3595
  "resultType": "\"left\" | \"right\" | null"
2414
3596
  },
2415
3597
  {
2416
3598
  "path": "design.doors.getType",
2417
3599
  "namespace": "design.doors",
2418
- "summary": "Get a door's type name.",
2419
- "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
+ ],
2420
3607
  "argsType": "ComponentHandle",
2421
3608
  "resultType": "string | null"
2422
3609
  },
2423
3610
  {
2424
3611
  "path": "design.doors.getWidth",
2425
3612
  "namespace": "design.doors",
2426
- "summary": "Get a door's width.",
2427
- "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
+ ],
2428
3620
  "argsType": "ComponentHandle",
2429
3621
  "resultType": "number | null"
2430
3622
  },
2431
3623
  {
2432
3624
  "path": "design.doors.mirror",
2433
3625
  "namespace": "design.doors",
2434
- "summary": "Mirror a door across an axis (reflect its swing). Undoable (one command).",
2435
- "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
+ ],
2436
3634
  "argsType": "ComponentHandle",
2437
3635
  "resultType": "PluginDesignChangeResult"
2438
3636
  },
2439
3637
  {
2440
3638
  "path": "design.doors.setHeight",
2441
3639
  "namespace": "design.doors",
2442
- "summary": "Set the height of one or more doors (engine units; re-cuts the host wall). Undoable.",
2443
- "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
+ ],
2444
3647
  "argsType": "ComponentHandle[]",
2445
3648
  "resultType": "PluginDesignChangeResult"
2446
3649
  },
2447
3650
  {
2448
3651
  "path": "design.doors.setWidth",
2449
3652
  "namespace": "design.doors",
2450
- "summary": "Set the width of one or more doors (engine units; re-cuts the host wall). Undoable.",
2451
- "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
+ ],
2452
3661
  "argsType": "ComponentHandle[]",
2453
3662
  "resultType": "PluginDesignChangeResult"
2454
3663
  },
2455
3664
  {
2456
3665
  "path": "design.edit.offsetSplit",
2457
3666
  "namespace": "design.edit",
2458
- "summary": "Offset-and-split the top profile of one component. Positive = outward, negative = inward. Single-component only (the engine rejects batches).",
2459
- "examplePrompts": [],
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
+ ],
2460
3674
  "argsType": "ComponentHandle",
2461
3675
  "resultType": "OffsetSplitOutcome"
2462
3676
  },
@@ -2464,7 +3678,13 @@
2464
3678
  "path": "design.erase.edge",
2465
3679
  "namespace": "design.erase",
2466
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.",
2467
- "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
+ ],
2468
3688
  "argsType": "ErasableEdgeRef",
2469
3689
  "resultType": "PluginDesignEraseEdgeResult"
2470
3690
  },
@@ -2472,7 +3692,12 @@
2472
3692
  "path": "design.erase.listErasableEdges",
2473
3693
  "namespace": "design.erase",
2474
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.",
2475
- "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
+ ],
2476
3701
  "argsType": "PluginDesignListErasableEdgesArgs",
2477
3702
  "resultType": "ErasableEdgeRef[]"
2478
3703
  },
@@ -2480,7 +3705,12 @@
2480
3705
  "path": "design.furniture.exists",
2481
3706
  "namespace": "design.furniture",
2482
3707
  "summary": "Test whether a catalog item exists for the given library id.",
2483
- "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
+ ],
2484
3714
  "argsType": "string",
2485
3715
  "resultType": "boolean"
2486
3716
  },
@@ -2488,7 +3718,12 @@
2488
3718
  "path": "design.furniture.getCatalogItem",
2489
3719
  "namespace": "design.furniture",
2490
3720
  "summary": "Get a single catalog item by its library id.",
2491
- "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
+ ],
2492
3727
  "argsType": "string",
2493
3728
  "resultType": "PluginFurnitureCatalogItem | null"
2494
3729
  },
@@ -2496,7 +3731,13 @@
2496
3731
  "path": "design.furniture.listCatalog",
2497
3732
  "namespace": "design.furniture",
2498
3733
  "summary": "List the placeable furniture catalog (team + general libraries).",
2499
- "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
+ ],
2500
3741
  "argsType": "\"team\" | \"general\"",
2501
3742
  "resultType": "PluginFurnitureCatalogItem[]"
2502
3743
  },
@@ -2504,7 +3745,12 @@
2504
3745
  "path": "design.isLocked",
2505
3746
  "namespace": "design",
2506
3747
  "summary": "Test whether an entity is locked (folds group + bucket lock unless `includeInherited: false`).",
2507
- "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
+ ],
2508
3754
  "argsType": "ComponentHandle",
2509
3755
  "resultType": "boolean"
2510
3756
  },
@@ -2512,31 +3758,52 @@
2512
3758
  "path": "design.listLocked",
2513
3759
  "namespace": "design",
2514
3760
  "summary": "List the explicitly-locked entities (excludes purely group/bucket-inherited locks).",
2515
- "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
+ ],
2516
3767
  "argsType": null,
2517
3768
  "resultType": "ComponentHandle[]"
2518
3769
  },
2519
3770
  {
2520
3771
  "path": "design.lock",
2521
3772
  "namespace": "design",
2522
- "summary": "Lock entities (blocks editing). Undoable. Cascades to void/door/window children, stacked-wall companions, and terrain neighborhood; skips active-group members.",
2523
- "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
+ ],
2524
3780
  "argsType": "ComponentHandle[]",
2525
3781
  "resultType": "PluginDesignChangeResult"
2526
3782
  },
2527
3783
  {
2528
3784
  "path": "design.materials.apply",
2529
3785
  "namespace": "design.materials",
2530
- "summary": "Apply a material (by handle or spec) to one or more components. Undoable (`save`, default true).",
2531
- "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
+ ],
2532
3794
  "argsType": "ComponentHandle[]",
2533
3795
  "resultType": "PluginMaterialResult"
2534
3796
  },
2535
3797
  {
2536
3798
  "path": "design.materials.create",
2537
3799
  "namespace": "design.materials",
2538
- "summary": "Create (or get, idempotent by name) a material from a spec.",
2539
- "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
+ ],
2540
3807
  "argsType": "PluginMaterialSpec",
2541
3808
  "resultType": "MaterialHandle"
2542
3809
  },
@@ -2544,15 +3811,25 @@
2544
3811
  "path": "design.materials.getDefault",
2545
3812
  "namespace": "design.materials",
2546
3813
  "summary": "Get the default material for a component's type.",
2547
- "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
+ ],
2548
3820
  "argsType": "ComponentHandle",
2549
3821
  "resultType": "MaterialHandle | null"
2550
3822
  },
2551
3823
  {
2552
3824
  "path": "design.materials.getInfo",
2553
3825
  "namespace": "design.materials",
2554
- "summary": "Read a material's descriptor.",
2555
- "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
+ ],
2556
3833
  "argsType": "MaterialHandle",
2557
3834
  "resultType": "PluginMaterialInfo | null"
2558
3835
  },
@@ -2560,7 +3837,12 @@
2560
3837
  "path": "design.materials.hasTexture",
2561
3838
  "namespace": "design.materials",
2562
3839
  "summary": "Test whether a material has a texture.",
2563
- "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
+ ],
2564
3846
  "argsType": "MaterialHandle",
2565
3847
  "resultType": "boolean"
2566
3848
  },
@@ -2568,7 +3850,12 @@
2568
3850
  "path": "design.materials.isDefault",
2569
3851
  "namespace": "design.materials",
2570
3852
  "summary": "Test whether a component carries its (type) default material.",
2571
- "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
+ ],
2572
3859
  "argsType": "ComponentHandle",
2573
3860
  "resultType": "boolean"
2574
3861
  },
@@ -2576,7 +3863,12 @@
2576
3863
  "path": "design.materials.isUniform",
2577
3864
  "namespace": "design.materials",
2578
3865
  "summary": "Test whether a component has a single (uniform) material across all faces.",
2579
- "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
+ ],
2580
3872
  "argsType": "ComponentHandle",
2581
3873
  "resultType": "boolean"
2582
3874
  },
@@ -2584,15 +3876,26 @@
2584
3876
  "path": "design.materials.list",
2585
3877
  "namespace": "design.materials",
2586
3878
  "summary": "List the project materials.",
2587
- "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
+ ],
2588
3886
  "argsType": "\"project\" | \"preset\"",
2589
3887
  "resultType": "MaterialHandle[]"
2590
3888
  },
2591
3889
  {
2592
3890
  "path": "design.materials.reset",
2593
3891
  "namespace": "design.materials",
2594
- "summary": "Reset one or more components to their default material. Undoable. Paired with `apply`.",
2595
- "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
+ ],
2596
3899
  "argsType": "ComponentHandle[]",
2597
3900
  "resultType": "PluginMaterialResult"
2598
3901
  },
@@ -2600,7 +3903,12 @@
2600
3903
  "path": "design.query.exists",
2601
3904
  "namespace": "design.query",
2602
3905
  "summary": "Test whether an entity id resolves to a live scene entity.",
2603
- "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
+ ],
2604
3912
  "argsType": "ComponentHandle",
2605
3913
  "resultType": "boolean"
2606
3914
  },
@@ -2608,23 +3916,53 @@
2608
3916
  "path": "design.query.geometry.getBottomContour",
2609
3917
  "namespace": "design.query.geometry",
2610
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}.",
2611
- "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
+ ],
2612
3926
  "argsType": "ComponentHandle",
2613
3927
  "resultType": "ContourHandle | null"
2614
3928
  },
2615
3929
  {
2616
3930
  "path": "design.query.geometry.getBrep",
2617
3931
  "namespace": "design.query.geometry",
2618
- "summary": "Get the boundary-representation (BREP) mesh of a scene component.",
2619
- "examplePrompts": [],
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
+ ],
2620
3939
  "argsType": "ComponentHandle",
2621
3940
  "resultType": "BrepHandle | null"
2622
3941
  },
3942
+ {
3943
+ "path": "design.query.geometry.getCenterline",
3944
+ "namespace": "design.query.geometry",
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
+ ],
3953
+ "argsType": "ComponentHandle",
3954
+ "resultType": "CurveHandle | null"
3955
+ },
2623
3956
  {
2624
3957
  "path": "design.query.getBoundingBox",
2625
3958
  "namespace": "design.query",
2626
3959
  "summary": "Get the **union** axis-aligned bounding box enclosing a set of entities.",
2627
- "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
+ ],
2628
3966
  "argsType": "ComponentHandle[]",
2629
3967
  "resultType": "BBoxComponents | null"
2630
3968
  },
@@ -2632,7 +3970,12 @@
2632
3970
  "path": "design.query.getById",
2633
3971
  "namespace": "design.query",
2634
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}).",
2635
- "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
+ ],
2636
3979
  "argsType": "ComponentHandle",
2637
3980
  "resultType": "ComponentHandle | null"
2638
3981
  },
@@ -2640,15 +3983,24 @@
2640
3983
  "path": "design.query.getEntityRef",
2641
3984
  "namespace": "design.query",
2642
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.",
2643
- "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
+ ],
2644
3991
  "argsType": "ComponentHandle",
2645
3992
  "resultType": "ComponentHandle"
2646
3993
  },
2647
3994
  {
2648
3995
  "path": "design.query.getEntityType",
2649
3996
  "namespace": "design.query",
2650
- "summary": "Get an entity's {@linkcode PluginEntityType}.",
2651
- "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
+ ],
2652
4004
  "argsType": "ComponentHandle",
2653
4005
  "resultType": "PluginEntityType | null"
2654
4006
  },
@@ -2656,7 +4008,12 @@
2656
4008
  "path": "design.query.getHost",
2657
4009
  "namespace": "design.query",
2658
4010
  "summary": "Get an entity's host/parent entity (e.g. the wall a door is cut into).",
2659
- "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
+ ],
2660
4017
  "argsType": "ComponentHandle",
2661
4018
  "resultType": "ComponentHandle | null"
2662
4019
  },
@@ -2664,7 +4021,12 @@
2664
4021
  "path": "design.query.getLabel",
2665
4022
  "namespace": "design.query",
2666
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`).",
2667
- "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
+ ],
2668
4030
  "argsType": "ComponentHandle",
2669
4031
  "resultType": "string"
2670
4032
  },
@@ -2672,55 +4034,91 @@
2672
4034
  "path": "design.query.getProperties",
2673
4035
  "namespace": "design.query",
2674
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`).",
2675
- "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
+ ],
2676
4044
  "argsType": "ComponentHandle",
2677
4045
  "resultType": "PluginEntityProperties"
2678
4046
  },
2679
4047
  {
2680
4048
  "path": "design.query.listBeams",
2681
4049
  "namespace": "design.query",
2682
- "summary": "List all **beams**, filtered.",
2683
- "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
+ ],
2684
4057
  "argsType": "PluginEntityFilter",
2685
4058
  "resultType": "ComponentHandle[]"
2686
4059
  },
2687
4060
  {
2688
4061
  "path": "design.query.listByType",
2689
4062
  "namespace": "design.query",
2690
- "summary": "List entities of a single {@linkcode PluginEntityType}, plus filter.",
2691
- "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
+ ],
2692
4070
  "argsType": "PluginEntityType",
2693
4071
  "resultType": "ComponentHandle[]"
2694
4072
  },
2695
4073
  {
2696
4074
  "path": "design.query.listCeilings",
2697
4075
  "namespace": "design.query",
2698
- "summary": "List all **ceilings**, filtered.",
2699
- "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
+ ],
2700
4083
  "argsType": "PluginEntityFilter",
2701
4084
  "resultType": "ComponentHandle[]"
2702
4085
  },
2703
4086
  {
2704
4087
  "path": "design.query.listChildren",
2705
4088
  "namespace": "design.query",
2706
- "summary": "List an entity's direct child entities.",
2707
- "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
+ ],
2708
4096
  "argsType": "ComponentHandle",
2709
4097
  "resultType": "ComponentHandle[]"
2710
4098
  },
2711
4099
  {
2712
4100
  "path": "design.query.listColumns",
2713
4101
  "namespace": "design.query",
2714
- "summary": "List all **columns**, filtered.",
2715
- "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
+ ],
2716
4109
  "argsType": "PluginEntityFilter",
2717
4110
  "resultType": "ComponentHandle[]"
2718
4111
  },
2719
4112
  {
2720
4113
  "path": "design.query.listDoors",
2721
4114
  "namespace": "design.query",
2722
- "summary": "List all **doors**, filtered.",
2723
- "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
+ ],
2724
4122
  "argsType": "PluginEntityFilter",
2725
4123
  "resultType": "ComponentHandle[]"
2726
4124
  },
@@ -2728,103 +4126,172 @@
2728
4126
  "path": "design.query.listEntities",
2729
4127
  "namespace": "design.query",
2730
4128
  "summary": "List **all** BIM entities in the project matching the filter.",
2731
- "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
+ ],
2732
4136
  "argsType": "PluginEntityFilter",
2733
4137
  "resultType": "ComponentHandle[]"
2734
4138
  },
2735
4139
  {
2736
4140
  "path": "design.query.listFloors",
2737
4141
  "namespace": "design.query",
2738
- "summary": "List all **floors**, filtered.",
2739
- "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
+ ],
2740
4149
  "argsType": "PluginEntityFilter",
2741
4150
  "resultType": "ComponentHandle[]"
2742
4151
  },
2743
4152
  {
2744
4153
  "path": "design.query.listFurniture",
2745
4154
  "namespace": "design.query",
2746
- "summary": "List all **furniture**, filtered.",
2747
- "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
+ ],
2748
4162
  "argsType": "PluginEntityFilter",
2749
4163
  "resultType": "ComponentHandle[]"
2750
4164
  },
2751
4165
  {
2752
4166
  "path": "design.query.listMasses",
2753
4167
  "namespace": "design.query",
2754
- "summary": "List all **generic masses** (non-room masses), filtered.",
2755
- "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
+ ],
2756
4175
  "argsType": "PluginEntityFilter",
2757
4176
  "resultType": "ComponentHandle[]"
2758
4177
  },
2759
4178
  {
2760
4179
  "path": "design.query.listMullions",
2761
4180
  "namespace": "design.query",
2762
- "summary": "List all **curtain-wall mullions**, filtered.",
2763
- "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
+ ],
2764
4188
  "argsType": "PluginEntityFilter",
2765
4189
  "resultType": "ComponentHandle[]"
2766
4190
  },
2767
4191
  {
2768
4192
  "path": "design.query.listReferenceLines",
2769
4193
  "namespace": "design.query",
2770
- "summary": "List all **reference lines**, filtered.",
2771
- "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
+ ],
2772
4201
  "argsType": "PluginEntityFilter",
2773
4202
  "resultType": "ComponentHandle[]"
2774
4203
  },
2775
4204
  {
2776
4205
  "path": "design.query.listRoofs",
2777
4206
  "namespace": "design.query",
2778
- "summary": "List all **roofs**, filtered.",
2779
- "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
+ ],
2780
4214
  "argsType": "PluginEntityFilter",
2781
4215
  "resultType": "ComponentHandle[]"
2782
4216
  },
2783
4217
  {
2784
4218
  "path": "design.query.listSlabs",
2785
4219
  "namespace": "design.query",
2786
- "summary": "List all **slabs**, filtered.",
2787
- "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
+ ],
2788
4227
  "argsType": "PluginEntityFilter",
2789
4228
  "resultType": "ComponentHandle[]"
2790
4229
  },
2791
4230
  {
2792
4231
  "path": "design.query.listSpaces",
2793
4232
  "namespace": "design.query",
2794
- "summary": "List all **spaces** (room masses), filtered. See {@linkcode PluginDesignQueryApi.listWalls}.",
2795
- "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
+ ],
2796
4241
  "argsType": "PluginEntityFilter",
2797
4242
  "resultType": "ComponentHandle[]"
2798
4243
  },
2799
4244
  {
2800
4245
  "path": "design.query.listStaircases",
2801
4246
  "namespace": "design.query",
2802
- "summary": "List all **staircases**, filtered.",
2803
- "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
+ ],
2804
4254
  "argsType": "PluginEntityFilter",
2805
4255
  "resultType": "ComponentHandle[]"
2806
4256
  },
2807
4257
  {
2808
4258
  "path": "design.query.listWalls",
2809
4259
  "namespace": "design.query",
2810
- "summary": "List all **walls**, filtered.",
2811
- "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
+ ],
2812
4268
  "argsType": "PluginEntityFilter",
2813
4269
  "resultType": "ComponentHandle[]"
2814
4270
  },
2815
4271
  {
2816
4272
  "path": "design.query.listWindows",
2817
4273
  "namespace": "design.query",
2818
- "summary": "List all **windows**, filtered.",
2819
- "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
+ ],
2820
4281
  "argsType": "PluginEntityFilter",
2821
4282
  "resultType": "ComponentHandle[]"
2822
4283
  },
2823
4284
  {
2824
4285
  "path": "design.query.measure",
2825
4286
  "namespace": "design.query",
2826
- "summary": "Measure an entity — the multi-metric bundle (area/volume/length + bbox).",
2827
- "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
+ ],
2828
4295
  "argsType": "ComponentHandle",
2829
4296
  "resultType": "PluginEntityMeasurements | null"
2830
4297
  },
@@ -2832,7 +4299,13 @@
2832
4299
  "path": "design.query.spaces.get",
2833
4300
  "namespace": "design.query.spaces",
2834
4301
  "summary": "Get selected properties of a space — the selective multi-property read.",
2835
- "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
+ ],
2836
4309
  "argsType": "ComponentHandle",
2837
4310
  "resultType": "PluginDesignQuerySpacesGetResult"
2838
4311
  },
@@ -2840,55 +4313,107 @@
2840
4313
  "path": "design.query.spaces.getFootprint",
2841
4314
  "namespace": "design.query.spaces",
2842
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.",
2843
- "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
+ ],
2844
4322
  "argsType": "ComponentHandle",
2845
4323
  "resultType": "ContourHandle | null"
2846
4324
  },
2847
4325
  {
2848
4326
  "path": "design.selection.add",
2849
4327
  "namespace": "design.selection",
2850
- "summary": "Add entities to the current selection.",
2851
- "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
+ ],
2852
4335
  "argsType": "ComponentHandle[]",
2853
4336
  "resultType": "PluginDesignChangeResult"
2854
4337
  },
2855
4338
  {
2856
4339
  "path": "design.selection.clear",
2857
4340
  "namespace": "design.selection",
2858
- "summary": "Clear the selection ( `set([])`).",
2859
- "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
+ ],
2860
4348
  "argsType": null,
2861
4349
  "resultType": "PluginDesignChangeResult"
2862
4350
  },
2863
4351
  {
2864
4352
  "path": "design.selection.get",
2865
4353
  "namespace": "design.selection",
2866
- "summary": "Get the currently-selected entities.",
2867
- "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
+ ],
2868
4362
  "argsType": null,
2869
4363
  "resultType": "ComponentHandle[]"
2870
4364
  },
2871
4365
  {
2872
4366
  "path": "design.selection.remove",
2873
4367
  "namespace": "design.selection",
2874
- "summary": "Remove entities from the current selection.",
2875
- "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
+ ],
2876
4375
  "argsType": "ComponentHandle[]",
2877
4376
  "resultType": "PluginDesignChangeResult"
2878
4377
  },
2879
4378
  {
2880
4379
  "path": "design.selection.set",
2881
4380
  "namespace": "design.selection",
2882
- "summary": "Replace the selection with exactly the given entities.",
2883
- "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
+ ],
2884
4388
  "argsType": "ComponentHandle[]",
2885
4389
  "resultType": "PluginDesignChangeResult"
2886
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
+ },
2887
4406
  {
2888
4407
  "path": "design.transform.move",
2889
4408
  "namespace": "design.transform",
2890
4409
  "summary": "Translate entities by a **relative** displacement vector (added to the first component's absolute position as the anchor). Undoable.",
2891
- "examplePrompts": [],
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
+ ],
2892
4417
  "argsType": "ComponentHandle[]",
2893
4418
  "resultType": "PluginDesignChangeResult"
2894
4419
  },
@@ -2896,95 +4421,160 @@
2896
4421
  "path": "design.transform.rotate",
2897
4422
  "namespace": "design.transform",
2898
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.",
2899
- "examplePrompts": [],
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
+ ],
2900
4430
  "argsType": "ComponentHandle[]",
2901
4431
  "resultType": "PluginDesignChangeResult"
2902
4432
  },
2903
4433
  {
2904
4434
  "path": "design.unlock",
2905
4435
  "namespace": "design",
2906
- "summary": "Unlock entities. Undoable. Paired with {@linkcode PluginDesignApi.lock}.",
2907
- "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
+ ],
2908
4443
  "argsType": "ComponentHandle[]",
2909
4444
  "resultType": "PluginDesignChangeResult"
2910
4445
  },
2911
4446
  {
2912
4447
  "path": "design.update.space",
2913
4448
  "namespace": "design.update",
2914
- "summary": "Update ONE space — sparse `properties` and/or a `geometry` re-extrude. Undoable.",
2915
- "examplePrompts": [],
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
+ ],
2916
4457
  "argsType": "ComponentHandle",
2917
4458
  "resultType": "PluginSpaceUpdateResult"
2918
4459
  },
2919
4460
  {
2920
4461
  "path": "design.update.spaces",
2921
4462
  "namespace": "design.update",
2922
- "summary": "Update **many spaces** in one undoable operation (bulk plural of {@linkcode space}). Migrated from `entity.space.bulkUpdate`. Validate-all-or-throw; one command.",
2923
- "examplePrompts": [],
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
+ ],
2924
4471
  "argsType": "PluginUpdateSpaceItem[]",
2925
4472
  "resultType": "PluginSpaceUpdateResult[]"
2926
4473
  },
2927
4474
  {
2928
4475
  "path": "design.windows.getDimensions",
2929
4476
  "namespace": "design.windows",
2930
- "summary": "Get a window's dimensions (local oriented space; `thickness` = through-wall depth).",
2931
- "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
+ ],
2932
4485
  "argsType": "ComponentHandle",
2933
4486
  "resultType": "PluginWindowDimensions | null"
2934
4487
  },
2935
4488
  {
2936
4489
  "path": "design.windows.getHeight",
2937
4490
  "namespace": "design.windows",
2938
- "summary": "Get a window's height.",
2939
- "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
+ ],
2940
4498
  "argsType": "ComponentHandle",
2941
4499
  "resultType": "number | null"
2942
4500
  },
2943
4501
  {
2944
4502
  "path": "design.windows.getType",
2945
4503
  "namespace": "design.windows",
2946
- "summary": "Get a window's type name.",
2947
- "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
+ ],
2948
4511
  "argsType": "ComponentHandle",
2949
4512
  "resultType": "string | null"
2950
4513
  },
2951
4514
  {
2952
4515
  "path": "design.windows.getWidth",
2953
4516
  "namespace": "design.windows",
2954
- "summary": "Get a window's width.",
2955
- "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
+ ],
2956
4524
  "argsType": "ComponentHandle",
2957
4525
  "resultType": "number | null"
2958
4526
  },
2959
4527
  {
2960
4528
  "path": "design.windows.setHeight",
2961
4529
  "namespace": "design.windows",
2962
- "summary": "Set a window's height (engine units; re-cuts the host wall). Undoable.",
2963
- "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
+ ],
2964
4537
  "argsType": "ComponentHandle",
2965
4538
  "resultType": "PluginDesignChangeResult"
2966
4539
  },
2967
4540
  {
2968
4541
  "path": "design.windows.setWidth",
2969
4542
  "namespace": "design.windows",
2970
- "summary": "Set a window's width (engine units; re-cuts the host wall). Undoable.",
2971
- "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
+ ],
2972
4550
  "argsType": "ComponentHandle",
2973
4551
  "resultType": "PluginDesignChangeResult"
2974
4552
  },
2975
4553
  {
2976
4554
  "path": "entity.buildableEnvelope.create",
2977
4555
  "namespace": "entity.buildableEnvelope",
2978
- "summary": "Create a new parametric buildable envelope.",
2979
- "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
+ ],
2980
4564
  "argsType": "PluginBuildableEnvelopePolygonVertex[]",
2981
4565
  "resultType": "PluginBuildableEnvelopeCreateResult"
2982
4566
  },
2983
4567
  {
2984
4568
  "path": "entity.buildableEnvelope.update",
2985
4569
  "namespace": "entity.buildableEnvelope",
2986
- "summary": "Update an existing parametric buildable envelope.",
2987
- "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
+ ],
2988
4578
  "argsType": "string",
2989
4579
  "resultType": "PluginBuildableEnvelopeUpdateResult"
2990
4580
  },
@@ -2992,7 +4582,13 @@
2992
4582
  "path": "entity.referenceLine.createMulti",
2993
4583
  "namespace": "entity.referenceLine",
2994
4584
  "summary": "Create multiple reference lines from a profile.",
2995
- "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
+ ],
2996
4592
  "argsType": "ProfileHandle",
2997
4593
  "resultType": "PluginReferenceLineCreateMultiResult"
2998
4594
  },
@@ -3000,7 +4596,12 @@
3000
4596
  "path": "entity.referenceLine.delete",
3001
4597
  "namespace": "entity.referenceLine",
3002
4598
  "summary": "Delete a reference line by its ID.",
3003
- "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
+ ],
3004
4605
  "argsType": "string",
3005
4606
  "resultType": "PluginReferenceLineDeleteResult"
3006
4607
  },
@@ -3008,7 +4609,12 @@
3008
4609
  "path": "entity.referenceLine.get",
3009
4610
  "namespace": "entity.referenceLine",
3010
4611
  "summary": "Get properties of a reference line by its ID.",
3011
- "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
+ ],
3012
4618
  "argsType": "string",
3013
4619
  "resultType": "PluginReferenceLineGetResult"
3014
4620
  },
@@ -3016,7 +4622,12 @@
3016
4622
  "path": "entity.referenceLine.getAll",
3017
4623
  "namespace": "entity.referenceLine",
3018
4624
  "summary": "Get the IDs of all reference lines in the current project.",
3019
- "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
+ ],
3020
4631
  "argsType": null,
3021
4632
  "resultType": "PluginReferenceLineGetAllResult"
3022
4633
  },
@@ -3024,7 +4635,13 @@
3024
4635
  "path": "entity.story.create",
3025
4636
  "namespace": "entity.story",
3026
4637
  "summary": "Create a new story (floor) in the project.",
3027
- "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
+ ],
3028
4645
  "argsType": "number",
3029
4646
  "resultType": "PluginStoryCreateResult"
3030
4647
  },
@@ -3032,7 +4649,13 @@
3032
4649
  "path": "entity.story.get",
3033
4650
  "namespace": "entity.story",
3034
4651
  "summary": "Get properties of a story by its storey number.",
3035
- "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
+ ],
3036
4659
  "argsType": "number",
3037
4660
  "resultType": "PluginStoryGetResult"
3038
4661
  },
@@ -3040,7 +4663,12 @@
3040
4663
  "path": "entity.story.getAll",
3041
4664
  "namespace": "entity.story",
3042
4665
  "summary": "Get all stories in the current project.",
3043
- "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
+ ],
3044
4672
  "argsType": null,
3045
4673
  "resultType": "PluginStoryGetAllResult"
3046
4674
  },
@@ -3048,7 +4676,12 @@
3048
4676
  "path": "entity.story.update",
3049
4677
  "namespace": "entity.story",
3050
4678
  "summary": "Update a story's height.",
3051
- "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
+ ],
3052
4685
  "argsType": "number",
3053
4686
  "resultType": "PluginStoryUpdateResult"
3054
4687
  },
@@ -3488,6 +5121,30 @@
3488
5121
  "argsType": null,
3489
5122
  "resultType": "PluginProgramSiteContextResult"
3490
5123
  },
5124
+ {
5125
+ "path": "program.site.getLocation",
5126
+ "namespace": "program.site",
5127
+ "summary": "Get the project's geographic location.",
5128
+ "examplePrompts": [
5129
+ "What's the project's latitude and longitude?",
5130
+ "Where is this site located?",
5131
+ "Get the geographic coordinates of the project\n\n# Example\n```ts\nconst location = await snaptrude.program.site.getLocation()\nif (location) console.log(location.latitude, location.longitude)\n```"
5132
+ ],
5133
+ "argsType": null,
5134
+ "resultType": "PluginProgramSiteLocationResult"
5135
+ },
5136
+ {
5137
+ "path": "program.site.getNorthAngle",
5138
+ "namespace": "program.site",
5139
+ "summary": "Get the site's true-north angle.",
5140
+ "examplePrompts": [
5141
+ "What's the north angle of the site?",
5142
+ "How far is the model rotated from true north?",
5143
+ "Get the project's true north direction\n\n# Example\n```ts\nconst northAngle = await snaptrude.program.site.getNorthAngle()\nif (northAngle !== null) console.log(`${northAngle}° from true north`)\n```"
5144
+ ],
5145
+ "argsType": null,
5146
+ "resultType": "PluginProgramSiteNorthAngleResult"
5147
+ },
3491
5148
  {
3492
5149
  "path": "program.site.listGeoPolygons",
3493
5150
  "namespace": "program.site",