@snaptrude/plugin-core 0.11.0-rc.1 → 1.0.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/AGENTS.md +4 -0
- package/CHANGELOG.md +176 -14
- package/api-manifest.json +872 -49
- package/dist/api/analysis/daylight.d.ts +5 -5
- package/dist/api/analysis/solar.d.ts +2 -2
- package/dist/api/core/camera/index.d.ts +447 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +942 -101
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +59 -2
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +59 -35
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/edge.d.ts +2 -2
- package/dist/api/core/geom/query/face.d.ts +105 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +10 -2
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +5 -5
- package/dist/api/core/geom/update/profile.d.ts +3 -1
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/handles/index.d.ts +4 -2
- package/dist/api/core/handles/index.d.ts.map +1 -1
- package/dist/api/core/index.d.ts +4 -4
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +3 -1
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +377 -255
- package/dist/api/core/layers.d.ts.map +1 -1
- package/dist/api/core/mode/index.d.ts +19 -7
- package/dist/api/core/mode/index.d.ts.map +1 -1
- package/dist/api/core/proposals/index.d.ts +4 -3
- package/dist/api/core/proposals/index.d.ts.map +1 -1
- package/dist/api/core/storeys/index.d.ts +17 -2
- package/dist/api/core/storeys/index.d.ts.map +1 -1
- package/dist/api/core/storeys/layers.d.ts +408 -0
- package/dist/api/core/storeys/layers.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +84 -3
- package/dist/api/core/tags.d.ts.map +1 -1
- package/dist/api/core/zoom/index.d.ts +13 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/bim.d.ts +299 -0
- package/dist/api/design/bim.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +2 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/catalog.d.ts +320 -0
- package/dist/api/design/catalog.d.ts.map +1 -0
- package/dist/api/design/create/bulk-items.d.ts +269 -0
- package/dist/api/design/create/bulk-items.d.ts.map +1 -0
- package/dist/api/design/create/grids.d.ts +132 -0
- package/dist/api/design/create/grids.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +753 -102
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +38 -0
- package/dist/api/design/create/opening-fields.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +7 -20
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +427 -0
- package/dist/api/design/dimensions.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +24 -23
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +1446 -0
- package/dist/api/design/family.d.ts.map +1 -0
- package/dist/api/design/grids.d.ts +237 -0
- package/dist/api/design/grids.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +30 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/networks.d.ts +1703 -0
- package/dist/api/design/networks.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +33 -5
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/grids.d.ts +287 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +143 -36
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -66
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- package/dist/api/design/selection/index.d.ts +12 -12
- package/dist/api/design/types/index.d.ts +40 -24
- package/dist/api/design/types/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +412 -8
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +8 -8
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/entity/buildableEnvelope.d.ts +84 -2
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +13 -1
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +12 -15
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/api/presentation/aiInspiration.d.ts +24 -24
- package/dist/api/presentation/annotate.d.ts +38 -22
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- package/dist/api/presentation/camera.d.ts +265 -0
- package/dist/api/presentation/camera.d.ts.map +1 -0
- package/dist/api/presentation/drawingContract.d.ts +32 -0
- package/dist/api/presentation/drawingContract.d.ts.map +1 -0
- package/dist/api/presentation/drawings.d.ts +3523 -0
- package/dist/api/presentation/drawings.d.ts.map +1 -0
- package/dist/api/presentation/export.d.ts +23 -5
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/graphics.d.ts +419 -0
- package/dist/api/presentation/graphics.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +66 -12
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +117 -51
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/sections.d.ts +461 -0
- package/dist/api/presentation/sections.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/api/presentation/sheets.d.ts +175 -37
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/standards.d.ts +590 -0
- package/dist/api/presentation/standards.d.ts.map +1 -0
- package/dist/api/presentation/viewPresets.d.ts +222 -0
- package/dist/api/presentation/viewPresets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +144 -9
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +1350 -0
- package/dist/api/presentation/walkthroughs.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +58 -2
- package/dist/api/program/departments.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +16 -6
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/labels.d.ts +355 -0
- package/dist/api/program/labels.d.ts.map +1 -0
- package/dist/api/program/metadata.d.ts +328 -0
- package/dist/api/program/metadata.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +4 -4
- package/dist/api/program/spreadsheet.d.ts +267 -4
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +49 -2
- package/dist/api/workspace/index.d.ts.map +1 -1
- package/dist/errors/codes.d.ts +5 -8
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/handles.d.ts +32 -3
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +6534 -2865
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6118 -2857
- package/dist/index.js.map +1 -1
- package/dist/massParameters.d.ts +287 -0
- package/dist/massParameters.d.ts.map +1 -0
- package/dist/massParameters.ops.d.ts +138 -0
- package/dist/massParameters.ops.d.ts.map +1 -0
- package/package.json +2 -1
- package/scripts/check-dist-fresh.mjs +22 -0
- package/scripts/generate-manifest.mjs +5 -0
- package/scripts/generate-manifest.test.mjs +14 -3
- package/src/api/core/camera/index.ts +429 -1
- package/src/api/core/geom/create/index.ts +1037 -102
- package/src/api/core/geom/query/brep.ts +60 -2
- package/src/api/core/geom/query/curve.ts +26 -2
- package/src/api/core/geom/query/edge.ts +2 -2
- package/src/api/core/geom/query/face.ts +109 -4
- package/src/api/core/geom/update/contour.ts +10 -2
- package/src/api/core/geom/update/profile.ts +2 -0
- package/src/api/core/handles/index.ts +3 -2
- package/src/api/core/index.ts +4 -4
- package/src/api/core/io/import/index.ts +11 -3
- package/src/api/core/layers.ts +380 -173
- package/src/api/core/mode/index.ts +19 -7
- package/src/api/core/proposals/index.ts +4 -3
- package/src/api/core/storeys/index.ts +19 -2
- package/src/api/core/storeys/layers.ts +339 -0
- package/src/api/core/tags.ts +76 -0
- package/src/api/core/zoom/index.ts +13 -0
- package/src/api/design/bim.ts +210 -0
- package/src/api/design/boolean/index.ts +2 -0
- package/src/api/design/catalog.ts +203 -0
- package/src/api/design/create/bulk-items.ts +294 -0
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +824 -141
- package/src/api/design/create/opening-fields.ts +40 -0
- package/src/api/design/delete/index.ts +6 -20
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/doors/index.ts +64 -41
- package/src/api/design/family.ts +1342 -0
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +49 -4
- package/src/api/design/networks.ts +607 -0
- package/src/api/design/query/geometry/index.ts +35 -4
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +105 -5
- package/src/api/design/query/spaces.ts +0 -68
- package/src/api/design/types/index.ts +31 -24
- package/src/api/design/update/index.ts +398 -4
- package/src/api/design/windows/index.ts +40 -22
- package/src/api/entity/buildableEnvelope.ts +77 -2
- package/src/api/entity/referenceLine.ts +25 -12
- package/src/api/entity/space.ts +0 -2
- package/src/api/presentation/annotate.ts +90 -58
- package/src/api/presentation/camera.ts +289 -0
- package/src/api/presentation/drawingContract.ts +70 -0
- package/src/api/presentation/drawings.ts +1179 -0
- package/src/api/presentation/export.ts +32 -6
- package/src/api/presentation/graphics.ts +324 -0
- package/src/api/presentation/index.ts +73 -14
- package/src/api/presentation/placedViews.ts +120 -57
- package/src/api/presentation/sections.ts +420 -0
- package/src/api/presentation/sheets.ts +182 -37
- package/src/api/presentation/standards.ts +445 -0
- package/src/api/presentation/viewPresets.ts +241 -0
- package/src/api/presentation/views.ts +81 -10
- package/src/api/presentation/walkthroughs.ts +1201 -0
- package/src/api/program/departments.ts +54 -2
- package/src/api/program/index.ts +16 -6
- package/src/api/program/labels.ts +332 -0
- package/src/api/program/metadata.ts +364 -0
- package/src/api/program/spreadsheet.ts +282 -0
- package/src/api/workspace/index.ts +51 -2
- package/src/errors/codes.ts +9 -30
- package/src/handles.ts +42 -3
- package/src/index.ts +2 -0
- package/src/massParameters.ops.ts +246 -0
- package/src/massParameters.ts +427 -0
- package/test/drawingContract.test.mjs +288 -0
- package/test/errors.test.mjs +1 -4
- package/test/massParameters.test.mjs +952 -0
- package/test/paperPensContract.test.mjs +75 -0
- package/test/presentationViewSettings.test.mjs +85 -0
- package/api-manifest.full.json +0 -6928
- package/snaptrude-plugin-core-0.11.0.tgz +0 -0
package/api-manifest.json
CHANGED
|
@@ -729,8 +729,9 @@
|
|
|
729
729
|
{
|
|
730
730
|
"path": "core.geom.create.brepFromChamfer",
|
|
731
731
|
"namespace": "core.geom.create",
|
|
732
|
-
"summary": "Bevels the given
|
|
732
|
+
"summary": "Bevels the given edges of a solid with a symmetric planar cut. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
|
|
733
733
|
"examplePrompts": [
|
|
734
|
+
"Chamfer the top edge of the cylinder",
|
|
734
735
|
"Bevel these edges by 100mm",
|
|
735
736
|
"Chamfer the top edges of the plinth",
|
|
736
737
|
"Cut a 45-degree flat along the corners of this mass\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst edges = await snaptrude.core.geom.query.brep.listEdges(brep)\nconst beveled = await snaptrude.core.geom.create.brepFromChamfer(brep, [edges[0]], 0.1)\n```"
|
|
@@ -738,6 +739,28 @@
|
|
|
738
739
|
"argsType": "BrepHandle",
|
|
739
740
|
"resultType": "BrepHandle"
|
|
740
741
|
},
|
|
742
|
+
{
|
|
743
|
+
"path": "core.geom.create.brepFromCone",
|
|
744
|
+
"namespace": "core.geom.create",
|
|
745
|
+
"summary": "Create a solid **cone or frustum** B-rep: bottom-cap centre, axis, base radius, height, and an optional top radius (default 0 — a full cone to a point; > 0 — a frustum / tapered column). Host API call — returns a {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. Carries a creation recipe (radii + height), editable through `design.update.parameters`.",
|
|
746
|
+
"examplePrompts": [
|
|
747
|
+
"Create a cone roof 4m wide and 3m tall",
|
|
748
|
+
"Make a tapered column narrowing from 1m to 0.6m\n\n# Example\n```ts\nconst roof = await snaptrude.core.geom.create.brepFromCone(\n{ x: 0, y: 9, z: 0 },\n{ x: 0, y: 1, z: 0 },\n2,\n3,\n)\n```"
|
|
749
|
+
],
|
|
750
|
+
"argsType": "Vec3Components",
|
|
751
|
+
"resultType": "BrepHandle"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"path": "core.geom.create.brepFromCylinder",
|
|
755
|
+
"namespace": "core.geom.create",
|
|
756
|
+
"summary": "Create a solid **cylinder** B-rep from its bottom-cap centre, axis direction, radius and height. Host API call — returns a {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. The bottom cap sits AT `base` and the solid extends `height` along `axis` — place `base` on the floor and use axis `{x: 0, y: 1, z: 0}` for an upright column. Carries a creation recipe (radius, height), editable through `design.update.parameters`.",
|
|
757
|
+
"examplePrompts": [
|
|
758
|
+
"Create a cylinder 2m across and 4m tall",
|
|
759
|
+
"Add a circular column here\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromCylinder(\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 1, z: 0 },\n1,\n4,\n)\nconst column = await snaptrude.design.create.massFromBrep(brep, \"Column\")\n```"
|
|
760
|
+
],
|
|
761
|
+
"argsType": "Vec3Components",
|
|
762
|
+
"resultType": "BrepHandle"
|
|
763
|
+
},
|
|
741
764
|
{
|
|
742
765
|
"path": "core.geom.create.brepFromExtrusion",
|
|
743
766
|
"namespace": "core.geom.create",
|
|
@@ -745,7 +768,9 @@
|
|
|
745
768
|
"examplePrompts": [
|
|
746
769
|
"Extrude this profile 3 metres up",
|
|
747
770
|
"Make a solid by extruding this outline",
|
|
748
|
-
"Create a cylinder from a circle profile
|
|
771
|
+
"Create a cylinder from a circle profile",
|
|
772
|
+
"Extrude this floor plate 40m up with a 90 degree twist",
|
|
773
|
+
"Taper this tower to 60 percent of its footprint at the top\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```"
|
|
749
774
|
],
|
|
750
775
|
"argsType": "ContourHandle",
|
|
751
776
|
"resultType": "BrepHandle"
|
|
@@ -765,11 +790,14 @@
|
|
|
765
790
|
{
|
|
766
791
|
"path": "core.geom.create.brepFromFillet",
|
|
767
792
|
"namespace": "core.geom.create",
|
|
768
|
-
"summary": "Rounds the given
|
|
793
|
+
"summary": "Rounds the given edges of a solid with a constant radius. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
|
|
769
794
|
"examplePrompts": [
|
|
770
|
-
"Round the
|
|
795
|
+
"Round the rim of the column with 200 mm",
|
|
796
|
+
"Soften where the dome meets the wall",
|
|
771
797
|
"Fillet the corners of the podium with a 0.5m radius",
|
|
772
|
-
"Soften the vertical edges of this tower
|
|
798
|
+
"Soften the vertical edges of this tower",
|
|
799
|
+
"Blend this edge from 200mm at one end to 600mm at the other",
|
|
800
|
+
"Round this rim wider at the back than at the front\n\n# Example\n```ts\n// Rim = every edge between the cylinder side and a plane cap\nconst edges = await snaptrude.core.geom.query.brep.listEdges(column)\nconst rim = []\nfor (const edge of edges) {\nconst faces = await snaptrude.core.geom.query.edge.listFaces(edge)\nconst kinds = await Promise.all(\nfaces.map((f) => snaptrude.core.geom.query.face.getSurfaceKind(f)),\n)\nif (kinds.includes(\"cylinder\") && kinds.includes(\"plane\")) rim.push(edge)\n}\nconst rounded = await snaptrude.core.geom.create.brepFromFillet(column, rim, 0.787) // 200 mm\n```"
|
|
773
801
|
],
|
|
774
802
|
"argsType": "BrepHandle",
|
|
775
803
|
"resultType": "BrepHandle"
|
|
@@ -798,7 +826,8 @@
|
|
|
798
826
|
"Loft a four-sided base to a five-sided top",
|
|
799
827
|
"Loft these outlines even though their corners don't line up",
|
|
800
828
|
"Loft these outlines exactly as authored, corner to corner",
|
|
801
|
-
"Fail the loft if my sections don't have matching edge counts
|
|
829
|
+
"Fail the loft if my sections don't have matching edge counts",
|
|
830
|
+
"Loft these three outlines with smoothly curving sides\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```"
|
|
802
831
|
],
|
|
803
832
|
"argsType": "ContourHandle",
|
|
804
833
|
"resultType": "BrepHandle"
|
|
@@ -820,6 +849,7 @@
|
|
|
820
849
|
"namespace": "core.geom.create",
|
|
821
850
|
"summary": "Grows or shrinks a solid by offsetting every face — positive distance moves faces outward, negative moves them inward. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
|
|
822
851
|
"examplePrompts": [
|
|
852
|
+
"Thicken the torus ring by 100 mm",
|
|
823
853
|
"Grow this solid by 0.5m in every direction",
|
|
824
854
|
"Shrink this mass by 200mm",
|
|
825
855
|
"Offset the building envelope outward by 1m\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst grown = await snaptrude.core.geom.create.brepFromOffset(brep, 0.5)\n```"
|
|
@@ -827,14 +857,27 @@
|
|
|
827
857
|
"argsType": "BrepHandle",
|
|
828
858
|
"resultType": "BrepHandle"
|
|
829
859
|
},
|
|
860
|
+
{
|
|
861
|
+
"path": "core.geom.create.brepFromPatch",
|
|
862
|
+
"namespace": "core.geom.create",
|
|
863
|
+
"summary": "Stretches a surface across a closed loop of boundary curves and thickens it into a SOLID in one call — a roof over four curves, a canopy between two rails, a blend across a gap. `thickness` is in internal length units and is required: only solids reach the canvas, and there is no separate surface object to keep. Pass edges as `{ edge, brep, face }` with `continuity: \"tangent\"` to leave the named face smoothly. The result carries NO recipe (`design.query.getParameters` returns `null`) — label it when you commit it, because the label is all the provenance there is.",
|
|
864
|
+
"examplePrompts": [
|
|
865
|
+
"Patch a roof over these four boundary curves, 250 mm thick",
|
|
866
|
+
"Span a canopy between these two curved rails, 300 mm thick\n\n# Example\n```ts\n// A roof over four curves\nconst roof = await snaptrude.core.geom.create.brepFromPatch(\n[curveA, curveB, curveC, curveD],\n0.25,\n)\nconst mass = await snaptrude.design.create.massFromBrep(roof, \"Roof patch\")\n```\n\n```ts\n// A canopy between two towers' rims, leaving every wall it meets smoothly:\n// with `continuity: \"tangent\"` EVERY item is an edge naming its face.\nconst canopy = await snaptrude.core.geom.create.brepFromPatch(\n[\n{ edge: rimA, brep: towerA, face: wallA },\n{ edge: sideA, brep: towerA, face: endA },\n{ edge: rimB, brep: towerB, face: wallB },\n{ edge: sideB, brep: towerB, face: endB },\n],\n0.3,\n{ continuity: \"tangent\" },\n)\n```"
|
|
867
|
+
],
|
|
868
|
+
"argsType": "(CurveHandle | OwnedEdge)[]",
|
|
869
|
+
"resultType": "BrepHandle"
|
|
870
|
+
},
|
|
830
871
|
{
|
|
831
872
|
"path": "core.geom.create.brepFromRevolution",
|
|
832
873
|
"namespace": "core.geom.create",
|
|
833
|
-
"summary": "Revolves a planar profile about an axis to make a solid of revolution — a full turn by default. Host API call — returns a new {@linkcode BrepHandle}; the input contour is read-only. Holes in the profile are allowed
|
|
874
|
+
"summary": "Revolves a planar profile about an axis to make a solid of revolution — a full turn by default. Host API call — returns a new {@linkcode BrepHandle}; the input contour is read-only. Holes in the profile are allowed, and segments may run at any angle to the axis: an inclined segment revolves into a cone, an arc into a sphere or torus section. This is the general route to domes, vases, columns and rotundas.",
|
|
834
875
|
"examplePrompts": [
|
|
835
876
|
"Create a dome from this section",
|
|
836
877
|
"Revolve this profile 360 degrees around the vertical axis",
|
|
837
|
-
"Build a rotunda by revolving this wall section
|
|
878
|
+
"Build a rotunda by revolving this wall section",
|
|
879
|
+
"Make a dome by revolving a quarter-circle about the vertical axis",
|
|
880
|
+
"Turn this curved outline into a vase\n\n# Example\n```ts\n// A cylinder: revolve a 2m-wide, 3m-tall rectangle about the Y axis at\n// its edge — the left edge sits ON the axis, which is legal.\nconst rect = await snaptrude.core.geom.create.profileFromLinePoints([\nawait snaptrude.core.math.vec3.new(0, 0, 0),\nawait snaptrude.core.math.vec3.new(2, 0, 0),\nawait snaptrude.core.math.vec3.new(2, 3, 0),\nawait snaptrude.core.math.vec3.new(0, 3, 0),\n])\nconst profile = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst cylinder = await snaptrude.core.geom.create.brepFromRevolution(\nprofile,\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 1, z: 0 },\n)\n```"
|
|
838
881
|
],
|
|
839
882
|
"argsType": "ContourHandle",
|
|
840
883
|
"resultType": "BrepHandle"
|
|
@@ -844,13 +887,25 @@
|
|
|
844
887
|
"namespace": "core.geom.create",
|
|
845
888
|
"summary": "Hollows a solid into constant-thickness walls, removing the given faces as openings. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only. The outer surface is kept and the walls grow inward.",
|
|
846
889
|
"examplePrompts": [
|
|
890
|
+
"Hollow the dome into a 300 mm shell, open at the base",
|
|
847
891
|
"Hollow this mass into 200mm walls",
|
|
848
892
|
"Shell this form with the top face open",
|
|
849
|
-
"Turn this solid tower into a tube open at both ends\n\n# Example\n```ts\nconst
|
|
893
|
+
"Turn this solid tower into a tube open at both ends\n\n# Example\n```ts\n// Open the dome at its flat base: the one face whose surface is a plane\nconst faces = await snaptrude.core.geom.query.brep.listFaces(dome)\nconst base = []\nfor (const face of faces) {\nif ((await snaptrude.core.geom.query.face.getSurfaceKind(face)) === \"plane\") base.push(face)\n}\nconst hollow = await snaptrude.core.geom.create.brepFromShell(dome, base, 1.181) // 300 mm\n```"
|
|
850
894
|
],
|
|
851
895
|
"argsType": "BrepHandle",
|
|
852
896
|
"resultType": "BrepHandle"
|
|
853
897
|
},
|
|
898
|
+
{
|
|
899
|
+
"path": "core.geom.create.brepFromSphere",
|
|
900
|
+
"namespace": "core.geom.create",
|
|
901
|
+
"summary": "Create a solid **sphere** B-rep from a centre and radius. Host API call — returns a {@linkcode BrepHandle}; commit it to the scene with `design.create.massFromBrep`. The result carries an exact spherical surface (not a faceted approximation) and a creation recipe — read the committed mass's parameters back with `design.query.getParameters` and edit them with `design.update.parameters`.",
|
|
902
|
+
"examplePrompts": [
|
|
903
|
+
"Create a sphere of radius 5 at the origin",
|
|
904
|
+
"Add a 3m ball on top of the tower\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromSphere({ x: 0, y: 5, z: 0 }, 5)\nconst mass = await snaptrude.design.create.massFromBrep(brep, \"Sphere\")\n```"
|
|
905
|
+
],
|
|
906
|
+
"argsType": "Vec3Components",
|
|
907
|
+
"resultType": "BrepHandle"
|
|
908
|
+
},
|
|
854
909
|
{
|
|
855
910
|
"path": "core.geom.create.brepFromSubtraction",
|
|
856
911
|
"namespace": "core.geom.create",
|
|
@@ -866,7 +921,7 @@
|
|
|
866
921
|
{
|
|
867
922
|
"path": "core.geom.create.brepFromSweep",
|
|
868
923
|
"namespace": "core.geom.create",
|
|
869
|
-
"summary": "Sweeps a planar profile along a polyline path, with mitred corners at each bend. Host API call — returns a new {@linkcode BrepHandle}; the input contour is read-only. The profile must be hole-free and must not lie in a plane containing the first path segment's direction. Repeating the first point as the last closes the path into a ring solid (a picture frame): closed paths must be flat and straight-segmented and take a straight-edged (arc-free) profile — the ring's cross-section is the authored profile projected along the first leg onto the first mitre plane, so a profile not perpendicular to the first leg appears sheared. An optional scale law tapers the sweep: `startScale`/`endScale` interpolate linearly by arc length, or `scales` gives one factor per path point (scaling is about the profile centroid). A uniform scale (all factors equal) works on any path today's sweep accepts; a varying scale takes straight (collinear) open paths with straight-edged profiles — tapering across a bend or along an arc edge would create faces Snaptrude cannot represent and throws (sweep each straight run separately and union the results instead). An optional `transition` picks the corner treatment: `\"miter\"` (default) is today's sharp mitred bend; `{ bevel: b }` chamfers each turning corner by cutting `b` back along both adjacent legs (works on open and closed paths — each leg must be long enough for its cuts). On a corner-less path `transition` has no effect, and the varying-scale lane takes straight paths, so it never sees a corner.",
|
|
924
|
+
"summary": "Sweeps a planar profile along a polyline path, with mitred corners at each bend. Host API call — returns a new {@linkcode BrepHandle}; the input contour is read-only. The profile must be hole-free and must not lie in a plane containing the first path segment's direction. Repeating the first point as the last closes the path into a ring solid (a picture frame): closed paths must be flat and straight-segmented and take a straight-edged (arc-free) profile — the ring's cross-section is the authored profile projected along the first leg onto the first mitre plane, so a profile not perpendicular to the first leg appears sheared. An optional scale law tapers the sweep: `startScale`/`endScale` interpolate linearly by arc length, or `scales` gives one factor per path point (scaling is about the profile centroid). A uniform scale (all factors equal) works on any path today's sweep accepts; a varying scale takes straight (collinear) open paths with straight-edged profiles — tapering across a bend or along an arc edge would create faces Snaptrude cannot represent and throws (sweep each straight run separately and union the results instead). An optional `transition` picks the corner treatment: `\"miter\"` (default) is today's sharp mitred bend; `\"round\"` carries the section around each turning corner on a tangent circular arc, so the corner patch is a real curved (cylindrical) surface rather than a flat cut (open paths only — `\"round\"` on a closed ring path is refused); `{ bevel: b }` chamfers each turning corner by cutting `b` back along both adjacent legs (works on open and closed paths — each leg must be long enough for its cuts). On a corner-less path `transition` has no effect, and the varying-scale lane takes straight paths, so it never sees a corner.",
|
|
870
925
|
"examplePrompts": [
|
|
871
926
|
"Sweep this profile along the corridor path",
|
|
872
927
|
"Extrude the railing section along this route",
|
|
@@ -874,11 +929,35 @@
|
|
|
874
929
|
"Sweep a frame profile around a closed rectangular loop",
|
|
875
930
|
"Taper this duct from 1x1 to 2x2 along its run",
|
|
876
931
|
"Sweep a column section that narrows toward the top",
|
|
877
|
-
"Chamfer the corners of this swept frame by 200mm
|
|
932
|
+
"Chamfer the corners of this swept frame by 200mm",
|
|
933
|
+
"Sweep this handrail with rounded corners at the bends\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.4, 0.4)\nconst profile = await snaptrude.core.geom.create.contourFromProfile(rect)\n// profileRect lies in the XZ plane, so the path must START out of that\n// plane (here: straight up), then it can run horizontally.\nconst duct = await snaptrude.core.geom.create.brepFromSweep(profile, [\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 2.8, z: 0 },\n{ x: 10, y: 2.8, z: 0 },\n])\n// A closed ring (picture frame): repeat the first point as the last\nconst frame = await snaptrude.core.geom.create.brepFromSweep(profile, [\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 3, z: 0 },\n{ x: 4, y: 3, z: 0 },\n{ x: 4, y: 0, z: 0 },\n{ x: 0, y: 0, z: 0 },\n])\n// A tapered straight run: 0.4x0.4 at the start, 0.8x0.8 at the end\nconst flue = await snaptrude.core.geom.create.brepFromSweep(\nprofile,\n[\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 10, z: 0 },\n],\n{ startScale: 1, endScale: 2 },\n)\n```"
|
|
878
934
|
],
|
|
879
935
|
"argsType": "ContourHandle",
|
|
880
936
|
"resultType": "BrepHandle"
|
|
881
937
|
},
|
|
938
|
+
{
|
|
939
|
+
"path": "core.geom.create.brepFromSweepAlongCurve",
|
|
940
|
+
"namespace": "core.geom.create",
|
|
941
|
+
"summary": "Sweeps a cross-section along a SMOOTH path — splines, arcs and lines chained end to end — with control of how the profile turns. {@linkcode PluginGeomCreateApi.brepFromSweep} takes a polyline path; this takes curves. Host API call — returns a new {@linkcode BrepHandle}; the inputs are read-only. Records as `sweepAlongCurve`, so the orientation stays editable through `design.update.parameters` (agent-editable; the panel shows it read-only — a string is not a scalar row).",
|
|
942
|
+
"examplePrompts": [
|
|
943
|
+
"Sweep a 600x400 duct along this curved route and keep it upright",
|
|
944
|
+
"Run this handrail along the curved stair edge",
|
|
945
|
+
"Bend this footprint along the arc\n\n# Example\n```ts\nconst route = await snaptrude.core.geom.create.splineFromPoints(points)\nconst duct = await snaptrude.core.geom.create.brepFromSweepAlongCurve(profile, [route], {\norientation: \"upright\",\n})\n```"
|
|
946
|
+
],
|
|
947
|
+
"argsType": "ContourHandle",
|
|
948
|
+
"resultType": "BrepHandle"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"path": "core.geom.create.brepFromTorus",
|
|
952
|
+
"namespace": "core.geom.create",
|
|
953
|
+
"summary": "Create a solid **torus** (ring / donut) B-rep from its centre, plane normal, ring radius and tube radius. Host API call — returns a {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. `majorRadius` is centre-to-tube-centre; `minorRadius` is the tube's own radius and must be strictly smaller. Carries a creation recipe, editable through `design.update.parameters`.",
|
|
954
|
+
"examplePrompts": [
|
|
955
|
+
"Create a donut-shaped ring 10m across with a 1m tube",
|
|
956
|
+
"Add a torus canopy around the tower\n\n# Example\n```ts\nconst ring = await snaptrude.core.geom.create.brepFromTorus(\n{ x: 0, y: 6, z: 0 },\n{ x: 0, y: 1, z: 0 },\n5,\n1,\n)\n```"
|
|
957
|
+
],
|
|
958
|
+
"argsType": "Vec3Components",
|
|
959
|
+
"resultType": "BrepHandle"
|
|
960
|
+
},
|
|
882
961
|
{
|
|
883
962
|
"path": "core.geom.create.brepFromUnion",
|
|
884
963
|
"namespace": "core.geom.create",
|
|
@@ -903,6 +982,16 @@
|
|
|
903
982
|
"argsType": "BrepHandle",
|
|
904
983
|
"resultType": "BrepHandle[]"
|
|
905
984
|
},
|
|
985
|
+
{
|
|
986
|
+
"path": "core.geom.create.brepsFromSplitByFace",
|
|
987
|
+
"namespace": "core.geom.create",
|
|
988
|
+
"summary": "Cuts a solid with a FACE of another solid — the curved twin of {@linkcode PluginGeomCreateApi.brepsFromSplit}, which cuts with a plane. Host API call — returns new {@linkcode BrepHandle}s; both inputs are read-only. BOTH breps must be in the same frame: read scene masses with `design.query.geometry.getBrep(x, { frame: \"world\" })` (the default is each mass's own local frame, and two masses have two). The pieces come back in DESCENDING volume order; pick the one you want with `core.geom.query.brep.getCentroid` or `getVolume` and commit it. A piece carries no recipe — label it.",
|
|
989
|
+
"examplePrompts": [
|
|
990
|
+
"Cut this mass with the curved roof surface and keep the lower part\n\n# Example\n```ts\nconst target = await snaptrude.design.query.geometry.getBrep(tower, { frame: \"world\" })\nconst tool = await snaptrude.design.query.geometry.getBrep(roof, { frame: \"world\" })\nconst [toolFace] = await snaptrude.core.geom.query.brep.listFaces(tool)\nconst pieces = await snaptrude.core.geom.create.brepsFromSplitByFace(target, toolFace, tool)\n```"
|
|
991
|
+
],
|
|
992
|
+
"argsType": "BrepHandle",
|
|
993
|
+
"resultType": "BrepHandle[]"
|
|
994
|
+
},
|
|
906
995
|
{
|
|
907
996
|
"path": "core.geom.create.circle",
|
|
908
997
|
"namespace": "core.geom.create",
|
|
@@ -933,6 +1022,14 @@
|
|
|
933
1022
|
"argsType": "ProfileHandle",
|
|
934
1023
|
"resultType": "ContourHandle"
|
|
935
1024
|
},
|
|
1025
|
+
{
|
|
1026
|
+
"path": "core.geom.create.curvesFromProjection",
|
|
1027
|
+
"namespace": "core.geom.create",
|
|
1028
|
+
"summary": "Drops a curve onto a face along the face's normal and returns the curves it lands on — one per connected run, empty when the curve misses the face entirely. Host API call — returns new curve handles; the inputs are read-only. No lengths are involved: the result is a curve in the same internal length units as its inputs.",
|
|
1029
|
+
"examplePrompts": [],
|
|
1030
|
+
"argsType": "CurveHandle",
|
|
1031
|
+
"resultType": "CurveHandle[]"
|
|
1032
|
+
},
|
|
936
1033
|
{
|
|
937
1034
|
"path": "core.geom.create.line",
|
|
938
1035
|
"namespace": "core.geom.create",
|
|
@@ -965,6 +1062,18 @@
|
|
|
965
1062
|
"argsType": "Vec3Handle[]",
|
|
966
1063
|
"resultType": "ProfileHandle"
|
|
967
1064
|
},
|
|
1065
|
+
{
|
|
1066
|
+
"path": "core.geom.create.profileFromSplinePoints",
|
|
1067
|
+
"namespace": "core.geom.create",
|
|
1068
|
+
"summary": "Create a CLOSED smooth profile passing through each point, in order, with the loop closed smoothly back from the last point to the first (do NOT repeat the first point). Host API call — returns a handle. This is the closed counterpart of {@linkcode PluginGeomCreateApi.splineFromPoints} and the one-call route from points to an extrudable outline: wrap in `contourFromProfile` and extrude/loft/sweep as usual.",
|
|
1069
|
+
"examplePrompts": [
|
|
1070
|
+
"Make a blob-shaped floor plate through these points",
|
|
1071
|
+
"Organic curved outline through these corners",
|
|
1072
|
+
"Freeform podium profile\n\n# Example\n```ts\nconst profile = await snaptrude.core.geom.create.profileFromSplinePoints([p0, p1, p2, p3, p4])\nconst contour = await snaptrude.core.geom.create.contourFromProfile(profile)\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst podium = await snaptrude.design.create.massFromBrep(brep, \"Podium\")\n```"
|
|
1073
|
+
],
|
|
1074
|
+
"argsType": "Vec3Handle[]",
|
|
1075
|
+
"resultType": "ProfileHandle"
|
|
1076
|
+
},
|
|
968
1077
|
{
|
|
969
1078
|
"path": "core.geom.create.profileRect",
|
|
970
1079
|
"namespace": "core.geom.create",
|
|
@@ -976,6 +1085,29 @@
|
|
|
976
1085
|
"argsType": "number",
|
|
977
1086
|
"resultType": "ProfileHandle"
|
|
978
1087
|
},
|
|
1088
|
+
{
|
|
1089
|
+
"path": "core.geom.create.splineFromControlPoints",
|
|
1090
|
+
"namespace": "core.geom.create",
|
|
1091
|
+
"summary": "Create an open NURBS curve DEFINED BY control points — the curve is pulled TOWARD the interior points, not through them; it starts at the first point and ends at the last. Knots are computed for you (clamped, uniform) — there is no knot-vector argument. For a curve that must pass THROUGH given points use {@linkcode PluginGeomCreateApi.splineFromPoints}.",
|
|
1092
|
+
"examplePrompts": [
|
|
1093
|
+
"Draw a smooth curve controlled by these four points",
|
|
1094
|
+
"Rebuild this edge from its control polygon\n\n# Example\n```ts\nconst curve = await snaptrude.core.geom.create.splineFromControlPoints([p0, p1, p2, p3])\n// Quadratic instead of the default cubic\nconst tighter = await snaptrude.core.geom.create.splineFromControlPoints(\n[p0, p1, p2, p3],\n{ degree: 2 },\n)\n```"
|
|
1095
|
+
],
|
|
1096
|
+
"argsType": "Vec3Handle[]",
|
|
1097
|
+
"resultType": "SplineHandle"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
"path": "core.geom.create.splineFromPoints",
|
|
1101
|
+
"namespace": "core.geom.create",
|
|
1102
|
+
"summary": "Create an open NURBS curve passing exactly THROUGH each point, in order (centripetal Catmull-Rom fit → clamped cubic B-spline; C1-smooth, no cusps on uneven spacing). Host API call — returns a handle. The points are interpolated, NOT control points. For a CLOSED smooth loop use {@linkcode PluginGeomCreateApi.profileFromSplinePoints} — closed splines exist only as profiles, never as a single curve handle.",
|
|
1103
|
+
"examplePrompts": [
|
|
1104
|
+
"Draw a smooth curve through these points",
|
|
1105
|
+
"Make a wavy edge that passes through A, B, C and D",
|
|
1106
|
+
"Freeform curved wall path through these clicks\n\n# Example\n```ts\nconst spline = await snaptrude.core.geom.create.splineFromPoints([p0, p1, p2, p3])\n// Mixed profile: smooth top, straight closing base\nconst base = await snaptrude.core.geom.create.line(p3, p0)\nconst profile = await snaptrude.core.geom.create.profileFromCurves([spline, base])\n```"
|
|
1107
|
+
],
|
|
1108
|
+
"argsType": "Vec3Handle[]",
|
|
1109
|
+
"resultType": "SplineHandle"
|
|
1110
|
+
},
|
|
979
1111
|
{
|
|
980
1112
|
"path": "core.geom.delete.contour",
|
|
981
1113
|
"namespace": "core.geom.delete",
|
|
@@ -1101,10 +1233,11 @@
|
|
|
1101
1233
|
"Read the radius of this curved edge",
|
|
1102
1234
|
"Is this edge straight or an arc?",
|
|
1103
1235
|
"Get the exact start and end points of this edge",
|
|
1104
|
-
"Measure the length of each edge of this mass
|
|
1236
|
+
"Measure the length of each edge of this mass",
|
|
1237
|
+
"Read the control points of this curved edge\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst edges = await snaptrude.core.geom.query.brep.listEdges(brep)\nfor (const edge of edges) {\nconst curve = await snaptrude.core.geom.query.brep.getEdgeCurve(brep, edge)\nif (curve.type === \"arc\") console.log(\"arc radius:\", curve.radius)\n}\n}\n```"
|
|
1105
1238
|
],
|
|
1106
1239
|
"argsType": "BrepHandle",
|
|
1107
|
-
"resultType": "| { type: \"line\"; startPoint: Vec3Components; endPoint: Vec3Components; length: number }\n | {\n type: \"arc\"\n startPoint: Vec3Components\n endPoint: Vec3Components\n centre: Vec3Components\n axis: Vec3Components\n radius: number\n length: number\n }\n | {\n type: \"circle\"\n centre: Vec3Components\n axis: Vec3Components\n radius: number\n length: number\n }"
|
|
1240
|
+
"resultType": "| { type: \"line\"; startPoint: Vec3Components; endPoint: Vec3Components; length: number }\n | {\n type: \"arc\"\n startPoint: Vec3Components\n endPoint: Vec3Components\n centre: Vec3Components\n axis: Vec3Components\n radius: number\n length: number\n }\n | {\n type: \"circle\"\n centre: Vec3Components\n axis: Vec3Components\n radius: number\n length: number\n }\n | {\n type: \"spline\"\n startPoint: Vec3Components\n endPoint: Vec3Components\n degree: number\n controlPoints: Vec3Components[]\n /** Expanded by multiplicity: `controlPoints.length + degree + 1` entries. */\n knots: number[]\n length: number\n }"
|
|
1108
1241
|
},
|
|
1109
1242
|
{
|
|
1110
1243
|
"path": "core.geom.query.brep.getFaceCount",
|
|
@@ -1138,6 +1271,18 @@
|
|
|
1138
1271
|
"argsType": "BrepHandle",
|
|
1139
1272
|
"resultType": "Vec3Components"
|
|
1140
1273
|
},
|
|
1274
|
+
{
|
|
1275
|
+
"path": "core.geom.query.brep.getVolume",
|
|
1276
|
+
"namespace": "core.geom.query.brep",
|
|
1277
|
+
"summary": "Get the enclosed **volume** of a closed solid, integrated from its exact surfaces. Curved faces are measured analytically, not from their tessellation — a real sphere of radius 5 reports 523.6, whatever its triangle count. That makes this the reliable way to confirm a solid is the shape you intended (a torus should measure 2·π²·R·r²).",
|
|
1278
|
+
"examplePrompts": [
|
|
1279
|
+
"What is the volume of this mass?",
|
|
1280
|
+
"How much concrete is in this shape?",
|
|
1281
|
+
"Check the volume of the dome I just made\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst volume = await snaptrude.core.geom.query.brep.getVolume(brep)\nconsole.log(\"volume:\", volume)\n}\n```"
|
|
1282
|
+
],
|
|
1283
|
+
"argsType": "BrepHandle",
|
|
1284
|
+
"resultType": "number"
|
|
1285
|
+
},
|
|
1141
1286
|
{
|
|
1142
1287
|
"path": "core.geom.query.brep.hasEdge",
|
|
1143
1288
|
"namespace": "core.geom.query.brep",
|
|
@@ -1742,7 +1887,7 @@
|
|
|
1742
1887
|
{
|
|
1743
1888
|
"path": "core.geom.query.edge.getCurve",
|
|
1744
1889
|
"namespace": "core.geom.query.edge",
|
|
1745
|
-
"summary": "Get the underlying curve geometry of an edge (a line or
|
|
1890
|
+
"summary": "Get the underlying curve geometry of an edge (a line, arc or spline).",
|
|
1746
1891
|
"examplePrompts": [],
|
|
1747
1892
|
"argsType": "EdgeHandle",
|
|
1748
1893
|
"resultType": "CurveHandle | null"
|
|
@@ -1779,6 +1924,28 @@
|
|
|
1779
1924
|
"argsType": "EdgeHandle",
|
|
1780
1925
|
"resultType": "VertexHandle[]"
|
|
1781
1926
|
},
|
|
1927
|
+
{
|
|
1928
|
+
"path": "core.geom.query.face.getArea",
|
|
1929
|
+
"namespace": "core.geom.query.face",
|
|
1930
|
+
"summary": "Exact surface area of one face of `brep`, in internal length units SQUARED — integrated off the face's own surface, not its facets, so a curved patch reads exactly rather than as its triangles. Needs the parent brep: a face handle cannot name its own solid.",
|
|
1931
|
+
"examplePrompts": [
|
|
1932
|
+
"How big is this roof patch?",
|
|
1933
|
+
"Which face of this mass has the largest area?\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst faces = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst areas = await Promise.all(\nfaces.map((f) => snaptrude.core.geom.query.face.getArea(f, brep)),\n)\n}\n```"
|
|
1934
|
+
],
|
|
1935
|
+
"argsType": "FaceHandle",
|
|
1936
|
+
"resultType": "number"
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
"path": "core.geom.query.face.getCentroid",
|
|
1940
|
+
"namespace": "core.geom.query.face",
|
|
1941
|
+
"summary": "Centre of area of one face of `brep`, as a point in that brep's frame (internal length units). On a solid whose every face reads `\"spline\"` this is the read that tells two patches apart — the top of a thickened patch from its bottom, one quarter of a closed surface from the next.",
|
|
1942
|
+
"examplePrompts": [
|
|
1943
|
+
"Where is the middle of this face?",
|
|
1944
|
+
"Pick the topmost face of this curved mass\n\n# Example\n```ts\nconst centre = await snaptrude.core.geom.query.face.getCentroid(face, brep)\n```"
|
|
1945
|
+
],
|
|
1946
|
+
"argsType": "FaceHandle",
|
|
1947
|
+
"resultType": "Vec3Components"
|
|
1948
|
+
},
|
|
1782
1949
|
{
|
|
1783
1950
|
"path": "core.geom.query.face.getHalfEdge",
|
|
1784
1951
|
"namespace": "core.geom.query.face",
|
|
@@ -1819,6 +1986,19 @@
|
|
|
1819
1986
|
"argsType": "FaceHandle",
|
|
1820
1987
|
"resultType": "number"
|
|
1821
1988
|
},
|
|
1989
|
+
{
|
|
1990
|
+
"path": "core.geom.query.face.getSurfaceKind",
|
|
1991
|
+
"namespace": "core.geom.query.face",
|
|
1992
|
+
"summary": "Read what KIND of surface a face lies on. This is the one read that tells a genuinely curved face from a faceted approximation of one: every face of a 200-triangle \"dome\" answers `\"plane\"`, while a real dome has faces answering `\"sphere\"`. Use it to confirm a curved solid actually came out curved.",
|
|
1993
|
+
"examplePrompts": [
|
|
1994
|
+
"Is this face flat or curved?",
|
|
1995
|
+
"Check that this dome is a real sphere, not a faceted approximation",
|
|
1996
|
+
"What kind of surface is this face?",
|
|
1997
|
+
"How many curved faces does this mass have?\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst faces = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst kinds = []\nfor (const face of faces) kinds.push(await snaptrude.core.geom.query.face.getSurfaceKind(face))\nconsole.log(\"spherical faces:\", kinds.filter((k) => k === \"sphere\").length)\n}\n```"
|
|
1998
|
+
],
|
|
1999
|
+
"argsType": "FaceHandle",
|
|
2000
|
+
"resultType": "\"plane\" | \"cylinder\" | \"cone\" | \"sphere\" | \"torus\" | \"spline\" | null"
|
|
2001
|
+
},
|
|
1822
2002
|
{
|
|
1823
2003
|
"path": "core.geom.query.face.hasHoles",
|
|
1824
2004
|
"namespace": "core.geom.query.face",
|
|
@@ -3403,7 +3583,8 @@
|
|
|
3403
3583
|
"examplePrompts": [
|
|
3404
3584
|
"Switch to present mode",
|
|
3405
3585
|
"Open BIM mode",
|
|
3406
|
-
"Go back to design mode
|
|
3586
|
+
"Go back to design mode",
|
|
3587
|
+
"Open program mode\n\n# Example\n```ts\nawait snaptrude.core.mode.set(\"present\")\n// ... presentation work ...\nawait snaptrude.core.mode.set(\"design\")\n```"
|
|
3407
3588
|
],
|
|
3408
3589
|
"argsType": "PluginAppMode",
|
|
3409
3590
|
"resultType": "PluginCoreModeSetResult"
|
|
@@ -4038,6 +4219,19 @@
|
|
|
4038
4219
|
"argsType": "ComponentHandle",
|
|
4039
4220
|
"resultType": "PluginCoreTagsGetTagsForComponentResult"
|
|
4040
4221
|
},
|
|
4222
|
+
{
|
|
4223
|
+
"path": "core.tags.listForComponents",
|
|
4224
|
+
"namespace": "core.tags",
|
|
4225
|
+
"summary": "List the tags carried by many components in one call.",
|
|
4226
|
+
"examplePrompts": [
|
|
4227
|
+
"Get the tags of every space with their colors",
|
|
4228
|
+
"List the tags on all rooms so I can color them by Occupancy",
|
|
4229
|
+
"Which tag does each selected space carry?\n\n# Example\n```ts\nconst { components } = await snaptrude.core.tags.listForComponents()\nfor (const c of components) {\nconst occupancy = c.tags.find((t) => t.categoryName === \"Occupancy\")\nif (occupancy) paint(c.componentId, occupancy.color)\n}\n```"
|
|
4230
|
+
],
|
|
4231
|
+
"argsType": "ComponentHandle[]",
|
|
4232
|
+
"resultType": "PluginCoreTagsListForComponentsResult",
|
|
4233
|
+
"performance": "One round-trip for any number of components — use this instead of a `listForComponent` loop."
|
|
4234
|
+
},
|
|
4041
4235
|
{
|
|
4042
4236
|
"path": "core.tags.unassign",
|
|
4043
4237
|
"namespace": "core.tags",
|
|
@@ -4274,6 +4468,17 @@
|
|
|
4274
4468
|
"argsType": "Vec3Handle",
|
|
4275
4469
|
"resultType": "ComponentHandle"
|
|
4276
4470
|
},
|
|
4471
|
+
{
|
|
4472
|
+
"path": "design.create.columnsFromGrids",
|
|
4473
|
+
"namespace": "design.create",
|
|
4474
|
+
"summary": "Create **columns at every grid-line intersection** of the given grid groups, sized `width` × `depth` and oriented to the grid axes, on the grids' storey. All columns commit as ONE undoable unit.",
|
|
4475
|
+
"examplePrompts": [
|
|
4476
|
+
"Generate columns on this grid",
|
|
4477
|
+
"Place 450mm square columns at every grid intersection\n\n# Example\n```ts\nconst grids = await snaptrude.design.query.listGrids()\nconst columns = await snaptrude.design.create.columnsFromGrids(grids, 0.45, 0.45)\n```"
|
|
4478
|
+
],
|
|
4479
|
+
"argsType": "ComponentHandle[]",
|
|
4480
|
+
"resultType": "ComponentHandle[]"
|
|
4481
|
+
},
|
|
4277
4482
|
{
|
|
4278
4483
|
"path": "design.create.copy",
|
|
4279
4484
|
"namespace": "design.create",
|
|
@@ -4299,10 +4504,27 @@
|
|
|
4299
4504
|
"Put a door from the catalog at this point on the wall",
|
|
4300
4505
|
"Insert the entrance door into this wall",
|
|
4301
4506
|
"Add a door to the wall and call it Entry-01",
|
|
4302
|
-
"Add a door that opens into the living room
|
|
4507
|
+
"Add a door that opens into the living room",
|
|
4508
|
+
"Put a door here hinged on the north jamb\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// …and hinged on the jamb nearest a point (here the +x end of the opening):\nconst hingedRight = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ hinge: await snaptrude.core.math.vec3.new(3.5, 0, 5) },\nawait snaptrude.core.math.vec3.new(3, 0, 9),\n)\n```"
|
|
4303
4509
|
],
|
|
4304
4510
|
"argsType": "string",
|
|
4305
|
-
"resultType": "ComponentHandle"
|
|
4511
|
+
"resultType": "ComponentHandle",
|
|
4512
|
+
"performance": "For MORE THAN ONE door, call `design.create.doors(items[])` — one host round-trip and ONE undo entry, with each host wall re-cut once per opening inside that single call. Looping this single-door creator is N round-trips."
|
|
4513
|
+
},
|
|
4514
|
+
{
|
|
4515
|
+
"path": "design.create.doors",
|
|
4516
|
+
"namespace": "design.create",
|
|
4517
|
+
"summary": "Place **many doors** into host walls in one undoable operation (bulk plural of {@linkcode door}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width` and `height` — the same fields as a `\"door\"` {@linkcode PluginDesignCreateOpeningOptions}. Validate-all-or-throw; one command.",
|
|
4518
|
+
"examplePrompts": [
|
|
4519
|
+
"Add doors to all of these walls at once",
|
|
4520
|
+
"Place a door in every room in one operation",
|
|
4521
|
+
"Bulk add the entrance doors from this schedule",
|
|
4522
|
+
"Put three doors on this wall in a single undo step",
|
|
4523
|
+
"Add all the doors for this floor plan together"
|
|
4524
|
+
],
|
|
4525
|
+
"argsType": "PluginCreateDoorItem[]",
|
|
4526
|
+
"resultType": "ComponentHandle[]",
|
|
4527
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.door` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [entry] = await snaptrude.design.doors.listCatalog() const [front, side] = await snaptrude.design.create.doors([ { catalogId: entry.id, hostWall: wall, position: await v.new(2, 0, 5), label: \"D-01\" }, { catalogId: entry.id, hostWall: wall, position: await v.new(6, 0, 5), width: 1.2 }, ]) // `wall` was re-cut twice and no longer resolves — ask the opening for its host: const currentWall = await snaptrude.design.query.getHost(front) ```"
|
|
4306
4528
|
},
|
|
4307
4529
|
{
|
|
4308
4530
|
"path": "design.create.floor",
|
|
@@ -4312,10 +4534,26 @@
|
|
|
4312
4534
|
"Create a floor from this room outline",
|
|
4313
4535
|
"Add a 100mm thick floor over the footprint",
|
|
4314
4536
|
"Lay flooring across the selected outline",
|
|
4315
|
-
"Put a floor at this position with 150mm thickness\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(5, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst
|
|
4537
|
+
"Put a floor at this position with 150mm thickness\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(5, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst floor = await snaptrude.design.create.floor(contour, 0.1)\n```"
|
|
4316
4538
|
],
|
|
4317
4539
|
"argsType": "ContourHandle",
|
|
4318
|
-
"resultType": "ComponentHandle
|
|
4540
|
+
"resultType": "ComponentHandle",
|
|
4541
|
+
"performance": "For MORE THAN ONE floor, call `design.create.floors(items[])` — one host round-trip and ONE undo entry for the whole batch. Looping this single-floor creator is N round-trips and N undo entries."
|
|
4542
|
+
},
|
|
4543
|
+
{
|
|
4544
|
+
"path": "design.create.floors",
|
|
4545
|
+
"namespace": "design.create",
|
|
4546
|
+
"summary": "Create **many floors** in one undoable operation (bulk plural of {@linkcode floor}). Each item extrudes its own footprint contour (outer profile + holes) upward by its own `thickness`, at its own optional position offset. Validate-all-or-throw; one command.",
|
|
4547
|
+
"examplePrompts": [
|
|
4548
|
+
"Create floors for all these room outlines at once",
|
|
4549
|
+
"Add a floor to every space in one operation",
|
|
4550
|
+
"Bulk create the floor plates for this building",
|
|
4551
|
+
"Lay 100mm floors across these five footprints in one undo step",
|
|
4552
|
+
"Create the ground and first floor slabs together"
|
|
4553
|
+
],
|
|
4554
|
+
"argsType": "PluginCreateFloorItem[]",
|
|
4555
|
+
"resultType": "ComponentHandle[]",
|
|
4556
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.floor` in a loop: build the full `items[]` array first (all contours and offsets up front), then make one call. # Example ```ts const rect = await snaptrude.core.geom.create.profileRect(5, 4) const contour = await snaptrude.core.geom.create.contourFromProfile(rect) const [ground, upper] = await snaptrude.design.create.floors([ { contour, thickness: 0.1 }, { contour, thickness: 0.1, position: await snaptrude.core.math.vec3.new(0, 3, 0) }, ]) ```"
|
|
4319
4557
|
},
|
|
4320
4558
|
{
|
|
4321
4559
|
"path": "design.create.furniture",
|
|
@@ -4330,8 +4568,60 @@
|
|
|
4330
4568
|
"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```"
|
|
4331
4569
|
],
|
|
4332
4570
|
"argsType": "string",
|
|
4571
|
+
"resultType": "ComponentHandle",
|
|
4572
|
+
"performance": "For MORE THAN ONE item, call `design.create.furnitureItems(items[])` — one host round-trip and ONE undo entry, and a catalog source shared by several items is fetched once. Looping this single-item creator is N round-trips."
|
|
4573
|
+
},
|
|
4574
|
+
{
|
|
4575
|
+
"path": "design.create.furnitureItems",
|
|
4576
|
+
"namespace": "design.create",
|
|
4577
|
+
"summary": "Place **many furniture items** in one undoable operation (bulk plural of {@linkcode furniture}). Each item names a catalog id and an absolute world position (`position.y` is the REST elevation — the same grounding contract as the singular creator), with optional label and rotation. A catalog source shared by several items is fetched and recorded once for the whole batch, so the host — not the caller — owns source persistence (there is no per-item `createNewSourceMesh`). Validate-all-or-throw; one command.",
|
|
4578
|
+
"examplePrompts": [
|
|
4579
|
+
"Place all the desks for this office at once",
|
|
4580
|
+
"Furnish every bedroom in one operation",
|
|
4581
|
+
"Bulk place these chairs around the table",
|
|
4582
|
+
"Add the whole furniture layout in a single undo step",
|
|
4583
|
+
"Drop twenty copies of this chair at these positions"
|
|
4584
|
+
],
|
|
4585
|
+
"argsType": "PluginCreateFurnitureItem[]",
|
|
4586
|
+
"resultType": "ComponentHandle[]",
|
|
4587
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.furniture` in a loop: build the full `items[]` array first (all positions and angles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [chair] = await snaptrude.design.furniture.listCatalog() const placed = await snaptrude.design.create.furnitureItems([ { catalogId: chair.id, position: await v.new(3, 0, 5), label: \"Chair-01\" }, { catalogId: chair.id, position: await v.new(4, 0, 5), angleInDegrees: 90 }, { catalogId: chair.id, position: await v.new(5, 0, 5), angleInDegrees: 180 }, ]) ```"
|
|
4588
|
+
},
|
|
4589
|
+
{
|
|
4590
|
+
"path": "design.create.grid",
|
|
4591
|
+
"namespace": "design.create",
|
|
4592
|
+
"summary": "Create a free rectangular **structural grid** — one grid group with two perpendicular line families (`linesX` lines spaced `spacingX` apart, and `linesY` lines spaced `spacingY` apart) on the active storey. One undoable creation.",
|
|
4593
|
+
"examplePrompts": [
|
|
4594
|
+
"Create a 5 by 8 structural grid with 6 metre spacing",
|
|
4595
|
+
"Add a column grid rotated 30 degrees",
|
|
4596
|
+
"Set up a structural grid at the site origin\n\n# Example\n```ts\nconst centre = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst grid = await snaptrude.design.create.grid(5, 8, 6, 6, { center: centre })\n```"
|
|
4597
|
+
],
|
|
4598
|
+
"argsType": "number",
|
|
4333
4599
|
"resultType": "ComponentHandle"
|
|
4334
4600
|
},
|
|
4601
|
+
{
|
|
4602
|
+
"path": "design.create.gridFromCurve",
|
|
4603
|
+
"namespace": "design.create",
|
|
4604
|
+
"summary": "Create a **structural grid from a single curve** — one grid group holding one wing with one line (the draw tool's output). The curve may be a line or an arc; circles are rejected with `VALIDATION`. Undoable.",
|
|
4605
|
+
"examplePrompts": [
|
|
4606
|
+
"Draw a grid line from A to B",
|
|
4607
|
+
"Add a curved grid line through these points",
|
|
4608
|
+
"Create grid line \"C\" along this wall\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\nconst from = await vec3.new(0, 0, 0)\nconst to = await vec3.new(30, 0, 0)\nconst curve = await snaptrude.core.geom.create.line(from, to)\nconst grid = await snaptrude.design.create.gridFromCurve(curve, { tag: \"A\" })\n```"
|
|
4609
|
+
],
|
|
4610
|
+
"argsType": "CurveHandle",
|
|
4611
|
+
"resultType": "ComponentHandle"
|
|
4612
|
+
},
|
|
4613
|
+
{
|
|
4614
|
+
"path": "design.create.gridsFromMasses",
|
|
4615
|
+
"namespace": "design.create",
|
|
4616
|
+
"summary": "Generate **structural grids fitted to mass footprints** — one grid group per footprint cluster, with counts and orientation derived from each footprint's geometry and the given spacings. All created groups commit as ONE undoable unit.",
|
|
4617
|
+
"examplePrompts": [
|
|
4618
|
+
"Generate grids for the selected masses",
|
|
4619
|
+
"Auto-generate a 6m structural grid on this building",
|
|
4620
|
+
"Fit column grids to every mass on this storey\n\n# Example\n```ts\nconst masses = await snaptrude.design.query.listMasses({ storeys: [1] })\nconst grids = await snaptrude.design.create.gridsFromMasses(masses, 6, 6)\n```"
|
|
4621
|
+
],
|
|
4622
|
+
"argsType": "ComponentHandle[]",
|
|
4623
|
+
"resultType": "ComponentHandle[]"
|
|
4624
|
+
},
|
|
4335
4625
|
{
|
|
4336
4626
|
"path": "design.create.mass",
|
|
4337
4627
|
"namespace": "design.create",
|
|
@@ -4367,7 +4657,7 @@
|
|
|
4367
4657
|
],
|
|
4368
4658
|
"argsType": "PluginDesignCreateOpeningOptions",
|
|
4369
4659
|
"resultType": "ComponentHandle",
|
|
4370
|
-
"performance": "Single-opening creator — use it for one hosted opening.
|
|
4660
|
+
"performance": "Single-opening creator — use it for one hosted opening. For MORE THAN ONE, call `design.create.doors(items[])` / `design.create.windows(items[])`: the same per-item fields, one host round-trip, ONE undo entry. # Example ```ts const opening = await snaptrude.design.create.opening({ kind: \"window\", catalogId: windowType.id, hostWall: wall, position: await snaptrude.core.math.vec3.new(3, 0, 5), width: 1.2, height: 1.5, sillHeight: 0.9, }) ```"
|
|
4371
4661
|
},
|
|
4372
4662
|
{
|
|
4373
4663
|
"path": "design.create.referenceLines",
|
|
@@ -4469,6 +4759,21 @@
|
|
|
4469
4759
|
"argsType": "PluginStaircasePreset",
|
|
4470
4760
|
"resultType": "ComponentHandle"
|
|
4471
4761
|
},
|
|
4762
|
+
{
|
|
4763
|
+
"path": "design.create.wallRuns",
|
|
4764
|
+
"namespace": "design.create",
|
|
4765
|
+
"summary": "Create **many wall runs** in one undoable operation (bulk plural of {@linkcode walls}). Each item is one full run — a wall per curve in that item's profile chain, mitred at shared endpoints. Junctions resolve within a run, not between runs. Each item carries its own dimensions, `wallType` and `storey`, so a single call can build a whole floor plate or several storeys at once. Validate-all-or-throw; one command.",
|
|
4766
|
+
"examplePrompts": [
|
|
4767
|
+
"Draw all the walls of this floor plan at once",
|
|
4768
|
+
"Build every room's perimeter in one operation",
|
|
4769
|
+
"Bulk create wall runs from these centerlines",
|
|
4770
|
+
"Create the walls for both storeys in a single undo step",
|
|
4771
|
+
"Turn these polylines into 200mm brick walls together"
|
|
4772
|
+
],
|
|
4773
|
+
"argsType": "PluginCreateWallRunItem[]",
|
|
4774
|
+
"resultType": "ComponentHandle[][]",
|
|
4775
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.walls` in a loop: build the full `items[]` array first (all profiles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const ground = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), await v.new(8, 0, 6), ]) const upper = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), ]) const [groundWalls, upperWalls] = await snaptrude.design.create.wallRuns([ { profile: ground, height: 3, thickness: 0.2 }, { profile: upper, height: 3, storey: 2 }, ]) console.log(groundWalls.length, \"walls on the ground floor\") ```"
|
|
4776
|
+
},
|
|
4472
4777
|
{
|
|
4473
4778
|
"path": "design.create.walls",
|
|
4474
4779
|
"namespace": "design.create",
|
|
@@ -4483,7 +4788,8 @@
|
|
|
4483
4788
|
"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```"
|
|
4484
4789
|
],
|
|
4485
4790
|
"argsType": "ProfileHandle",
|
|
4486
|
-
"resultType": "ComponentHandle[]"
|
|
4791
|
+
"resultType": "ComponentHandle[]",
|
|
4792
|
+
"performance": "For MORE THAN ONE run, call `design.create.wallRuns(items[])` — one host round-trip and ONE undo entry for every run in the batch. Looping this single-run creator is N round-trips and N undo entries."
|
|
4487
4793
|
},
|
|
4488
4794
|
{
|
|
4489
4795
|
"path": "design.create.window",
|
|
@@ -4498,7 +4804,23 @@
|
|
|
4498
4804
|
"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```"
|
|
4499
4805
|
],
|
|
4500
4806
|
"argsType": "string",
|
|
4501
|
-
"resultType": "ComponentHandle"
|
|
4807
|
+
"resultType": "ComponentHandle",
|
|
4808
|
+
"performance": "For MORE THAN ONE window, call `design.create.windows(items[])` — one host round-trip and ONE undo entry, with each host wall re-cut once per opening inside that single call. Looping this single-window creator is N round-trips."
|
|
4809
|
+
},
|
|
4810
|
+
{
|
|
4811
|
+
"path": "design.create.windows",
|
|
4812
|
+
"namespace": "design.create",
|
|
4813
|
+
"summary": "Place **many windows** into host walls in one undoable operation (bulk plural of {@linkcode window}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width`, `height` and `sillHeight` — the same fields as a `\"window\"` {@linkcode PluginDesignCreateOpeningOptions}. `sillHeight` is measured from the host wall base to the BOTTOM of the window. Validate-all-or-throw; one command.",
|
|
4814
|
+
"examplePrompts": [
|
|
4815
|
+
"Add windows along this whole facade at once",
|
|
4816
|
+
"Place a window in every bedroom in one operation",
|
|
4817
|
+
"Bulk add the windows from this schedule",
|
|
4818
|
+
"Put four windows on this wall in a single undo step",
|
|
4819
|
+
"Add all the windows with a 0.9m sill height together"
|
|
4820
|
+
],
|
|
4821
|
+
"argsType": "PluginCreateWindowItem[]",
|
|
4822
|
+
"resultType": "ComponentHandle[]",
|
|
4823
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.window` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [casement] = await snaptrude.design.windows.listCatalog() const placed = await snaptrude.design.create.windows([ { catalogId: casement.id, hostWall: wall, position: await v.new(2, 0, 5), sillHeight: 0.9 }, { catalogId: casement.id, hostWall: wall, position: await v.new(5, 0, 5), sillHeight: 0.9 }, ]) const currentWall = await snaptrude.design.query.getHost(placed[0]) ```"
|
|
4502
4824
|
},
|
|
4503
4825
|
{
|
|
4504
4826
|
"path": "design.delete.entities",
|
|
@@ -4512,9 +4834,85 @@
|
|
|
4512
4834
|
"Remove the door and window I just created"
|
|
4513
4835
|
],
|
|
4514
4836
|
"argsType": "ComponentHandle[]",
|
|
4515
|
-
"resultType": "
|
|
4837
|
+
"resultType": "PluginDesignChangeResult",
|
|
4516
4838
|
"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) } ```"
|
|
4517
4839
|
},
|
|
4840
|
+
{
|
|
4841
|
+
"path": "design.dimensions.create",
|
|
4842
|
+
"namespace": "design.dimensions",
|
|
4843
|
+
"summary": "Draw one dimension line between two world points, anchored to a component.",
|
|
4844
|
+
"examplePrompts": [
|
|
4845
|
+
"Dimension every wall on level 2",
|
|
4846
|
+
"Add a dimension line along this wall",
|
|
4847
|
+
"Measure the width of this room and label it on the plan\n\n# Example\n```ts\nconst { design, core } = snaptrude\nconst v = core.math.vec3\nconst curve = core.geom.query.curve\nfor (const wall of await design.query.listWalls({ storeys: [2] })) {\nconst cl = await design.query.geometry.getCenterline(wall)\nif (!cl) continue\nconst a = await curve.getStartPoint(cl)\nconst b = await curve.getEndPoint(cl)\nawait design.dimensions.create(\nawait v.new(a.x, a.y, a.z),\nawait v.new(b.x, b.y, b.z),\nwall,\n)\n}\n```"
|
|
4848
|
+
],
|
|
4849
|
+
"argsType": "Vec3Handle",
|
|
4850
|
+
"resultType": "DimensionHandle"
|
|
4851
|
+
},
|
|
4852
|
+
{
|
|
4853
|
+
"path": "design.dimensions.delete",
|
|
4854
|
+
"namespace": "design.dimensions",
|
|
4855
|
+
"summary": "Delete dimension lines — the same hard removal as selecting them and pressing Delete. Undoable as a **single** entry for the whole batch.",
|
|
4856
|
+
"examplePrompts": [
|
|
4857
|
+
"Remove all dimension lines",
|
|
4858
|
+
"Delete the dimensions on this wall",
|
|
4859
|
+
"Clear the measurements I added to level 2"
|
|
4860
|
+
],
|
|
4861
|
+
"argsType": "DimensionHandle[]",
|
|
4862
|
+
"resultType": "PluginDimensionsChangeResult",
|
|
4863
|
+
"performance": "Array API — pass the whole set in one call (one host round-trip, one undo entry). Never loop this per dimension. # Example ```ts const dims = snaptrude.design.dimensions const onWall = await dims.list({ anchors: [wall] }) if (onWall.length > 0) await dims.delete(onWall.map((d) => d.id)) ```"
|
|
4864
|
+
},
|
|
4865
|
+
{
|
|
4866
|
+
"path": "design.dimensions.get",
|
|
4867
|
+
"namespace": "design.dimensions",
|
|
4868
|
+
"summary": "Read one dimension line by handle.",
|
|
4869
|
+
"examplePrompts": [
|
|
4870
|
+
"Read the dimension line I just created",
|
|
4871
|
+
"How long is this dimension and what does its label say?",
|
|
4872
|
+
"Check whether that dimension line still exists\n\n# Example\n```ts\nconst dim = await snaptrude.design.dimensions.get(handle)\nif (dim) console.log(dim.label, dim.length, dim.storey)\n```"
|
|
4873
|
+
],
|
|
4874
|
+
"argsType": "DimensionHandle",
|
|
4875
|
+
"resultType": "PluginDimensionLine | null"
|
|
4876
|
+
},
|
|
4877
|
+
{
|
|
4878
|
+
"path": "design.dimensions.hide",
|
|
4879
|
+
"namespace": "design.dimensions",
|
|
4880
|
+
"summary": "Hide dimension lines from the viewport — the same as the right-click \"Hide\" action (it sets the user Hide flag, `isHidden`). Undoable. Already-hidden dimensions are skipped and are not reported in `affected`.",
|
|
4881
|
+
"examplePrompts": [
|
|
4882
|
+
"Hide the dimensions on this storey",
|
|
4883
|
+
"Hide every dimension line while I present",
|
|
4884
|
+
"Temporarily hide the measurements on level 3"
|
|
4885
|
+
],
|
|
4886
|
+
"argsType": "DimensionHandle[]",
|
|
4887
|
+
"resultType": "PluginDimensionsChangeResult",
|
|
4888
|
+
"performance": "Array API — one host round-trip and one undo entry for the whole set. # Example ```ts const dims = snaptrude.design.dimensions const onLevel3 = await dims.list({ storeys: [3] }) const { affected } = await dims.hide(onLevel3.map((d) => d.id)) ```"
|
|
4889
|
+
},
|
|
4890
|
+
{
|
|
4891
|
+
"path": "design.dimensions.list",
|
|
4892
|
+
"namespace": "design.dimensions",
|
|
4893
|
+
"summary": "List the dimension lines in the project as full records.",
|
|
4894
|
+
"examplePrompts": [
|
|
4895
|
+
"List all the dimension lines in this model",
|
|
4896
|
+
"Which dimensions are on level 3?",
|
|
4897
|
+
"Flag any dimension line shorter than 600 mm"
|
|
4898
|
+
],
|
|
4899
|
+
"argsType": "{\n storeys?: number[]\n anchors?: ComponentHandle[]\n isHidden?: boolean\n }",
|
|
4900
|
+
"resultType": "PluginDimensionLine[]",
|
|
4901
|
+
"performance": "Array read — one host round-trip returns every record. Filter in one call rather than calling `get` per dimension. # Example ```ts const units = snaptrude.core.units const min = await units.convert(600, \"millimeters\", await units.getBabylonType()) const short = (await snaptrude.design.dimensions.list()).filter( (d) => d.length < min, ) console.log(short.map((d) => `${d.label} on storey ${d.storey}`)) ```"
|
|
4902
|
+
},
|
|
4903
|
+
{
|
|
4904
|
+
"path": "design.dimensions.show",
|
|
4905
|
+
"namespace": "design.dimensions",
|
|
4906
|
+
"summary": "Reveal hidden dimension lines — clear the user Hide flag, the inverse of {@linkcode PluginDesignDimensionsApi.hide}. Undoable. Already-visible dimensions are skipped and are not reported in `affected`.",
|
|
4907
|
+
"examplePrompts": [
|
|
4908
|
+
"Show the dimension lines again",
|
|
4909
|
+
"Unhide all the hidden dimensions",
|
|
4910
|
+
"Bring back the measurements I hid on this storey"
|
|
4911
|
+
],
|
|
4912
|
+
"argsType": "DimensionHandle[]",
|
|
4913
|
+
"resultType": "PluginDimensionsChangeResult",
|
|
4914
|
+
"performance": "Array API — one host round-trip and one undo entry for the whole set. # Example ```ts const dims = snaptrude.design.dimensions const hidden = await dims.list({ isHidden: true }) await dims.show(hidden.map((d) => d.id)) ```"
|
|
4915
|
+
},
|
|
4518
4916
|
{
|
|
4519
4917
|
"path": "design.doors.exists",
|
|
4520
4918
|
"namespace": "design.doors",
|
|
@@ -4596,7 +4994,7 @@
|
|
|
4596
4994
|
{
|
|
4597
4995
|
"path": "design.doors.getSwingDirection",
|
|
4598
4996
|
"namespace": "design.doors",
|
|
4599
|
-
"summary": "Get a door's swing (hinge) handedness
|
|
4997
|
+
"summary": "Get a door's swing (hinge) handedness. Stand on the side the door swings open to, facing the door: `'left'` when the hinged jamb is on your left, `'right'` when it is on your right. Derived from the placed mesh's orientation (the same reflection `mirror` and the `hinge` placement option apply), not a persisted field.",
|
|
4600
4998
|
"examplePrompts": [
|
|
4601
4999
|
"Which way does this door swing?",
|
|
4602
5000
|
"Is the selected door left-handed or right-handed?",
|
|
@@ -4661,13 +5059,13 @@
|
|
|
4661
5059
|
{
|
|
4662
5060
|
"path": "design.doors.mirror",
|
|
4663
5061
|
"namespace": "design.doors",
|
|
4664
|
-
"summary": "Mirror a door
|
|
5062
|
+
"summary": "Mirror a door about its own axes. `'x'` (default) flips the swing side — the door opens to the other side of the wall; `'z'` swaps the hinged jamb (left-hand ↔ right-hand, same swing side); `'y'` turns it upside down. Undoable as a single command.",
|
|
4665
5063
|
"examplePrompts": [
|
|
4666
5064
|
"Flip this door's swing",
|
|
4667
5065
|
"Mirror the selected door",
|
|
4668
5066
|
"Make this door open the other way",
|
|
4669
5067
|
"Reverse the hinge side of the entrance door",
|
|
4670
|
-
"Change the door to swing from the other side\n\n# Example\n```ts\n// Flip the selected door's swing — axis defaults to \"x\"
|
|
5068
|
+
"Change the door to swing from the other side\n\n# Example\n```ts\n// Flip the selected door's swing side — axis defaults to \"x\"\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst { affected } = await snaptrude.design.doors.mirror(door)\n// …or swap the hinged jamb instead (keeps the swing side)\nawait snaptrude.design.doors.mirror(door, \"z\")\n```"
|
|
4671
5069
|
],
|
|
4672
5070
|
"argsType": "ComponentHandle",
|
|
4673
5071
|
"resultType": "PluginDesignChangeResult"
|
|
@@ -4739,6 +5137,117 @@
|
|
|
4739
5137
|
"argsType": "PluginDesignListErasableEdgesArgs",
|
|
4740
5138
|
"resultType": "ErasableEdgeRef[]"
|
|
4741
5139
|
},
|
|
5140
|
+
{
|
|
5141
|
+
"path": "design.family.create",
|
|
5142
|
+
"namespace": "design.family",
|
|
5143
|
+
"summary": "Commit the prepared bundle to the project's parametric-definition library, so it survives the session and appears in the Families panel.",
|
|
5144
|
+
"examplePrompts": [
|
|
5145
|
+
"Save this as a family called Vertical Louvre",
|
|
5146
|
+
"Add it to my library\n\n# Example\n```ts\nconst { definitionId } = await snaptrude.design.family.create({ name: \"Louvre Screen\" })\n```"
|
|
5147
|
+
],
|
|
5148
|
+
"argsType": "PluginDesignFamilyCreateArgs",
|
|
5149
|
+
"resultType": "PluginFamilyCreateResult"
|
|
5150
|
+
},
|
|
5151
|
+
{
|
|
5152
|
+
"path": "design.family.delete",
|
|
5153
|
+
"namespace": "design.family",
|
|
5154
|
+
"summary": "Remove a family from the library: its catalog row is archived, so it leaves the Families panel. Placed instances are untouched — in this project and every other — because archived pins keep resolving. Pass `instances: true` to ALSO delete this project's instances in one undoable command; do that only when the user asks for the instances to go.",
|
|
5155
|
+
"examplePrompts": [
|
|
5156
|
+
"Delete the Louvre Screen family from my library",
|
|
5157
|
+
"Get rid of that bollard and every copy of it in here\n\n# Example\n```ts\nawait snaptrude.design.family.delete({ id: \"revit:steel-bollard~bef047\" })\nawait snaptrude.design.family.delete({ id: \"revit:steel-bollard~bef047\", instances: true })\n```"
|
|
5158
|
+
],
|
|
5159
|
+
"argsType": "PluginDesignFamilyDeleteArgs",
|
|
5160
|
+
"resultType": "PluginFamilyDeleteResult"
|
|
5161
|
+
},
|
|
5162
|
+
{
|
|
5163
|
+
"path": "design.family.flex",
|
|
5164
|
+
"namespace": "design.family",
|
|
5165
|
+
"summary": "Re-run the prepared family's recipe at new parameter values.",
|
|
5166
|
+
"examplePrompts": [
|
|
5167
|
+
"Change it to 6 bays",
|
|
5168
|
+
"Show me what happens with 20 blades\n\n# Example\n```ts\nconst { changed } = await snaptrude.design.family.flex({ values: { bays: 6 } })\nconsole.log(`removed ${changed.removed}, rebuilt ${changed.rebuilt}`)\n```"
|
|
5169
|
+
],
|
|
5170
|
+
"argsType": "PluginDesignFamilyFlexArgs",
|
|
5171
|
+
"resultType": "PluginFamilyFlexResult"
|
|
5172
|
+
},
|
|
5173
|
+
{
|
|
5174
|
+
"path": "design.family.get",
|
|
5175
|
+
"namespace": "design.family",
|
|
5176
|
+
"summary": "A family's spec bundle: the prepared draft's, or — to CHANGE a saved family — that family's recipe, opened as the new draft.",
|
|
5177
|
+
"examplePrompts": [
|
|
5178
|
+
"Make the chairs I placed 50 mm wider",
|
|
5179
|
+
"Change the Louvre Screen family so its blades are deeper\n\n# Example\n```ts\nconst draft = await snaptrude.design.family.get()\nconst family = await snaptrude.design.family.get({ component })\n// family.editing → { familyId, version, name, library }\n```"
|
|
5180
|
+
],
|
|
5181
|
+
"argsType": "PluginDesignFamilyGetArgs",
|
|
5182
|
+
"resultType": "PluginFamilyGetResult | null"
|
|
5183
|
+
},
|
|
5184
|
+
{
|
|
5185
|
+
"path": "design.family.getParameters",
|
|
5186
|
+
"namespace": "design.family",
|
|
5187
|
+
"summary": "Read a placed component's current parameter values and its sheet.",
|
|
5188
|
+
"examplePrompts": [
|
|
5189
|
+
"What size is that table?",
|
|
5190
|
+
"Show me the parameters on this partition\n\n# Example\n```ts\nconst { values, parameters } = await snaptrude.design.family.getParameters({ component })\n```"
|
|
5191
|
+
],
|
|
5192
|
+
"argsType": "PluginDesignFamilyGetParametersArgs",
|
|
5193
|
+
"resultType": "PluginFamilyInstanceParameters | null"
|
|
5194
|
+
},
|
|
5195
|
+
{
|
|
5196
|
+
"path": "design.family.getReference",
|
|
5197
|
+
"namespace": "design.family",
|
|
5198
|
+
"summary": "Read the family-spec DSL reference: grammar, the op table, the expression whitelist, the coordinate convention, the repair contract, and a worked example taken from a registered family.",
|
|
5199
|
+
"examplePrompts": [
|
|
5200
|
+
"How do I write a parametric family spec?",
|
|
5201
|
+
"Show me the family DSL\n\n# Example\n```ts\nconst { reference } = await snaptrude.design.family.getReference()\n```"
|
|
5202
|
+
],
|
|
5203
|
+
"argsType": null,
|
|
5204
|
+
"resultType": "PluginFamilyReference"
|
|
5205
|
+
},
|
|
5206
|
+
{
|
|
5207
|
+
"path": "design.family.list",
|
|
5208
|
+
"namespace": "design.family",
|
|
5209
|
+
"summary": "Every parametric family registered in this session — native and imported.",
|
|
5210
|
+
"examplePrompts": [
|
|
5211
|
+
"What families are available?\n\n# Example\n```ts\nconst families = await snaptrude.design.family.list()\n```"
|
|
5212
|
+
],
|
|
5213
|
+
"argsType": null,
|
|
5214
|
+
"resultType": "PluginFamilySummary[]"
|
|
5215
|
+
},
|
|
5216
|
+
{
|
|
5217
|
+
"path": "design.family.place",
|
|
5218
|
+
"namespace": "design.family",
|
|
5219
|
+
"summary": "Put a family into the model — either the prepared draft or any family from {@linkcode PluginDesignFamilyApi.list}.",
|
|
5220
|
+
"examplePrompts": [
|
|
5221
|
+
"Place it in the model",
|
|
5222
|
+
"Put a louvre screen at the origin",
|
|
5223
|
+
"Copy that table two metres to the right\n\n# Example\n```ts\n// positioned — geometry exists when this resolves\nconst { component } = await snaptrude.design.family.place({\nid: \"revit:gypsum-stud-partition~90ad72\",\nposition: { x: 0, y: 0, z: 0 },\nrotation: 90,\n})\nawait snaptrude.design.transform.move([component], { x: 2, y: 0, z: 0 })\n\n// interactive — the user clicks\nawait snaptrude.design.family.place()\n\n// hosted — a door in a wall, near a point along it\nawait snaptrude.design.family.place({ id: doorId, host: wall, position: { x: 3, y: 0, z: 0 } })\n```"
|
|
5224
|
+
],
|
|
5225
|
+
"argsType": "PluginDesignFamilyPlaceArgs",
|
|
5226
|
+
"resultType": "PluginFamilyPlaceResult"
|
|
5227
|
+
},
|
|
5228
|
+
{
|
|
5229
|
+
"path": "design.family.prepare",
|
|
5230
|
+
"namespace": "design.family",
|
|
5231
|
+
"summary": "Validate, compile and preview a family spec. Nothing is committed to the model or the library — call {@linkcode PluginDesignFamilyApi.place} or {@linkcode PluginDesignFamilyApi.create} for that.",
|
|
5232
|
+
"examplePrompts": [
|
|
5233
|
+
"Make a louvre screen with adjustable blade count and tilt",
|
|
5234
|
+
"Design a curtain wall panel family with 8 bays",
|
|
5235
|
+
"Create a railing family I can adjust\n\n# Example\n```ts\nconst r = await snaptrude.design.family.prepare({ bundle })\nif (!r.ok) console.error(r.errors[0].path, r.errors[0].message)\n```"
|
|
5236
|
+
],
|
|
5237
|
+
"argsType": "PluginDesignFamilyPrepareArgs",
|
|
5238
|
+
"resultType": "PluginFamilyPrepareResult"
|
|
5239
|
+
},
|
|
5240
|
+
{
|
|
5241
|
+
"path": "design.family.setParameters",
|
|
5242
|
+
"namespace": "design.family",
|
|
5243
|
+
"summary": "Change a placed component's parameters and rebuild its geometry in place.",
|
|
5244
|
+
"examplePrompts": [
|
|
5245
|
+
"Make that table seat 8",
|
|
5246
|
+
"Change the stud spacing to 400\n\n# Example\n```ts\nawait snaptrude.design.family.setParameters({ component, values: { seats: 8 } })\nawait snaptrude.design.family.setParameters({ component, children: { chair: { width: \"380mm\" } } })\nawait snaptrude.design.family.setParameters({\ncomponent: railing,\nlinks: { steps: { from: stair, expr: \"steps\" }, side: { from: stair, expr: \"width - 40mm\" } },\n})\nawait snaptrude.design.family.setParameters({\ncomponent: post,\nrelations: { add: [{ kind: \"attach\", side: \"top\", to: slab, bind: { height: \"reach\" } }] },\n})\n```"
|
|
5247
|
+
],
|
|
5248
|
+
"argsType": "PluginDesignFamilySetParametersArgs",
|
|
5249
|
+
"resultType": "PluginFamilyInstanceParameters"
|
|
5250
|
+
},
|
|
4742
5251
|
{
|
|
4743
5252
|
"path": "design.furniture.exists",
|
|
4744
5253
|
"namespace": "design.furniture",
|
|
@@ -4830,6 +5339,51 @@
|
|
|
4830
5339
|
"argsType": "ComponentHandle",
|
|
4831
5340
|
"resultType": "PluginDesignChangeResult"
|
|
4832
5341
|
},
|
|
5342
|
+
{
|
|
5343
|
+
"path": "design.grids.addLine",
|
|
5344
|
+
"namespace": "design.grids",
|
|
5345
|
+
"summary": "Insert a parallel grid line into a wing at an explicit position along the wing's spacing axis (Snaptrude units, wing-local — line 0's position can be read from its curve). Sibling lines do not shift; the wing's tag sequence is renumbered. Undoable.",
|
|
5346
|
+
"examplePrompts": [
|
|
5347
|
+
"Add a grid line between lines 2 and 3",
|
|
5348
|
+
"Insert an extra grid line 4 metres from line A\n\n# Example\n```ts\nawait snaptrude.design.grids.addLine(grid, 0, 12.5)\n```"
|
|
5349
|
+
],
|
|
5350
|
+
"argsType": "ComponentHandle",
|
|
5351
|
+
"resultType": "boolean"
|
|
5352
|
+
},
|
|
5353
|
+
{
|
|
5354
|
+
"path": "design.grids.removeLines",
|
|
5355
|
+
"namespace": "design.grids",
|
|
5356
|
+
"summary": "Remove grid lines by positional address, as ONE undoable step. With `tagPolicy: \"rewrite\"` (default) each affected wing renumbers its tag sequence; `\"preserve\"` keeps surviving tags unchanged. A wing emptied of lines is dropped from the group.",
|
|
5357
|
+
"examplePrompts": [
|
|
5358
|
+
"Delete grid line B",
|
|
5359
|
+
"Remove the last two lines of this grid without renumbering\n\n# Example\n```ts\nawait snaptrude.design.grids.removeLines(grid, [{ wing: 0, line: 2 }], \"preserve\")\n```"
|
|
5360
|
+
],
|
|
5361
|
+
"argsType": "ComponentHandle",
|
|
5362
|
+
"resultType": "boolean"
|
|
5363
|
+
},
|
|
5364
|
+
{
|
|
5365
|
+
"path": "design.grids.updateLines",
|
|
5366
|
+
"namespace": "design.grids",
|
|
5367
|
+
"summary": "Update one or more **lines** of a grid with sparse per-line entries — `tag`, `distanceToPrevious`/`distanceToNext` (typed distance to the neighbour on that side; mutually exclusive), `props` (per-line style overrides), and `visible: false` (hide). Every change routes through the exact setters the native panel uses — each changed field commits its own undoable command, identical to editing that field in the panel.",
|
|
5368
|
+
"examplePrompts": [
|
|
5369
|
+
"Rename grid line 2 to \"B\"",
|
|
5370
|
+
"Move this grid line 4 metres from its neighbour",
|
|
5371
|
+
"Hide grid line 3 on this grid\n\n# Example\n```ts\nawait snaptrude.design.grids.updateLines(grid, [\n{ wing: 0, line: 1, tag: \"B\", distanceToPrevious: 4 },\n])\n```"
|
|
5372
|
+
],
|
|
5373
|
+
"argsType": "ComponentHandle",
|
|
5374
|
+
"resultType": "boolean"
|
|
5375
|
+
},
|
|
5376
|
+
{
|
|
5377
|
+
"path": "design.grids.updateWings",
|
|
5378
|
+
"namespace": "design.grids",
|
|
5379
|
+
"summary": "Update one or more **wings** of a grid with sparse per-wing entries — `spacing` (uniform re-space), `count` (grow/truncate + tag renumber), `spanMin`/`spanMax` (family length handles). Every change routes through the exact setters the native panel uses — each changed field commits its own undoable command, identical to editing that field in the panel.",
|
|
5380
|
+
"examplePrompts": [
|
|
5381
|
+
"Change this grid's spacing to 8 metres",
|
|
5382
|
+
"Make this grid 10 by 12 lines\n\n# Example\n```ts\nawait snaptrude.design.grids.updateWings(grid, [{ wing: 0, spacing: 8, count: 10 }])\n```"
|
|
5383
|
+
],
|
|
5384
|
+
"argsType": "ComponentHandle",
|
|
5385
|
+
"resultType": "boolean"
|
|
5386
|
+
},
|
|
4833
5387
|
{
|
|
4834
5388
|
"path": "design.isAreaLocked",
|
|
4835
5389
|
"namespace": "design",
|
|
@@ -5133,6 +5687,7 @@
|
|
|
5133
5687
|
"summary": "Get the boundary representation (B-rep) of a scene component — the solid geometry (faces, edges, vertices) behind a wall, slab, room or any other scene entity, as a reusable {@linkcode BrepHandle} for the `core.geom.query.brep.*` reads.",
|
|
5134
5688
|
"examplePrompts": [
|
|
5135
5689
|
"Get the 3D solid geometry of the selected wall",
|
|
5690
|
+
"Round the top rim of this column and put it back where it is",
|
|
5136
5691
|
"How many faces does this mass have?",
|
|
5137
5692
|
"Inspect the mesh of this slab so I can look at its faces and edges",
|
|
5138
5693
|
"Read the vertices of the selected column's geometry"
|
|
@@ -5244,6 +5799,19 @@
|
|
|
5244
5799
|
"argsType": "ComponentHandle",
|
|
5245
5800
|
"resultType": "string"
|
|
5246
5801
|
},
|
|
5802
|
+
{
|
|
5803
|
+
"path": "design.query.getParameters",
|
|
5804
|
+
"namespace": "design.query",
|
|
5805
|
+
"summary": "Read a mass's creation-parameter record — the recipe it was built from (`kind` plus the values that constructor was called with). Present on masses committed from a `core.geom.create` brep constructor that carries a recipe: {@linkcode MassParametersRecord} covers the four primitives (sphere, cylinder, cone, torus), extrusions, revolutions, lofts and sweeps.",
|
|
5806
|
+
"examplePrompts": [
|
|
5807
|
+
"What radius is this sphere?",
|
|
5808
|
+
"Is this mass parametric?",
|
|
5809
|
+
"Read back the dome's creation parameters",
|
|
5810
|
+
"How tall was this cylinder made?\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses({ isSelected: true })\nconst params = await snaptrude.design.query.getParameters(mass)\nif (params?.kind === \"sphere\") console.log(\"radius:\", params.values.radius)\n```"
|
|
5811
|
+
],
|
|
5812
|
+
"argsType": "ComponentHandle",
|
|
5813
|
+
"resultType": "MassParametersRecord | null"
|
|
5814
|
+
},
|
|
5247
5815
|
{
|
|
5248
5816
|
"path": "design.query.getProperties",
|
|
5249
5817
|
"namespace": "design.query",
|
|
@@ -5272,6 +5840,19 @@
|
|
|
5272
5840
|
"argsType": "ComponentHandle",
|
|
5273
5841
|
"resultType": "PluginStaircaseParams | null"
|
|
5274
5842
|
},
|
|
5843
|
+
{
|
|
5844
|
+
"path": "design.query.grids.get",
|
|
5845
|
+
"namespace": "design.query.grids",
|
|
5846
|
+
"summary": "Get properties of a grid by its ID.",
|
|
5847
|
+
"examplePrompts": [
|
|
5848
|
+
"What is the spacing of this grid?",
|
|
5849
|
+
"Read the grid line tags on this structural grid",
|
|
5850
|
+
"Get the geometry of every line in this grid",
|
|
5851
|
+
"Which storeys is this grid hidden on?\n\n# Example\n```ts\nconst [grid] = await snaptrude.design.query.listGrids()\nconst { wings } = await snaptrude.design.query.grids.get(grid, [\"wings\"])\n// wings[0].lines[0].curve is an opaque CurveHandle in world space;\n// read its coordinates via `snaptrude.core.geom.curve`.\n```"
|
|
5852
|
+
],
|
|
5853
|
+
"argsType": "string",
|
|
5854
|
+
"resultType": "PluginGridGetResult"
|
|
5855
|
+
},
|
|
5275
5856
|
{
|
|
5276
5857
|
"path": "design.query.listBeams",
|
|
5277
5858
|
"namespace": "design.query",
|
|
@@ -5390,6 +5971,19 @@
|
|
|
5390
5971
|
"argsType": "PluginEntityFilter",
|
|
5391
5972
|
"resultType": "ComponentHandle[]"
|
|
5392
5973
|
},
|
|
5974
|
+
{
|
|
5975
|
+
"path": "design.query.listGrids",
|
|
5976
|
+
"namespace": "design.query",
|
|
5977
|
+
"summary": "List all the structural grids (grid groups) in the project, optionally filtered by storey, building, selection state, or region.",
|
|
5978
|
+
"examplePrompts": [
|
|
5979
|
+
"List all the structural grids in the model",
|
|
5980
|
+
"How many grids are on the ground floor?",
|
|
5981
|
+
"Show the grids on this storey",
|
|
5982
|
+
"Which grids are currently selected?\n\n# Example\n```ts\nconst groundFloorGrids = await snaptrude.design.query.listGrids({ storeys: [1] })\n```"
|
|
5983
|
+
],
|
|
5984
|
+
"argsType": "PluginEntityFilter",
|
|
5985
|
+
"resultType": "ComponentHandle[]"
|
|
5986
|
+
},
|
|
5393
5987
|
{
|
|
5394
5988
|
"path": "design.query.listMasses",
|
|
5395
5989
|
"namespace": "design.query",
|
|
@@ -5578,18 +6172,6 @@
|
|
|
5578
6172
|
"argsType": "ComponentHandle",
|
|
5579
6173
|
"resultType": "ContourHandle | null"
|
|
5580
6174
|
},
|
|
5581
|
-
{
|
|
5582
|
-
"path": "design.query.spaces.listGeneratedBim",
|
|
5583
|
-
"namespace": "design.query.spaces",
|
|
5584
|
-
"summary": "List the space's **engine-generated BIM components** — the walls, floors and slabs the parametric engine derived from this space, grouped by kind.",
|
|
5585
|
-
"examplePrompts": [
|
|
5586
|
-
"Which walls did this room generate?",
|
|
5587
|
-
"List the BIM components derived from the selected space",
|
|
5588
|
-
"Get the floors and slabs that belong to this room\n\n# Example\n```ts\nconst [space] = await snaptrude.design.query.listSpaces()\nconst bim = await snaptrude.design.query.spaces.listGeneratedBim(space)\nconsole.log(`${bim.walls.length} walls, ${bim.floors.length} floors`)\n```"
|
|
5589
|
-
],
|
|
5590
|
-
"argsType": "ComponentHandle",
|
|
5591
|
-
"resultType": "PluginSpaceGeneratedBim"
|
|
5592
|
-
},
|
|
5593
6175
|
{
|
|
5594
6176
|
"path": "design.query.storeyOutline",
|
|
5595
6177
|
"namespace": "design.query",
|
|
@@ -5833,6 +6415,31 @@
|
|
|
5833
6415
|
"argsType": "ComponentHandle",
|
|
5834
6416
|
"resultType": "PluginDesignChangeResult"
|
|
5835
6417
|
},
|
|
6418
|
+
{
|
|
6419
|
+
"path": "design.update.grid",
|
|
6420
|
+
"namespace": "design.update",
|
|
6421
|
+
"summary": "Update a structural grid's **group-level** fields with a sparse patch — default line styling, absolute angle, and per-storey 2D visibility. Only provided fields change. Wing- and line-level updates live on the grids entity family: {@linkcode PluginDesignGridsApi.updateWings} / {@linkcode PluginDesignGridsApi.updateLines}.",
|
|
6422
|
+
"examplePrompts": [
|
|
6423
|
+
"Rotate the grid to 45 degrees",
|
|
6424
|
+
"Make this grid's lines dashed and grey",
|
|
6425
|
+
"Hide this grid on storey 3's plan\n\n# Example\n```ts\nconst [grid] = await snaptrude.design.query.listGrids()\nawait snaptrude.design.update.grid(grid, { angle: 45, props: { style: \"DASHED\" } })\n```"
|
|
6426
|
+
],
|
|
6427
|
+
"argsType": "ComponentHandle",
|
|
6428
|
+
"resultType": "boolean"
|
|
6429
|
+
},
|
|
6430
|
+
{
|
|
6431
|
+
"path": "design.update.parameters",
|
|
6432
|
+
"namespace": "design.update",
|
|
6433
|
+
"summary": "Edit a parametric mass by patching its creation recipe and rebuilding the solid in place — the mass keeps its id, storey, materials, position and linked copies; only the geometry changes. Read the current record with `design.query.getParameters` first.",
|
|
6434
|
+
"examplePrompts": [
|
|
6435
|
+
"Make the dome's radius 8 metres",
|
|
6436
|
+
"Raise the podium to 5 m",
|
|
6437
|
+
"Widen the vase — move its profile points 20 cm outward",
|
|
6438
|
+
"Change the fillet on the rounded column to 300 mm\n\n# Example\n```ts\n// { kind: \"sphere\", values: { centre, radius: 19.685 }, … }\nconst before = await snaptrude.design.query.getParameters(dome)\nconst after = await snaptrude.design.update.parameters(dome, { radius: 31.496 }) // 8 m in internal units\n\n// Fillet radius on a recorded result: read → edit → send the array back\nconst rec = await snaptrude.design.query.getParameters(column)\nconst operations = rec?.operations ?? []\nif (operations[0]?.op === \"fillet\") {\noperations[0].radius = 1.181\nawait snaptrude.design.update.parameters(column, { operations })\n}\n```"
|
|
6439
|
+
],
|
|
6440
|
+
"argsType": "ComponentHandle",
|
|
6441
|
+
"resultType": "MassParametersRecord"
|
|
6442
|
+
},
|
|
5836
6443
|
{
|
|
5837
6444
|
"path": "design.update.roof",
|
|
5838
6445
|
"namespace": "design.update",
|
|
@@ -6872,17 +7479,6 @@
|
|
|
6872
7479
|
"argsType": "string",
|
|
6873
7480
|
"resultType": "PluginPlacedViewLabel"
|
|
6874
7481
|
},
|
|
6875
|
-
{
|
|
6876
|
-
"path": "presentation.placedViews.setLod",
|
|
6877
|
-
"namespace": "presentation.placedViews",
|
|
6878
|
-
"summary": "Set the level of detail a placed view renders at — `\"design\"` (the Design-mode massing representation) or `\"bim\"` (the detailed BIM representation). Views only. Undoable. Requires Present mode to be open.",
|
|
6879
|
-
"examplePrompts": [
|
|
6880
|
-
"Switch this placed view to the BIM level of detail",
|
|
6881
|
-
"Show the massing version of the placed plan"
|
|
6882
|
-
],
|
|
6883
|
-
"argsType": "string",
|
|
6884
|
-
"resultType": "void"
|
|
6885
|
-
},
|
|
6886
7482
|
{
|
|
6887
7483
|
"path": "presentation.placedViews.setMask",
|
|
6888
7484
|
"namespace": "presentation.placedViews",
|
|
@@ -7528,6 +8124,18 @@
|
|
|
7528
8124
|
"argsType": "string",
|
|
7529
8125
|
"resultType": "PluginProgramDepartmentsSetTargetAreaResult"
|
|
7530
8126
|
},
|
|
8127
|
+
{
|
|
8128
|
+
"path": "program.departments.setTargetCount",
|
|
8129
|
+
"namespace": "program.departments",
|
|
8130
|
+
"summary": "Set a department's target unit count.",
|
|
8131
|
+
"examplePrompts": [
|
|
8132
|
+
"Set the Bedrooms department unit count to 12",
|
|
8133
|
+
"The program needs 4 clinic blocks — update the department count",
|
|
8134
|
+
"Update the target count for department dep_123\n\n# Example\n```ts\nawait snaptrude.program.departments.setTargetCount(\"dep_123\", 12)\n```"
|
|
8135
|
+
],
|
|
8136
|
+
"argsType": "string",
|
|
8137
|
+
"resultType": "PluginProgramDepartmentsSetTargetCountResult"
|
|
8138
|
+
},
|
|
7531
8139
|
{
|
|
7532
8140
|
"path": "program.departments.unassign",
|
|
7533
8141
|
"namespace": "program.departments",
|
|
@@ -7554,6 +8162,65 @@
|
|
|
7554
8162
|
"argsType": "string",
|
|
7555
8163
|
"resultType": "PluginProgramDepartmentsUpdateResult"
|
|
7556
8164
|
},
|
|
8165
|
+
{
|
|
8166
|
+
"path": "program.labels.create",
|
|
8167
|
+
"namespace": "program.labels",
|
|
8168
|
+
"summary": "Create labels (program rows), optionally creating their spaces too.",
|
|
8169
|
+
"examplePrompts": [
|
|
8170
|
+
"Add program rows for 4 exam rooms of 120 sqft each",
|
|
8171
|
+
"Create the labels from this interpreted program",
|
|
8172
|
+
"Add an Office label with a 2000 sqft target to the Admin department",
|
|
8173
|
+
"Create program rows and their spaces on the canvas\n\n# Example\n```ts\nconst { labelIds } = await snaptrude.program.labels.create(\n[{ name: \"Exam Room\", targetArea: 480, targetCount: 4, departmentName: \"Clinic\" }],\n{ units: \"ft2\" },\n)\n```"
|
|
8174
|
+
],
|
|
8175
|
+
"argsType": "PluginProgramLabelCreateItem[]",
|
|
8176
|
+
"resultType": "PluginProgramLabelsCreateResult"
|
|
8177
|
+
},
|
|
8178
|
+
{
|
|
8179
|
+
"path": "program.labels.get",
|
|
8180
|
+
"namespace": "program.labels",
|
|
8181
|
+
"summary": "Get a single label by id.",
|
|
8182
|
+
"examplePrompts": [
|
|
8183
|
+
"Get the label with id lbl_12",
|
|
8184
|
+
"What is the target area of this program row?\n\n# Example\n```ts\nconst label = await snaptrude.program.labels.get(\"lbl_12\")\nif (label) console.log(label.name, label.targetArea, label.units)\n```"
|
|
8185
|
+
],
|
|
8186
|
+
"argsType": "string",
|
|
8187
|
+
"resultType": "PluginProgramLabelsGetResult"
|
|
8188
|
+
},
|
|
8189
|
+
{
|
|
8190
|
+
"path": "program.labels.list",
|
|
8191
|
+
"namespace": "program.labels",
|
|
8192
|
+
"summary": "List the labels (program rows) of the active program.",
|
|
8193
|
+
"examplePrompts": [
|
|
8194
|
+
"List all the program rows with their target areas",
|
|
8195
|
+
"What space labels are in the program and how many of each?",
|
|
8196
|
+
"Show every label with its department and target\n\n# Example\n```ts\nconst { units, labels } = await snaptrude.program.labels.list()\nfor (const l of labels) console.log(l.name, l.targetArea, units, l.targetCount)\n```"
|
|
8197
|
+
],
|
|
8198
|
+
"argsType": null,
|
|
8199
|
+
"resultType": "PluginProgramLabelsListResult"
|
|
8200
|
+
},
|
|
8201
|
+
{
|
|
8202
|
+
"path": "program.labels.setTargetArea",
|
|
8203
|
+
"namespace": "program.labels",
|
|
8204
|
+
"summary": "Set a label's total target area.",
|
|
8205
|
+
"examplePrompts": [
|
|
8206
|
+
"Set the Exam Room target area to 480 sqft",
|
|
8207
|
+
"Give the Corridor program row a 150 sqm target",
|
|
8208
|
+
"Update the area target for label lbl_12\n\n# Example\n```ts\nawait snaptrude.program.labels.setTargetArea(\"lbl_12\", 480, \"ft2\")\n```"
|
|
8209
|
+
],
|
|
8210
|
+
"argsType": "string",
|
|
8211
|
+
"resultType": "PluginProgramLabelsSetTargetAreaResult"
|
|
8212
|
+
},
|
|
8213
|
+
{
|
|
8214
|
+
"path": "program.labels.setTargetCount",
|
|
8215
|
+
"namespace": "program.labels",
|
|
8216
|
+
"summary": "Set a label's target unit count (how many of this space the program calls for).",
|
|
8217
|
+
"examplePrompts": [
|
|
8218
|
+
"Set the Exam Room count to 6",
|
|
8219
|
+
"The program needs 12 patient rooms — update the count\n\n# Example\n```ts\nawait snaptrude.program.labels.setTargetCount(\"lbl_12\", 6)\n```"
|
|
8220
|
+
],
|
|
8221
|
+
"argsType": "string",
|
|
8222
|
+
"resultType": "PluginProgramLabelsSetTargetCountResult"
|
|
8223
|
+
},
|
|
7557
8224
|
{
|
|
7558
8225
|
"path": "program.layout.applySolution",
|
|
7559
8226
|
"namespace": "program.layout",
|
|
@@ -7627,6 +8294,81 @@
|
|
|
7627
8294
|
"argsType": null,
|
|
7628
8295
|
"resultType": "PluginProgramLayoutStackResult"
|
|
7629
8296
|
},
|
|
8297
|
+
{
|
|
8298
|
+
"path": "program.metadata.createHeader",
|
|
8299
|
+
"namespace": "program.metadata",
|
|
8300
|
+
"summary": "Create a metadata header (a custom column on the Program Data sheet).",
|
|
8301
|
+
"examplePrompts": [
|
|
8302
|
+
"Add a custom column called Occupancy to the program sheet",
|
|
8303
|
+
"Create a metadata header named Department Code",
|
|
8304
|
+
"Make a new program-mode column for Finish Level\n\n# Example\n```ts\nconst header = await snaptrude.program.metadata.createHeader(\"Occupancy\", {\ndescription: \"People per room\",\n})\n```"
|
|
8305
|
+
],
|
|
8306
|
+
"argsType": "string",
|
|
8307
|
+
"resultType": "PluginProgramMetadataCreateHeaderResult"
|
|
8308
|
+
},
|
|
8309
|
+
{
|
|
8310
|
+
"path": "program.metadata.get",
|
|
8311
|
+
"namespace": "program.metadata",
|
|
8312
|
+
"summary": "Get one space's metadata values, keyed by header id.",
|
|
8313
|
+
"examplePrompts": [
|
|
8314
|
+
"Get the metadata on this space",
|
|
8315
|
+
"Read the custom column values for space sp_12",
|
|
8316
|
+
"What is this room's Occupancy metadata?\n\n# Example\n```ts\nconst record = await snaptrude.program.metadata.get(\"sp_12\")\nif (record) console.log(record.values)\n```"
|
|
8317
|
+
],
|
|
8318
|
+
"argsType": "ComponentHandle",
|
|
8319
|
+
"resultType": "PluginProgramMetadataGetResult"
|
|
8320
|
+
},
|
|
8321
|
+
{
|
|
8322
|
+
"path": "program.metadata.list",
|
|
8323
|
+
"namespace": "program.metadata",
|
|
8324
|
+
"summary": "List metadata values for many spaces at once.",
|
|
8325
|
+
"examplePrompts": [
|
|
8326
|
+
"List the metadata of every space",
|
|
8327
|
+
"Read the custom column values for all rooms",
|
|
8328
|
+
"Get the metadata for these three spaces in one call\n\n# Example\n```ts\nconst { records } = await snaptrude.program.metadata.list()\nconst byId = Object.fromEntries(records.map((r) => [r.spaceId, r.values]))\n```"
|
|
8329
|
+
],
|
|
8330
|
+
"argsType": "ComponentHandle[]",
|
|
8331
|
+
"resultType": "PluginProgramMetadataListResult",
|
|
8332
|
+
"performance": "One round-trip for any number of spaces — use this instead of a `get` loop."
|
|
8333
|
+
},
|
|
8334
|
+
{
|
|
8335
|
+
"path": "program.metadata.listHeaders",
|
|
8336
|
+
"namespace": "program.metadata",
|
|
8337
|
+
"summary": "List the metadata headers (custom columns) of the Program Data sheet.",
|
|
8338
|
+
"examplePrompts": [
|
|
8339
|
+
"List the custom metadata columns in program mode",
|
|
8340
|
+
"What metadata headers does the program sheet have?",
|
|
8341
|
+
"Show every custom column with its id\n\n# Example\n```ts\nconst { headers } = await snaptrude.program.metadata.listHeaders()\nfor (const h of headers) console.log(h.headerId, h.name)\n```"
|
|
8342
|
+
],
|
|
8343
|
+
"argsType": null,
|
|
8344
|
+
"resultType": "PluginProgramMetadataListHeadersResult"
|
|
8345
|
+
},
|
|
8346
|
+
{
|
|
8347
|
+
"path": "program.metadata.update",
|
|
8348
|
+
"namespace": "program.metadata",
|
|
8349
|
+
"summary": "Update a space's metadata values (sparse).",
|
|
8350
|
+
"examplePrompts": [
|
|
8351
|
+
"Set the Occupancy metadata of this space to 4",
|
|
8352
|
+
"Store a department code on the selected rooms",
|
|
8353
|
+
"Write custom column values onto space sp_12",
|
|
8354
|
+
"Clear the Finish Level metadata on this space\n\n# Example\n```ts\nconst header = await snaptrude.program.metadata.createHeader(\"Occupancy\")\nawait snaptrude.program.metadata.update(\"sp_12\", { [header.headerId]: 4 })\n```"
|
|
8355
|
+
],
|
|
8356
|
+
"argsType": "ComponentHandle",
|
|
8357
|
+
"resultType": "PluginProgramMetadataUpdateResult"
|
|
8358
|
+
},
|
|
8359
|
+
{
|
|
8360
|
+
"path": "program.metadata.updateMany",
|
|
8361
|
+
"namespace": "program.metadata",
|
|
8362
|
+
"summary": "Update metadata values on many spaces in one undoable step.",
|
|
8363
|
+
"examplePrompts": [
|
|
8364
|
+
"Fill the Occupancy column for all bedrooms",
|
|
8365
|
+
"Write metadata onto every selected space at once",
|
|
8366
|
+
"Bulk-update custom column values\n\n# Example\n```ts\nawait snaptrude.program.metadata.updateMany([\n{ spaceId: \"sp_12\", values: { [headerId]: 4 } },\n{ spaceId: \"sp_13\", values: { [headerId]: 2 } },\n])\n```"
|
|
8367
|
+
],
|
|
8368
|
+
"argsType": "PluginProgramMetadataUpdateItem[]",
|
|
8369
|
+
"resultType": "PluginProgramMetadataUpdateManyResult",
|
|
8370
|
+
"performance": "One round-trip and one undo step for up to 1000 spaces — use this instead of an `update` loop."
|
|
8371
|
+
},
|
|
7630
8372
|
{
|
|
7631
8373
|
"path": "program.metrics.get",
|
|
7632
8374
|
"namespace": "program.metrics",
|
|
@@ -7865,6 +8607,19 @@
|
|
|
7865
8607
|
"argsType": "{\n name?: string\n }",
|
|
7866
8608
|
"resultType": "PluginProgramSpreadsheetBindingsRefreshResult"
|
|
7867
8609
|
},
|
|
8610
|
+
{
|
|
8611
|
+
"path": "program.spreadsheet.createCustomSheet",
|
|
8612
|
+
"namespace": "program.spreadsheet",
|
|
8613
|
+
"summary": "Create a **custom program sheet** — a live view of the program grouped by a configurable hierarchy (the Program tab's \"Custom\" sheet with *Organize → Group by*).",
|
|
8614
|
+
"examplePrompts": [
|
|
8615
|
+
"Create a custom sheet grouped by department then sub-department",
|
|
8616
|
+
"Make a program view grouped by storey and label",
|
|
8617
|
+
"Build a grouped program sheet for the healthcare hierarchy",
|
|
8618
|
+
"Add a custom sheet with a department → room type group-by\n\n# Example\n```ts\nconst { headers } = await snaptrude.program.metadata.listHeaders()\nconst subDept = headers.find((h) => h.name === \"Sub-department\")\nawait snaptrude.program.spreadsheet.createCustomSheet(\"Clinical Program\", {\ngroupBy: [\"departmentName\", subDept.headerId, \"label\"],\nproperties: [\"label\", \"count\", \"areas\", \"netAreaAchieved\"],\n})\n```"
|
|
8619
|
+
],
|
|
8620
|
+
"argsType": "string",
|
|
8621
|
+
"resultType": "PluginProgramSpreadsheetCustomSheetResult"
|
|
8622
|
+
},
|
|
7868
8623
|
{
|
|
7869
8624
|
"path": "program.spreadsheet.createSheet",
|
|
7870
8625
|
"namespace": "program.spreadsheet",
|
|
@@ -7930,6 +8685,17 @@
|
|
|
7930
8685
|
"argsType": "{\n limit?: number\n }",
|
|
7931
8686
|
"resultType": "PluginProgramSpreadsheetGetAuditLogResult"
|
|
7932
8687
|
},
|
|
8688
|
+
{
|
|
8689
|
+
"path": "program.spreadsheet.getCustomSheet",
|
|
8690
|
+
"namespace": "program.spreadsheet",
|
|
8691
|
+
"summary": "Get a custom program sheet's configuration.",
|
|
8692
|
+
"examplePrompts": [
|
|
8693
|
+
"How is the Clinical Program sheet grouped?",
|
|
8694
|
+
"Get the group-by configuration of this custom sheet\n\n# Example\n```ts\nconst cfg = await snaptrude.program.spreadsheet.getCustomSheet(\"Clinical Program\")\nif (cfg) console.log(cfg.groupBy, cfg.properties)\n```"
|
|
8695
|
+
],
|
|
8696
|
+
"argsType": "string",
|
|
8697
|
+
"resultType": "PluginProgramSpreadsheetGetCustomSheetResult"
|
|
8698
|
+
},
|
|
7933
8699
|
{
|
|
7934
8700
|
"path": "program.spreadsheet.getMaterialTakeoff",
|
|
7935
8701
|
"namespace": "program.spreadsheet",
|
|
@@ -7996,6 +8762,28 @@
|
|
|
7996
8762
|
"argsType": "string",
|
|
7997
8763
|
"resultType": "PluginProgramSpreadsheetHighlightCellsResult"
|
|
7998
8764
|
},
|
|
8765
|
+
{
|
|
8766
|
+
"path": "program.spreadsheet.listCustomSheetProperties",
|
|
8767
|
+
"namespace": "program.spreadsheet",
|
|
8768
|
+
"summary": "List the property ids a custom program sheet can show as columns or group by.",
|
|
8769
|
+
"examplePrompts": [
|
|
8770
|
+
"What can I group a custom program sheet by?",
|
|
8771
|
+
"List the columns available for a custom sheet\n\n# Example\n```ts\nconst { properties } = await snaptrude.program.spreadsheet.listCustomSheetProperties()\nconst groupable = properties.filter((p) => p.groupable).map((p) => p.id)\n```"
|
|
8772
|
+
],
|
|
8773
|
+
"argsType": null,
|
|
8774
|
+
"resultType": "PluginProgramSpreadsheetListCustomSheetPropertiesResult"
|
|
8775
|
+
},
|
|
8776
|
+
{
|
|
8777
|
+
"path": "program.spreadsheet.listCustomSheets",
|
|
8778
|
+
"namespace": "program.spreadsheet",
|
|
8779
|
+
"summary": "List the custom program sheets in the workbook with their configurations.",
|
|
8780
|
+
"examplePrompts": [
|
|
8781
|
+
"List the custom program sheets",
|
|
8782
|
+
"Which sheets are grouped program views?\n\n# Example\n```ts\nconst { sheets } = await snaptrude.program.spreadsheet.listCustomSheets()\n```"
|
|
8783
|
+
],
|
|
8784
|
+
"argsType": null,
|
|
8785
|
+
"resultType": "PluginProgramSpreadsheetListCustomSheetsResult"
|
|
8786
|
+
},
|
|
7999
8787
|
{
|
|
8000
8788
|
"path": "program.spreadsheet.listSheets",
|
|
8001
8789
|
"namespace": "program.spreadsheet",
|
|
@@ -8172,6 +8960,18 @@
|
|
|
8172
8960
|
"argsType": "PluginSpreadsheetTransactionOp[]",
|
|
8173
8961
|
"resultType": "PluginProgramSpreadsheetTransactionResult"
|
|
8174
8962
|
},
|
|
8963
|
+
{
|
|
8964
|
+
"path": "program.spreadsheet.updateCustomSheet",
|
|
8965
|
+
"namespace": "program.spreadsheet",
|
|
8966
|
+
"summary": "Update a custom program sheet's group-by hierarchy, columns, or group colors.",
|
|
8967
|
+
"examplePrompts": [
|
|
8968
|
+
"Change the custom sheet to group by storey first",
|
|
8969
|
+
"Add the Occupancy column to my grouped program sheet",
|
|
8970
|
+
"Regroup the Clinical Program sheet by department only\n\n# Example\n```ts\nawait snaptrude.program.spreadsheet.updateCustomSheet(\"Clinical Program\", {\ngroupBy: [\"storey\", \"departmentName\"],\n})\n```"
|
|
8971
|
+
],
|
|
8972
|
+
"argsType": "string",
|
|
8973
|
+
"resultType": "PluginProgramSpreadsheetCustomSheetResult"
|
|
8974
|
+
},
|
|
8175
8975
|
{
|
|
8176
8976
|
"path": "workspace.closePresentMode",
|
|
8177
8977
|
"namespace": "workspace",
|
|
@@ -8184,6 +8984,17 @@
|
|
|
8184
8984
|
"argsType": null,
|
|
8185
8985
|
"resultType": "void"
|
|
8186
8986
|
},
|
|
8987
|
+
{
|
|
8988
|
+
"path": "workspace.closeProgramMode",
|
|
8989
|
+
"namespace": "workspace",
|
|
8990
|
+
"summary": "Close the Program tab.",
|
|
8991
|
+
"examplePrompts": [
|
|
8992
|
+
"Close program mode",
|
|
8993
|
+
"Close the Program tab\n\n# Example\n```ts\nawait snaptrude.workspace.closeProgramMode()\n```"
|
|
8994
|
+
],
|
|
8995
|
+
"argsType": null,
|
|
8996
|
+
"resultType": "void"
|
|
8997
|
+
},
|
|
8187
8998
|
{
|
|
8188
8999
|
"path": "workspace.openPresentMode",
|
|
8189
9000
|
"namespace": "workspace",
|
|
@@ -8196,6 +9007,18 @@
|
|
|
8196
9007
|
"argsType": null,
|
|
8197
9008
|
"resultType": "void"
|
|
8198
9009
|
},
|
|
9010
|
+
{
|
|
9011
|
+
"path": "workspace.openProgramMode",
|
|
9012
|
+
"namespace": "workspace",
|
|
9013
|
+
"summary": "Open Program mode — the Program tab the `program.spreadsheet.*` calls run in.",
|
|
9014
|
+
"examplePrompts": [
|
|
9015
|
+
"Open program mode",
|
|
9016
|
+
"Open the Program tab so I can build a custom sheet",
|
|
9017
|
+
"Switch to the program spreadsheet\n\n# Example\n```ts\nawait snaptrude.workspace.openProgramMode()\nconst { sheets } = await snaptrude.program.spreadsheet.listSheets()\n```"
|
|
9018
|
+
],
|
|
9019
|
+
"argsType": null,
|
|
9020
|
+
"resultType": "void"
|
|
9021
|
+
},
|
|
8199
9022
|
{
|
|
8200
9023
|
"path": "workspace.projects.copy",
|
|
8201
9024
|
"namespace": "workspace.projects",
|