@snaptrude/plugin-core 0.8.0 → 0.9.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 +16 -1
- package/api-manifest.full.json +1350 -89
- package/api-manifest.json +826 -40
- package/dist/api/analysis/daylight.d.ts +603 -0
- package/dist/api/analysis/daylight.d.ts.map +1 -0
- package/dist/api/analysis/heatmaps.d.ts +438 -14
- package/dist/api/analysis/heatmaps.d.ts.map +1 -1
- package/dist/api/analysis/index.d.ts +15 -0
- package/dist/api/analysis/index.d.ts.map +1 -1
- package/dist/api/analysis/solar.d.ts +249 -0
- package/dist/api/analysis/solar.d.ts.map +1 -0
- package/dist/api/analysis/weather.d.ts +193 -0
- package/dist/api/analysis/weather.d.ts.map +1 -0
- package/dist/api/core/camera/index.d.ts +37 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +318 -1
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/index.d.ts +9 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/export/index.d.ts +3 -1
- package/dist/api/core/io/export/index.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +61 -0
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/mode/index.d.ts +99 -0
- package/dist/api/core/mode/index.d.ts.map +1 -0
- package/dist/api/core/storeys/index.d.ts +251 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +24 -0
- package/dist/api/core/tags.d.ts.map +1 -1
- package/dist/api/core/zoom/index.d.ts +4 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +115 -4
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +3 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +112 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +4 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/referenceLines.d.ts +45 -0
- package/dist/api/design/query/referenceLines.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +173 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- package/dist/api/design/transform/index.d.ts +12 -0
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +51 -1
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/entity/buildableEnvelope.d.ts +4 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +8 -0
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +20 -0
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +4 -0
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/import.d.ts +6 -0
- package/dist/api/presentation/import.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +9 -0
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +370 -0
- package/dist/api/presentation/placedViews.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +481 -0
- package/dist/api/presentation/shapes.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +94 -0
- package/dist/api/program/site.d.ts.map +1 -1
- package/dist/api/program/spreadsheet.d.ts +260 -28
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +460 -0
- package/dist/api/workspace/index.d.ts.map +1 -0
- package/dist/index.cjs +2625 -1758
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2515 -1758
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/scripts/generate-manifest.mjs +45 -0
- package/src/api/analysis/daylight.ts +470 -0
- package/src/api/analysis/heatmaps.ts +444 -17
- package/src/api/analysis/index.ts +15 -0
- package/src/api/analysis/solar.ts +237 -0
- package/src/api/analysis/weather.ts +179 -0
- package/src/api/core/camera/index.ts +39 -0
- package/src/api/core/geom/create/index.ts +344 -1
- package/src/api/core/index.ts +9 -0
- package/src/api/core/io/export/index.ts +3 -1
- package/src/api/core/io/import/index.ts +64 -0
- package/src/api/core/mode/index.ts +96 -0
- package/src/api/core/storeys/index.ts +279 -0
- package/src/api/core/tags.ts +27 -0
- package/src/api/core/zoom/index.ts +4 -0
- package/src/api/design/create/index.ts +138 -1
- package/src/api/design/delete/index.ts +3 -0
- package/src/api/design/query/geometry/index.ts +125 -3
- package/src/api/design/query/index.ts +4 -0
- package/src/api/design/query/referenceLines.ts +52 -0
- package/src/api/design/query/spaces.ts +143 -0
- package/src/api/design/transform/index.ts +12 -0
- package/src/api/design/update/index.ts +66 -1
- package/src/api/entity/buildableEnvelope.ts +4 -0
- package/src/api/entity/referenceLine.ts +8 -0
- package/src/api/entity/story.ts +20 -0
- package/src/api/index.ts +5 -0
- package/src/api/presentation/export.ts +4 -0
- package/src/api/presentation/import.ts +6 -0
- package/src/api/presentation/index.ts +9 -0
- package/src/api/presentation/placedViews.ts +363 -0
- package/src/api/presentation/shapes.ts +274 -0
- package/src/api/program/site.ts +95 -0
- package/src/api/program/spreadsheet.ts +251 -6
- package/src/api/workspace/index.ts +516 -0
package/api-manifest.json
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"path": "analysis.daylight.compute",
|
|
4
|
+
"namespace": "analysis.daylight",
|
|
5
|
+
"summary": "Compute annual daylight metrics for the model's spaces.",
|
|
6
|
+
"examplePrompts": [
|
|
7
|
+
"Run an LM-83 ASE daylight analysis on all my spaces",
|
|
8
|
+
"Which rooms fail annual sunlight exposure?",
|
|
9
|
+
"Compute ASE with a 0.6m sensor grid at desk height",
|
|
10
|
+
"Run an LM-83 sDA analysis with blinds operated",
|
|
11
|
+
"Which spaces meet sDA300/50%?",
|
|
12
|
+
"Compute sDA with 70% reflective ceilings and Tvis 0.6 glazing\n\n# Example\n```ts\nlet res = await snaptrude.analysis.daylight.compute({\nstandard: \"IES-LM-83-23\",\nmetrics: [\"sDA\", \"ASE\"],\ngrid: { spacingM: 0.6, workplaneHeightM: 0.76, boundaryOffsetM: 0.5 },\noptics: { materials: { \"Glass - Clear\": { transmittance: 0.6 } } },\n})\nconst runId = res.runId\nwhile (res.status === \"running\" && runId) {\nawait new Promise((r) => setTimeout(r, 5000))\nres = await snaptrude.analysis.daylight.poll({ runId })\n}\nconst failing = res.aggregates.filter(\n(a) => a.scope === \"space\" && (a.sdaPercent ?? 0) < 55,\n)\n```"
|
|
13
|
+
],
|
|
14
|
+
"argsType": "PluginDaylightComputeArgs",
|
|
15
|
+
"resultType": "PluginDaylightResults"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"path": "analysis.daylight.poll",
|
|
19
|
+
"namespace": "analysis.daylight",
|
|
20
|
+
"summary": "Poll an asynchronous daylight run started by {@linkcode PluginAnalysisDaylightApi.compute}.",
|
|
21
|
+
"examplePrompts": [
|
|
22
|
+
"Check whether my sDA run has finished",
|
|
23
|
+
"Get the results of the daylight run"
|
|
24
|
+
],
|
|
25
|
+
"argsType": "PluginDaylightPollArgs",
|
|
26
|
+
"resultType": "PluginDaylightResults"
|
|
27
|
+
},
|
|
2
28
|
{
|
|
3
29
|
"path": "analysis.heatmaps.isActive",
|
|
4
30
|
"namespace": "analysis.heatmaps",
|
|
@@ -11,6 +37,79 @@
|
|
|
11
37
|
"argsType": null,
|
|
12
38
|
"resultType": "boolean"
|
|
13
39
|
},
|
|
40
|
+
{
|
|
41
|
+
"path": "analysis.heatmaps.overlays.hide",
|
|
42
|
+
"namespace": "analysis.heatmaps.overlays",
|
|
43
|
+
"summary": "Hide an overlay without removing it.",
|
|
44
|
+
"examplePrompts": [
|
|
45
|
+
"Hide the wind overlay but keep it around",
|
|
46
|
+
"Temporarily hide my heatmap",
|
|
47
|
+
"Turn off the occupancy colours without deleting them\n\n# Example\n```ts\nawait snaptrude.analysis.heatmaps.overlays.hide(\"wind\")\n```"
|
|
48
|
+
],
|
|
49
|
+
"argsType": "string",
|
|
50
|
+
"resultType": "boolean"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"path": "analysis.heatmaps.overlays.list",
|
|
54
|
+
"namespace": "analysis.heatmaps.overlays",
|
|
55
|
+
"summary": "List the registered heatmap overlays.",
|
|
56
|
+
"examplePrompts": [
|
|
57
|
+
"Which heatmap overlays do I have?",
|
|
58
|
+
"List my rendered analysis overlays",
|
|
59
|
+
"Check which heatmap is currently visible\n\n# Example\n```ts\nconst { overlays } = await snaptrude.analysis.heatmaps.overlays.list()\nconst visible = overlays.find((o) => o.visible)\n```"
|
|
60
|
+
],
|
|
61
|
+
"argsType": null,
|
|
62
|
+
"resultType": "PluginAnalysisHeatmapOverlaysListResult"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"path": "analysis.heatmaps.overlays.remove",
|
|
66
|
+
"namespace": "analysis.heatmaps.overlays",
|
|
67
|
+
"summary": "Remove an overlay — dispose its meshes and forget it.",
|
|
68
|
+
"examplePrompts": [
|
|
69
|
+
"Delete the wind overlay",
|
|
70
|
+
"Remove my occupancy heatmap for good",
|
|
71
|
+
"Free up an overlay slot\n\n# Example\n```ts\nawait snaptrude.analysis.heatmaps.overlays.remove(\"wind\")\n```"
|
|
72
|
+
],
|
|
73
|
+
"argsType": "string",
|
|
74
|
+
"resultType": "boolean"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"path": "analysis.heatmaps.overlays.removeAll",
|
|
78
|
+
"namespace": "analysis.heatmaps.overlays",
|
|
79
|
+
"summary": "Remove every registered overlay and close the legend.",
|
|
80
|
+
"examplePrompts": [
|
|
81
|
+
"Clear all my heatmap overlays",
|
|
82
|
+
"Remove every analysis overlay from the scene",
|
|
83
|
+
"Start over with a clean set of overlays\n\n# Example\n```ts\nconst removed = await snaptrude.analysis.heatmaps.overlays.removeAll()\n```"
|
|
84
|
+
],
|
|
85
|
+
"argsType": null,
|
|
86
|
+
"resultType": "number"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"path": "analysis.heatmaps.overlays.show",
|
|
90
|
+
"namespace": "analysis.heatmaps.overlays",
|
|
91
|
+
"summary": "Make a registered overlay the visible one.",
|
|
92
|
+
"examplePrompts": [
|
|
93
|
+
"Switch back to my wind heatmap",
|
|
94
|
+
"Show the occupancy overlay",
|
|
95
|
+
"Flip between my two analysis overlays\n\n# Example\n```ts\nawait snaptrude.analysis.heatmaps.overlays.show(\"wind\")\n```"
|
|
96
|
+
],
|
|
97
|
+
"argsType": "string",
|
|
98
|
+
"resultType": "boolean"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"path": "analysis.heatmaps.renderField",
|
|
102
|
+
"namespace": "analysis.heatmaps",
|
|
103
|
+
"summary": "Render a heatmap from **arbitrary cell geometry** — planar polygons or pre-tessellated meshes, one scalar value each.",
|
|
104
|
+
"examplePrompts": [
|
|
105
|
+
"Overlay my FEA stress results on their solver mesh",
|
|
106
|
+
"Color these Voronoi regions by footfall",
|
|
107
|
+
"Paint each façade panel polygon by its PV yield",
|
|
108
|
+
"Render pass/fail daylight compliance per zone polygon\n\n# Example\n```ts\n// Two triangular cells at ground level, coloured pass/fail at 300 lux.\nawait snaptrude.analysis.heatmaps.renderField(\n[\n{ polygon: [{ x: 0, y: 0, z: 0 }, { x: 4, y: 0, z: 0 }, { x: 0, y: 0, z: 4 }], value: 420 },\n{ polygon: [{ x: 4, y: 0, z: 4 }, { x: 0, y: 0, z: 4 }, { x: 4, y: 0, z: 0 }], value: 180 },\n],\n{ title: \"Daylight\", unit: \"lux\", scale: { type: \"threshold\", threshold: 300 } },\n)\n```"
|
|
109
|
+
],
|
|
110
|
+
"argsType": "PluginAnalysisHeatmapFieldCell[]",
|
|
111
|
+
"resultType": "PluginAnalysisHeatmapsRenderResult"
|
|
112
|
+
},
|
|
14
113
|
{
|
|
15
114
|
"path": "analysis.heatmaps.renderGrid",
|
|
16
115
|
"namespace": "analysis.heatmaps",
|
|
@@ -35,10 +134,23 @@
|
|
|
35
134
|
"argsType": "PluginAnalysisHeatmapSpaceEntry[]",
|
|
36
135
|
"resultType": "PluginAnalysisHeatmapsRenderResult"
|
|
37
136
|
},
|
|
137
|
+
{
|
|
138
|
+
"path": "analysis.heatmaps.renderSurfaceGrid",
|
|
139
|
+
"namespace": "analysis.heatmaps",
|
|
140
|
+
"summary": "Render a grid heatmap on an **arbitrarily oriented plane** — a façade, a section cut, any flat surface.",
|
|
141
|
+
"examplePrompts": [
|
|
142
|
+
"Paint the solar irradiance results on the south façade",
|
|
143
|
+
"Show my daylight values as a heatmap on this wall",
|
|
144
|
+
"Render panel-level PV yield on the building face",
|
|
145
|
+
"Overlay wind pressure on the tower's west elevation\n\n# Example\n```ts\n// Samples lie on a wall plane facing +X; colour each 1-unit cell by irradiance.\nawait snaptrude.analysis.heatmaps.renderSurfaceGrid(\nsamples.map((s) => ({ position: { x: wallX, y: s.y, z: s.z }, value: s.irradiance })),\n1,\n{ x: 1, y: 0, z: 0 }, // façade normal\n{ title: \"Irradiance\", unit: \"kWh/m²\", colors: [\"#0000ff\", \"#ffff00\", \"#ff0000\"] },\n)\n```"
|
|
146
|
+
],
|
|
147
|
+
"argsType": "PluginAnalysisHeatmapGridCell[]",
|
|
148
|
+
"resultType": "PluginAnalysisHeatmapsRenderResult"
|
|
149
|
+
},
|
|
38
150
|
{
|
|
39
151
|
"path": "analysis.heatmaps.reset",
|
|
40
152
|
"namespace": "analysis.heatmaps",
|
|
41
|
-
"summary": "Clear
|
|
153
|
+
"summary": "Clear every plugin heatmap overlay from the scene.",
|
|
42
154
|
"examplePrompts": [
|
|
43
155
|
"Clear my custom heatmap",
|
|
44
156
|
"Remove the wind overlay from the model",
|
|
@@ -155,6 +267,18 @@
|
|
|
155
267
|
"argsType": "string",
|
|
156
268
|
"resultType": "PluginAnalysisShadowsDateTimeResult"
|
|
157
269
|
},
|
|
270
|
+
{
|
|
271
|
+
"path": "analysis.solar.sampleGrid",
|
|
272
|
+
"namespace": "analysis.solar",
|
|
273
|
+
"summary": "Sample solar exposure at a set of points.",
|
|
274
|
+
"examplePrompts": [
|
|
275
|
+
"What's the irradiance at these facade points at noon on June 21?",
|
|
276
|
+
"How shaded are these balcony points across the summer?",
|
|
277
|
+
"Sample direct sun visibility at these roof points right now\n\n# Example\n```ts\nconst grid = await snaptrude.analysis.solar.sampleGrid({\npoints: [\n{ id: \"a\", position: [0, 3, 0] },\n{ id: \"b\", position: [5, 3, 0], normal: [0, 0, 1] },\n],\ndateTime: \"2026-06-21T12:00:00+05:30\",\n})\nfor (const r of grid.results) {\nconsole.log(r.id, r.directSunVisible, r.totalIrradiance, grid.units)\n}\n```"
|
|
278
|
+
],
|
|
279
|
+
"argsType": "PluginSolarSampleGridArgs",
|
|
280
|
+
"resultType": "PluginSolarSampleGridResult"
|
|
281
|
+
},
|
|
158
282
|
{
|
|
159
283
|
"path": "analysis.sunlightHours.cancel",
|
|
160
284
|
"namespace": "analysis.sunlightHours",
|
|
@@ -239,6 +363,18 @@
|
|
|
239
363
|
"argsType": null,
|
|
240
364
|
"resultType": "boolean"
|
|
241
365
|
},
|
|
366
|
+
{
|
|
367
|
+
"path": "analysis.weather.getSeries",
|
|
368
|
+
"namespace": "analysis.weather",
|
|
369
|
+
"summary": "Get the hourly weather series for a date range, paged.",
|
|
370
|
+
"examplePrompts": [
|
|
371
|
+
"Get the weather series for June at my site",
|
|
372
|
+
"Pull the hourly temperature and irradiance for this location",
|
|
373
|
+
"What EPW weather file is my project using?\n\n# Example\n```ts\nlet cursor: string | undefined = undefined\nconst rows = []\ndo {\nconst page = await snaptrude.analysis.weather.getSeries({\nstartDate: \"2026-06-01\",\nendDate: \"2026-06-30\",\ncursor,\n})\nrows.push(...page.rows)\ncursor = page.nextCursor ?? undefined\n} while (cursor)\n```"
|
|
374
|
+
],
|
|
375
|
+
"argsType": "PluginWeatherGetSeriesArgs",
|
|
376
|
+
"resultType": "PluginWeatherSeriesResult"
|
|
377
|
+
},
|
|
242
378
|
{
|
|
243
379
|
"path": "core.buildings.copy",
|
|
244
380
|
"namespace": "core.buildings",
|
|
@@ -412,6 +548,32 @@
|
|
|
412
548
|
"argsType": "PluginStandardView",
|
|
413
549
|
"resultType": "boolean"
|
|
414
550
|
},
|
|
551
|
+
{
|
|
552
|
+
"path": "core.camera.zoomExtents",
|
|
553
|
+
"namespace": "core.camera",
|
|
554
|
+
"summary": "Zoom (fit) the camera to all geometry in the scene — the \"zoom extents\" action. View-state only — not undoable. Canonical home of the zoom-extents read (the deprecated `core.zoom.extents`).",
|
|
555
|
+
"examplePrompts": [
|
|
556
|
+
"Zoom out so I can see the whole model",
|
|
557
|
+
"Fit everything in the view",
|
|
558
|
+
"Frame the entire building in the viewport",
|
|
559
|
+
"Do a zoom extents on the canvas\n\n# Example\n```ts\nawait snaptrude.core.camera.zoomExtents()\n```"
|
|
560
|
+
],
|
|
561
|
+
"argsType": null,
|
|
562
|
+
"resultType": "boolean"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"path": "core.camera.zoomSelection",
|
|
566
|
+
"namespace": "core.camera",
|
|
567
|
+
"summary": "Zoom (fit) the camera to the current selection. View-state only — not undoable. Canonical home of the zoom-to-selection read (the deprecated `core.zoom.selection`).",
|
|
568
|
+
"examplePrompts": [
|
|
569
|
+
"Zoom in on what I have selected",
|
|
570
|
+
"Frame the selected walls in the view",
|
|
571
|
+
"Focus the camera on my current selection",
|
|
572
|
+
"Fit the view to the selected room\n\n# Example\n```ts\nawait snaptrude.core.camera.zoomSelection()\n```"
|
|
573
|
+
],
|
|
574
|
+
"argsType": null,
|
|
575
|
+
"resultType": "boolean"
|
|
576
|
+
},
|
|
415
577
|
{
|
|
416
578
|
"path": "core.comment.create",
|
|
417
579
|
"namespace": "core.comment",
|
|
@@ -553,6 +715,90 @@
|
|
|
553
715
|
"argsType": "Vec3Handle",
|
|
554
716
|
"resultType": "ArcHandle"
|
|
555
717
|
},
|
|
718
|
+
{
|
|
719
|
+
"path": "core.geom.create.brepFromExtrusion",
|
|
720
|
+
"namespace": "core.geom.create",
|
|
721
|
+
"summary": "Create a closed solid **B-rep** by extruding a contour along a direction. Host API call — returns a {@linkcode BrepHandle}. The direction is normalised by the host, so `amount` is the extrusion distance in raw Babylon units (negative extrudes the opposite way). The contour is copied — the input handle is never mutated. Holes and arc/circle profiles extrude natively (a circle profile yields a cylinder).",
|
|
722
|
+
"examplePrompts": [
|
|
723
|
+
"Extrude this profile 3 metres up",
|
|
724
|
+
"Make a solid by extruding this outline",
|
|
725
|
+
"Create a cylinder from a circle profile\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 brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6\n```"
|
|
726
|
+
],
|
|
727
|
+
"argsType": "ContourHandle",
|
|
728
|
+
"resultType": "BrepHandle"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"path": "core.geom.create.brepFromFaces",
|
|
732
|
+
"namespace": "core.geom.create",
|
|
733
|
+
"summary": "Create a closed solid **B-rep** from explicit face loops. Host API call — returns a {@linkcode BrepHandle}. Faces are plain arrays of `{x, y, z}` point components, NOT point handles (bulk-data precedent: `design.query.geometry.getTriangulatedMeshes`), in raw Babylon units.",
|
|
734
|
+
"examplePrompts": [
|
|
735
|
+
"Create a brep from faces",
|
|
736
|
+
"Build a custom solid from a set of faces",
|
|
737
|
+
"Make a pyramid from triangular faces\n\n# Example\n```ts\n// A pyramid: square base + 4 triangular sides\nconst apex = { x: 0, y: 4, z: 0 }\nconst a = { x: -2, y: 0, z: -2 }\nconst b = { x: 2, y: 0, z: -2 }\nconst c = { x: 2, y: 0, z: 2 }\nconst d = { x: -2, y: 0, z: 2 }\nconst brep = await snaptrude.core.geom.create.brepFromFaces([\n[a, d, c, b], // base\n[a, b, apex],\n[b, c, apex],\n[c, d, apex],\n[d, a, apex],\n])\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 5\n```"
|
|
738
|
+
],
|
|
739
|
+
"argsType": "Vec3Components[][]",
|
|
740
|
+
"resultType": "BrepHandle"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"path": "core.geom.create.brepFromIntersection",
|
|
744
|
+
"namespace": "core.geom.create",
|
|
745
|
+
"summary": "Create a closed solid **B-rep** as the boolean **intersection** of two breps (`a ∩ b` — the shared volume only). Host API call — returns a new {@linkcode BrepHandle}. Inputs are read-only and may be authored or scene-derived breps (see {@linkcode PluginGeomCreateApi.brepFromUnion}); coordinates are combined as-is.",
|
|
746
|
+
"examplePrompts": [
|
|
747
|
+
"Keep only the overlap of these two solids",
|
|
748
|
+
"Intersect these two masses",
|
|
749
|
+
"Clip the tower to the zoning envelope\n\n# Example\n```ts\nconst overlap = await snaptrude.core.geom.create.brepFromIntersection(towerBrep, envelopeBrep)\n```"
|
|
750
|
+
],
|
|
751
|
+
"argsType": "BrepHandle",
|
|
752
|
+
"resultType": "BrepHandle"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"path": "core.geom.create.brepFromLoft",
|
|
756
|
+
"namespace": "core.geom.create",
|
|
757
|
+
"summary": "Create a closed solid **B-rep** by lofting between a bottom and a top contour. Host API call — returns a {@linkcode BrepHandle}. Both contours must have the same number of edges (and matching hole counts); side faces connect corresponding edges by authored index. Corresponding edges must stay coplanar — a twisted loft would produce non-planar side faces and is rejected. The contours are copied — the input handles are never mutated.",
|
|
758
|
+
"examplePrompts": [
|
|
759
|
+
"Make a tapered tower from these two outlines",
|
|
760
|
+
"Loft between a large base and a smaller top",
|
|
761
|
+
"Create a frustum from two squares\n\n# Example\n```ts\n// A square frustum: 4m base lofted to a 2m top, 3m up\nconst base = await snaptrude.core.geom.create.profileRect(4, 4)\nconst top = await snaptrude.core.geom.create.profileRect(2, 2, await snaptrude.core.math.vec3.new(0, 3, 0))\nconst brep = await snaptrude.core.geom.create.brepFromLoft(\nawait snaptrude.core.geom.create.contourFromProfile(base),\nawait snaptrude.core.geom.create.contourFromProfile(top),\n)\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6\n```"
|
|
762
|
+
],
|
|
763
|
+
"argsType": "ContourHandle",
|
|
764
|
+
"resultType": "BrepHandle"
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"path": "core.geom.create.brepFromMesh",
|
|
768
|
+
"namespace": "core.geom.create",
|
|
769
|
+
"summary": "Create a closed solid **B-rep** from indexed mesh data: a vertex position array plus face loops of indices into it. Host API call — returns a {@linkcode BrepHandle}. The indexed form of {@linkcode PluginGeomCreateApi.brepFromFaces} — same validation (planar faces, closed manifold solid, every edge shared by exactly two faces) after the indices are expanded to point loops.",
|
|
770
|
+
"examplePrompts": [
|
|
771
|
+
"Create a brep from mesh vertices and indices",
|
|
772
|
+
"Turn this indexed mesh into a solid",
|
|
773
|
+
"Build a solid from vertex positions and face indices\n\n# Example\n```ts\n// A tetrahedron from 4 vertices and 4 triangular faces\nconst positions = [\n{ x: 0, y: 0, z: 0 },\n{ x: 4, y: 0, z: 0 },\n{ x: 2, y: 0, z: 4 },\n{ x: 2, y: 3, z: 1.5 },\n]\nconst brep = await snaptrude.core.geom.create.brepFromMesh(positions, [\n[0, 2, 1], // base\n[0, 1, 3],\n[1, 2, 3],\n[2, 0, 3],\n])\nconst vertexCount = await snaptrude.core.geom.query.brep.getVertexCount(brep) // 4\n```"
|
|
774
|
+
],
|
|
775
|
+
"argsType": "Vec3Components[]",
|
|
776
|
+
"resultType": "BrepHandle"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"path": "core.geom.create.brepFromSubtraction",
|
|
780
|
+
"namespace": "core.geom.create",
|
|
781
|
+
"summary": "Create a closed solid **B-rep** as the boolean **subtraction** of two breps: **`a` minus `b`** — `b` is cut away from `a`. Host API call — returns a new {@linkcode BrepHandle}. Argument order matters: `brepFromSubtraction(a, b)` removes `b`'s volume from `a`. Inputs are read-only and may be authored or scene-derived breps (see {@linkcode PluginGeomCreateApi.brepFromUnion}); coordinates are combined as-is.",
|
|
782
|
+
"examplePrompts": [
|
|
783
|
+
"Subtract the courtyard from the building mass",
|
|
784
|
+
"Cut this solid out of that one",
|
|
785
|
+
"Punch a hole through the slab with this box\n\n# Example\n```ts\n// buildingBrep minus courtyardBrep — order matters\nconst carved = await snaptrude.core.geom.create.brepFromSubtraction(buildingBrep, courtyardBrep)\n```"
|
|
786
|
+
],
|
|
787
|
+
"argsType": "BrepHandle",
|
|
788
|
+
"resultType": "BrepHandle"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
"path": "core.geom.create.brepFromUnion",
|
|
792
|
+
"namespace": "core.geom.create",
|
|
793
|
+
"summary": "Create a closed solid **B-rep** as the boolean **union** of two breps (`a ∪ b`). Host API call — returns a new {@linkcode BrepHandle}. Inputs are read-only and may be authored breps (any `core.geom.create` brep constructor) or scene-derived breps from `design.query.geometry.getBrep`; coordinates are combined as-is, so both inputs must share a frame. The result must be a single solid — disjoint inputs are rejected.",
|
|
794
|
+
"examplePrompts": [
|
|
795
|
+
"Union these two solids",
|
|
796
|
+
"Merge these breps into one mass",
|
|
797
|
+
"Combine the tower and the podium into a single solid\n\n# Example\n```ts\nconst a = await snaptrude.core.geom.create.brepFromExtrusion(baseContour, { x: 0, y: 1, z: 0 }, 3)\nconst b = await snaptrude.core.geom.create.brepFromExtrusion(overlappingContour, { x: 0, y: 1, z: 0 }, 5)\nconst merged = await snaptrude.core.geom.create.brepFromUnion(a, b)\n```"
|
|
798
|
+
],
|
|
799
|
+
"argsType": "BrepHandle",
|
|
800
|
+
"resultType": "BrepHandle"
|
|
801
|
+
},
|
|
556
802
|
{
|
|
557
803
|
"path": "core.geom.create.circle",
|
|
558
804
|
"namespace": "core.geom.create",
|
|
@@ -632,7 +878,8 @@
|
|
|
632
878
|
"summary": "Free a transient contour resource handle — releases its registry entry and reclaims its share of the plugin's resource quota. Handle-lifecycle only; does NOT tear down engine-side geometry, nor the contour's child profile handles.",
|
|
633
879
|
"examplePrompts": [],
|
|
634
880
|
"argsType": "ContourHandle",
|
|
635
|
-
"resultType": "void"
|
|
881
|
+
"resultType": "void",
|
|
882
|
+
"deprecated": "core.handles.release"
|
|
636
883
|
},
|
|
637
884
|
{
|
|
638
885
|
"path": "core.geom.delete.profile",
|
|
@@ -640,7 +887,8 @@
|
|
|
640
887
|
"summary": "Free a transient profile resource handle — releases its registry entry and reclaims its share of the plugin's resource quota. This is a handle-lifecycle operation only and does NOT tear down any engine-side geometry.",
|
|
641
888
|
"examplePrompts": [],
|
|
642
889
|
"argsType": "ProfileHandle",
|
|
643
|
-
"resultType": "void"
|
|
890
|
+
"resultType": "void",
|
|
891
|
+
"deprecated": "core.handles.release"
|
|
644
892
|
},
|
|
645
893
|
{
|
|
646
894
|
"path": "core.geom.query.arc.getAxis",
|
|
@@ -2220,6 +2468,18 @@
|
|
|
2220
2468
|
"argsType": "string",
|
|
2221
2469
|
"resultType": "ImportJobHandle"
|
|
2222
2470
|
},
|
|
2471
|
+
{
|
|
2472
|
+
"path": "core.io.import.epw",
|
|
2473
|
+
"namespace": "core.io.import",
|
|
2474
|
+
"summary": "Import an **EPW weather file** into the project's weather catalog.",
|
|
2475
|
+
"examplePrompts": [
|
|
2476
|
+
"Import this EPW weather file for the site",
|
|
2477
|
+
"Upload a custom weather file for the daylight analysis",
|
|
2478
|
+
"Use this .epw as the project's weather source\n\n# Example\n```ts\nconst { weatherFileId, label } = await snaptrude.core.io.import.epw(\n\"https://example.com/Chicago-OHare.epw\",\n)\nconsole.log(`Weather set to ${label} (${weatherFileId})`)\n```"
|
|
2479
|
+
],
|
|
2480
|
+
"argsType": "string",
|
|
2481
|
+
"resultType": "PluginImportEpwResult"
|
|
2482
|
+
},
|
|
2223
2483
|
{
|
|
2224
2484
|
"path": "core.io.import.image",
|
|
2225
2485
|
"namespace": "core.io.import",
|
|
@@ -2923,6 +3183,41 @@
|
|
|
2923
3183
|
"argsType": "Vec3Handle",
|
|
2924
3184
|
"resultType": "Vec3Handle"
|
|
2925
3185
|
},
|
|
3186
|
+
{
|
|
3187
|
+
"path": "core.mode.get",
|
|
3188
|
+
"namespace": "core.mode",
|
|
3189
|
+
"summary": "Get the currently active application mode.",
|
|
3190
|
+
"examplePrompts": [
|
|
3191
|
+
"Which mode am I in right now?",
|
|
3192
|
+
"Am I in present mode?",
|
|
3193
|
+
"Check whether the editor is in BIM mode\n\n# Example\n```ts\nconst mode = await snaptrude.core.mode.get()\nif (mode !== \"present\") await snaptrude.core.mode.set(\"present\")\n```"
|
|
3194
|
+
],
|
|
3195
|
+
"argsType": null,
|
|
3196
|
+
"resultType": "PluginAppMode"
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
"path": "core.mode.list",
|
|
3200
|
+
"namespace": "core.mode",
|
|
3201
|
+
"summary": "List every application mode the editor has.",
|
|
3202
|
+
"examplePrompts": [
|
|
3203
|
+
"What modes does Snaptrude have?",
|
|
3204
|
+
"List the editor modes I can switch to\n\n# Example\n```ts\nconst { modes } = await snaptrude.core.mode.list()\n// [\"design\", \"bim\", \"present\", \"program\"]\n```"
|
|
3205
|
+
],
|
|
3206
|
+
"argsType": null,
|
|
3207
|
+
"resultType": "PluginCoreModeListResult"
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
"path": "core.mode.set",
|
|
3211
|
+
"namespace": "core.mode",
|
|
3212
|
+
"summary": "Switch the editor to another application mode — the same action as clicking that tab in the top menu bar.",
|
|
3213
|
+
"examplePrompts": [
|
|
3214
|
+
"Switch to present mode",
|
|
3215
|
+
"Open BIM mode",
|
|
3216
|
+
"Go back to design mode\n\n# Example\n```ts\nawait snaptrude.core.mode.set(\"present\")\n// ... presentation work ...\nawait snaptrude.core.mode.set(\"design\")\n```"
|
|
3217
|
+
],
|
|
3218
|
+
"argsType": "PluginAppMode",
|
|
3219
|
+
"resultType": "PluginCoreModeSetResult"
|
|
3220
|
+
},
|
|
2926
3221
|
{
|
|
2927
3222
|
"path": "core.project.settings.getTolerance",
|
|
2928
3223
|
"namespace": "core.project.settings",
|
|
@@ -3292,6 +3587,98 @@
|
|
|
3292
3587
|
"argsType": "string",
|
|
3293
3588
|
"resultType": "PluginCoreProposalsSetActiveResult"
|
|
3294
3589
|
},
|
|
3590
|
+
{
|
|
3591
|
+
"path": "core.storeys.copy",
|
|
3592
|
+
"namespace": "core.storeys",
|
|
3593
|
+
"summary": "Copy a storey into the adjacent level, up or down.",
|
|
3594
|
+
"examplePrompts": [
|
|
3595
|
+
"Copy this floor to the storey above",
|
|
3596
|
+
"Copy the ground floor down into a new basement",
|
|
3597
|
+
"Repeat this level upwards with its own independent geometry",
|
|
3598
|
+
"Copy just the selected walls onto the next floor up\n\n# Example\n```ts\n// Copy the whole active storey one level up (instanced copies).\nconst { targetStories, created, skipped } =\nawait snaptrude.core.storeys.copy(\"up\")\nconsole.log(`Copied ${created.length} elements onto storey ${targetStories}`)\nif (skipped) console.log(`${skipped} elements were skipped`)\n```"
|
|
3599
|
+
],
|
|
3600
|
+
"argsType": "\"up\" | \"down\"",
|
|
3601
|
+
"resultType": "PluginStoryDuplicateResult"
|
|
3602
|
+
},
|
|
3603
|
+
{
|
|
3604
|
+
"path": "core.storeys.create",
|
|
3605
|
+
"namespace": "core.storeys",
|
|
3606
|
+
"summary": "Create a new storey (floor) in the project.",
|
|
3607
|
+
"examplePrompts": [
|
|
3608
|
+
"Add a third floor to the building",
|
|
3609
|
+
"Create a new storey above the second floor",
|
|
3610
|
+
"Add a basement level to this project",
|
|
3611
|
+
"Insert a new level with a custom floor height\n\n# Example\n```ts\n// Create a new third floor with custom height\nconst { storyId } = await snaptrude.core.storeys.create(3, 4.5)\n```"
|
|
3612
|
+
],
|
|
3613
|
+
"argsType": "number",
|
|
3614
|
+
"resultType": "PluginStoryCreateResult"
|
|
3615
|
+
},
|
|
3616
|
+
{
|
|
3617
|
+
"path": "core.storeys.delete",
|
|
3618
|
+
"namespace": "core.storeys",
|
|
3619
|
+
"summary": "Delete a storey and everything on it — the same as removing it from the storey panel. Every element placed on the storey (walls, floors, masses, …) is deleted with it, the remaining storeys are re-stacked, and the active storey falls back to an adjacent one. Committed as a single undo step.",
|
|
3620
|
+
"examplePrompts": [
|
|
3621
|
+
"Delete the top floor",
|
|
3622
|
+
"Remove the basement level",
|
|
3623
|
+
"Get rid of storey 3",
|
|
3624
|
+
"Delete the second floor and everything on it\n\n# Example\n```ts\nconst { newActiveStory } = await snaptrude.core.storeys.delete(3)\nconsole.log(`Deleted storey 3; now on storey ${newActiveStory}`)\n```"
|
|
3625
|
+
],
|
|
3626
|
+
"argsType": "number",
|
|
3627
|
+
"resultType": "PluginStoryDeleteResult"
|
|
3628
|
+
},
|
|
3629
|
+
{
|
|
3630
|
+
"path": "core.storeys.get",
|
|
3631
|
+
"namespace": "core.storeys",
|
|
3632
|
+
"summary": "Get properties of a storey by its storey number.",
|
|
3633
|
+
"examplePrompts": [
|
|
3634
|
+
"What is the height of the ground floor?",
|
|
3635
|
+
"How many rooms are on the second storey?",
|
|
3636
|
+
"Get the total floor area of level 3",
|
|
3637
|
+
"Is the first floor hidden in the viewport?",
|
|
3638
|
+
"Show me the name and height of storey 2\n\n# Example\n```ts\nconst info = await snaptrude.core.storeys.get(1, [\"height\", \"name\", \"spacesCount\"])\nconsole.log(info.name, info.height, info.spacesCount)\n```"
|
|
3639
|
+
],
|
|
3640
|
+
"argsType": "number",
|
|
3641
|
+
"resultType": "PluginStoryGetResult"
|
|
3642
|
+
},
|
|
3643
|
+
{
|
|
3644
|
+
"path": "core.storeys.list",
|
|
3645
|
+
"namespace": "core.storeys",
|
|
3646
|
+
"summary": "List all storeys in the current project.",
|
|
3647
|
+
"examplePrompts": [
|
|
3648
|
+
"How many floors does this building have?",
|
|
3649
|
+
"List all the storeys in the project",
|
|
3650
|
+
"Show me every level with its name",
|
|
3651
|
+
"Which storeys exist in this model?\n\n# Example\n```ts\nconst { storeys } = await snaptrude.core.storeys.list()\nfor (const s of storeys) {\nconsole.log(`Storey ${s.value}: ${s.name} (id: ${s.id})`)\n}\n```"
|
|
3652
|
+
],
|
|
3653
|
+
"argsType": null,
|
|
3654
|
+
"resultType": "PluginCoreStoreysListResult"
|
|
3655
|
+
},
|
|
3656
|
+
{
|
|
3657
|
+
"path": "core.storeys.setActive",
|
|
3658
|
+
"namespace": "core.storeys",
|
|
3659
|
+
"summary": "Make a storey the active storey — the same as clicking it in the storey/layer panel. Subsequent draws and creates target this storey, and in 2D the viewport switches to it. This is a view/navigation change: it is **not** undoable and commits nothing to the model.",
|
|
3660
|
+
"examplePrompts": [
|
|
3661
|
+
"Switch to the second floor",
|
|
3662
|
+
"Make the ground storey active",
|
|
3663
|
+
"Go to the basement level",
|
|
3664
|
+
"Set level 3 as the current storey\n\n# Example\n```ts\n// Activate storey 2, then draw a wall — it lands on storey 2.\nawait snaptrude.core.storeys.setActive(2)\n```"
|
|
3665
|
+
],
|
|
3666
|
+
"argsType": "number",
|
|
3667
|
+
"resultType": "PluginStorySetActiveResult"
|
|
3668
|
+
},
|
|
3669
|
+
{
|
|
3670
|
+
"path": "core.storeys.update",
|
|
3671
|
+
"namespace": "core.storeys",
|
|
3672
|
+
"summary": "Update a storey's floor-to-floor `height` and/or `name`.",
|
|
3673
|
+
"examplePrompts": [
|
|
3674
|
+
"Change the ground floor height to 3.5 metres",
|
|
3675
|
+
"Make the second storey taller",
|
|
3676
|
+
"Rename the ground floor to \"Lobby\"",
|
|
3677
|
+
"Set the floor-to-floor height of level 1\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.core.storeys.update(1, 5)\n// Rename only, leaving the height untouched.\nawait snaptrude.core.storeys.update(1, undefined, { name: \"Lobby\" })\n```"
|
|
3678
|
+
],
|
|
3679
|
+
"argsType": "number",
|
|
3680
|
+
"resultType": "PluginStoryUpdateResult"
|
|
3681
|
+
},
|
|
3295
3682
|
{
|
|
3296
3683
|
"path": "core.tags.assign",
|
|
3297
3684
|
"namespace": "core.tags",
|
|
@@ -3386,7 +3773,8 @@
|
|
|
3386
3773
|
"Show the labels applied to this room\n\n# Example\n```ts\nconst { tags } = await snaptrude.core.tags.getTagsForComponent(\"cmp_42\")\nfor (const t of tags) console.log(t.categoryName, t.tagName)\n```"
|
|
3387
3774
|
],
|
|
3388
3775
|
"argsType": "ComponentHandle",
|
|
3389
|
-
"resultType": "PluginCoreTagsGetTagsForComponentResult"
|
|
3776
|
+
"resultType": "PluginCoreTagsGetTagsForComponentResult",
|
|
3777
|
+
"deprecated": "core.tags.listForComponent"
|
|
3390
3778
|
},
|
|
3391
3779
|
{
|
|
3392
3780
|
"path": "core.tags.list",
|
|
@@ -3424,6 +3812,18 @@
|
|
|
3424
3812
|
"argsType": "{ tagId?: string; categoryId?: string; untagged?: boolean }",
|
|
3425
3813
|
"resultType": "PluginCoreTagsListComponentsResult"
|
|
3426
3814
|
},
|
|
3815
|
+
{
|
|
3816
|
+
"path": "core.tags.listForComponent",
|
|
3817
|
+
"namespace": "core.tags",
|
|
3818
|
+
"summary": "List the tags carried by a component.",
|
|
3819
|
+
"examplePrompts": [
|
|
3820
|
+
"What tags does this space have?",
|
|
3821
|
+
"List the tags on component cmp_42",
|
|
3822
|
+
"Show the labels applied to this room\n\n# Example\n```ts\nconst { tags } = await snaptrude.core.tags.listForComponent(\"cmp_42\")\nfor (const t of tags) console.log(t.categoryName, t.tagName)\n```"
|
|
3823
|
+
],
|
|
3824
|
+
"argsType": "ComponentHandle",
|
|
3825
|
+
"resultType": "PluginCoreTagsGetTagsForComponentResult"
|
|
3826
|
+
},
|
|
3427
3827
|
{
|
|
3428
3828
|
"path": "core.tags.unassign",
|
|
3429
3829
|
"namespace": "core.tags",
|
|
@@ -3550,7 +3950,8 @@
|
|
|
3550
3950
|
"Show me the full scene\n\n# Example\n```ts\nawait snaptrude.core.zoom.extents()\n```"
|
|
3551
3951
|
],
|
|
3552
3952
|
"argsType": null,
|
|
3553
|
-
"resultType": "boolean"
|
|
3953
|
+
"resultType": "boolean",
|
|
3954
|
+
"deprecated": "core.camera.zoomExtents"
|
|
3554
3955
|
},
|
|
3555
3956
|
{
|
|
3556
3957
|
"path": "core.zoom.selection",
|
|
@@ -3563,7 +3964,8 @@
|
|
|
3563
3964
|
"Fit the view to the selected room\n\n# Example\n```ts\nawait snaptrude.core.zoom.selection()\n```"
|
|
3564
3965
|
],
|
|
3565
3966
|
"argsType": null,
|
|
3566
|
-
"resultType": "boolean"
|
|
3967
|
+
"resultType": "boolean",
|
|
3968
|
+
"deprecated": "core.camera.zoomSelection"
|
|
3567
3969
|
},
|
|
3568
3970
|
{
|
|
3569
3971
|
"path": "design.boolean.intersect",
|
|
@@ -3619,6 +4021,19 @@
|
|
|
3619
4021
|
"argsType": "ContourHandle",
|
|
3620
4022
|
"resultType": "ComponentHandle"
|
|
3621
4023
|
},
|
|
4024
|
+
{
|
|
4025
|
+
"path": "design.create.buildableEnvelope",
|
|
4026
|
+
"namespace": "design.create",
|
|
4027
|
+
"summary": "Create a new parametric buildable envelope — the zoning-regulated volume a building may occupy — generated from a site polygon, tiered setbacks, a height or floor-count cap, and optional FAR and lot-coverage limits. The host mints the envelope id and returns it. Canonical home of the create formerly at `entity.buildableEnvelope.create` (now deprecated).",
|
|
4028
|
+
"examplePrompts": [
|
|
4029
|
+
"Create a buildable envelope for my site",
|
|
4030
|
+
"Generate the zoning envelope with 10ft front setbacks",
|
|
4031
|
+
"Show the maximum buildable volume with a 150ft height limit",
|
|
4032
|
+
"Create a zoning envelope capped at 12 floors with FAR 3\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.design.create.buildableEnvelope(\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[\n{ aboveHeight: 0, front: 10, side: 5, rear: 10 },\n{ aboveHeight: 100, front: 20, side: 10, rear: 20 },\n],\n{ kind: \"max_height\", maxHeight: 150 },\n12,\n)\n```"
|
|
4033
|
+
],
|
|
4034
|
+
"argsType": "PluginBuildableEnvelopePolygonVertex[]",
|
|
4035
|
+
"resultType": "PluginBuildableEnvelopeCreateResult"
|
|
4036
|
+
},
|
|
3622
4037
|
{
|
|
3623
4038
|
"path": "design.create.ceiling",
|
|
3624
4039
|
"namespace": "design.create",
|
|
@@ -3654,10 +4069,11 @@
|
|
|
3654
4069
|
"Duplicate the selected furniture along the X axis",
|
|
3655
4070
|
"Make 5 copies of this column at 4 metre intervals",
|
|
3656
4071
|
"Array these walls with a 3m offset",
|
|
3657
|
-
"Clone the desk as a unique copy, not an instance
|
|
4072
|
+
"Clone the desk as a unique copy, not an instance"
|
|
3658
4073
|
],
|
|
3659
4074
|
"argsType": "ComponentHandle[]",
|
|
3660
|
-
"resultType": "ComponentHandle[]"
|
|
4075
|
+
"resultType": "ComponentHandle[]",
|
|
4076
|
+
"performance": "To place N repeats of the same geometry, bulk-create the seed(s) once then call this ONCE with `{ count: N - 1 }` — one host round-trip for all copies. Never reproduce geometry by looping `design.create.*` N times. Copy only after the create that mints the seed ids. # Example ```ts const { vec3 } = snaptrude.core.math const copies = await snaptrude.design.create.copy([\"space-id\"], vec3.new(6, 0, 0), { count: 3 }) ```"
|
|
3661
4077
|
},
|
|
3662
4078
|
{
|
|
3663
4079
|
"path": "design.create.door",
|
|
@@ -3715,6 +4131,18 @@
|
|
|
3715
4131
|
"argsType": "ContourHandle",
|
|
3716
4132
|
"resultType": "ComponentHandle"
|
|
3717
4133
|
},
|
|
4134
|
+
{
|
|
4135
|
+
"path": "design.create.massFromBrep",
|
|
4136
|
+
"namespace": "design.create",
|
|
4137
|
+
"summary": "Create a **mass** from a custom solid built with a `core.geom.create` brep constructor (`brepFromFaces`, `brepFromExtrusion`, `brepFromLoft`, `brepFromMesh`, or a brep boolean) — the free-form counterpart of {@linkcode PluginDesignCreateApi.mass}, for solids that are not simple footprint extrusions (pyramids, wedges, faceted volumes).",
|
|
4138
|
+
"examplePrompts": [
|
|
4139
|
+
"Create a mass from these faces",
|
|
4140
|
+
"Turn this custom brep into a scene mass",
|
|
4141
|
+
"Add a pyramid-shaped mass to the model\n\n# Example\n```ts\nconst apex = { x: 0, y: 4, z: 0 }\nconst a = { x: -2, y: 0, z: -2 }\nconst b = { x: 2, y: 0, z: -2 }\nconst c = { x: 2, y: 0, z: 2 }\nconst d = { x: -2, y: 0, z: 2 }\nconst brep = await snaptrude.core.geom.create.brepFromFaces([\n[a, d, c, b],\n[a, b, apex],\n[b, c, apex],\n[c, d, apex],\n[d, a, apex],\n])\nconst pyramid = await snaptrude.design.create.massFromBrep(brep, \"Pavilion\")\n```"
|
|
4142
|
+
],
|
|
4143
|
+
"argsType": "BrepHandle",
|
|
4144
|
+
"resultType": "ComponentHandle"
|
|
4145
|
+
},
|
|
3718
4146
|
{
|
|
3719
4147
|
"path": "design.create.referenceLines",
|
|
3720
4148
|
"namespace": "design.create",
|
|
@@ -3780,10 +4208,11 @@
|
|
|
3780
4208
|
"Make a bedroom here and assign it to the Residential department",
|
|
3781
4209
|
"Extrude this closed outline into a 10 foot high room",
|
|
3782
4210
|
"Can you create a Kitchen space from the sketch I just drew?",
|
|
3783
|
-
"Create a bedroom on the second floor from this outline
|
|
4211
|
+
"Create a bedroom on the second floor from this outline"
|
|
3784
4212
|
],
|
|
3785
4213
|
"argsType": "ContourHandle",
|
|
3786
|
-
"resultType": "ComponentHandle"
|
|
4214
|
+
"resultType": "ComponentHandle",
|
|
4215
|
+
"performance": "For MORE THAN ONE space, call `design.create.spaces(items[])` — the whole batch is one host round-trip. Looping this single-space creator is N round-trips (slow, and a large loop can trip the plugin rate limit). # Example ```ts const v = snaptrude.core.math.vec3 const outer = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(10, 0, 0), await v.new(10, 0, 8), await v.new(0, 0, 8), ]) const contour = await snaptrude.core.geom.create.contourFromProfile(outer) const space = await snaptrude.design.create.space(contour, 3, \"Living\") // …place one directly on the second floor (no setActive dance): const upstairs = await snaptrude.design.create.space( contour, 3, \"Bedroom\", undefined, undefined, undefined, undefined, 2, ) ```"
|
|
3787
4216
|
},
|
|
3788
4217
|
{
|
|
3789
4218
|
"path": "design.create.spaces",
|
|
@@ -3794,10 +4223,11 @@
|
|
|
3794
4223
|
"Generate all the bedrooms in one operation",
|
|
3795
4224
|
"Bulk create the spaces for this floor plan",
|
|
3796
4225
|
"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
|
|
4226
|
+
"Create one room on the ground floor and one on the first floor"
|
|
3798
4227
|
],
|
|
3799
4228
|
"argsType": "PluginCreateSpaceItem[]",
|
|
3800
|
-
"resultType": "ComponentHandle[]"
|
|
4229
|
+
"resultType": "ComponentHandle[]",
|
|
4230
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip. Always prefer this over calling `design.create.space` in a loop: build the full `items[]` array first (all per-item math and geometry up front), then make one call. # Example ```ts const rect = await snaptrude.core.geom.create.profileRect(4, 3) const contour = await snaptrude.core.geom.create.contourFromProfile(rect) const [a, b] = await snaptrude.design.create.spaces([ { contour, height: 3, label: \"R1\" }, { contour, height: 4, label: \"R2\", position: await vec3.new(10, 0, 0) }, ]) ```"
|
|
3801
4231
|
},
|
|
3802
4232
|
{
|
|
3803
4233
|
"path": "design.create.staircase",
|
|
@@ -3853,10 +4283,11 @@
|
|
|
3853
4283
|
"Remove these walls from the model",
|
|
3854
4284
|
"Get rid of this mass entirely",
|
|
3855
4285
|
"Delete all the furniture I picked",
|
|
3856
|
-
"Remove the door and window I just created
|
|
4286
|
+
"Remove the door and window I just created"
|
|
3857
4287
|
],
|
|
3858
4288
|
"argsType": "ComponentHandle[]",
|
|
3859
|
-
"resultType": "PluginDesignChangeResult"
|
|
4289
|
+
"resultType": "PluginDesignChangeResult",
|
|
4290
|
+
"performance": "Array delete — pass every target in one call (one host round-trip). There is no per-item delete; collect the whole set and never loop this per entity. # Example ```ts // Hard-delete every furniture item on storey 2 (a single undo entry) const furniture = await snaptrude.design.query.listFurniture({ storeys: [2] }) if (furniture.length > 0) { const { affected } = await snaptrude.design.delete.entities(furniture) } ```"
|
|
3860
4291
|
},
|
|
3861
4292
|
{
|
|
3862
4293
|
"path": "design.doors.exists",
|
|
@@ -4485,6 +4916,19 @@
|
|
|
4485
4916
|
"argsType": "ComponentHandle",
|
|
4486
4917
|
"resultType": "CurveHandle | null"
|
|
4487
4918
|
},
|
|
4919
|
+
{
|
|
4920
|
+
"path": "design.query.geometry.getTriangulatedMeshes",
|
|
4921
|
+
"namespace": "design.query.geometry",
|
|
4922
|
+
"summary": "Get the **triangulated render meshes** of scene components as plain, serializable arrays — flat world-space vertex `positions` (`[x0, y0, z0, x1, …]`) and triangle `indices` (three per triangle), one record per requested component.",
|
|
4923
|
+
"examplePrompts": [
|
|
4924
|
+
"Export the selected masses as a triangle mesh",
|
|
4925
|
+
"Get the raw vertices and triangles of this wall in world coordinates",
|
|
4926
|
+
"Give me the triangulated geometry of every space with its materials",
|
|
4927
|
+
"Compute the surface area of this roof from its triangles"
|
|
4928
|
+
],
|
|
4929
|
+
"argsType": "ComponentHandle[]",
|
|
4930
|
+
"resultType": "PluginDesignQueryGeometryGetTriangulatedMeshesResult"
|
|
4931
|
+
},
|
|
4488
4932
|
{
|
|
4489
4933
|
"path": "design.query.getBoundingBox",
|
|
4490
4934
|
"namespace": "design.query",
|
|
@@ -4843,6 +5287,19 @@
|
|
|
4843
5287
|
"argsType": "ComponentHandle",
|
|
4844
5288
|
"resultType": "PluginEntityMeasurements | null"
|
|
4845
5289
|
},
|
|
5290
|
+
{
|
|
5291
|
+
"path": "design.query.referenceLines.get",
|
|
5292
|
+
"namespace": "design.query.referenceLines",
|
|
5293
|
+
"summary": "Get properties of a reference line by its ID.",
|
|
5294
|
+
"examplePrompts": [
|
|
5295
|
+
"Get the curve geometry of this reference line",
|
|
5296
|
+
"Where does this grid line run?",
|
|
5297
|
+
"Read the geometry of a guide line by its id",
|
|
5298
|
+
"Look up the curve of the selected reference line\n\n# Example\n```ts\nconst [refLine] = await snaptrude.design.query.listReferenceLines()\nconst result = await snaptrude.design.query.referenceLines.get(refLine, [\"curve\"])\n// result.curve is an opaque CurveHandle; read its coordinates via\n// `snaptrude.core.geom.curve`.\n```"
|
|
5299
|
+
],
|
|
5300
|
+
"argsType": "string",
|
|
5301
|
+
"resultType": "PluginReferenceLineGetResult"
|
|
5302
|
+
},
|
|
4846
5303
|
{
|
|
4847
5304
|
"path": "design.query.spaces.get",
|
|
4848
5305
|
"namespace": "design.query.spaces",
|
|
@@ -4857,6 +5314,19 @@
|
|
|
4857
5314
|
"argsType": "ComponentHandle",
|
|
4858
5315
|
"resultType": "PluginDesignQuerySpacesGetResult"
|
|
4859
5316
|
},
|
|
5317
|
+
{
|
|
5318
|
+
"path": "design.query.spaces.getEnclosure",
|
|
5319
|
+
"namespace": "design.query.spaces",
|
|
5320
|
+
"summary": "Get the **enclosure** of a space — the floor and ceiling that cap it, the bounding walls around it (with each wall's door/window openings), and the neighbouring spaces it shares a boundary with.",
|
|
5321
|
+
"examplePrompts": [
|
|
5322
|
+
"What walls, floor and ceiling enclose this room?",
|
|
5323
|
+
"Which of this room's walls are external?",
|
|
5324
|
+
"List the doors and windows around the selected space",
|
|
5325
|
+
"Which spaces are adjacent to this room, and through which wall?\n\n# Example\n```ts\nconst [space] = await snaptrude.design.query.listSpaces()\nconst enclosure = await snaptrude.design.query.spaces.getEnclosure(space)\nif (enclosure) {\nconst walls = enclosure.surfaces.filter((s) => s.role === \"wall\")\nconst external = walls.filter((s) => s.isExternal)\nconsole.log(`${walls.length} walls, ${external.length} external`)\n}\n```"
|
|
5326
|
+
],
|
|
5327
|
+
"argsType": "ComponentHandle",
|
|
5328
|
+
"resultType": "PluginSpaceEnclosure | null"
|
|
5329
|
+
},
|
|
4860
5330
|
{
|
|
4861
5331
|
"path": "design.query.spaces.getFootprint",
|
|
4862
5332
|
"namespace": "design.query.spaces",
|
|
@@ -4960,10 +5430,11 @@
|
|
|
4960
5430
|
"Line up these masses along their top edges",
|
|
4961
5431
|
"Center these columns horizontally",
|
|
4962
5432
|
"Align all the walls to the left edge of this reference wall",
|
|
4963
|
-
"Snap the bottom edges of these spaces together
|
|
5433
|
+
"Snap the bottom edges of these spaces together"
|
|
4964
5434
|
],
|
|
4965
5435
|
"argsType": "ComponentHandle[]",
|
|
4966
|
-
"resultType": "PluginDesignChangeResult"
|
|
5436
|
+
"resultType": "PluginDesignChangeResult",
|
|
5437
|
+
"performance": "Array API — one host round-trip for the whole set. Pass every target in a single call; never loop `design.transform.align` per entity. # Example ```ts const rooms = await snaptrude.design.selection.get() // align every room's left (world -X) edge to a common minimum await snaptrude.design.transform.align(rooms, \"left\") // …or align them to a fixed reference component's left edge const [anchor] = await snaptrude.design.query.listWalls({ storeys: [1] }) await snaptrude.design.transform.align(rooms, \"left\", { reference: anchor }) ```"
|
|
4967
5438
|
},
|
|
4968
5439
|
{
|
|
4969
5440
|
"path": "design.transform.mirror",
|
|
@@ -4974,10 +5445,11 @@
|
|
|
4974
5445
|
"Flip these rooms left to right",
|
|
4975
5446
|
"Mirror this furniture block horizontally",
|
|
4976
5447
|
"Flip the selected walls front to back",
|
|
4977
|
-
"Create a mirror image of these masses about the z axis
|
|
5448
|
+
"Create a mirror image of these masses about the z axis"
|
|
4978
5449
|
],
|
|
4979
5450
|
"argsType": "ComponentHandle[]",
|
|
4980
|
-
"resultType": "PluginDesignChangeResult"
|
|
5451
|
+
"resultType": "PluginDesignChangeResult",
|
|
5452
|
+
"performance": "Array API — one host round-trip for the whole set. Pass every target in a single call; never loop `design.transform.mirror` per entity. # Example ```ts const rooms = await snaptrude.design.selection.get() await snaptrude.design.transform.mirror(rooms, \"x\") ```"
|
|
4981
5453
|
},
|
|
4982
5454
|
{
|
|
4983
5455
|
"path": "design.transform.move",
|
|
@@ -4988,10 +5460,11 @@
|
|
|
4988
5460
|
"Shift these walls 3m along the x axis",
|
|
4989
5461
|
"Nudge this space 500mm north",
|
|
4990
5462
|
"Translate the furniture block by (10, 0, 5)",
|
|
4991
|
-
"Move these masses up one storey
|
|
5463
|
+
"Move these masses up one storey"
|
|
4992
5464
|
],
|
|
4993
5465
|
"argsType": "ComponentHandle[]",
|
|
4994
|
-
"resultType": "PluginDesignChangeResult"
|
|
5466
|
+
"resultType": "PluginDesignChangeResult",
|
|
5467
|
+
"performance": "Array API — one host round-trip for the whole set. Pass every target in a single call; never loop `design.transform.move` per entity. # Example ```ts const { vec3 } = snaptrude.core.math await snaptrude.design.transform.move([\"space-id\"], vec3.new(10, 0, 0)) ```"
|
|
4995
5468
|
},
|
|
4996
5469
|
{
|
|
4997
5470
|
"path": "design.transform.rotate",
|
|
@@ -5002,10 +5475,11 @@
|
|
|
5002
5475
|
"Turn this room 45 degrees clockwise",
|
|
5003
5476
|
"Spin the furniture block 180 degrees about its centre",
|
|
5004
5477
|
"Rotate these masses 30 degrees around the vertical axis",
|
|
5005
|
-
"Rotate these walls 90 degrees about the origin
|
|
5478
|
+
"Rotate these walls 90 degrees about the origin"
|
|
5006
5479
|
],
|
|
5007
5480
|
"argsType": "ComponentHandle[]",
|
|
5008
|
-
"resultType": "PluginDesignChangeResult"
|
|
5481
|
+
"resultType": "PluginDesignChangeResult",
|
|
5482
|
+
"performance": "Array API — one host round-trip for the whole set. Pass every target in a single call; never loop `design.transform.rotate` per entity. # Example ```ts await snaptrude.design.transform.rotate([\"space-id\"], 90) // …or rotate about an explicit pivot point const { vec3 } = snaptrude.core.math await snaptrude.design.transform.rotate([\"space-id\"], 90, { pivot: vec3.new(0, 0, 0) }) ```"
|
|
5009
5483
|
},
|
|
5010
5484
|
{
|
|
5011
5485
|
"path": "design.types.get",
|
|
@@ -5059,6 +5533,19 @@
|
|
|
5059
5533
|
"argsType": "ComponentHandle[]",
|
|
5060
5534
|
"resultType": "PluginDesignChangeResult"
|
|
5061
5535
|
},
|
|
5536
|
+
{
|
|
5537
|
+
"path": "design.update.buildableEnvelope",
|
|
5538
|
+
"namespace": "design.update",
|
|
5539
|
+
"summary": "Update an existing parametric buildable envelope — regenerate the zoning volume from a revised site polygon, setbacks, vertical cap, or FAR and lot-coverage limits, keeping the same envelope id. Canonical home of the update formerly at `entity.buildableEnvelope.update` (now deprecated).",
|
|
5540
|
+
"examplePrompts": [
|
|
5541
|
+
"Change the envelope's height limit to 175 feet",
|
|
5542
|
+
"Update the setbacks on the buildable envelope",
|
|
5543
|
+
"Regenerate the zoning envelope with a new site boundary",
|
|
5544
|
+
"Increase the FAR on the buildable volume\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.design.update.buildableEnvelope(\nexistingId,\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[{ aboveHeight: 0, front: 10, side: 5, rear: 10 }],\n{ kind: \"max_height\", maxHeight: 175 },\n12,\n)\n```"
|
|
5545
|
+
],
|
|
5546
|
+
"argsType": "string",
|
|
5547
|
+
"resultType": "PluginBuildableEnvelopeUpdateResult"
|
|
5548
|
+
},
|
|
5062
5549
|
{
|
|
5063
5550
|
"path": "design.update.ceiling",
|
|
5064
5551
|
"namespace": "design.update",
|
|
@@ -5170,10 +5657,11 @@
|
|
|
5170
5657
|
"Change this space's room type to Meeting Room",
|
|
5171
5658
|
"Set the height of this room to 3 metres",
|
|
5172
5659
|
"Move this space into the Circulation department",
|
|
5173
|
-
"Exclude this room from the area calculations
|
|
5660
|
+
"Exclude this room from the area calculations"
|
|
5174
5661
|
],
|
|
5175
5662
|
"argsType": "ComponentHandle",
|
|
5176
|
-
"resultType": "PluginSpaceUpdateResult"
|
|
5663
|
+
"resultType": "PluginSpaceUpdateResult",
|
|
5664
|
+
"performance": "For MORE THAN ONE space, call `design.update.spaces(items[])` — the whole batch is one host round-trip. Looping this single-space updater is N round-trips. # Example ```ts await snaptrude.design.update.space(\"space-id\", { properties: { room_type: \"Office\" } }) ```"
|
|
5177
5665
|
},
|
|
5178
5666
|
{
|
|
5179
5667
|
"path": "design.update.spaces",
|
|
@@ -5184,10 +5672,11 @@
|
|
|
5184
5672
|
"Change the room type of these five spaces at once",
|
|
5185
5673
|
"Set every room on this floor to a 3m height in one go",
|
|
5186
5674
|
"Bulk-assign these spaces to the Service department",
|
|
5187
|
-
"Mark all of these rooms as excluded from area in one update
|
|
5675
|
+
"Mark all of these rooms as excluded from area in one update"
|
|
5188
5676
|
],
|
|
5189
5677
|
"argsType": "PluginUpdateSpaceItem[]",
|
|
5190
|
-
"resultType": "PluginSpaceUpdateResult[]"
|
|
5678
|
+
"resultType": "PluginSpaceUpdateResult[]",
|
|
5679
|
+
"performance": "Bulk update — the whole batch is ONE host round-trip. Prefer over looping `design.update.space`: build the `items[]` array first, then make one call. # Example ```ts // Re-label every selected room and mark it NET area — one undoable bulk update const rooms = await snaptrude.design.query.listSpaces({ isSelected: true }) const results = await snaptrude.design.update.spaces( rooms.map((space) => ({ space, properties: { room_type: \"Bedroom\", areaClass: \"NET\" }, })), ) // One result per item, in input order console.log(results.map((r) => r.spaceId)) ```"
|
|
5191
5680
|
},
|
|
5192
5681
|
{
|
|
5193
5682
|
"path": "design.update.staircase",
|
|
@@ -5399,7 +5888,8 @@
|
|
|
5399
5888
|
"Create a zoning envelope capped at 12 floors with FAR 3\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.create(\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[\n{ aboveHeight: 0, front: 10, side: 5, rear: 10 },\n{ aboveHeight: 100, front: 20, side: 10, rear: 20 },\n],\n{ kind: \"max_height\", maxHeight: 150 },\n12,\n)\n```"
|
|
5400
5889
|
],
|
|
5401
5890
|
"argsType": "PluginBuildableEnvelopePolygonVertex[]",
|
|
5402
|
-
"resultType": "PluginBuildableEnvelopeCreateResult"
|
|
5891
|
+
"resultType": "PluginBuildableEnvelopeCreateResult",
|
|
5892
|
+
"deprecated": "design.create.buildableEnvelope"
|
|
5403
5893
|
},
|
|
5404
5894
|
{
|
|
5405
5895
|
"path": "entity.buildableEnvelope.update",
|
|
@@ -5413,7 +5903,8 @@
|
|
|
5413
5903
|
"Modify the envelope to allow 15 storeys instead\n\n# Example\n```ts\nconst { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.update(\nexistingId,\n[\n{ x: 0, z: 0 },\n{ x: 100, z: 0 },\n{ x: 100, z: 80 },\n{ x: 0, z: 80 },\n],\n\"ft\",\n[{ aboveHeight: 0, front: 10, side: 5, rear: 10 }],\n{ kind: \"max_height\", maxHeight: 175 },\n12,\n)\n```"
|
|
5414
5904
|
],
|
|
5415
5905
|
"argsType": "string",
|
|
5416
|
-
"resultType": "PluginBuildableEnvelopeUpdateResult"
|
|
5906
|
+
"resultType": "PluginBuildableEnvelopeUpdateResult",
|
|
5907
|
+
"deprecated": "design.update.buildableEnvelope"
|
|
5417
5908
|
},
|
|
5418
5909
|
{
|
|
5419
5910
|
"path": "entity.referenceLine.createMulti",
|
|
@@ -5427,7 +5918,8 @@
|
|
|
5427
5918
|
"Turn this profile into reference lines\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\n\nconst start = await vec3.new(0, 0, 0)\nconst mid = await vec3.new(10, 0, 0)\nconst end = await vec3.new(10, 0, 10)\nconst l1 = await snaptrude.core.geom.create.line(start, mid)\nconst l2 = await snaptrude.core.geom.create.line(mid, end)\nconst profile = await snaptrude.core.geom.create.profileFromCurves([l1, l2])\n\nconst { referenceLineIds } = await snaptrude.entity.referenceLine.createMulti(profile)\n```"
|
|
5428
5919
|
],
|
|
5429
5920
|
"argsType": "ProfileHandle",
|
|
5430
|
-
"resultType": "PluginReferenceLineCreateMultiResult"
|
|
5921
|
+
"resultType": "PluginReferenceLineCreateMultiResult",
|
|
5922
|
+
"deprecated": "design.create.referenceLines"
|
|
5431
5923
|
},
|
|
5432
5924
|
{
|
|
5433
5925
|
"path": "entity.referenceLine.delete",
|
|
@@ -5440,7 +5932,8 @@
|
|
|
5440
5932
|
"Erase a reference line by its id\n\n# Example\n```ts\nawait snaptrude.entity.referenceLine.delete(\"some-ref-line-id\")\n```"
|
|
5441
5933
|
],
|
|
5442
5934
|
"argsType": "string",
|
|
5443
|
-
"resultType": "PluginReferenceLineDeleteResult"
|
|
5935
|
+
"resultType": "PluginReferenceLineDeleteResult",
|
|
5936
|
+
"deprecated": "design.delete.entities"
|
|
5444
5937
|
},
|
|
5445
5938
|
{
|
|
5446
5939
|
"path": "entity.referenceLine.get",
|
|
@@ -5453,7 +5946,8 @@
|
|
|
5453
5946
|
"Look up the curve of the selected reference line\n\n# Example\n```ts\nconst result = await snaptrude.entity.referenceLine.get(\"some-ref-line-id\", [\"curve\"])\n// result.curve is an opaque CurveHandle; a dedicated curve read API for its\n// coordinates is exposed separately via `snaptrude.core.geom.curve`.\n```"
|
|
5454
5947
|
],
|
|
5455
5948
|
"argsType": "string",
|
|
5456
|
-
"resultType": "PluginReferenceLineGetResult"
|
|
5949
|
+
"resultType": "PluginReferenceLineGetResult",
|
|
5950
|
+
"deprecated": "design.query.referenceLines.get"
|
|
5457
5951
|
},
|
|
5458
5952
|
{
|
|
5459
5953
|
"path": "entity.referenceLine.getAll",
|
|
@@ -5466,7 +5960,8 @@
|
|
|
5466
5960
|
"Do I have any reference lines in this project?\n\n# Example\n```ts\nconst { referenceLineIds } = await snaptrude.entity.referenceLine.getAll()\nconsole.log(`Project has ${referenceLineIds.length} reference lines`)\n```"
|
|
5467
5961
|
],
|
|
5468
5962
|
"argsType": null,
|
|
5469
|
-
"resultType": "PluginReferenceLineGetAllResult"
|
|
5963
|
+
"resultType": "PluginReferenceLineGetAllResult",
|
|
5964
|
+
"deprecated": "design.query.listReferenceLines"
|
|
5470
5965
|
},
|
|
5471
5966
|
{
|
|
5472
5967
|
"path": "entity.story.create",
|
|
@@ -5480,7 +5975,8 @@
|
|
|
5480
5975
|
"Add another floor on top of the building\n\n# Example\n```ts\n// Create a new third floor with custom height\nconst { storyId } = await snaptrude.entity.story.create(3, 4.5)\n```"
|
|
5481
5976
|
],
|
|
5482
5977
|
"argsType": "number",
|
|
5483
|
-
"resultType": "PluginStoryCreateResult"
|
|
5978
|
+
"resultType": "PluginStoryCreateResult",
|
|
5979
|
+
"deprecated": "core.storeys.create"
|
|
5484
5980
|
},
|
|
5485
5981
|
{
|
|
5486
5982
|
"path": "entity.story.delete",
|
|
@@ -5493,7 +5989,8 @@
|
|
|
5493
5989
|
"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
5990
|
],
|
|
5495
5991
|
"argsType": "number",
|
|
5496
|
-
"resultType": "PluginStoryDeleteResult"
|
|
5992
|
+
"resultType": "PluginStoryDeleteResult",
|
|
5993
|
+
"deprecated": "core.storeys.delete"
|
|
5497
5994
|
},
|
|
5498
5995
|
{
|
|
5499
5996
|
"path": "entity.story.duplicate",
|
|
@@ -5503,10 +6000,12 @@
|
|
|
5503
6000
|
"Duplicate this floor to the storey above",
|
|
5504
6001
|
"Copy the ground floor down into a new basement",
|
|
5505
6002
|
"Repeat this level upwards with its own independent geometry",
|
|
5506
|
-
"Duplicate just the selected walls onto the next floor up
|
|
6003
|
+
"Duplicate just the selected walls onto the next floor up"
|
|
5507
6004
|
],
|
|
5508
6005
|
"argsType": "\"up\" | \"down\"",
|
|
5509
|
-
"resultType": "PluginStoryDuplicateResult"
|
|
6006
|
+
"resultType": "PluginStoryDuplicateResult",
|
|
6007
|
+
"performance": "For storeys that share a layout, duplicate the storey instead of recreating its contents floor by floor — this copies every eligible element in one call, and the default instanced copies keep the floors linked. To stack many identical floors, either call this per level or capture the storey's component ids and `design.create.copy(ids, oneFloorRise, { count })` to lay them all down in a single call. # Example ```ts // Duplicate the whole active story one level up (instanced copies). const { targetStories, created, skipped } = await snaptrude.entity.story.duplicate(\"up\") console.log(`Copied ${created.length} elements onto story ${targetStories}`) if (skipped) console.log(`${skipped} elements were skipped`) ```",
|
|
6008
|
+
"deprecated": "core.storeys.copy"
|
|
5510
6009
|
},
|
|
5511
6010
|
{
|
|
5512
6011
|
"path": "entity.story.get",
|
|
@@ -5520,7 +6019,8 @@
|
|
|
5520
6019
|
"Show me the name and height of story 2\n\n# Example\n```ts\nconst info = await snaptrude.entity.story.get(1, [\"height\", \"name\", \"spacesCount\"])\nconsole.log(info.name, info.height, info.spacesCount)\n```"
|
|
5521
6020
|
],
|
|
5522
6021
|
"argsType": "number",
|
|
5523
|
-
"resultType": "PluginStoryGetResult"
|
|
6022
|
+
"resultType": "PluginStoryGetResult",
|
|
6023
|
+
"deprecated": "core.storeys.get"
|
|
5524
6024
|
},
|
|
5525
6025
|
{
|
|
5526
6026
|
"path": "entity.story.getAll",
|
|
@@ -5533,7 +6033,8 @@
|
|
|
5533
6033
|
"Which stories exist in this model?\n\n# Example\n```ts\nconst { stories } = await snaptrude.entity.story.getAll()\nfor (const s of stories) {\nconsole.log(`Story ${s.value}: ${s.name} (id: ${s.id})`)\n}\n```"
|
|
5534
6034
|
],
|
|
5535
6035
|
"argsType": null,
|
|
5536
|
-
"resultType": "PluginStoryGetAllResult"
|
|
6036
|
+
"resultType": "PluginStoryGetAllResult",
|
|
6037
|
+
"deprecated": "core.storeys.list"
|
|
5537
6038
|
},
|
|
5538
6039
|
{
|
|
5539
6040
|
"path": "entity.story.setActive",
|
|
@@ -5546,7 +6047,8 @@
|
|
|
5546
6047
|
"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
6048
|
],
|
|
5548
6049
|
"argsType": "number",
|
|
5549
|
-
"resultType": "PluginStorySetActiveResult"
|
|
6050
|
+
"resultType": "PluginStorySetActiveResult",
|
|
6051
|
+
"deprecated": "core.storeys.setActive"
|
|
5550
6052
|
},
|
|
5551
6053
|
{
|
|
5552
6054
|
"path": "entity.story.update",
|
|
@@ -5560,7 +6062,8 @@
|
|
|
5560
6062
|
"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```"
|
|
5561
6063
|
],
|
|
5562
6064
|
"argsType": "number",
|
|
5563
|
-
"resultType": "PluginStoryUpdateResult"
|
|
6065
|
+
"resultType": "PluginStoryUpdateResult",
|
|
6066
|
+
"deprecated": "core.storeys.update"
|
|
5564
6067
|
},
|
|
5565
6068
|
{
|
|
5566
6069
|
"path": "presentation.aiInspiration.cancelJob",
|
|
@@ -5894,6 +6397,128 @@
|
|
|
5894
6397
|
"argsType": "{ url?: string; dataUrl?: string }",
|
|
5895
6398
|
"resultType": "PluginPresentationImportResult"
|
|
5896
6399
|
},
|
|
6400
|
+
{
|
|
6401
|
+
"path": "presentation.placedViews.get",
|
|
6402
|
+
"namespace": "presentation.placedViews",
|
|
6403
|
+
"summary": "Get a single placed view by its shape id.",
|
|
6404
|
+
"examplePrompts": [
|
|
6405
|
+
"Get the placed view I just dropped on the sheet",
|
|
6406
|
+
"Read the position and scale of this placed view",
|
|
6407
|
+
"What's the crop on shape_123?\n\n# Example\n```ts\nconst placed = await snaptrude.presentation.placedViews.get(shapeId)\nconsole.log(placed.position, placed.scale)\n```"
|
|
6408
|
+
],
|
|
6409
|
+
"argsType": "string",
|
|
6410
|
+
"resultType": "PluginPlacedView"
|
|
6411
|
+
},
|
|
6412
|
+
{
|
|
6413
|
+
"path": "presentation.placedViews.list",
|
|
6414
|
+
"namespace": "presentation.placedViews",
|
|
6415
|
+
"summary": "List the placed views in the presentation.",
|
|
6416
|
+
"examplePrompts": [
|
|
6417
|
+
"Which views are placed on this sheet?",
|
|
6418
|
+
"List all the placed views in the presentation",
|
|
6419
|
+
"What's laid out on sheet 2?",
|
|
6420
|
+
"Show me every view on the Present canvas\n\n# Example\n```ts\nconst { placedViews } = await snaptrude.presentation.placedViews.list(\"sheet_1\")\n```"
|
|
6421
|
+
],
|
|
6422
|
+
"argsType": "string",
|
|
6423
|
+
"resultType": "PluginPresentationPlacedViewsListResult"
|
|
6424
|
+
},
|
|
6425
|
+
{
|
|
6426
|
+
"path": "presentation.placedViews.move",
|
|
6427
|
+
"namespace": "presentation.placedViews",
|
|
6428
|
+
"summary": "Move a placed view.",
|
|
6429
|
+
"examplePrompts": [
|
|
6430
|
+
"Move the site plan view to the top-left of sheet 2",
|
|
6431
|
+
"Reposition this placed view to 100, 200",
|
|
6432
|
+
"Move the hero perspective onto the cover sheet\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.move(shapeId, { x: 50, y: 50 }, {\nsheetId: \"sheet_2\",\n})\n```"
|
|
6433
|
+
],
|
|
6434
|
+
"argsType": "string",
|
|
6435
|
+
"resultType": "PluginPlacedView"
|
|
6436
|
+
},
|
|
6437
|
+
{
|
|
6438
|
+
"path": "presentation.placedViews.scale",
|
|
6439
|
+
"namespace": "presentation.placedViews",
|
|
6440
|
+
"summary": "Resize a placed view by a uniform factor.",
|
|
6441
|
+
"examplePrompts": [
|
|
6442
|
+
"Make this placed view twice as big",
|
|
6443
|
+
"Shrink the placed 3D view to half its size",
|
|
6444
|
+
"Scale the placed plan up by 50%\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.scale(shapeId, 2)\n```"
|
|
6445
|
+
],
|
|
6446
|
+
"argsType": "string",
|
|
6447
|
+
"resultType": "PluginPlacedView"
|
|
6448
|
+
},
|
|
6449
|
+
{
|
|
6450
|
+
"path": "presentation.placedViews.setCrop",
|
|
6451
|
+
"namespace": "presentation.placedViews",
|
|
6452
|
+
"summary": "Crop a placed view, or clear its crop.",
|
|
6453
|
+
"examplePrompts": [
|
|
6454
|
+
"Crop the placed view to its left half",
|
|
6455
|
+
"Crop this view to the top-right quarter",
|
|
6456
|
+
"Remove the crop from the placed plan\n\n# Example\n```ts\n// keep the left half of the view\nawait snaptrude.presentation.placedViews.setCrop(shapeId, {\ntopLeft: { x: 0, y: 0 },\nbottomRight: { x: 0.5, y: 1 },\n})\nawait snaptrude.presentation.placedViews.setCrop(shapeId, null) // clear\n```"
|
|
6457
|
+
],
|
|
6458
|
+
"argsType": "string",
|
|
6459
|
+
"resultType": "PluginPlacedView"
|
|
6460
|
+
},
|
|
6461
|
+
{
|
|
6462
|
+
"path": "presentation.placedViews.setScale",
|
|
6463
|
+
"namespace": "presentation.placedViews",
|
|
6464
|
+
"summary": "Set a placed view's architectural scale.",
|
|
6465
|
+
"examplePrompts": [
|
|
6466
|
+
"Set the plan to 1:100",
|
|
6467
|
+
"Change the placed floor plan to 1:50 scale",
|
|
6468
|
+
"Make this view print at quarter-inch scale\n\n# Example\n```ts\nawait snaptrude.presentation.placedViews.setScale(shapeId, 100) // 1:100\n```"
|
|
6469
|
+
],
|
|
6470
|
+
"argsType": "string",
|
|
6471
|
+
"resultType": "PluginPlacedView"
|
|
6472
|
+
},
|
|
6473
|
+
{
|
|
6474
|
+
"path": "presentation.shapes.list",
|
|
6475
|
+
"namespace": "presentation.shapes",
|
|
6476
|
+
"summary": "List the calling plugin's shapes.",
|
|
6477
|
+
"examplePrompts": [
|
|
6478
|
+
"Which annotations has my plugin placed on the sheets?",
|
|
6479
|
+
"List the plugin's shapes before refreshing them",
|
|
6480
|
+
"Check whether the FAR label already exists\n\n# Example\n```ts\nconst { shapes } = await snaptrude.presentation.shapes.list()\nconst hasLabel = shapes.some((s) => s.key === \"far-label\")\n```"
|
|
6481
|
+
],
|
|
6482
|
+
"argsType": null,
|
|
6483
|
+
"resultType": "PluginPresentationShapesListResult"
|
|
6484
|
+
},
|
|
6485
|
+
{
|
|
6486
|
+
"path": "presentation.shapes.remove",
|
|
6487
|
+
"namespace": "presentation.shapes",
|
|
6488
|
+
"summary": "Delete the shape for a key.",
|
|
6489
|
+
"examplePrompts": [
|
|
6490
|
+
"Remove the FAR label from the sheet",
|
|
6491
|
+
"Delete the highlight the plugin added earlier",
|
|
6492
|
+
"Clear the \"far-label\" annotation\n\n# Example\n```ts\nconst removed = await snaptrude.presentation.shapes.remove(\"far-label\")\n```"
|
|
6493
|
+
],
|
|
6494
|
+
"argsType": "string",
|
|
6495
|
+
"resultType": "boolean"
|
|
6496
|
+
},
|
|
6497
|
+
{
|
|
6498
|
+
"path": "presentation.shapes.removeAll",
|
|
6499
|
+
"namespace": "presentation.shapes",
|
|
6500
|
+
"summary": "Delete every shape owned by the calling plugin.",
|
|
6501
|
+
"examplePrompts": [
|
|
6502
|
+
"Clear all annotations my plugin added",
|
|
6503
|
+
"Reset the sheet output before rerunning the analysis",
|
|
6504
|
+
"Remove every plugin-drawn shape\n\n# Example\n```ts\nconst deleted = await snaptrude.presentation.shapes.removeAll()\n```"
|
|
6505
|
+
],
|
|
6506
|
+
"argsType": null,
|
|
6507
|
+
"resultType": "number"
|
|
6508
|
+
},
|
|
6509
|
+
{
|
|
6510
|
+
"path": "presentation.shapes.upsert",
|
|
6511
|
+
"namespace": "presentation.shapes",
|
|
6512
|
+
"summary": "Create or update the shape for a key.",
|
|
6513
|
+
"examplePrompts": [
|
|
6514
|
+
"Update the analysis label on the sheet instead of adding another one",
|
|
6515
|
+
"Rerun the daylight report and refresh its annotations",
|
|
6516
|
+
"Keep one \"FAR: 2.4\" text on Sheet 1 that updates on each run",
|
|
6517
|
+
"Draw a highlight rectangle the plugin can move on the next run\n\n# Example\n```ts\nconst { shapeId, created } = await snaptrude.presentation.shapes.upsert(\"far-label\", {\ntype: \"text\",\ntext: \"FAR: 2.4\",\nposition: { x: 40, y: 40 },\ncolor: \"blue\",\n})\n```"
|
|
6518
|
+
],
|
|
6519
|
+
"argsType": "string",
|
|
6520
|
+
"resultType": "PluginPresentationShapesUpsertResult"
|
|
6521
|
+
},
|
|
5897
6522
|
{
|
|
5898
6523
|
"path": "presentation.sheets.create",
|
|
5899
6524
|
"namespace": "presentation.sheets",
|
|
@@ -6533,6 +7158,31 @@
|
|
|
6533
7158
|
"argsType": null,
|
|
6534
7159
|
"resultType": "PluginProgramSiteNorthAngleResult"
|
|
6535
7160
|
},
|
|
7161
|
+
{
|
|
7162
|
+
"path": "program.site.getTimezone",
|
|
7163
|
+
"namespace": "program.site",
|
|
7164
|
+
"summary": "Get the IANA timezone of the project's geographic location.",
|
|
7165
|
+
"examplePrompts": [
|
|
7166
|
+
"What timezone is this project in?",
|
|
7167
|
+
"Get the site's IANA timezone",
|
|
7168
|
+
"What's the local time zone at the project location?",
|
|
7169
|
+
"Which timezone should I use for the sun study schedule?\n\n# Example\n```ts\nconst timezone = await snaptrude.program.site.getTimezone()\nif (timezone) console.log(`Project timezone: ${timezone}`)\n```"
|
|
7170
|
+
],
|
|
7171
|
+
"argsType": null,
|
|
7172
|
+
"resultType": "PluginProgramSiteTimezoneResult"
|
|
7173
|
+
},
|
|
7174
|
+
{
|
|
7175
|
+
"path": "program.site.getWeather",
|
|
7176
|
+
"namespace": "program.site",
|
|
7177
|
+
"summary": "Get the weather file resolved for the project site.",
|
|
7178
|
+
"examplePrompts": [
|
|
7179
|
+
"Which weather file is my project using?",
|
|
7180
|
+
"What EPW station was resolved for this site?",
|
|
7181
|
+
"Get the weather file id for the daylight analysis\n\n# Example\n```ts\nconst weather = await snaptrude.program.site.getWeather()\nif (weather) console.log(weather.station, weather.selectionMethod)\n```"
|
|
7182
|
+
],
|
|
7183
|
+
"argsType": null,
|
|
7184
|
+
"resultType": "PluginProgramSiteWeatherResult"
|
|
7185
|
+
},
|
|
6536
7186
|
{
|
|
6537
7187
|
"path": "program.site.listGeoPolygons",
|
|
6538
7188
|
"namespace": "program.site",
|
|
@@ -6584,6 +7234,19 @@
|
|
|
6584
7234
|
"argsType": "string",
|
|
6585
7235
|
"resultType": "PluginProgramSpreadsheetAddConditionalFormattingResult"
|
|
6586
7236
|
},
|
|
7237
|
+
{
|
|
7238
|
+
"path": "program.spreadsheet.addImage",
|
|
7239
|
+
"namespace": "program.spreadsheet",
|
|
7240
|
+
"summary": "Place a floating image on a workbook sheet from a base64 data URI.",
|
|
7241
|
+
"examplePrompts": [
|
|
7242
|
+
"Add my logo image to the report sheet",
|
|
7243
|
+
"Place a PNG at cell B2 on the Takeoff sheet",
|
|
7244
|
+
"Put an SVG diagram on a spreadsheet sheet",
|
|
7245
|
+
"Insert an image into the workbook\n\n# Example\n```ts\nconst { name } = await snaptrude.program.spreadsheet.addImage(\n\"Report\",\n{ dataUri: \"data:image/png;base64,iVBORw0...\" },\n{ anchorCell: \"B2\", size: { width: 240, height: 120 }, name: \"logo\" },\n)\n```"
|
|
7246
|
+
],
|
|
7247
|
+
"argsType": "string",
|
|
7248
|
+
"resultType": "PluginProgramSpreadsheetAddImageResult"
|
|
7249
|
+
},
|
|
6587
7250
|
{
|
|
6588
7251
|
"path": "program.spreadsheet.bindings.create",
|
|
6589
7252
|
"namespace": "program.spreadsheet.bindings",
|
|
@@ -6633,6 +7296,31 @@
|
|
|
6633
7296
|
"argsType": "string",
|
|
6634
7297
|
"resultType": "PluginProgramSpreadsheetCreateSheetResult"
|
|
6635
7298
|
},
|
|
7299
|
+
{
|
|
7300
|
+
"path": "program.spreadsheet.datasets.list",
|
|
7301
|
+
"namespace": "program.spreadsheet.datasets",
|
|
7302
|
+
"summary": "List the stored plugin datasets.",
|
|
7303
|
+
"examplePrompts": [
|
|
7304
|
+
"List my plugin datasets",
|
|
7305
|
+
"What datasets are stored for the sheets?",
|
|
7306
|
+
"Show the data sets bindings can use\n\n# Example\n```ts\nconst { datasets } = await snaptrude.program.spreadsheet.datasets.list()\n```"
|
|
7307
|
+
],
|
|
7308
|
+
"argsType": null,
|
|
7309
|
+
"resultType": "PluginProgramSpreadsheetDatasetsListResult"
|
|
7310
|
+
},
|
|
7311
|
+
{
|
|
7312
|
+
"path": "program.spreadsheet.datasets.set",
|
|
7313
|
+
"namespace": "program.spreadsheet.datasets",
|
|
7314
|
+
"summary": "Store (upsert) a named plugin dataset.",
|
|
7315
|
+
"examplePrompts": [
|
|
7316
|
+
"Store my plugin's rows as a named dataset",
|
|
7317
|
+
"Upload data the sheets can bind to and refresh",
|
|
7318
|
+
"Save a dataset for a live sheet binding",
|
|
7319
|
+
"Push my computed table so a binding keeps it fresh\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.datasets.set(\n\"costs\",\n[\n{ key: \"item\", header: \"Item\" },\n{ key: \"cost\", header: \"Cost\", align: \"right\" },\n],\n[{ item: \"Concrete\", cost: 120 }],\n)\n```"
|
|
7320
|
+
],
|
|
7321
|
+
"argsType": "string",
|
|
7322
|
+
"resultType": "PluginProgramSpreadsheetDatasetsSetResult"
|
|
7323
|
+
},
|
|
6636
7324
|
{
|
|
6637
7325
|
"path": "program.spreadsheet.export",
|
|
6638
7326
|
"namespace": "program.spreadsheet",
|
|
@@ -6901,5 +7589,103 @@
|
|
|
6901
7589
|
],
|
|
6902
7590
|
"argsType": "PluginSpreadsheetTransactionOp[]",
|
|
6903
7591
|
"resultType": "PluginProgramSpreadsheetTransactionResult"
|
|
7592
|
+
},
|
|
7593
|
+
{
|
|
7594
|
+
"path": "workspace.projects.copy",
|
|
7595
|
+
"namespace": "workspace.projects",
|
|
7596
|
+
"summary": "Copy the **current** project into a new project — the dashboard's \"Save As\".",
|
|
7597
|
+
"examplePrompts": [
|
|
7598
|
+
"Save this project as a new copy called Tower Study v2",
|
|
7599
|
+
"Duplicate the current project into the Acme team",
|
|
7600
|
+
"Make a copy of this project so I can try changes\n\n# Example\n```ts\nconst { projectId } = await snaptrude.workspace.projects.copy(\"Tower Study v2\")\n```"
|
|
7601
|
+
],
|
|
7602
|
+
"argsType": "string",
|
|
7603
|
+
"resultType": "PluginWorkspaceProjectsCopyResult"
|
|
7604
|
+
},
|
|
7605
|
+
{
|
|
7606
|
+
"path": "workspace.projects.create",
|
|
7607
|
+
"namespace": "workspace.projects",
|
|
7608
|
+
"summary": "Create a new, empty BIM project.",
|
|
7609
|
+
"examplePrompts": [
|
|
7610
|
+
"Create a new project called Tower Study",
|
|
7611
|
+
"Start a new project in the Acme team",
|
|
7612
|
+
"Make a fresh project using millimeters",
|
|
7613
|
+
"Create an empty project for me to work in\n\n# Example\n```ts\nconst { projectId } = await snaptrude.workspace.projects.create(\"Tower Study\", {\nteamId: \"team_1\",\nunit: \"mm\",\n})\n```"
|
|
7614
|
+
],
|
|
7615
|
+
"argsType": "string",
|
|
7616
|
+
"resultType": "PluginWorkspaceProjectsCreateResult"
|
|
7617
|
+
},
|
|
7618
|
+
{
|
|
7619
|
+
"path": "workspace.projects.get",
|
|
7620
|
+
"namespace": "workspace.projects",
|
|
7621
|
+
"summary": "Get a single project by id.",
|
|
7622
|
+
"examplePrompts": [
|
|
7623
|
+
"Get the project with this id",
|
|
7624
|
+
"Look up a project by its floorkey",
|
|
7625
|
+
"What is the name of this project?\n\n# Example\n```ts\nconst project = await snaptrude.workspace.projects.get(\"floorkey_123\")\nif (project) console.log(project.name)\n```"
|
|
7626
|
+
],
|
|
7627
|
+
"argsType": "string",
|
|
7628
|
+
"resultType": "PluginWorkspaceProjectsGetResult"
|
|
7629
|
+
},
|
|
7630
|
+
{
|
|
7631
|
+
"path": "workspace.projects.list",
|
|
7632
|
+
"namespace": "workspace.projects",
|
|
7633
|
+
"summary": "List the projects the user can access.",
|
|
7634
|
+
"examplePrompts": [
|
|
7635
|
+
"List all my projects",
|
|
7636
|
+
"Show the projects in the Acme team",
|
|
7637
|
+
"How many projects do I have?",
|
|
7638
|
+
"What projects can I open?\n\n# Example\n```ts\nconst { projects } = await snaptrude.workspace.projects.list({ teamId: \"team_1\" })\nfor (const p of projects) console.log(p.id, p.name)\n```"
|
|
7639
|
+
],
|
|
7640
|
+
"argsType": "{ teamId?: string }",
|
|
7641
|
+
"resultType": "PluginWorkspaceProjectsListResult"
|
|
7642
|
+
},
|
|
7643
|
+
{
|
|
7644
|
+
"path": "workspace.projects.rename",
|
|
7645
|
+
"namespace": "workspace.projects",
|
|
7646
|
+
"summary": "Rename a project.",
|
|
7647
|
+
"examplePrompts": [
|
|
7648
|
+
"Rename this project to Tower Study Final",
|
|
7649
|
+
"Change the name of project floorkey_123",
|
|
7650
|
+
"Give this project a new name\n\n# Example\n```ts\nconst { projectId } = await snaptrude.workspace.projects.rename(\n\"floorkey_123\",\n\"Tower Study Final\",\n)\n```"
|
|
7651
|
+
],
|
|
7652
|
+
"argsType": "string",
|
|
7653
|
+
"resultType": "PluginWorkspaceProjectsRenameResult"
|
|
7654
|
+
},
|
|
7655
|
+
{
|
|
7656
|
+
"path": "workspace.teams.get",
|
|
7657
|
+
"namespace": "workspace.teams",
|
|
7658
|
+
"summary": "Get a single team by id.",
|
|
7659
|
+
"examplePrompts": [
|
|
7660
|
+
"Get the team with id team_1",
|
|
7661
|
+
"Look up a team by its id",
|
|
7662
|
+
"What is the name of this team?\n\n# Example\n```ts\nconst team = await snaptrude.workspace.teams.get(\"team_1\")\nif (team) console.log(team.name)\n```"
|
|
7663
|
+
],
|
|
7664
|
+
"argsType": "string",
|
|
7665
|
+
"resultType": "PluginWorkspaceTeamsGetResult"
|
|
7666
|
+
},
|
|
7667
|
+
{
|
|
7668
|
+
"path": "workspace.teams.list",
|
|
7669
|
+
"namespace": "workspace.teams",
|
|
7670
|
+
"summary": "List the teams the user belongs to.",
|
|
7671
|
+
"examplePrompts": [
|
|
7672
|
+
"List all my teams",
|
|
7673
|
+
"Which teams am I a member of?",
|
|
7674
|
+
"Show every team I can access\n\n# Example\n```ts\nconst { teams } = await snaptrude.workspace.teams.list()\nfor (const t of teams) console.log(t.id, t.name)\n```"
|
|
7675
|
+
],
|
|
7676
|
+
"argsType": null,
|
|
7677
|
+
"resultType": "PluginWorkspaceTeamsListResult"
|
|
7678
|
+
},
|
|
7679
|
+
{
|
|
7680
|
+
"path": "workspace.teams.listMembers",
|
|
7681
|
+
"namespace": "workspace.teams",
|
|
7682
|
+
"summary": "List the members of a team.",
|
|
7683
|
+
"examplePrompts": [
|
|
7684
|
+
"List the members of the Acme team",
|
|
7685
|
+
"Who is on team_1?",
|
|
7686
|
+
"How many people are in this team?\n\n# Example\n```ts\nconst { members } = await snaptrude.workspace.teams.listMembers(\"team_1\")\nfor (const m of members) console.log(m.name, m.email)\n```"
|
|
7687
|
+
],
|
|
7688
|
+
"argsType": "string",
|
|
7689
|
+
"resultType": "PluginWorkspaceTeamsListMembersResult"
|
|
6904
7690
|
}
|
|
6905
7691
|
]
|