@snaptrude/plugin-core 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/api-manifest.full.json +360 -19
- package/api-manifest.json +915 -37
- package/dist/api/core/camera/index.d.ts +208 -0
- package/dist/api/core/camera/index.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +105 -2
- package/dist/api/core/comment/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +13 -13
- package/dist/api/core/geom/delete/index.d.ts +8 -2
- package/dist/api/core/geom/delete/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/arc.d.ts +5 -5
- package/dist/api/core/geom/query/brep.d.ts +18 -18
- package/dist/api/core/geom/query/circle.d.ts +18 -18
- package/dist/api/core/geom/query/contour.d.ts +20 -20
- package/dist/api/core/geom/query/curve.d.ts +49 -49
- package/dist/api/core/geom/query/edge.d.ts +5 -5
- package/dist/api/core/geom/query/face.d.ts +16 -16
- package/dist/api/core/geom/query/halfedge.d.ts +8 -8
- package/dist/api/core/geom/query/profile.d.ts +19 -19
- package/dist/api/core/geom/query/vertex.d.ts +8 -8
- package/dist/api/core/geom/update/contour.d.ts +14 -14
- package/dist/api/core/geom/update/curve.d.ts +7 -7
- package/dist/api/core/geom/update/profile.d.ts +16 -16
- package/dist/api/core/handles/index.d.ts +210 -0
- package/dist/api/core/handles/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +15 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/export/index.d.ts +132 -0
- package/dist/api/core/io/export/index.d.ts.map +1 -0
- package/dist/api/core/io/import/index.d.ts +1 -1
- package/dist/api/core/io/index.d.ts +5 -0
- package/dist/api/core/io/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +7 -7
- package/dist/api/core/proposals/index.d.ts +65 -9
- package/dist/api/core/proposals/index.d.ts.map +1 -1
- package/dist/api/core/user.d.ts +44 -0
- package/dist/api/core/user.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +4 -4
- package/dist/api/design/create/index.d.ts +139 -44
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +36 -0
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/edit/index.d.ts +1 -1
- package/dist/api/design/erase/index.d.ts +2 -2
- package/dist/api/design/furniture/index.d.ts +114 -3
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +10 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/materials/index.d.ts +111 -14
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +31 -1
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -5
- package/dist/api/design/transform/index.d.ts +83 -14
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/types/index.d.ts +181 -0
- package/dist/api/design/types/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +335 -2
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/visibility.d.ts +98 -0
- package/dist/api/design/visibility.d.ts.map +1 -0
- package/dist/api/entity/referenceLine.d.ts +2 -2
- package/dist/api/entity/space.d.ts +19 -19
- package/dist/api/entity/story.d.ts +128 -15
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +1967 -7
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -1
- package/dist/api/presentation/annotate.d.ts +448 -0
- package/dist/api/presentation/annotate.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +49 -8
- package/dist/api/presentation/diagrams.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +104 -0
- package/dist/api/presentation/export.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +40 -3
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/sheets.d.ts +410 -13
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +165 -10
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/program/areas.d.ts +63 -3
- package/dist/api/program/areas.d.ts.map +1 -1
- package/dist/api/program/cores.d.ts +3 -99
- package/dist/api/program/cores.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +2 -2
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/layout.d.ts +172 -12
- package/dist/api/program/layout.d.ts.map +1 -1
- package/dist/api/program/site.d.ts +11 -8
- package/dist/api/program/site.d.ts.map +1 -1
- package/dist/api/program/spreadsheet.d.ts +105 -13
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/handles.d.ts +64 -25
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2502 -1466
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2369 -1461
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/core/camera/index.ts +212 -0
- package/src/api/core/comment/index.ts +120 -2
- package/src/api/core/geom/delete/index.ts +6 -0
- package/src/api/core/handles/index.ts +233 -0
- package/src/api/core/index.ts +15 -0
- package/src/api/core/io/export/index.ts +124 -0
- package/src/api/core/io/index.ts +5 -0
- package/src/api/core/proposals/index.ts +71 -11
- package/src/api/core/user.ts +46 -0
- package/src/api/design/create/index.ts +166 -36
- package/src/api/design/doors/index.ts +40 -0
- package/src/api/design/furniture/index.ts +127 -3
- package/src/api/design/index.ts +10 -0
- package/src/api/design/materials/index.ts +157 -30
- package/src/api/design/query/index.ts +33 -7
- package/src/api/design/transform/index.ts +89 -12
- package/src/api/design/types/index.ts +156 -0
- package/src/api/design/update/index.ts +402 -6
- package/src/api/design/visibility.ts +109 -0
- package/src/api/entity/story.ts +141 -15
- package/src/api/presentation/aiInspiration.ts +761 -7
- package/src/api/presentation/annotate.ts +360 -0
- package/src/api/presentation/diagrams.ts +53 -8
- package/src/api/presentation/export.ts +104 -0
- package/src/api/presentation/index.ts +48 -3
- package/src/api/presentation/sheets.ts +346 -13
- package/src/api/presentation/views.ts +164 -12
- package/src/api/program/areas.ts +57 -6
- package/src/api/program/cores.ts +3 -91
- package/src/api/program/index.ts +2 -2
- package/src/api/program/layout.ts +182 -12
- package/src/api/program/site.ts +11 -8
- package/src/api/program/spreadsheet.ts +125 -29
- package/src/handles.ts +77 -13
- package/tsconfig.json +7 -2
package/api-manifest.json
CHANGED
|
@@ -347,6 +347,71 @@
|
|
|
347
347
|
"argsType": "string",
|
|
348
348
|
"resultType": "PluginCoreBuildingsUpdateResult"
|
|
349
349
|
},
|
|
350
|
+
{
|
|
351
|
+
"path": "core.camera.getProjection",
|
|
352
|
+
"namespace": "core.camera",
|
|
353
|
+
"summary": "Read the camera's current projection: `\"perspective\"` (the default 3D view) or `\"orthographic\"`. In 2D (plan) mode this always reports `\"orthographic\"` — a plan is an orthographic projection.",
|
|
354
|
+
"examplePrompts": [
|
|
355
|
+
"Is the camera in perspective or orthographic?",
|
|
356
|
+
"What projection is the 3D view using?",
|
|
357
|
+
"Check whether perspective is on\n\n# Example\n```ts\nconst projection = await snaptrude.core.camera.getProjection()\nconsole.log(projection) // \"perspective\" | \"orthographic\"\n```"
|
|
358
|
+
],
|
|
359
|
+
"argsType": null,
|
|
360
|
+
"resultType": "PluginCameraProjection"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"path": "core.camera.lookFrom",
|
|
364
|
+
"namespace": "core.camera",
|
|
365
|
+
"summary": "Point the camera: place its eye at `eye` looking toward `target` (world coordinates, internal `babylon` units). View-state only — not undoable.",
|
|
366
|
+
"examplePrompts": [
|
|
367
|
+
"Look at the model from above the north-east corner",
|
|
368
|
+
"Position the camera at (50, 30, 50) looking at the origin",
|
|
369
|
+
"Point the camera at the centre of the building from the side",
|
|
370
|
+
"Set the eye to this point and aim it at that point\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\nawait snaptrude.core.camera.lookFrom(vec3.new(50, 30, 50), vec3.new(0, 0, 0))\n```"
|
|
371
|
+
],
|
|
372
|
+
"argsType": "Vec3Handle",
|
|
373
|
+
"resultType": "boolean"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"path": "core.camera.setMode",
|
|
377
|
+
"namespace": "core.camera",
|
|
378
|
+
"summary": "Toggle the modelling mode between `2d` (plan) and `3d`. Mirrors the canvas 2D/3D toggle: `3d` enters the isometric perspective view, `2d` drops to the orthographic plan of the active storey. View-state only — not undoable.",
|
|
379
|
+
"examplePrompts": [
|
|
380
|
+
"Switch to 3D view",
|
|
381
|
+
"Drop into 2D plan mode",
|
|
382
|
+
"Go back to 3D",
|
|
383
|
+
"Show the floor plan in 2D\n\n# Example\n```ts\nawait snaptrude.core.camera.setMode(\"3d\")\n```"
|
|
384
|
+
],
|
|
385
|
+
"argsType": "PluginCameraMode",
|
|
386
|
+
"resultType": "boolean"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"path": "core.camera.setProjection",
|
|
390
|
+
"namespace": "core.camera",
|
|
391
|
+
"summary": "Switch the 3D camera between `\"perspective\"` and `\"orthographic\"` projection — the Perspective/Orthographic control in the Design tab's View Settings panel. Like {@linkcode PluginCameraApi.setMode}, this is a transient view-state change: not write-gated, not undoable.",
|
|
392
|
+
"examplePrompts": [
|
|
393
|
+
"Switch the camera to orthographic",
|
|
394
|
+
"Turn perspective off",
|
|
395
|
+
"Give me a perspective view of the model",
|
|
396
|
+
"Make the 3D view orthographic like an axonometric drawing\n\n# Example\n```ts\nawait snaptrude.core.camera.setProjection(\"orthographic\")\nconst projection = await snaptrude.core.camera.getProjection() // \"orthographic\"\n```"
|
|
397
|
+
],
|
|
398
|
+
"argsType": "PluginCameraProjection",
|
|
399
|
+
"resultType": "boolean"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"path": "core.camera.setStandardView",
|
|
403
|
+
"namespace": "core.camera",
|
|
404
|
+
"summary": "Snap the camera to a standard view — the five orthographic elevations (`top` / `front` / `back` / `left` / `right`) or the 3D `iso` (isometric perspective) view. Mirrors the canvas view menu. View-state only — not undoable. The orthographic presets exit 2D mode first if needed.",
|
|
405
|
+
"examplePrompts": [
|
|
406
|
+
"Switch to the top view",
|
|
407
|
+
"Show me the front elevation",
|
|
408
|
+
"Go to the isometric view",
|
|
409
|
+
"Look at the model from the left",
|
|
410
|
+
"Give me a plan view from the top\n\n# Example\n```ts\nawait snaptrude.core.camera.setStandardView(\"top\")\n```"
|
|
411
|
+
],
|
|
412
|
+
"argsType": "PluginStandardView",
|
|
413
|
+
"resultType": "boolean"
|
|
414
|
+
},
|
|
350
415
|
{
|
|
351
416
|
"path": "core.comment.create",
|
|
352
417
|
"namespace": "core.comment",
|
|
@@ -373,6 +438,19 @@
|
|
|
373
438
|
"argsType": "CommentHandle",
|
|
374
439
|
"resultType": "boolean"
|
|
375
440
|
},
|
|
441
|
+
{
|
|
442
|
+
"path": "core.comment.get",
|
|
443
|
+
"namespace": "core.comment",
|
|
444
|
+
"summary": "Read a comment's full detail — its text, author, pin location, resolved state, and reply thread. Comments are otherwise write-only; this is the read side. Pass a top-level comment handle or a reply handle (a reply has an empty `thread`). Returns `null` if the handle doesn't match a live comment.",
|
|
445
|
+
"examplePrompts": [
|
|
446
|
+
"Read the comment on this wall and tell me what it says",
|
|
447
|
+
"Who left this comment and where is it pinned?",
|
|
448
|
+
"Show me the full thread for this comment",
|
|
449
|
+
"Get the text and author of the selected comment\n\n# Example\n```ts\nconst [first] = await snaptrude.core.comment.list()\nconst details = await snaptrude.core.comment.get(first)\nconsole.log(details?.content, \"by\", details?.author?.name)\nconsole.log(`${details?.thread.length ?? 0} replies`)\n```"
|
|
450
|
+
],
|
|
451
|
+
"argsType": "CommentHandle",
|
|
452
|
+
"resultType": "PluginCommentDetails | null"
|
|
453
|
+
},
|
|
376
454
|
{
|
|
377
455
|
"path": "core.comment.isResolved",
|
|
378
456
|
"namespace": "core.comment",
|
|
@@ -412,6 +490,19 @@
|
|
|
412
490
|
"argsType": "CommentHandle",
|
|
413
491
|
"resultType": "boolean"
|
|
414
492
|
},
|
|
493
|
+
{
|
|
494
|
+
"path": "core.comment.reply",
|
|
495
|
+
"namespace": "core.comment",
|
|
496
|
+
"summary": "Reply to a comment — posts a new comment threaded under `comment` (which must be a top-level comment, not itself a reply). Notifies the thread's participants, mirroring the sidebar Reply action.",
|
|
497
|
+
"examplePrompts": [
|
|
498
|
+
"Reply to this comment saying I fixed the wall height",
|
|
499
|
+
"Add a reply to the review note confirming it's done",
|
|
500
|
+
"Respond to the comment about the door with \"looks good now\"",
|
|
501
|
+
"Post a follow-up on the selected comment thread\n\n# Example\n```ts\nconst [thread] = await snaptrude.core.comment.list()\nconst reply = await snaptrude.core.comment.reply(thread, \"Fixed 👍\")\n```"
|
|
502
|
+
],
|
|
503
|
+
"argsType": "CommentHandle",
|
|
504
|
+
"resultType": "CommentHandle"
|
|
505
|
+
},
|
|
415
506
|
{
|
|
416
507
|
"path": "core.comment.resolve",
|
|
417
508
|
"namespace": "core.comment",
|
|
@@ -2023,6 +2114,46 @@
|
|
|
2023
2114
|
"argsType": "string",
|
|
2024
2115
|
"resultType": "PluginCoreGroupsUpdateResult"
|
|
2025
2116
|
},
|
|
2117
|
+
{
|
|
2118
|
+
"path": "core.handles.beginScope",
|
|
2119
|
+
"namespace": "core.handles",
|
|
2120
|
+
"summary": "Open a mint-recording scope: every arena handle MINTED after this call (fresh mints only — identity-deduped re-registrations of pre-existing objects are not captured) is freed when the matching {@linkcode endScope} runs. Scopes nest, up to 64 deep — always pair begin/end in try/finally.",
|
|
2121
|
+
"examplePrompts": [],
|
|
2122
|
+
"argsType": null,
|
|
2123
|
+
"resultType": "ScopeToken"
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
"path": "core.handles.endScope",
|
|
2127
|
+
"namespace": "core.handles",
|
|
2128
|
+
"summary": "Close a scope by its token and free every handle it recorded, except those listed in `retain`. Retained handles are promoted to the enclosing scope (if any), so nesting composes like block scopes. Closing is token-addressed: an out-of-order close (interleaved async tasks) frees only that scope's mints and leaves other open scopes intact. Always pair begin/end in try/finally so a thrown body cannot leak the scope.",
|
|
2129
|
+
"examplePrompts": [],
|
|
2130
|
+
"argsType": "ScopeToken",
|
|
2131
|
+
"resultType": "void"
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
"path": "core.handles.release",
|
|
2135
|
+
"namespace": "core.handles",
|
|
2136
|
+
"summary": "Free arena handles in bulk. Unknown, foreign, or already-released ids are silent no-ops — there is no per-id result and no count, so responses can never be used as an existence oracle.",
|
|
2137
|
+
"examplePrompts": [],
|
|
2138
|
+
"argsType": "ReadonlyArray<AnyArenaHandle>",
|
|
2139
|
+
"resultType": "void"
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
"path": "core.handles.releaseAll",
|
|
2143
|
+
"namespace": "core.handles",
|
|
2144
|
+
"summary": "Free every live arena handle of one kind, or ALL arena handles when the kind is omitted. Useful at batch boundaries — e.g. a poll loop that mints a fresh footprint contour per tick.",
|
|
2145
|
+
"examplePrompts": [],
|
|
2146
|
+
"argsType": "ArenaKind",
|
|
2147
|
+
"resultType": "void"
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
"path": "core.handles.stats",
|
|
2151
|
+
"namespace": "core.handles",
|
|
2152
|
+
"summary": "Live handle-registry statistics for the calling plugin, plus the host page's JS heap usage (when the browser exposes it). Diagnostic surface for verifying that releases actually shrink host memory.",
|
|
2153
|
+
"examplePrompts": [],
|
|
2154
|
+
"argsType": null,
|
|
2155
|
+
"resultType": "PluginHandlesStatsResult"
|
|
2156
|
+
},
|
|
2026
2157
|
{
|
|
2027
2158
|
"path": "core.history.redo",
|
|
2028
2159
|
"namespace": "core.history",
|
|
@@ -2050,6 +2181,20 @@
|
|
|
2050
2181
|
"argsType": "number",
|
|
2051
2182
|
"resultType": "PluginHistoryStepResult"
|
|
2052
2183
|
},
|
|
2184
|
+
{
|
|
2185
|
+
"path": "core.io.export.model",
|
|
2186
|
+
"namespace": "core.io.export",
|
|
2187
|
+
"summary": "Export the model to a 3D file and return its bytes as base64.",
|
|
2188
|
+
"examplePrompts": [
|
|
2189
|
+
"Export the model as a GLB",
|
|
2190
|
+
"Give me the whole scene as an OBJ file",
|
|
2191
|
+
"Export just my selection to GLB",
|
|
2192
|
+
"Download the model as an FBX file",
|
|
2193
|
+
"Export the scene to 3DS for 3ds Max\n\n# Example\n```ts\nconst file = await snaptrude.core.io.export.model(\"glb\")\n// decode base64 → bytes and save/download in the plugin UI\nconst bytes = Uint8Array.from(atob(file.dataBase64), (c) => c.charCodeAt(0))\nconst blob = new Blob([bytes], { type: file.mimeType })\n// ...offer blob for download as file.fileName\n\n// Only the current selection, as OBJ text:\nconst obj = await snaptrude.core.io.export.model(\"obj\", \"selection\")\nconst text = atob(obj.dataBase64)\n```"
|
|
2194
|
+
],
|
|
2195
|
+
"argsType": "ExportModelFormat",
|
|
2196
|
+
"resultType": "ExportedFile"
|
|
2197
|
+
},
|
|
2053
2198
|
{
|
|
2054
2199
|
"path": "core.io.import.cadJson",
|
|
2055
2200
|
"namespace": "core.io.import",
|
|
@@ -3041,11 +3186,12 @@
|
|
|
3041
3186
|
{
|
|
3042
3187
|
"path": "core.proposals.create",
|
|
3043
3188
|
"namespace": "core.proposals",
|
|
3044
|
-
"summary": "Create a new design option (proposal).",
|
|
3189
|
+
"summary": "Create a new design option (proposal) — blank, or configured from a base proposal (the New Proposal modal's two paths).",
|
|
3045
3190
|
"examplePrompts": [
|
|
3046
3191
|
"Create a design option called Scheme B",
|
|
3047
3192
|
"Add a new proposal named Option 2",
|
|
3048
|
-
"
|
|
3193
|
+
"Duplicate the current proposal as Scheme C",
|
|
3194
|
+
"Create a design option based on Proposal 1 that shares its site layer\n\n# Example\n```ts\n// blank design option\nconst { id } = await snaptrude.core.proposals.create(\"Scheme B\")\n\n// configured from the active proposal: duplicate every layer\nconst base = await snaptrude.core.proposals.getActive()\nif (base) {\nconst { id: dup } = await snaptrude.core.proposals.create(\"Scheme C\", {\nbaseProposalId: base.id,\n})\n// …or share one layer and leave the rest behind\nconst { id: shared } = await snaptrude.core.proposals.create(\"Scheme D\", {\nbaseProposalId: base.id,\nlayers: [{ bucketId: base.defaultBucketId, action: \"share\" }],\n})\n}\n```"
|
|
3049
3195
|
],
|
|
3050
3196
|
"argsType": "string",
|
|
3051
3197
|
"resultType": "PluginCoreProposalsCreateResult"
|
|
@@ -3379,6 +3525,19 @@
|
|
|
3379
3525
|
"argsType": "PUnitType",
|
|
3380
3526
|
"resultType": "boolean"
|
|
3381
3527
|
},
|
|
3528
|
+
{
|
|
3529
|
+
"path": "core.user.getLocale",
|
|
3530
|
+
"namespace": "core.user",
|
|
3531
|
+
"summary": "Get the viewer's locale: IANA timezone and BCP-47 language tag, resolved from the browser (`Intl.DateTimeFormat().resolvedOptions().timeZone` and `navigator.language`). Locale only — no precise location.",
|
|
3532
|
+
"examplePrompts": [
|
|
3533
|
+
"What timezone is the user in?",
|
|
3534
|
+
"Get the viewer's language for localized labels",
|
|
3535
|
+
"Format the report date in the user's local timezone",
|
|
3536
|
+
"Which locale should I use for this plugin's UI?\n\n# Example\n```ts\nconst { timezone, language } = await snaptrude.core.user.getLocale()\n```"
|
|
3537
|
+
],
|
|
3538
|
+
"argsType": null,
|
|
3539
|
+
"resultType": "PluginUserLocale"
|
|
3540
|
+
},
|
|
3382
3541
|
{
|
|
3383
3542
|
"path": "core.zoom.extents",
|
|
3384
3543
|
"namespace": "core.zoom",
|
|
@@ -3450,7 +3609,7 @@
|
|
|
3450
3609
|
{
|
|
3451
3610
|
"path": "design.create.beam",
|
|
3452
3611
|
"namespace": "design.create",
|
|
3453
|
-
"summary": "Create a **beam** by extruding a cross-section contour along `direction` by `length`.",
|
|
3612
|
+
"summary": "Create a **beam** by extruding a cross-section contour along `direction` by `length`. Matches the Snaptrude beam tool's semantics: the beam body hangs BELOW the plane the section is authored on.",
|
|
3454
3613
|
"examplePrompts": [
|
|
3455
3614
|
"Add a beam spanning 6 metres between the columns",
|
|
3456
3615
|
"Create a horizontal beam along the X axis",
|
|
@@ -3476,7 +3635,7 @@
|
|
|
3476
3635
|
{
|
|
3477
3636
|
"path": "design.create.column",
|
|
3478
3637
|
"namespace": "design.create",
|
|
3479
|
-
"summary": "Create a **column** by extruding a cross-section contour upward by `height` from a base `position`.",
|
|
3638
|
+
"summary": "Create a **column** by extruding a cross-section contour upward by `height` from a base `position`. The column is built to EXACTLY `height` — unlike the interactive draw tool, no slab-thickness deduction is applied.",
|
|
3480
3639
|
"examplePrompts": [
|
|
3481
3640
|
"Add a 3m tall column at this point",
|
|
3482
3641
|
"Place a column at the grid intersection",
|
|
@@ -3509,7 +3668,8 @@
|
|
|
3509
3668
|
"Place a sliding door on the selected wall",
|
|
3510
3669
|
"Put a door from the catalog at this point on the wall",
|
|
3511
3670
|
"Insert the entrance door into this wall",
|
|
3512
|
-
"Add a door to the wall and call it Entry-01
|
|
3671
|
+
"Add a door to the wall and call it Entry-01",
|
|
3672
|
+
"Add a door that opens into the living room\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst door = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Entry-01\" },\n)\n// …facing a specific side of the wall (pass a point inside that room):\nconst intoKitchen = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\nawait snaptrude.core.math.vec3.new(3, 0, 9),\n)\n```"
|
|
3513
3673
|
],
|
|
3514
3674
|
"argsType": "string",
|
|
3515
3675
|
"resultType": "ComponentHandle"
|
|
@@ -3536,7 +3696,8 @@
|
|
|
3536
3696
|
"Add a sofa from the furniture catalog to the living room",
|
|
3537
3697
|
"Drop a desk into the scene at 3, 0, 5",
|
|
3538
3698
|
"Insert the uploaded bed model in the bedroom",
|
|
3539
|
-
"Put a table from my project library here and name it Table-01
|
|
3699
|
+
"Put a table from my project library here and name it Table-01",
|
|
3700
|
+
"Place a chair here rotated 90 degrees\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// …placed already turned 90° about the vertical axis:\nconst turned = await snaptrude.design.create.furniture(\n\"6620f1a…\",\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\n90,\n)\n```"
|
|
3540
3701
|
],
|
|
3541
3702
|
"argsType": "string",
|
|
3542
3703
|
"resultType": "ComponentHandle"
|
|
@@ -3618,7 +3779,8 @@
|
|
|
3618
3779
|
"Add a new space on the current storey using this footprint",
|
|
3619
3780
|
"Make a bedroom here and assign it to the Residential department",
|
|
3620
3781
|
"Extrude this closed outline into a 10 foot high room",
|
|
3621
|
-
"Can you create a Kitchen space from the sketch I just drew
|
|
3782
|
+
"Can you create a Kitchen space from the sketch I just drew?",
|
|
3783
|
+
"Create a bedroom on the second floor from this outline\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// …place one directly on the second floor (no setActive dance):\nconst upstairs = await snaptrude.design.create.space(\ncontour, 3, \"Bedroom\", undefined, undefined, undefined, undefined, 2,\n)\n```"
|
|
3622
3784
|
],
|
|
3623
3785
|
"argsType": "ContourHandle",
|
|
3624
3786
|
"resultType": "ComponentHandle"
|
|
@@ -3626,12 +3788,13 @@
|
|
|
3626
3788
|
{
|
|
3627
3789
|
"path": "design.create.spaces",
|
|
3628
3790
|
"namespace": "design.create",
|
|
3629
|
-
"summary": "Create **many spaces** in one undoable operation (bulk plural of {@linkcode space}). Migrated from the removed `entity.space.bulkCreate`. Each item extrudes a contour footprint up `height`. Validate-all-or-throw; one command. For a rectangular (box) space, build the footprint with `core.geom.create.profileRect` → `contourFromProfile`, then pass it as an item.",
|
|
3791
|
+
"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. Each item may carry its own `storey` (see {@linkcode PluginCreateSpaceItem}) so a single call can populate several floors at once.",
|
|
3630
3792
|
"examplePrompts": [
|
|
3631
3793
|
"Create several rooms at once from these footprints",
|
|
3632
3794
|
"Generate all the bedrooms in one operation",
|
|
3633
3795
|
"Bulk create the spaces for this floor plan",
|
|
3634
|
-
"Add three rooms with different heights in a single undo step
|
|
3796
|
+
"Add three rooms with different heights in a single undo step",
|
|
3797
|
+
"Create one room on the ground floor and one on the first floor\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst [a, b] = await snaptrude.design.create.spaces([\n{ contour, height: 3, label: \"R1\" },\n{ contour, height: 4, label: \"R2\", position: await vec3.new(10, 0, 0) },\n])\n```"
|
|
3635
3798
|
],
|
|
3636
3799
|
"argsType": "PluginCreateSpaceItem[]",
|
|
3637
3800
|
"resultType": "ComponentHandle[]"
|
|
@@ -3659,7 +3822,9 @@
|
|
|
3659
3822
|
"Create 3m high, 200mm thick walls from these points",
|
|
3660
3823
|
"Build a wall run around the room outline",
|
|
3661
3824
|
"Turn this polyline sketch into walls",
|
|
3662
|
-
"Add walls with mitred corners along the path
|
|
3825
|
+
"Add walls with mitred corners along the path",
|
|
3826
|
+
"Draw brick walls with plaster along this outline",
|
|
3827
|
+
"Build the perimeter in exposed concrete walls\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// …built as a specific wall type (layers/material/thickness from the type):\nconst [brick] = await snaptrude.design.types.list(\"wall\")\nconst brickWalls = await snaptrude.design.create.walls(\ncenterlines, 3, undefined, brick.label,\n)\n```"
|
|
3663
3828
|
],
|
|
3664
3829
|
"argsType": "ProfileHandle",
|
|
3665
3830
|
"resultType": "ComponentHandle[]"
|
|
@@ -3673,7 +3838,8 @@
|
|
|
3673
3838
|
"Place a casement window on the selected wall",
|
|
3674
3839
|
"Put a window from the catalog at this point on the wall",
|
|
3675
3840
|
"Insert a window into the living room wall",
|
|
3676
|
-
"Add a window to the wall and name it Win-01
|
|
3841
|
+
"Add a window to the wall and name it Win-01",
|
|
3842
|
+
"Add a casement window opening toward the garden side\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.windows.listCatalog()\nconst window = await snaptrude.design.create.window(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Win-01\" },\n)\n```"
|
|
3677
3843
|
],
|
|
3678
3844
|
"argsType": "string",
|
|
3679
3845
|
"resultType": "ComponentHandle"
|
|
@@ -3718,6 +3884,19 @@
|
|
|
3718
3884
|
"argsType": "string",
|
|
3719
3885
|
"resultType": "PluginObjectCatalogItem | null"
|
|
3720
3886
|
},
|
|
3887
|
+
{
|
|
3888
|
+
"path": "design.doors.getDimensions",
|
|
3889
|
+
"namespace": "design.doors",
|
|
3890
|
+
"summary": "Get a door's full dimensions in one call — width along the wall, vertical height, and thickness through the wall — measured in the door's local oriented space. Parity with {@linkcode PluginDesignWindowsApi.getDimensions}.",
|
|
3891
|
+
"examplePrompts": [
|
|
3892
|
+
"What are the dimensions of this door?",
|
|
3893
|
+
"How big is the selected door?",
|
|
3894
|
+
"Give me the width, height and depth of this door",
|
|
3895
|
+
"Measure the entrance door including its thickness through the wall\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst dims = await snaptrude.design.doors.getDimensions(door)\nif (dims) console.log(dims.width, dims.height, dims.thickness)\n```"
|
|
3896
|
+
],
|
|
3897
|
+
"argsType": "ComponentHandle",
|
|
3898
|
+
"resultType": "PluginDoorDimensions | null"
|
|
3899
|
+
},
|
|
3721
3900
|
{
|
|
3722
3901
|
"path": "design.doors.getFamily",
|
|
3723
3902
|
"namespace": "design.doors",
|
|
@@ -3929,6 +4108,19 @@
|
|
|
3929
4108
|
"argsType": "string",
|
|
3930
4109
|
"resultType": "PluginFurnitureCatalogItem | null"
|
|
3931
4110
|
},
|
|
4111
|
+
{
|
|
4112
|
+
"path": "design.furniture.getDimensions",
|
|
4113
|
+
"namespace": "design.furniture",
|
|
4114
|
+
"summary": "Get the dimensions of a PLACED furniture item — `length` (along the object), `width` (across it) and `height` (vertical), in engine units. Mirrors the Length/Width/Height fields of the furniture properties panel.",
|
|
4115
|
+
"examplePrompts": [
|
|
4116
|
+
"How big is this sofa?",
|
|
4117
|
+
"What are the dimensions of the selected furniture?",
|
|
4118
|
+
"Measure the length, width and height of this table",
|
|
4119
|
+
"Get the size of the chair I just placed\n\n# Example\n```ts\nconst [item] = await snaptrude.design.query.listFurniture({ isSelected: true })\nconst dims = await snaptrude.design.furniture.getDimensions(item)\nif (dims) console.log(dims.length, dims.width, dims.height)\n```"
|
|
4120
|
+
],
|
|
4121
|
+
"argsType": "ComponentHandle",
|
|
4122
|
+
"resultType": "PluginFurnitureDimensions | null"
|
|
4123
|
+
},
|
|
3932
4124
|
{
|
|
3933
4125
|
"path": "design.furniture.listCatalog",
|
|
3934
4126
|
"namespace": "design.furniture",
|
|
@@ -3956,6 +4148,19 @@
|
|
|
3956
4148
|
"argsType": null,
|
|
3957
4149
|
"resultType": "string[]"
|
|
3958
4150
|
},
|
|
4151
|
+
{
|
|
4152
|
+
"path": "design.furniture.setDimensions",
|
|
4153
|
+
"namespace": "design.furniture",
|
|
4154
|
+
"summary": "Resize a PLACED furniture item along one or more axes — `length`, `width` and/or `height` (engine units). Omitted axes are left unchanged. Each supplied axis is an undoable command, mirroring editing the furniture properties panel.",
|
|
4155
|
+
"examplePrompts": [
|
|
4156
|
+
"Make this table 1.8m long",
|
|
4157
|
+
"Resize the selected sofa to 2000 wide",
|
|
4158
|
+
"Set this furniture to 800mm tall",
|
|
4159
|
+
"Change the desk to 1500 long and 700 deep\n\n# Example\n```ts\nconst [item] = await snaptrude.design.query.listFurniture({ isSelected: true })\nconst { affected } = await snaptrude.design.furniture.setDimensions(item, {\nlength: 1800,\nheight: 750\n})\n```"
|
|
4160
|
+
],
|
|
4161
|
+
"argsType": "ComponentHandle",
|
|
4162
|
+
"resultType": "PluginDesignChangeResult"
|
|
4163
|
+
},
|
|
3959
4164
|
{
|
|
3960
4165
|
"path": "design.isAreaLocked",
|
|
3961
4166
|
"namespace": "design",
|
|
@@ -4072,6 +4277,20 @@
|
|
|
4072
4277
|
"argsType": "PluginMaterialSpec",
|
|
4073
4278
|
"resultType": "MaterialHandle"
|
|
4074
4279
|
},
|
|
4280
|
+
{
|
|
4281
|
+
"path": "design.materials.get",
|
|
4282
|
+
"namespace": "design.materials",
|
|
4283
|
+
"summary": "Read the material applied to a component **as a whole** — the eyedropper. For a uniformly-painted component this is that single material; for a per-face-painted component it is the material on the component's base/first face. Use {@linkcode PluginDesignMaterialsApi.getByFace} / {@linkcode PluginDesignMaterialsApi.listByFace} for the per-face breakdown.",
|
|
4284
|
+
"examplePrompts": [
|
|
4285
|
+
"What material is on this wall?",
|
|
4286
|
+
"Eyedrop the finish of the selected object",
|
|
4287
|
+
"Which material does this slab use?",
|
|
4288
|
+
"Read the material on this column so I can paint others with it",
|
|
4289
|
+
"Is this component painted, and with what?\n\n# Example\n```ts\nconst [component] = await snaptrude.design.selection.get()\nconst sampled = await snaptrude.design.materials.get(component)\nif (sampled) {\nconsole.log(sampled.name, sampled.source) // e.g. \"Brick Red\" \"applied\"\nconst info = await snaptrude.design.materials.getInfo(sampled.material)\nconsole.log(info?.colorHex)\n}\n```"
|
|
4290
|
+
],
|
|
4291
|
+
"argsType": "ComponentHandle",
|
|
4292
|
+
"resultType": "PluginComponentMaterial | null"
|
|
4293
|
+
},
|
|
4075
4294
|
{
|
|
4076
4295
|
"path": "design.materials.getByFace",
|
|
4077
4296
|
"namespace": "design.materials",
|
|
@@ -4152,15 +4371,14 @@
|
|
|
4152
4371
|
{
|
|
4153
4372
|
"path": "design.materials.list",
|
|
4154
4373
|
"namespace": "design.materials",
|
|
4155
|
-
"summary": "List the project materials.",
|
|
4374
|
+
"summary": "List the materials loaded in the project — every named material in the live scene (applied finishes, plugin-created materials, and type defaults in use). For the browsable preset/library catalog (finishes not yet in the project), use {@linkcode PluginDesignMaterialsApi.listPresets}.",
|
|
4156
4375
|
"examplePrompts": [
|
|
4157
4376
|
"List all the materials in this project",
|
|
4158
4377
|
"What materials do I have available to apply?",
|
|
4159
|
-
"Show me the preset materials library",
|
|
4160
4378
|
"Which finishes exist in this model?",
|
|
4161
|
-
"Get every material in the project palette\n\n# Example\n```ts\nconst
|
|
4379
|
+
"Get every material in the project palette\n\n# Example\n```ts\nconst materials = await snaptrude.design.materials.list()\nconsole.log(materials.length, \"materials in the project\")\n```"
|
|
4162
4380
|
],
|
|
4163
|
-
"argsType":
|
|
4381
|
+
"argsType": null,
|
|
4164
4382
|
"resultType": "MaterialHandle[]"
|
|
4165
4383
|
},
|
|
4166
4384
|
{
|
|
@@ -4175,6 +4393,19 @@
|
|
|
4175
4393
|
"argsType": "ComponentHandle",
|
|
4176
4394
|
"resultType": "PluginFaceMaterial[]"
|
|
4177
4395
|
},
|
|
4396
|
+
{
|
|
4397
|
+
"path": "design.materials.listPresets",
|
|
4398
|
+
"namespace": "design.materials",
|
|
4399
|
+
"summary": "List the preset material library — the catalog the app's material browser shows (the built-in finishes plus the workspace's uploaded materials), fetched from the material library service. Library entries are **not** scene materials and carry no {@linkcode MaterialHandle}; each is a named texture record. To use one, feed it to {@linkcode PluginDesignMaterialsApi.create} / {@linkcode PluginDesignMaterialsApi.apply} as a {@linkcode PluginMaterialSpec}: `{ name, textureUrl, materialType: category }`.",
|
|
4400
|
+
"examplePrompts": [
|
|
4401
|
+
"Show me the preset materials library",
|
|
4402
|
+
"What wood finishes are available in the material library?",
|
|
4403
|
+
"Browse the material catalog and apply a brick texture",
|
|
4404
|
+
"Which preset materials can I choose from?\n\n# Example\n```ts\nconst presets = await snaptrude.design.materials.listPresets()\nconst brick = presets.find((p) => p.category.toLowerCase().includes(\"brick\"))\nif (brick) {\nconst walls = await snaptrude.design.query.listWalls()\nawait snaptrude.design.materials.apply(walls, {\nname: brick.name,\ntextureUrl: brick.textureUrl,\nmaterialType: brick.category,\n})\n}\n```"
|
|
4405
|
+
],
|
|
4406
|
+
"argsType": null,
|
|
4407
|
+
"resultType": "PluginPresetMaterial[]"
|
|
4408
|
+
},
|
|
4178
4409
|
{
|
|
4179
4410
|
"path": "design.materials.reset",
|
|
4180
4411
|
"namespace": "design.materials",
|
|
@@ -4334,10 +4565,11 @@
|
|
|
4334
4565
|
{
|
|
4335
4566
|
"path": "design.query.getProperties",
|
|
4336
4567
|
"namespace": "design.query",
|
|
4337
|
-
"summary": "Read an entity's common properties as a {@linkcode PluginEntityProperties} record (only applicable fields are present). For spaces/masses this includes `adjacency` — the per-entity adjacency read (bulk form: `program.adjacency.getMatrix`).",
|
|
4568
|
+
"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`). For walls and the slab family (slab / floor / roof / ceiling) this includes `buildingType` — the assigned building type NAME the panel's type dropdown shows, matching `design.types.list(kind)`.",
|
|
4338
4569
|
"examplePrompts": [
|
|
4339
4570
|
"Show me all the details of the selected object",
|
|
4340
4571
|
"What storey is this wall on?",
|
|
4572
|
+
"Which wall type is assigned to this wall?",
|
|
4341
4573
|
"Which department does this room belong to?",
|
|
4342
4574
|
"Is this element locked or hidden?",
|
|
4343
4575
|
"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```"
|
|
@@ -4602,9 +4834,11 @@
|
|
|
4602
4834
|
"examplePrompts": [
|
|
4603
4835
|
"What's the area of this room?",
|
|
4604
4836
|
"How long is the selected wall?",
|
|
4837
|
+
"How thick is this wall?",
|
|
4838
|
+
"Get the thickness of the slab on level 2",
|
|
4605
4839
|
"Get the volume of this mass",
|
|
4606
4840
|
"Give me the dimensions of the selected element",
|
|
4607
|
-
"What's the floor area of the kitchen?\n\n# Example\n```ts\nconst [space] = await snaptrude.design.query.listSpaces()\nconst m = await snaptrude.design.query.measure(space)\nconsole.log(m?.area, m?.volume)\n```"
|
|
4841
|
+
"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\n// wall dimensions — the panel's Thickness / Height, in engine units\nconst [wall] = await snaptrude.design.query.listWalls()\nconst wm = await snaptrude.design.query.measure(wall)\nconsole.log(wm?.thickness, wm?.height)\n```"
|
|
4608
4842
|
],
|
|
4609
4843
|
"argsType": "ComponentHandle",
|
|
4610
4844
|
"resultType": "PluginEntityMeasurements | null"
|
|
@@ -4731,6 +4965,20 @@
|
|
|
4731
4965
|
"argsType": "ComponentHandle[]",
|
|
4732
4966
|
"resultType": "PluginDesignChangeResult"
|
|
4733
4967
|
},
|
|
4968
|
+
{
|
|
4969
|
+
"path": "design.transform.mirror",
|
|
4970
|
+
"namespace": "design.transform",
|
|
4971
|
+
"summary": "Mirror components **in place** about a horizontal axis, flipping their geometry across that axis through the combined bounding-box centre (the mesh's world-matrix flip + brep inversion + CAD/dimension-line/parametric handling commit atomically). Nothing moves off-centre — this is the toolbar \"flip\", not a translate-and-reflect. Undoable.",
|
|
4972
|
+
"examplePrompts": [
|
|
4973
|
+
"Mirror the selected building across the x axis",
|
|
4974
|
+
"Flip these rooms left to right",
|
|
4975
|
+
"Mirror this furniture block horizontally",
|
|
4976
|
+
"Flip the selected walls front to back",
|
|
4977
|
+
"Create a mirror image of these masses about the z axis\n\n# Example\n```ts\nconst rooms = await snaptrude.design.selection.get()\nawait snaptrude.design.transform.mirror(rooms, \"x\")\n```"
|
|
4978
|
+
],
|
|
4979
|
+
"argsType": "ComponentHandle[]",
|
|
4980
|
+
"resultType": "PluginDesignChangeResult"
|
|
4981
|
+
},
|
|
4734
4982
|
{
|
|
4735
4983
|
"path": "design.transform.move",
|
|
4736
4984
|
"namespace": "design.transform",
|
|
@@ -4748,16 +4996,43 @@
|
|
|
4748
4996
|
{
|
|
4749
4997
|
"path": "design.transform.rotate",
|
|
4750
4998
|
"namespace": "design.transform",
|
|
4751
|
-
"summary": "Rotate entities by a **signed angle in DEGREES
|
|
4999
|
+
"summary": "Rotate entities by a **signed angle in DEGREES** (positive = CCW about +Y). The pivot defaults to the combined bounding-box centre; pass `options.pivot` to rotate about an explicit world-space point instead. NOTE: unlike the removed `tools.transform.rotate` (radians), this canonical form takes DEGREES. Undoable.",
|
|
4752
5000
|
"examplePrompts": [
|
|
4753
5001
|
"Rotate the selected building 90 degrees",
|
|
4754
5002
|
"Turn this room 45 degrees clockwise",
|
|
4755
5003
|
"Spin the furniture block 180 degrees about its centre",
|
|
4756
|
-
"Rotate these masses 30 degrees around the vertical axis
|
|
5004
|
+
"Rotate these masses 30 degrees around the vertical axis",
|
|
5005
|
+
"Rotate these walls 90 degrees about the origin\n\n# Example\n```ts\nawait snaptrude.design.transform.rotate([\"space-id\"], 90)\n// …or rotate about an explicit pivot point\nconst { vec3 } = snaptrude.core.math\nawait snaptrude.design.transform.rotate([\"space-id\"], 90, { pivot: vec3.new(0, 0, 0) })\n```"
|
|
4757
5006
|
],
|
|
4758
5007
|
"argsType": "ComponentHandle[]",
|
|
4759
5008
|
"resultType": "PluginDesignChangeResult"
|
|
4760
5009
|
},
|
|
5010
|
+
{
|
|
5011
|
+
"path": "design.types.get",
|
|
5012
|
+
"namespace": "design.types",
|
|
5013
|
+
"summary": "Get one building type by its `\"<kind>:<name>\"` id — its labelled layer stack (each layer's role, thickness and material) plus the summed total thickness.",
|
|
5014
|
+
"examplePrompts": [
|
|
5015
|
+
"What layers make up this wall type?",
|
|
5016
|
+
"Show the construction of the exposed-concrete wall",
|
|
5017
|
+
"What's the total thickness of this slab type?",
|
|
5018
|
+
"Which materials are in this roof assembly?\n\n# Example\n```ts\nconst [first] = await snaptrude.design.types.list(\"wall\")\nconst type = await snaptrude.design.types.get(first.id)\nif (type) for (const layer of type.layers) console.log(layer.name, layer.thickness)\n```"
|
|
5019
|
+
],
|
|
5020
|
+
"argsType": "string",
|
|
5021
|
+
"resultType": "PluginBuildingType | null"
|
|
5022
|
+
},
|
|
5023
|
+
{
|
|
5024
|
+
"path": "design.types.list",
|
|
5025
|
+
"namespace": "design.types",
|
|
5026
|
+
"summary": "List the building types of one `kind` (wall / slab / floor / ceiling / roof) — the built-in defaults plus any team/user-added types. Returns lightweight summaries; call {@linkcode PluginDesignTypesApi.get} for the full layer stack.",
|
|
5027
|
+
"examplePrompts": [
|
|
5028
|
+
"What wall types does this project have?",
|
|
5029
|
+
"List the available slab assemblies",
|
|
5030
|
+
"Show me every roof type in the project",
|
|
5031
|
+
"Which floor types can I use?\n\n# Example\n```ts\nconst wallTypes = await snaptrude.design.types.list(\"wall\")\nfor (const t of wallTypes) console.log(t.id, t.label, t.thickness)\n```"
|
|
5032
|
+
],
|
|
5033
|
+
"argsType": "PluginBuildingTypeKind",
|
|
5034
|
+
"resultType": "PluginBuildingTypeSummary[]"
|
|
5035
|
+
},
|
|
4761
5036
|
{
|
|
4762
5037
|
"path": "design.unlock",
|
|
4763
5038
|
"namespace": "design",
|
|
@@ -4784,6 +5059,69 @@
|
|
|
4784
5059
|
"argsType": "ComponentHandle[]",
|
|
4785
5060
|
"resultType": "PluginDesignChangeResult"
|
|
4786
5061
|
},
|
|
5062
|
+
{
|
|
5063
|
+
"path": "design.update.ceiling",
|
|
5064
|
+
"namespace": "design.update",
|
|
5065
|
+
"summary": "Edit a **ceiling's** thickness — the slab-family updater for ceilings (shares the slab thickness command). Undoable. Thickness is in **engine units** (the `design.doors.setWidth` convention) and must be `> 0`. Ceilings have no Overhang control, so `overhang` is rejected with `PRECONDITION_FAILED`.",
|
|
5066
|
+
"examplePrompts": [
|
|
5067
|
+
"Make this ceiling 150mm thick",
|
|
5068
|
+
"Set every ceiling to a 100 thickness",
|
|
5069
|
+
"Thicken the ceiling to 200\n\n# Example\n```ts\nconst [ceiling] = await snaptrude.design.query.listCeilings()\nawait snaptrude.design.update.ceiling(ceiling, { thickness: 150 })\n```"
|
|
5070
|
+
],
|
|
5071
|
+
"argsType": "ComponentHandle",
|
|
5072
|
+
"resultType": "PluginDesignChangeResult"
|
|
5073
|
+
},
|
|
5074
|
+
{
|
|
5075
|
+
"path": "design.update.floor",
|
|
5076
|
+
"namespace": "design.update",
|
|
5077
|
+
"summary": "Edit a **floor's** thickness — the slab-family updater for floors (shares the slab thickness command). Undoable. Thickness is in **engine units** (the `design.doors.setWidth` convention) and must be `> 0`. Floors have no Overhang control, so `overhang` is rejected with `PRECONDITION_FAILED`.",
|
|
5078
|
+
"examplePrompts": [
|
|
5079
|
+
"Make this floor 200mm thick",
|
|
5080
|
+
"Set every floor to a 250 thickness",
|
|
5081
|
+
"Thicken the ground floor slab to 300\n\n# Example\n```ts\nconst [floor] = await snaptrude.design.query.listFloors()\nawait snaptrude.design.update.floor(floor, { thickness: 200 })\n```"
|
|
5082
|
+
],
|
|
5083
|
+
"argsType": "ComponentHandle",
|
|
5084
|
+
"resultType": "PluginDesignChangeResult"
|
|
5085
|
+
},
|
|
5086
|
+
{
|
|
5087
|
+
"path": "design.update.roof",
|
|
5088
|
+
"namespace": "design.update",
|
|
5089
|
+
"summary": "Edit a **roof's** thickness and/or overhang — the same commands the roof panel's Thickness field and Overhang slider drive (shares the slab-family machinery). Sparse: only the fields you provide change. Undoable. Both values are in **engine units** (the `design.doors.setWidth` convention); thickness must be `> 0`, overhang is an absolute offset (negative insets the roof) and re-applying the current overhang is a no-op.",
|
|
5090
|
+
"examplePrompts": [
|
|
5091
|
+
"Make this roof 300mm thick",
|
|
5092
|
+
"Set the roof slab thickness to 250",
|
|
5093
|
+
"Give the roof a 600 overhang",
|
|
5094
|
+
"Pull the roof overhang back to 0\n\n# Example\n```ts\nconst [roof] = await snaptrude.design.query.listRoofs()\nawait snaptrude.design.update.roof(roof, { overhang: 600 })\n```"
|
|
5095
|
+
],
|
|
5096
|
+
"argsType": "ComponentHandle",
|
|
5097
|
+
"resultType": "PluginDesignChangeResult"
|
|
5098
|
+
},
|
|
5099
|
+
{
|
|
5100
|
+
"path": "design.update.setBaseOffset",
|
|
5101
|
+
"namespace": "design.update",
|
|
5102
|
+
"summary": "Set a component's **base offset** — its vertical distance above its own storey's base level. Moves the component so its base lands at `storeyBase + offset`, composed over the same command-backed move machinery as {@linkcode setElevation} (undoable, persisted, per-type invariants kept in sync). Use this instead of {@linkcode setElevation} when you want an offset relative to the storey rather than an absolute world height. `offset` is in **engine units** (the `design.doors.setWidth` convention); `0` sits the base flush with the storey base. Re-applying the current offset is a no-op.",
|
|
5103
|
+
"examplePrompts": [
|
|
5104
|
+
"Lift this element 300 above its floor",
|
|
5105
|
+
"Set this staircase's base offset to 0",
|
|
5106
|
+
"Raise the selected mass 500 off the storey base",
|
|
5107
|
+
"Offset this slab 150 above the floor level\n\n# Example\n```ts\nconst [stair] = await snaptrude.design.query.listStaircases()\nawait snaptrude.design.update.setBaseOffset(stair, 0)\n```"
|
|
5108
|
+
],
|
|
5109
|
+
"argsType": "ComponentHandle",
|
|
5110
|
+
"resultType": "PluginDesignChangeResult"
|
|
5111
|
+
},
|
|
5112
|
+
{
|
|
5113
|
+
"path": "design.update.setElevation",
|
|
5114
|
+
"namespace": "design.update",
|
|
5115
|
+
"summary": "Set a component's **absolute world elevation** — moves it vertically so its base (the bounding-box bottom, world Y) lands at `elevation`. Composed over the canonical command-backed move machinery, so it is undoable and persisted exactly like dragging the element up or down; per-type invariants (e.g. a staircase's base offset) stay in sync. `elevation` is in **engine units** (the `design.doors.setWidth` convention). Re-applying the current elevation is a no-op.",
|
|
5116
|
+
"examplePrompts": [
|
|
5117
|
+
"Set this element's elevation to 3000",
|
|
5118
|
+
"Raise this mass so its base sits at 3 metres",
|
|
5119
|
+
"Drop the selected slab to elevation 0",
|
|
5120
|
+
"Put this staircase's base at 3200\n\n# Example\n```ts\n// Sit the roof slab exactly at the top of a 3m storey\nconst [roof] = await snaptrude.design.query.listRoofs()\nawait snaptrude.design.update.setElevation(roof, 3000)\n```"
|
|
5121
|
+
],
|
|
5122
|
+
"argsType": "ComponentHandle",
|
|
5123
|
+
"resultType": "PluginDesignChangeResult"
|
|
5124
|
+
},
|
|
4787
5125
|
{
|
|
4788
5126
|
"path": "design.update.setLabel",
|
|
4789
5127
|
"namespace": "design.update",
|
|
@@ -4797,6 +5135,32 @@
|
|
|
4797
5135
|
"argsType": "ComponentHandle",
|
|
4798
5136
|
"resultType": "boolean"
|
|
4799
5137
|
},
|
|
5138
|
+
{
|
|
5139
|
+
"path": "design.update.setStorey",
|
|
5140
|
+
"namespace": "design.update",
|
|
5141
|
+
"summary": "Reassign one or more components to another **storey** — the same operation as the properties panel's Story dropdown, and it works across element kinds exactly like the panel (walls, slabs, masses, furniture, staircases, ...). Each component is moved vertically to the target storey's level (per-kind placement rules — e.g. a slab sits at the storey base, a wall on it) and its storey assignment, children, and dimension lines update together as **one undoable operation**.",
|
|
5142
|
+
"examplePrompts": [
|
|
5143
|
+
"Move this sofa to storey 2",
|
|
5144
|
+
"Put the selected walls on the first basement level",
|
|
5145
|
+
"Send everything on this storey up one level",
|
|
5146
|
+
"Reassign these slabs to storey 3\n\n# Example\n```ts\n// Move the current selection up to storey 2\nconst selection = await snaptrude.design.selection.get()\nconst { affected } = await snaptrude.design.update.setStorey(selection, 2)\nconsole.log(\"moved\", affected.length, \"components\")\n```"
|
|
5147
|
+
],
|
|
5148
|
+
"argsType": "ComponentHandle[]",
|
|
5149
|
+
"resultType": "PluginDesignChangeResult"
|
|
5150
|
+
},
|
|
5151
|
+
{
|
|
5152
|
+
"path": "design.update.slab",
|
|
5153
|
+
"namespace": "design.update",
|
|
5154
|
+
"summary": "Edit a **slab's** thickness and/or overhang — the same commands the properties panel's Thickness field and Overhang slider drive. Sparse: only the fields you provide change. Undoable; the slab rebuilds and dimension lines refresh. Both values are in **engine units** (the same convention as `design.doors.setWidth`); thickness must be `> 0`, overhang is an absolute offset (negative insets the slab) and re-applying the current overhang is a no-op.",
|
|
5155
|
+
"examplePrompts": [
|
|
5156
|
+
"Set this slab's thickness to 250mm",
|
|
5157
|
+
"Make the floor slab 300 thick",
|
|
5158
|
+
"Give this slab a 200 overhang",
|
|
5159
|
+
"Remove the overhang on every slab on level 2\n\n# Example\n```ts\nconst [slab] = await snaptrude.design.query.listSlabs()\nawait snaptrude.design.update.slab(slab, { thickness: 250, overhang: 200 })\n```"
|
|
5160
|
+
],
|
|
5161
|
+
"argsType": "ComponentHandle",
|
|
5162
|
+
"resultType": "PluginDesignChangeResult"
|
|
5163
|
+
},
|
|
4800
5164
|
{
|
|
4801
5165
|
"path": "design.update.space",
|
|
4802
5166
|
"namespace": "design.update",
|
|
@@ -4839,6 +5203,59 @@
|
|
|
4839
5203
|
"argsType": "ComponentHandle[]",
|
|
4840
5204
|
"resultType": "PluginDesignChangeResult"
|
|
4841
5205
|
},
|
|
5206
|
+
{
|
|
5207
|
+
"path": "design.update.wall",
|
|
5208
|
+
"namespace": "design.update",
|
|
5209
|
+
"summary": "Edit a **wall** — its thickness and/or height (the same command the properties panel's Thickness/Height fields drive) and/or its **wall type** (the panel's Wall Types dropdown: converts the wall to another type, rebuilding its layer stack and materials). Sparse: only the fields you provide change. Undoable; the geometry rebuilds and any dimension lines refresh. Stacked-wall companions and hosted fenestration are handled exactly as the panel does.",
|
|
5210
|
+
"examplePrompts": [
|
|
5211
|
+
"Make this wall 230mm thick",
|
|
5212
|
+
"Set the selected wall's height to 3 metres",
|
|
5213
|
+
"Thicken every exterior wall to 300",
|
|
5214
|
+
"Change this wall to a Glass Wall",
|
|
5215
|
+
"Convert all the partitions on this floor to Brick Wall\n\n# Example\n```ts\n// Convert every wall on storey 1 to the first listed wall type\nconst [wallType] = await snaptrude.design.types.list(\"wall\")\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\nfor (const wall of walls) {\nawait snaptrude.design.update.wall(wall, { type: wallType.id })\n}\n```"
|
|
5216
|
+
],
|
|
5217
|
+
"argsType": "ComponentHandle",
|
|
5218
|
+
"resultType": "PluginDesignChangeResult"
|
|
5219
|
+
},
|
|
5220
|
+
{
|
|
5221
|
+
"path": "design.visibility.hide",
|
|
5222
|
+
"namespace": "design.visibility",
|
|
5223
|
+
"summary": "Hide entities from the viewport — the same as the \"Hide\" action. Undoable. Hosted door/window/void children ride along with their wall. Already-hidden entities stay hidden.",
|
|
5224
|
+
"examplePrompts": [
|
|
5225
|
+
"Hide the selected walls",
|
|
5226
|
+
"Conceal these masses so I can see behind them",
|
|
5227
|
+
"Hide every column on this floor",
|
|
5228
|
+
"Make this furniture disappear from view\n\n# Example\n```ts\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\nconst { affected } = await snaptrude.design.visibility.hide(walls)\n```"
|
|
5229
|
+
],
|
|
5230
|
+
"argsType": "ComponentHandle[]",
|
|
5231
|
+
"resultType": "PluginDesignChangeResult"
|
|
5232
|
+
},
|
|
5233
|
+
{
|
|
5234
|
+
"path": "design.visibility.isolate",
|
|
5235
|
+
"namespace": "design.visibility",
|
|
5236
|
+
"summary": "Isolate entities — hide everything else so only the given entities remain visible (the \"Isolate\" / solo action). Undoable. Reverse it with {@linkcode PluginDesignVisibilityApi.showAll}.",
|
|
5237
|
+
"examplePrompts": [
|
|
5238
|
+
"Isolate the selected room so I can focus on it",
|
|
5239
|
+
"Show only these walls and hide the rest",
|
|
5240
|
+
"Solo this mass",
|
|
5241
|
+
"Hide everything except the staircase\n\n# Example\n```ts\nconst [room] = await snaptrude.design.selection.get()\nawait snaptrude.design.visibility.isolate([room])\n```"
|
|
5242
|
+
],
|
|
5243
|
+
"argsType": "ComponentHandle[]",
|
|
5244
|
+
"resultType": "PluginDesignChangeResult"
|
|
5245
|
+
},
|
|
5246
|
+
{
|
|
5247
|
+
"path": "design.visibility.showAll",
|
|
5248
|
+
"namespace": "design.visibility",
|
|
5249
|
+
"summary": "Reveal everything hidden on the active story — the \"Show All\" action, which also exits an isolate. Undoable.",
|
|
5250
|
+
"examplePrompts": [
|
|
5251
|
+
"Show everything again",
|
|
5252
|
+
"Unhide all the hidden objects",
|
|
5253
|
+
"Exit isolate mode",
|
|
5254
|
+
"Reveal everything I hid earlier\n\n# Example\n```ts\nconst { affected } = await snaptrude.design.visibility.showAll()\nconsole.log(`Revealed ${affected.length} entities`)\n```"
|
|
5255
|
+
],
|
|
5256
|
+
"argsType": null,
|
|
5257
|
+
"resultType": "PluginDesignChangeResult"
|
|
5258
|
+
},
|
|
4842
5259
|
{
|
|
4843
5260
|
"path": "design.windows.exists",
|
|
4844
5261
|
"namespace": "design.windows",
|
|
@@ -5065,6 +5482,19 @@
|
|
|
5065
5482
|
"argsType": "number",
|
|
5066
5483
|
"resultType": "PluginStoryCreateResult"
|
|
5067
5484
|
},
|
|
5485
|
+
{
|
|
5486
|
+
"path": "entity.story.delete",
|
|
5487
|
+
"namespace": "entity.story",
|
|
5488
|
+
"summary": "Delete a story and everything on it — the same as removing it from the storey panel. Every element placed on the story (walls, floors, masses, …) is deleted with it, the remaining stories are re-stacked, and the active story falls back to an adjacent one. Committed as a single undo step.",
|
|
5489
|
+
"examplePrompts": [
|
|
5490
|
+
"Delete the top floor",
|
|
5491
|
+
"Remove the basement level",
|
|
5492
|
+
"Get rid of storey 3",
|
|
5493
|
+
"Delete the second floor and everything on it\n\n# Example\n```ts\nconst { newActiveStory } = await snaptrude.entity.story.delete(3)\nconsole.log(`Deleted story 3; now on story ${newActiveStory}`)\n```"
|
|
5494
|
+
],
|
|
5495
|
+
"argsType": "number",
|
|
5496
|
+
"resultType": "PluginStoryDeleteResult"
|
|
5497
|
+
},
|
|
5068
5498
|
{
|
|
5069
5499
|
"path": "entity.story.duplicate",
|
|
5070
5500
|
"namespace": "entity.story",
|
|
@@ -5105,19 +5535,300 @@
|
|
|
5105
5535
|
"argsType": null,
|
|
5106
5536
|
"resultType": "PluginStoryGetAllResult"
|
|
5107
5537
|
},
|
|
5538
|
+
{
|
|
5539
|
+
"path": "entity.story.setActive",
|
|
5540
|
+
"namespace": "entity.story",
|
|
5541
|
+
"summary": "Make a story the active story — the same as clicking it in the storey/layer panel. Subsequent draws and creates target this story, and in 2D the viewport switches to it. This is a view/navigation change: it is **not** undoable and commits nothing to the model.",
|
|
5542
|
+
"examplePrompts": [
|
|
5543
|
+
"Switch to the second floor",
|
|
5544
|
+
"Make the ground storey active",
|
|
5545
|
+
"Go to the basement level",
|
|
5546
|
+
"Set level 3 as the current storey\n\n# Example\n```ts\n// Activate story 2, then draw a wall — it lands on story 2.\nawait snaptrude.entity.story.setActive(2)\n```"
|
|
5547
|
+
],
|
|
5548
|
+
"argsType": "number",
|
|
5549
|
+
"resultType": "PluginStorySetActiveResult"
|
|
5550
|
+
},
|
|
5108
5551
|
{
|
|
5109
5552
|
"path": "entity.story.update",
|
|
5110
5553
|
"namespace": "entity.story",
|
|
5111
|
-
"summary": "Update a story's floor-to-floor height
|
|
5554
|
+
"summary": "Update a story's floor-to-floor `height` and/or `name`.",
|
|
5112
5555
|
"examplePrompts": [
|
|
5113
5556
|
"Change the ground floor height to 3.5 metres",
|
|
5114
5557
|
"Make the second storey taller",
|
|
5558
|
+
"Rename the ground floor to \"Lobby\"",
|
|
5115
5559
|
"Set the floor-to-floor height of level 1",
|
|
5116
|
-
"
|
|
5560
|
+
"Rename storey 2 and make it taller in one go\n\n# Example\n```ts\n// Set ground floor height to 5 Babylon units — walls stretch and the\n// floors above move up to match, all in a single undo step.\nconst result = await snaptrude.entity.story.update(1, 5)\n// Rename only, leaving the height untouched.\nawait snaptrude.entity.story.update(1, undefined, { name: \"Lobby\" })\n```"
|
|
5117
5561
|
],
|
|
5118
5562
|
"argsType": "number",
|
|
5119
5563
|
"resultType": "PluginStoryUpdateResult"
|
|
5120
5564
|
},
|
|
5565
|
+
{
|
|
5566
|
+
"path": "presentation.aiInspiration.cancelJob",
|
|
5567
|
+
"namespace": "presentation.aiInspiration",
|
|
5568
|
+
"summary": "Cancel a transient AI Inspiration job.",
|
|
5569
|
+
"examplePrompts": [
|
|
5570
|
+
"Cancel the running generation",
|
|
5571
|
+
"Stop that AI job\n\n# Example\n```ts\nconst { job } = await snaptrude.presentation.aiInspiration.cancelJob({ jobId })\nconsole.log(job.status) // \"cancelled\" (or a terminal state it already reached)\n```"
|
|
5572
|
+
],
|
|
5573
|
+
"argsType": "PluginAIInspirationJobArgs",
|
|
5574
|
+
"resultType": "PluginAIInspirationCancelJobResult"
|
|
5575
|
+
},
|
|
5576
|
+
{
|
|
5577
|
+
"path": "presentation.aiInspiration.deleteRecipe",
|
|
5578
|
+
"namespace": "presentation.aiInspiration",
|
|
5579
|
+
"summary": "Delete a project-level AI Inspiration recipe.",
|
|
5580
|
+
"examplePrompts": [
|
|
5581
|
+
"Delete the facade render recipe",
|
|
5582
|
+
"Remove that saved AI recipe\n\n# Example\n```ts\nconst { recipes } = await snaptrude.presentation.aiInspiration.listRecipes()\nconst stale = recipes.find((r) => r.name === \"Old style test\")\nif (stale) {\nconst { deleted } = await snaptrude.presentation.aiInspiration.deleteRecipe({ recipeId: stale.id })\nconsole.log(deleted)\n}\n```"
|
|
5583
|
+
],
|
|
5584
|
+
"argsType": "PluginAIInspirationDeleteRecipeArgs",
|
|
5585
|
+
"resultType": "PluginAIInspirationDeleteRecipeResult"
|
|
5586
|
+
},
|
|
5587
|
+
{
|
|
5588
|
+
"path": "presentation.aiInspiration.extractRecipeFromShape",
|
|
5589
|
+
"namespace": "presentation.aiInspiration",
|
|
5590
|
+
"summary": "Extract a reusable recipe draft from the workflow path ending at a shape.",
|
|
5591
|
+
"examplePrompts": [
|
|
5592
|
+
"Turn this workflow into a reusable recipe",
|
|
5593
|
+
"Save the generation steps behind this image\n\n# Example\n```ts\nconst extraction = await snaptrude.presentation.aiInspiration.extractRecipeFromShape({\nshapeId: selected.shapeId,\n})\nif (extraction.status === \"ready\") console.log(extraction.draft.summary)\n```"
|
|
5594
|
+
],
|
|
5595
|
+
"argsType": "PluginAIInspirationExtractRecipeFromShapeArgs",
|
|
5596
|
+
"resultType": "PluginAIInspirationExtractionResult"
|
|
5597
|
+
},
|
|
5598
|
+
{
|
|
5599
|
+
"path": "presentation.aiInspiration.generate",
|
|
5600
|
+
"namespace": "presentation.aiInspiration",
|
|
5601
|
+
"summary": "Generate an image or video from a Present canvas source.",
|
|
5602
|
+
"examplePrompts": [
|
|
5603
|
+
"Generate an image from this sketch",
|
|
5604
|
+
"Render the selected view as a photorealistic image",
|
|
5605
|
+
"Make an AI image of a modern facade from this source",
|
|
5606
|
+
"Generate a video from this image",
|
|
5607
|
+
"Turn this massing into a rendered street view\n\n# Example\n```ts\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({})\nconst [source, ...refs] = sources\nconst { outputs } = await snaptrude.presentation.aiInspiration.generate({\nsourceShapeId: source.shapeId,\nprompt: \"Photorealistic render of a modern timber facade at dusk\",\nreferenceShapeIds: refs.slice(0, 2).map((r) => r.shapeId),\nreferenceStrength: \"medium\",\n})\nfor (const out of outputs ?? []) console.log(out.outputType, out.shapeId, out.outputUrl)\n```"
|
|
5608
|
+
],
|
|
5609
|
+
"argsType": "PluginAIInspirationGenerateArgs",
|
|
5610
|
+
"resultType": "PluginAIInspirationRunResult"
|
|
5611
|
+
},
|
|
5612
|
+
{
|
|
5613
|
+
"path": "presentation.aiInspiration.getJob",
|
|
5614
|
+
"namespace": "presentation.aiInspiration",
|
|
5615
|
+
"summary": "Get a transient AI Inspiration job by ID.",
|
|
5616
|
+
"examplePrompts": [
|
|
5617
|
+
"Is my render finished?",
|
|
5618
|
+
"Check on the generation job\n\n# Example\n```ts\nconst { jobId } = await snaptrude.presentation.aiInspiration.generate({\nsourceShapeId: source.shapeId,\nprompt: \"Aerial dusk render\",\nrunMode: \"job\",\n})\nconst { job } = await snaptrude.presentation.aiInspiration.getJob({ jobId })\nconsole.log(job.status, job.progress?.message)\n```"
|
|
5619
|
+
],
|
|
5620
|
+
"argsType": "PluginAIInspirationJobArgs",
|
|
5621
|
+
"resultType": "PluginAIInspirationGetJobResult"
|
|
5622
|
+
},
|
|
5623
|
+
{
|
|
5624
|
+
"path": "presentation.aiInspiration.getModelCapabilities",
|
|
5625
|
+
"namespace": "presentation.aiInspiration",
|
|
5626
|
+
"summary": "Get capability flags for a model.",
|
|
5627
|
+
"examplePrompts": [
|
|
5628
|
+
"What can this model do?",
|
|
5629
|
+
"Does the default model support reference images?",
|
|
5630
|
+
"Check if the video model supports keyframes\n\n# Example\n```ts\nconst { defaultModelId } = await snaptrude.presentation.aiInspiration.listModels()\nconst { capability } = await snaptrude.presentation.aiInspiration.getModelCapabilities({\nmodelId: defaultModelId,\n})\nconsole.log(capability.supportsReferenceImages, capability.maxExtraImages)\n```"
|
|
5631
|
+
],
|
|
5632
|
+
"argsType": "PluginAIInspirationGetModelCapabilitiesArgs",
|
|
5633
|
+
"resultType": "PluginAIInspirationGetModelCapabilitiesResult"
|
|
5634
|
+
},
|
|
5635
|
+
{
|
|
5636
|
+
"path": "presentation.aiInspiration.getPresetCatalog",
|
|
5637
|
+
"namespace": "presentation.aiInspiration",
|
|
5638
|
+
"summary": "Get the curated AI Inspiration preset catalog.",
|
|
5639
|
+
"examplePrompts": [
|
|
5640
|
+
"What style presets are available?",
|
|
5641
|
+
"List the curated AI generation presets",
|
|
5642
|
+
"Show me the exterior render styles\n\n# Example\n```ts\nconst { categories, presets } = await snaptrude.presentation.aiInspiration.getPresetCatalog()\nconst exterior = presets.filter((p) => p.categoryLabel === \"Exterior\")\nconsole.log(categories.map((c) => c.label), exterior.map((p) => p.name))\n```"
|
|
5643
|
+
],
|
|
5644
|
+
"argsType": null,
|
|
5645
|
+
"resultType": "PluginAIInspirationGetPresetCatalogResult"
|
|
5646
|
+
},
|
|
5647
|
+
{
|
|
5648
|
+
"path": "presentation.aiInspiration.getSelectedBranchRerunPlan",
|
|
5649
|
+
"namespace": "presentation.aiInspiration",
|
|
5650
|
+
"summary": "Build a rerun plan for the selected workflow branch ending at a shape.",
|
|
5651
|
+
"examplePrompts": [
|
|
5652
|
+
"Can I rerun the steps that produced this output?",
|
|
5653
|
+
"Preview the rerun for this generated image\n\n# Example\n```ts\nconst plan = await snaptrude.presentation.aiInspiration.getSelectedBranchRerunPlan({\nshapeId: selected.shapeId,\n})\nif (plan.status === \"ready\") console.log(plan.edges.map((e) => e.operation.label))\nelse console.log(\"Cannot rerun:\", plan.reason)\n```"
|
|
5654
|
+
],
|
|
5655
|
+
"argsType": "PluginAIInspirationGetWorkflowForShapeArgs",
|
|
5656
|
+
"resultType": "PluginAIInspirationRerunPlanResult"
|
|
5657
|
+
},
|
|
5658
|
+
{
|
|
5659
|
+
"path": "presentation.aiInspiration.getSelection",
|
|
5660
|
+
"namespace": "presentation.aiInspiration",
|
|
5661
|
+
"summary": "Get selected Present canvas shapes that AI Inspiration can use.",
|
|
5662
|
+
"examplePrompts": [
|
|
5663
|
+
"Generate from what I have selected",
|
|
5664
|
+
"Which of my selected shapes can be used as AI sources?\n\n# Example\n```ts\nconst { selectedShapeIds, sources } = await snaptrude.presentation.aiInspiration.getSelection()\nconsole.log(selectedShapeIds.length, \"selected,\", sources.length, \"usable\")\n```"
|
|
5665
|
+
],
|
|
5666
|
+
"argsType": null,
|
|
5667
|
+
"resultType": "PluginAIInspirationGetSelectionResult"
|
|
5668
|
+
},
|
|
5669
|
+
{
|
|
5670
|
+
"path": "presentation.aiInspiration.getWorkflowForShape",
|
|
5671
|
+
"namespace": "presentation.aiInspiration",
|
|
5672
|
+
"summary": "Get the sanitized workflow graph containing a Present shape.",
|
|
5673
|
+
"examplePrompts": [
|
|
5674
|
+
"Show the generation history of this image",
|
|
5675
|
+
"What workflow produced this shape?\n\n# Example\n```ts\nconst { workflow, node } = await snaptrude.presentation.aiInspiration.getWorkflowForShape({\nshapeId: selected.shapeId,\n})\nif (workflow && node) console.log(node.id, workflow.edgeIds.length, \"edges\")\n```"
|
|
5676
|
+
],
|
|
5677
|
+
"argsType": "PluginAIInspirationGetWorkflowForShapeArgs",
|
|
5678
|
+
"resultType": "PluginAIInspirationGetWorkflowForShapeResult"
|
|
5679
|
+
},
|
|
5680
|
+
{
|
|
5681
|
+
"path": "presentation.aiInspiration.listJobs",
|
|
5682
|
+
"namespace": "presentation.aiInspiration",
|
|
5683
|
+
"summary": "List transient AI Inspiration jobs created in the current host session.",
|
|
5684
|
+
"examplePrompts": [
|
|
5685
|
+
"What AI jobs are running?",
|
|
5686
|
+
"Show my generation queue\n\n# Example\n```ts\nconst { jobs } = await snaptrude.presentation.aiInspiration.listJobs()\nconst running = jobs.filter((j) => j.status === \"running\" || j.status === \"queued\")\nconsole.log(running.map((j) => `${j.jobId}: ${j.method}`))\n```"
|
|
5687
|
+
],
|
|
5688
|
+
"argsType": null,
|
|
5689
|
+
"resultType": "PluginAIInspirationListJobsResult"
|
|
5690
|
+
},
|
|
5691
|
+
{
|
|
5692
|
+
"path": "presentation.aiInspiration.listModels",
|
|
5693
|
+
"namespace": "presentation.aiInspiration",
|
|
5694
|
+
"summary": "List AI Inspiration models that can be used for generation.",
|
|
5695
|
+
"examplePrompts": [
|
|
5696
|
+
"What AI inspiration models can I use?",
|
|
5697
|
+
"List the available image and video models",
|
|
5698
|
+
"Which generation model is the default?\n\n# Example\n```ts\nconst { defaultModelId, models } = await snaptrude.presentation.aiInspiration.listModels()\nconst videoModels = models.filter((m) => m.output === \"video\")\nconsole.log(defaultModelId, videoModels.map((m) => m.id))\n```"
|
|
5699
|
+
],
|
|
5700
|
+
"argsType": null,
|
|
5701
|
+
"resultType": "PluginAIInspirationListModelsResult"
|
|
5702
|
+
},
|
|
5703
|
+
{
|
|
5704
|
+
"path": "presentation.aiInspiration.listRecipes",
|
|
5705
|
+
"namespace": "presentation.aiInspiration",
|
|
5706
|
+
"summary": "List project-level AI Inspiration recipes stored in Present document metadata.",
|
|
5707
|
+
"examplePrompts": [
|
|
5708
|
+
"What AI recipes are saved in this project?",
|
|
5709
|
+
"List my generation recipes\n\n# Example\n```ts\nconst { recipes } = await snaptrude.presentation.aiInspiration.listRecipes()\nconsole.log(recipes.map((r) => `${r.name} → ${r.outputKind}`))\n```"
|
|
5710
|
+
],
|
|
5711
|
+
"argsType": null,
|
|
5712
|
+
"resultType": "PluginAIInspirationListRecipesResult"
|
|
5713
|
+
},
|
|
5714
|
+
{
|
|
5715
|
+
"path": "presentation.aiInspiration.listSources",
|
|
5716
|
+
"namespace": "presentation.aiInspiration",
|
|
5717
|
+
"summary": "List image/view/video sources on the current Present page.",
|
|
5718
|
+
"examplePrompts": [
|
|
5719
|
+
"List the images I can generate from on this page",
|
|
5720
|
+
"What source shapes are on the present canvas?",
|
|
5721
|
+
"Show me the reference images available for AI generation\n\n# Example\n```ts\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({ includeGenerated: true })\nfor (const s of sources) console.log(s.kind, s.shapeId, s.name)\n```"
|
|
5722
|
+
],
|
|
5723
|
+
"argsType": "PluginAIInspirationListSourcesArgs",
|
|
5724
|
+
"resultType": "PluginAIInspirationListSourcesResult"
|
|
5725
|
+
},
|
|
5726
|
+
{
|
|
5727
|
+
"path": "presentation.aiInspiration.refine",
|
|
5728
|
+
"namespace": "presentation.aiInspiration",
|
|
5729
|
+
"summary": "Refine/upscale an AI Inspiration source image.",
|
|
5730
|
+
"examplePrompts": [
|
|
5731
|
+
"Upscale this AI image",
|
|
5732
|
+
"Refine and sharpen the selected render",
|
|
5733
|
+
"Make this generated image higher resolution\n\n# Example\n```ts\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({ includeGenerated: true })\nconst image = sources.find((s) => s.kind === \"image\")\nif (image) {\nconst { outputs } = await snaptrude.presentation.aiInspiration.refine({\nsourceShapeId: image.shapeId,\nupscaleFactor: 2,\n})\nconsole.log(outputs?.[0]?.shapeId)\n}\n```"
|
|
5734
|
+
],
|
|
5735
|
+
"argsType": "PluginAIInspirationRefineArgs",
|
|
5736
|
+
"resultType": "PluginAIInspirationRunResult"
|
|
5737
|
+
},
|
|
5738
|
+
{
|
|
5739
|
+
"path": "presentation.aiInspiration.rerunSelectedBranch",
|
|
5740
|
+
"namespace": "presentation.aiInspiration",
|
|
5741
|
+
"summary": "Rerun the selected workflow branch and supersede the previous branch.",
|
|
5742
|
+
"examplePrompts": [
|
|
5743
|
+
"Rerun this generation branch",
|
|
5744
|
+
"Regenerate this output with the same steps\n\n# Example\n```ts\nconst { outputs } = await snaptrude.presentation.aiInspiration.rerunSelectedBranch({\nshapeId: selected.shapeId,\n})\nconsole.log(outputs?.map((o) => o.shapeId))\n```"
|
|
5745
|
+
],
|
|
5746
|
+
"argsType": "PluginAIInspirationRerunSelectedBranchArgs",
|
|
5747
|
+
"resultType": "PluginAIInspirationRunResult"
|
|
5748
|
+
},
|
|
5749
|
+
{
|
|
5750
|
+
"path": "presentation.aiInspiration.runRecipe",
|
|
5751
|
+
"namespace": "presentation.aiInspiration",
|
|
5752
|
+
"summary": "Run a saved or inline recipe against Present canvas slot shapes.",
|
|
5753
|
+
"examplePrompts": [
|
|
5754
|
+
"Apply my saved recipe to this image",
|
|
5755
|
+
"Run the dusk-render recipe on the selected view\n\n# Example\n```ts\nconst { recipes } = await snaptrude.presentation.aiInspiration.listRecipes()\nconst recipe = recipes[0]\nconst { sources } = await snaptrude.presentation.aiInspiration.listSources({})\nconst { outputs } = await snaptrude.presentation.aiInspiration.runRecipe({\nrecipeId: recipe.id,\nslotShapeIds: { [recipe.slots[0].id]: sources[0].shapeId },\n})\nconsole.log(outputs?.map((o) => o.outputUrl))\n```"
|
|
5756
|
+
],
|
|
5757
|
+
"argsType": "PluginAIInspirationRunRecipeArgs",
|
|
5758
|
+
"resultType": "PluginAIInspirationRunResult"
|
|
5759
|
+
},
|
|
5760
|
+
{
|
|
5761
|
+
"path": "presentation.aiInspiration.saveRecipe",
|
|
5762
|
+
"namespace": "presentation.aiInspiration",
|
|
5763
|
+
"summary": "Save a project-level AI Inspiration recipe.",
|
|
5764
|
+
"examplePrompts": [
|
|
5765
|
+
"Save this recipe as \"Dusk facade render\"",
|
|
5766
|
+
"Store these generation steps for reuse\n\n# Example\n```ts\nconst extraction = await snaptrude.presentation.aiInspiration.extractRecipeFromShape({\nshapeId: selected.shapeId,\n})\nif (extraction.status === \"ready\") {\nconst saved = await snaptrude.presentation.aiInspiration.saveRecipe({\ndraft: extraction.draft,\nname: \"Dusk facade render\",\n})\nconsole.log(saved.status, saved.recipe?.id)\n}\n```"
|
|
5767
|
+
],
|
|
5768
|
+
"argsType": "PluginAIInspirationSaveRecipeArgs",
|
|
5769
|
+
"resultType": "PluginAIInspirationSaveRecipeResult"
|
|
5770
|
+
},
|
|
5771
|
+
{
|
|
5772
|
+
"path": "presentation.annotate.arrow",
|
|
5773
|
+
"namespace": "presentation.annotate",
|
|
5774
|
+
"summary": "Draw an arrow on a sheet.",
|
|
5775
|
+
"examplePrompts": [
|
|
5776
|
+
"Draw an arrow pointing at the entrance on Sheet 1",
|
|
5777
|
+
"Add a red arrow from the title to the plan view",
|
|
5778
|
+
"Point an arrow at the top-left view on the cover sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.arrow(\n\"sheet_1\",\n{ x: 100, y: 200 },\n{ x: 300, y: 250 },\n{ color: \"red\" },\n)\n```"
|
|
5779
|
+
],
|
|
5780
|
+
"argsType": "string",
|
|
5781
|
+
"resultType": "PluginPresentationAnnotateResult"
|
|
5782
|
+
},
|
|
5783
|
+
{
|
|
5784
|
+
"path": "presentation.annotate.note",
|
|
5785
|
+
"namespace": "presentation.annotate",
|
|
5786
|
+
"summary": "Add a sticky note to a sheet.",
|
|
5787
|
+
"examplePrompts": [
|
|
5788
|
+
"Add a sticky note \"Review this wall\" to Sheet 1",
|
|
5789
|
+
"Put a yellow note on the cover sheet",
|
|
5790
|
+
"Leave a note next to the ground floor plan\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.note(\n\"sheet_1\",\n\"Review this wall\",\n{ position: { x: 60, y: 120 }, color: \"yellow\" },\n)\n```"
|
|
5791
|
+
],
|
|
5792
|
+
"argsType": "string",
|
|
5793
|
+
"resultType": "PluginPresentationAnnotateResult"
|
|
5794
|
+
},
|
|
5795
|
+
{
|
|
5796
|
+
"path": "presentation.annotate.shape",
|
|
5797
|
+
"namespace": "presentation.annotate",
|
|
5798
|
+
"summary": "Draw a geo shape (rectangle, ellipse, cloud, …) on a sheet.",
|
|
5799
|
+
"examplePrompts": [
|
|
5800
|
+
"Draw a revision cloud around the kitchen on Sheet 2",
|
|
5801
|
+
"Add a red rectangle highlight to the sheet",
|
|
5802
|
+
"Draw an ellipse around the entrance on the cover sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.shape(\n\"sheet_1\",\n\"cloud\",\n{ x: 80, y: 80, w: 240, h: 160 },\n{ color: \"red\" },\n)\n```"
|
|
5803
|
+
],
|
|
5804
|
+
"argsType": "string",
|
|
5805
|
+
"resultType": "PluginPresentationAnnotateResult"
|
|
5806
|
+
},
|
|
5807
|
+
{
|
|
5808
|
+
"path": "presentation.annotate.text",
|
|
5809
|
+
"namespace": "presentation.annotate",
|
|
5810
|
+
"summary": "Add a text label to a sheet.",
|
|
5811
|
+
"examplePrompts": [
|
|
5812
|
+
"Add a title \"Ground Floor\" to Sheet 1",
|
|
5813
|
+
"Label the cover sheet with the project name",
|
|
5814
|
+
"Caption this view with \"Proposed layout\"",
|
|
5815
|
+
"Put a red note on the sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.text(\n\"sheet_1\",\n\"Ground Floor\",\n{ position: { x: 40, y: 40 }, size: \"xl\", color: \"blue\" },\n)\n```"
|
|
5816
|
+
],
|
|
5817
|
+
"argsType": "string",
|
|
5818
|
+
"resultType": "PluginPresentationAnnotateTextResult"
|
|
5819
|
+
},
|
|
5820
|
+
{
|
|
5821
|
+
"path": "presentation.diagrams.generateProgram",
|
|
5822
|
+
"namespace": "presentation.diagrams",
|
|
5823
|
+
"summary": "Generate the program (space + department) diagrams for the current model, creating new layout sheets.",
|
|
5824
|
+
"examplePrompts": [
|
|
5825
|
+
"Generate the program diagrams for this project",
|
|
5826
|
+
"Auto-generate the space and department diagram sheets",
|
|
5827
|
+
"Create the program layout sheets from the model\n\n# Example\n```ts\nconst { sheetIds } = await snaptrude.presentation.diagrams.generateProgram()\n```"
|
|
5828
|
+
],
|
|
5829
|
+
"argsType": null,
|
|
5830
|
+
"resultType": "PluginPresentationDiagramsGenerateResult"
|
|
5831
|
+
},
|
|
5121
5832
|
{
|
|
5122
5833
|
"path": "presentation.diagrams.place",
|
|
5123
5834
|
"namespace": "presentation.diagrams",
|
|
@@ -5130,6 +5841,20 @@
|
|
|
5130
5841
|
"argsType": "string",
|
|
5131
5842
|
"resultType": "PluginPresentationDiagramsPlaceResult"
|
|
5132
5843
|
},
|
|
5844
|
+
{
|
|
5845
|
+
"path": "presentation.export",
|
|
5846
|
+
"namespace": "presentation",
|
|
5847
|
+
"summary": "Export the presentation's layout sheets to a downloadable file (PDF / PNG / JPG) and return the encoded bytes as base64. Wraps the Present-mode Export dialog pipeline headlessly. Requires Present mode to be open.",
|
|
5848
|
+
"examplePrompts": [
|
|
5849
|
+
"Export the presentation as a PDF",
|
|
5850
|
+
"Download all sheets as a single PDF",
|
|
5851
|
+
"Export sheet 1 as a PNG",
|
|
5852
|
+
"Save the presentation sheets as JPG images",
|
|
5853
|
+
"Export these sheets to PDF at high resolution\n\n# Example\n```ts\nconst { files } = await snaptrude.presentation.export(\"pdf\")\n```"
|
|
5854
|
+
],
|
|
5855
|
+
"argsType": "PluginPresentationExportFormat",
|
|
5856
|
+
"resultType": "PluginPresentationExportResult"
|
|
5857
|
+
},
|
|
5133
5858
|
{
|
|
5134
5859
|
"path": "presentation.import.image",
|
|
5135
5860
|
"namespace": "presentation.import",
|
|
@@ -5175,12 +5900,25 @@
|
|
|
5175
5900
|
"summary": "Create a new layout sheet.",
|
|
5176
5901
|
"examplePrompts": [
|
|
5177
5902
|
"Create a new sheet called Cover",
|
|
5178
|
-
"Add
|
|
5179
|
-
"Make a new presentation sheet named Floor Plans
|
|
5903
|
+
"Add an A3 landscape layout sheet",
|
|
5904
|
+
"Make a new ANSI D presentation sheet named Floor Plans",
|
|
5905
|
+
"Create a portrait A4 sheet\n\n# Example\n```ts\nconst sheet = await snaptrude.presentation.sheets.create(\"Cover\", {\nsize: \"ISO_A3\",\norientation: \"landscape\",\n})\n```"
|
|
5180
5906
|
],
|
|
5181
5907
|
"argsType": "string",
|
|
5182
5908
|
"resultType": "PluginPresentationSheet"
|
|
5183
5909
|
},
|
|
5910
|
+
{
|
|
5911
|
+
"path": "presentation.sheets.delete",
|
|
5912
|
+
"namespace": "presentation.sheets",
|
|
5913
|
+
"summary": "Delete a layout sheet.",
|
|
5914
|
+
"examplePrompts": [
|
|
5915
|
+
"Delete sheet_2",
|
|
5916
|
+
"Remove the Cover sheet",
|
|
5917
|
+
"Get rid of the last layout sheet\n\n# Example\n```ts\nconst { id } = await snaptrude.presentation.sheets.delete(\"sheet_2\")\n```"
|
|
5918
|
+
],
|
|
5919
|
+
"argsType": "string",
|
|
5920
|
+
"resultType": "PluginPresentationSheetsDeleteResult"
|
|
5921
|
+
},
|
|
5184
5922
|
{
|
|
5185
5923
|
"path": "presentation.sheets.get",
|
|
5186
5924
|
"namespace": "presentation.sheets",
|
|
@@ -5214,11 +5952,73 @@
|
|
|
5214
5952
|
"Place the floor plan on Sheet 1",
|
|
5215
5953
|
"Add this 3D view to the cover sheet",
|
|
5216
5954
|
"Drop the site plan onto the layout sheet at 100, 200",
|
|
5217
|
-
"Put the Ground Floor view on sheet_1
|
|
5955
|
+
"Put the Ground Floor view on sheet_1 at 1:100 scale",
|
|
5956
|
+
"Place the plan on the cover sheet at quarter-inch scale\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.sheets.place(\"sheet_1\", \"view_123\", {\nscale: 100, // 1:100 (metric project)\n})\n```"
|
|
5218
5957
|
],
|
|
5219
5958
|
"argsType": "string",
|
|
5220
5959
|
"resultType": "PluginPresentationSheetsPlaceResult"
|
|
5221
5960
|
},
|
|
5961
|
+
{
|
|
5962
|
+
"path": "presentation.sheets.rename",
|
|
5963
|
+
"namespace": "presentation.sheets",
|
|
5964
|
+
"summary": "Rename a layout sheet.",
|
|
5965
|
+
"examplePrompts": [
|
|
5966
|
+
"Rename sheet_1 to Cover",
|
|
5967
|
+
"Call the first sheet Ground Floor",
|
|
5968
|
+
"Change this sheet's name to Site Plan\n\n# Example\n```ts\nconst sheet = await snaptrude.presentation.sheets.rename(\"sheet_1\", \"Cover\")\n```"
|
|
5969
|
+
],
|
|
5970
|
+
"argsType": "string",
|
|
5971
|
+
"resultType": "PluginPresentationSheet"
|
|
5972
|
+
},
|
|
5973
|
+
{
|
|
5974
|
+
"path": "presentation.sheets.reorder",
|
|
5975
|
+
"namespace": "presentation.sheets",
|
|
5976
|
+
"summary": "Move a sheet to a new position in the sheet order.",
|
|
5977
|
+
"examplePrompts": [
|
|
5978
|
+
"Move sheet_3 to the front",
|
|
5979
|
+
"Make the Cover sheet the first sheet",
|
|
5980
|
+
"Reorder this sheet to position 2\n\n# Example\n```ts\nconst { sheets } = await snaptrude.presentation.sheets.reorder(\"sheet_3\", 0)\n```"
|
|
5981
|
+
],
|
|
5982
|
+
"argsType": "string",
|
|
5983
|
+
"resultType": "PluginPresentationSheetsListResult"
|
|
5984
|
+
},
|
|
5985
|
+
{
|
|
5986
|
+
"path": "presentation.sheets.setActive",
|
|
5987
|
+
"namespace": "presentation.sheets",
|
|
5988
|
+
"summary": "Make a sheet the active sheet.",
|
|
5989
|
+
"examplePrompts": [
|
|
5990
|
+
"Go to sheet_1",
|
|
5991
|
+
"Open the Cover sheet",
|
|
5992
|
+
"Switch to the Site Plan sheet\n\n# Example\n```ts\nawait snaptrude.presentation.sheets.setActive(\"sheet_1\")\n```"
|
|
5993
|
+
],
|
|
5994
|
+
"argsType": "string",
|
|
5995
|
+
"resultType": "PluginPresentationSheet"
|
|
5996
|
+
},
|
|
5997
|
+
{
|
|
5998
|
+
"path": "presentation.sheets.setSize",
|
|
5999
|
+
"namespace": "presentation.sheets",
|
|
6000
|
+
"summary": "Set a sheet's paper size and/or orientation.",
|
|
6001
|
+
"examplePrompts": [
|
|
6002
|
+
"Resize sheet_1 to A1",
|
|
6003
|
+
"Make the cover sheet ANSI B portrait",
|
|
6004
|
+
"Change this sheet to Arch D landscape",
|
|
6005
|
+
"Set the sheet size to A3\n\n# Example\n```ts\nconst sheet = await snaptrude.presentation.sheets.setSize(\"sheet_1\", \"ISO_A1\", \"portrait\")\n```"
|
|
6006
|
+
],
|
|
6007
|
+
"argsType": "string",
|
|
6008
|
+
"resultType": "PluginPresentationSheet"
|
|
6009
|
+
},
|
|
6010
|
+
{
|
|
6011
|
+
"path": "presentation.sheets.updatePlacedView",
|
|
6012
|
+
"namespace": "presentation.sheets",
|
|
6013
|
+
"summary": "Refresh placed views to the current model state.",
|
|
6014
|
+
"examplePrompts": [
|
|
6015
|
+
"Update all the placed views to the latest model",
|
|
6016
|
+
"Refresh the views on sheet_1",
|
|
6017
|
+
"Re-render the placed views after my edits\n\n# Example\n```ts\nconst { shapeIds } = await snaptrude.presentation.sheets.updatePlacedView()\n```"
|
|
6018
|
+
],
|
|
6019
|
+
"argsType": "{\n sheetId?: string\n }",
|
|
6020
|
+
"resultType": "PluginPresentationSheetsUpdatePlacedViewResult"
|
|
6021
|
+
},
|
|
5222
6022
|
{
|
|
5223
6023
|
"path": "presentation.views.capture",
|
|
5224
6024
|
"namespace": "presentation.views",
|
|
@@ -5240,11 +6040,24 @@
|
|
|
5240
6040
|
"Save the current view as Lobby Perspective",
|
|
5241
6041
|
"Create a new saved view from where I'm looking",
|
|
5242
6042
|
"Bookmark this camera angle",
|
|
5243
|
-
"Save the current 2D plan as a view
|
|
6043
|
+
"Save the current 2D plan as a view",
|
|
6044
|
+
"Save a view on the second storey\n\n# Example\n```ts\nconst view = await snaptrude.presentation.views.create(\"Lobby\")\n// …or capture the view on a specific storey\nconst level2 = await snaptrude.presentation.views.create(\"Level 2\", { storey: 2 })\n```"
|
|
5244
6045
|
],
|
|
5245
6046
|
"argsType": "string",
|
|
5246
6047
|
"resultType": "PluginPresentationViewsCreateResult"
|
|
5247
6048
|
},
|
|
6049
|
+
{
|
|
6050
|
+
"path": "presentation.views.delete",
|
|
6051
|
+
"namespace": "presentation.views",
|
|
6052
|
+
"summary": "Delete a saved view.",
|
|
6053
|
+
"examplePrompts": [
|
|
6054
|
+
"Delete the view named Old Draft",
|
|
6055
|
+
"Remove this saved view",
|
|
6056
|
+
"Get rid of the Lobby camera bookmark\n\n# Example\n```ts\nconst { id } = await snaptrude.presentation.views.delete(\"view_123\")\n```"
|
|
6057
|
+
],
|
|
6058
|
+
"argsType": "string",
|
|
6059
|
+
"resultType": "PluginPresentationViewsDeleteResult"
|
|
6060
|
+
},
|
|
5248
6061
|
{
|
|
5249
6062
|
"path": "presentation.views.get",
|
|
5250
6063
|
"namespace": "presentation.views",
|
|
@@ -5272,7 +6085,7 @@
|
|
|
5272
6085
|
{
|
|
5273
6086
|
"path": "presentation.views.getSettings",
|
|
5274
6087
|
"namespace": "presentation.views",
|
|
5275
|
-
"summary": "Read a saved view's display settings (background, color mode, axis, edges, labels).",
|
|
6088
|
+
"summary": "Read a saved view's display settings (background, color mode, view mode, axis, edges, labels).",
|
|
5276
6089
|
"examplePrompts": [
|
|
5277
6090
|
"What color mode is the Ground Floor view using?",
|
|
5278
6091
|
"Get the display settings for this view",
|
|
@@ -5296,6 +6109,18 @@
|
|
|
5296
6109
|
"argsType": null,
|
|
5297
6110
|
"resultType": "PluginPresentationViewsListResult"
|
|
5298
6111
|
},
|
|
6112
|
+
{
|
|
6113
|
+
"path": "presentation.views.rename",
|
|
6114
|
+
"namespace": "presentation.views",
|
|
6115
|
+
"summary": "Rename a saved view.",
|
|
6116
|
+
"examplePrompts": [
|
|
6117
|
+
"Rename the view Lobby to Entrance Lobby",
|
|
6118
|
+
"Call this view Ground Floor Plan",
|
|
6119
|
+
"Change the active view's name to Final\n\n# Example\n```ts\nconst view = await snaptrude.presentation.views.rename(\"view_123\", \"Entrance\")\n```"
|
|
6120
|
+
],
|
|
6121
|
+
"argsType": "string",
|
|
6122
|
+
"resultType": "PluginPresentationViewsRenameResult"
|
|
6123
|
+
},
|
|
5299
6124
|
{
|
|
5300
6125
|
"path": "presentation.views.setActive",
|
|
5301
6126
|
"namespace": "presentation.views",
|
|
@@ -5318,7 +6143,8 @@
|
|
|
5318
6143
|
"Turn off the axis in the Ground Floor view",
|
|
5319
6144
|
"Set the background of the active view to white",
|
|
5320
6145
|
"Show area labels on this view",
|
|
5321
|
-
"Enable hidden-line mode for the section view
|
|
6146
|
+
"Enable hidden-line mode for the section view",
|
|
6147
|
+
"Make the 3D view orthographic instead of perspective\n\n# Example\n```ts\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\ncolorMode: \"monochrome\",\nshowAxis: false,\n})\n// switch a 3D view to an isometric (orthographic) projection\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\nviewMode: \"isometric\",\n})\n```"
|
|
5322
6148
|
],
|
|
5323
6149
|
"argsType": "string",
|
|
5324
6150
|
"resultType": "PluginPresentationViewsUpdateSettingsResult"
|
|
@@ -5390,6 +6216,18 @@
|
|
|
5390
6216
|
"argsType": "PluginProgramAreaGroupBy",
|
|
5391
6217
|
"resultType": "PluginProgramAreasListMembersResult"
|
|
5392
6218
|
},
|
|
6219
|
+
{
|
|
6220
|
+
"path": "program.areas.refresh",
|
|
6221
|
+
"namespace": "program.areas",
|
|
6222
|
+
"summary": "Force the area breakdown to recompute, then return the fresh summary.",
|
|
6223
|
+
"examplePrompts": [
|
|
6224
|
+
"Recompute the area totals before I read them",
|
|
6225
|
+
"Refresh the FAR numbers",
|
|
6226
|
+
"Make sure the area breakdown is up to date\n\n# Example\n```ts\nconst s = await snaptrude.program.areas.refresh()\nconst { groups } = await snaptrude.program.areas.list(\"storeys\") // now fresh\nconsole.log(s.builtUp, groups.length)\n```"
|
|
6227
|
+
],
|
|
6228
|
+
"argsType": null,
|
|
6229
|
+
"resultType": "PluginProgramAreasRefreshResult"
|
|
6230
|
+
},
|
|
5393
6231
|
{
|
|
5394
6232
|
"path": "program.areas.update",
|
|
5395
6233
|
"namespace": "program.areas",
|
|
@@ -5399,7 +6237,7 @@
|
|
|
5399
6237
|
"Override the site area to 5000",
|
|
5400
6238
|
"Allow a 10 percent FAR deviation\n\n# Example\n```ts\nconst s = await snaptrude.program.areas.update({ targetFar: 2.5 })\nconsole.log(s.achievedFar, s.targetFar)\n```"
|
|
5401
6239
|
],
|
|
5402
|
-
"argsType": "{
|
|
6240
|
+
"argsType": "{\n targetFar?: number\n siteArea?: number\n deviation?: number\n }",
|
|
5403
6241
|
"resultType": "PluginProgramAreasUpdateResult"
|
|
5404
6242
|
},
|
|
5405
6243
|
{
|
|
@@ -5544,6 +6382,18 @@
|
|
|
5544
6382
|
"argsType": "string",
|
|
5545
6383
|
"resultType": "PluginProgramDepartmentsUpdateResult"
|
|
5546
6384
|
},
|
|
6385
|
+
{
|
|
6386
|
+
"path": "program.layout.applySolution",
|
|
6387
|
+
"namespace": "program.layout",
|
|
6388
|
+
"summary": "Apply one of the pending arrange solutions.",
|
|
6389
|
+
"examplePrompts": [
|
|
6390
|
+
"Apply the second arrange solution",
|
|
6391
|
+
"Pick layout solution 3 and commit it",
|
|
6392
|
+
"Apply the arrange solution I chose\n\n# Example\n```ts\nawait snaptrude.program.layout.arrange({ autoCommit: false })\nlet job = await snaptrude.program.layout.getState()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.program.layout.getState()\n}\nif (job?.status === \"pendingReview\") {\nconsole.log(`${job.totalSolutions} candidate layouts`)\nawait snaptrude.program.layout.applySolution(1) // commit the second one\n}\n```"
|
|
6393
|
+
],
|
|
6394
|
+
"argsType": "number",
|
|
6395
|
+
"resultType": "PluginProgramLayoutApplyResult"
|
|
6396
|
+
},
|
|
5547
6397
|
{
|
|
5548
6398
|
"path": "program.layout.arrange",
|
|
5549
6399
|
"namespace": "program.layout",
|
|
@@ -5551,7 +6401,8 @@
|
|
|
5551
6401
|
"examplePrompts": [
|
|
5552
6402
|
"Arrange the rooms in the envelope",
|
|
5553
6403
|
"Lay out the departments inside the building envelope",
|
|
5554
|
-
"Auto-arrange the program spaces
|
|
6404
|
+
"Auto-arrange the program spaces",
|
|
6405
|
+
"Arrange the rooms but let me pick the solution\n\n# Example\n```ts\nconst { success, error } = await snaptrude.program.layout.arrange()\nif (!success) throw new Error(error)\n// poll until the layout is applied\nlet job = await snaptrude.program.layout.getState()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.program.layout.getState()\n}\n```"
|
|
5555
6406
|
],
|
|
5556
6407
|
"argsType": "PluginProgramLayoutRunArgs",
|
|
5557
6408
|
"resultType": "PluginProgramLayoutRunResult"
|
|
@@ -5592,6 +6443,18 @@
|
|
|
5592
6443
|
"argsType": "PluginProgramLayoutRunArgs",
|
|
5593
6444
|
"resultType": "PluginProgramLayoutRunResult"
|
|
5594
6445
|
},
|
|
6446
|
+
{
|
|
6447
|
+
"path": "program.layout.stack",
|
|
6448
|
+
"namespace": "program.layout",
|
|
6449
|
+
"summary": "Stack the program across **every storey** of the building — the product's *Pack in envelope* / auto-stack.",
|
|
6450
|
+
"examplePrompts": [
|
|
6451
|
+
"Stack the program across all floors",
|
|
6452
|
+
"Auto-stack the departments into the envelope on every storey",
|
|
6453
|
+
"Pack the whole building's program into its envelope\n\n# Example\n```ts\nconst { success, skippedStoreys, error } = await snaptrude.program.layout.stack()\nif (!success) throw new Error(error)\nif (skippedStoreys.length)\nconsole.warn(`No envelope on storeys: ${skippedStoreys.join(\", \")}`)\n```"
|
|
6454
|
+
],
|
|
6455
|
+
"argsType": null,
|
|
6456
|
+
"resultType": "PluginProgramLayoutStackResult"
|
|
6457
|
+
},
|
|
5595
6458
|
{
|
|
5596
6459
|
"path": "program.metrics.get",
|
|
5597
6460
|
"namespace": "program.metrics",
|
|
@@ -5686,7 +6549,7 @@
|
|
|
5686
6549
|
{
|
|
5687
6550
|
"path": "program.site.listPolygons",
|
|
5688
6551
|
"namespace": "program.site",
|
|
5689
|
-
"summary": "List the site parcels with their footprints (
|
|
6552
|
+
"summary": "List the site parcels with their footprints (world XZ plan coordinates, Snaptrude units).",
|
|
5690
6553
|
"examplePrompts": [
|
|
5691
6554
|
"List every site parcel",
|
|
5692
6555
|
"Show me each plot's footprint",
|
|
@@ -5754,7 +6617,7 @@
|
|
|
5754
6617
|
"Re-pull all my data bindings",
|
|
5755
6618
|
"Refresh every binding on the sheets\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.bindings.refresh({ name: \"takeoff\" })\n```"
|
|
5756
6619
|
],
|
|
5757
|
-
"argsType": "{
|
|
6620
|
+
"argsType": "{\n name?: string\n }",
|
|
5758
6621
|
"resultType": "PluginProgramSpreadsheetBindingsRefreshResult"
|
|
5759
6622
|
},
|
|
5760
6623
|
{
|
|
@@ -5773,12 +6636,13 @@
|
|
|
5773
6636
|
{
|
|
5774
6637
|
"path": "program.spreadsheet.export",
|
|
5775
6638
|
"namespace": "program.spreadsheet",
|
|
5776
|
-
"summary": "Export the
|
|
6639
|
+
"summary": "Export the report workbook to a file (xlsx, pdf, or csv).",
|
|
5777
6640
|
"examplePrompts": [
|
|
5778
6641
|
"Export the report as an Excel file",
|
|
5779
6642
|
"Download the whole workbook as a PDF",
|
|
5780
6643
|
"Export the program workbook to xlsx",
|
|
5781
|
-
"Save the report as a csv file
|
|
6644
|
+
"Save the report as a csv file",
|
|
6645
|
+
"Export the Takeoff sheet as CSV\n\n# Example\n```ts\nconst file = await snaptrude.program.spreadsheet.export(\"xlsx\")\n// file.fileName, file.mimeType, file.dataBase64\n\n// CSV of a specific sheet:\nconst csv = await snaptrude.program.spreadsheet.export(\"csv\", { sheetName: \"Takeoff\" })\n```"
|
|
5782
6646
|
],
|
|
5783
6647
|
"argsType": "PluginSpreadsheetExportFormat",
|
|
5784
6648
|
"resultType": "PluginProgramSpreadsheetExportResult"
|
|
@@ -5793,9 +6657,23 @@
|
|
|
5793
6657
|
"Get the last 10 audit log entries",
|
|
5794
6658
|
"Read the program spreadsheet audit log\n\n# Example\n```ts\nconst { entries } = await snaptrude.program.spreadsheet.getAuditLog({ limit: 10 })\n```"
|
|
5795
6659
|
],
|
|
5796
|
-
"argsType": "{
|
|
6660
|
+
"argsType": "{\n limit?: number\n }",
|
|
5797
6661
|
"resultType": "PluginProgramSpreadsheetGetAuditLogResult"
|
|
5798
6662
|
},
|
|
6663
|
+
{
|
|
6664
|
+
"path": "program.spreadsheet.getMaterialTakeoff",
|
|
6665
|
+
"namespace": "program.spreadsheet",
|
|
6666
|
+
"summary": "Read the material take-off dataset (surface area per material, per element type).",
|
|
6667
|
+
"examplePrompts": [
|
|
6668
|
+
"Get the material take-off",
|
|
6669
|
+
"How much of each material is used?",
|
|
6670
|
+
"Read the surface area by material",
|
|
6671
|
+
"Give me the material quantities before I render them",
|
|
6672
|
+
"What's in the material take-off right now?\n\n# Example\n```ts\nconst mto = await snaptrude.program.spreadsheet.getMaterialTakeoff()\nfor (const row of mto.rows) {\nconsole.log(row.objectType, row.family, row.material, row.quantity, row.unit)\n}\n```"
|
|
6673
|
+
],
|
|
6674
|
+
"argsType": null,
|
|
6675
|
+
"resultType": "PluginProgramSpreadsheetGetMaterialTakeoffResult"
|
|
6676
|
+
},
|
|
5799
6677
|
{
|
|
5800
6678
|
"path": "program.spreadsheet.getProgram",
|
|
5801
6679
|
"namespace": "program.spreadsheet",
|
|
@@ -5894,7 +6772,7 @@
|
|
|
5894
6772
|
"Recompute all the formulas",
|
|
5895
6773
|
"Recalculate the Summary sheet\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.recalculate()\n```"
|
|
5896
6774
|
],
|
|
5897
|
-
"argsType": "{
|
|
6775
|
+
"argsType": "{\n sheetName?: string\n }",
|
|
5898
6776
|
"resultType": "PluginProgramSpreadsheetRecalculateResult"
|
|
5899
6777
|
},
|
|
5900
6778
|
{
|
|
@@ -5921,7 +6799,7 @@
|
|
|
5921
6799
|
"Generate the program schedule sheet titled Program",
|
|
5922
6800
|
"Render the program filtered to the residential departments\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.renderProgram({ sheetName: \"Program\" })\n```"
|
|
5923
6801
|
],
|
|
5924
|
-
"argsType": "{
|
|
6802
|
+
"argsType": "{\n sheetName?: string\n title?: string\n filter?: string\n }",
|
|
5925
6803
|
"resultType": "PluginProgramSpreadsheetRenderResult"
|
|
5926
6804
|
},
|
|
5927
6805
|
{
|
|
@@ -5934,7 +6812,7 @@
|
|
|
5934
6812
|
"Generate the takeoff schedule sheet titled Takeoff",
|
|
5935
6813
|
"Render the material takeoff filtered to the walls\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.renderTakeoff({ sheetName: \"Takeoff\" })\n```"
|
|
5936
6814
|
],
|
|
5937
|
-
"argsType": "{
|
|
6815
|
+
"argsType": "{\n sheetName?: string\n title?: string\n filter?: string\n }",
|
|
5938
6816
|
"resultType": "PluginProgramSpreadsheetRenderResult"
|
|
5939
6817
|
},
|
|
5940
6818
|
{
|