@snaptrude/plugin-core 1.0.1 → 1.0.2-plainpoint-20261026.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -6
- package/api-manifest.json +1581 -94
- package/dist/api/core/camera/index.d.ts +12 -4
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/comment/index.d.ts +7 -3
- package/dist/api/core/comment/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +69 -21
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/circle.d.ts +31 -11
- package/dist/api/core/geom/query/circle.d.ts.map +1 -1
- package/dist/api/core/geom/query/contour.d.ts +19 -7
- package/dist/api/core/geom/query/contour.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +72 -24
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/profile.d.ts +19 -7
- package/dist/api/core/geom/query/profile.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +36 -12
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +13 -5
- package/dist/api/core/geom/update/curve.d.ts.map +1 -1
- package/dist/api/core/geom/update/profile.d.ts +36 -12
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +7 -3
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/math/quat.d.ts +2 -2
- package/dist/api/core/math/quat.d.ts.map +1 -1
- package/dist/api/core/math/vec3.d.ts +15 -15
- package/dist/api/core/math/vec3.d.ts.map +1 -1
- package/dist/api/design/boolean/index.d.ts +20 -4
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +20 -4
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +67 -27
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +14 -7
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +12 -4
- package/dist/api/design/dimensions.d.ts.map +1 -1
- package/dist/api/design/edit/index.d.ts +7 -3
- package/dist/api/design/edit/index.d.ts.map +1 -1
- package/dist/api/design/erase/index.d.ts +10 -2
- package/dist/api/design/erase/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +5 -1
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/lock.d.ts +3 -0
- package/dist/api/design/lock.d.ts.map +1 -1
- package/dist/api/design/transform/index.d.ts +28 -8
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +30 -6
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/presentation/drawings.d.ts +1 -1
- package/dist/handles.d.ts +8 -0
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +91 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +90 -79
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/api/core/camera/index.ts +5 -5
- package/src/api/core/comment/index.ts +3 -3
- package/src/api/core/geom/create/index.ts +25 -25
- package/src/api/core/geom/query/circle.ts +11 -11
- package/src/api/core/geom/query/contour.ts +7 -6
- package/src/api/core/geom/query/curve.ts +25 -25
- package/src/api/core/geom/query/profile.ts +7 -6
- package/src/api/core/geom/update/contour.ts +12 -11
- package/src/api/core/geom/update/curve.ts +5 -5
- package/src/api/core/geom/update/profile.ts +12 -11
- package/src/api/core/io/import/index.ts +3 -2
- package/src/api/core/math/quat.ts +2 -2
- package/src/api/core/math/vec3.ts +16 -16
- package/src/api/design/boolean/index.ts +2 -2
- package/src/api/design/create/bulk-items.ts +3 -2
- package/src/api/design/create/index.ts +27 -26
- package/src/api/design/delete/index.ts +14 -7
- package/src/api/design/dimensions.ts +5 -4
- package/src/api/design/edit/index.ts +3 -3
- package/src/api/design/erase/index.ts +2 -2
- package/src/api/design/family.ts +2 -1
- package/src/api/design/lock.ts +6 -0
- package/src/api/design/transform/index.ts +15 -7
- package/src/api/entity/space.ts +5 -4
- package/src/handles.ts +11 -0
- package/test/handles.test.mjs +36 -0
package/api-manifest.json
CHANGED
|
@@ -494,6 +494,30 @@
|
|
|
494
494
|
"argsType": null,
|
|
495
495
|
"resultType": "PluginCameraMode"
|
|
496
496
|
},
|
|
497
|
+
{
|
|
498
|
+
"path": "core.camera.getNavigationSettings",
|
|
499
|
+
"namespace": "core.camera",
|
|
500
|
+
"summary": "Read the arrow-key navigation settings: whether the arrow keys walk the camera, the eye height used by `setPose`'s `standAt` and by walkthroughs that follow the floor, the walking speed, and whether walking stops at walls. Paired with {@linkcode PluginCameraApi.updateNavigationSettings}.",
|
|
501
|
+
"examplePrompts": [
|
|
502
|
+
"Is arrow-key navigation on?",
|
|
503
|
+
"What eye height does the camera use?\n\n# Example\n```ts\nconst { isKeyboardNavigationEnabled } =\nawait snaptrude.core.camera.getNavigationSettings()\n```"
|
|
504
|
+
],
|
|
505
|
+
"argsType": null,
|
|
506
|
+
"resultType": "PluginCameraNavigationSettings"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"path": "core.camera.getPose",
|
|
510
|
+
"namespace": "core.camera",
|
|
511
|
+
"summary": "Read where the camera is and where it looks: the eye and target positions (world coordinates, internal `babylon` units), the view direction as yaw and pitch, the vertical field of view, the projection and the 2D/3D mode. Paired with {@linkcode PluginCameraApi.setPose}.",
|
|
512
|
+
"examplePrompts": [
|
|
513
|
+
"Where is the camera right now?",
|
|
514
|
+
"Remember this viewpoint so we can come back to it",
|
|
515
|
+
"Which way is the camera facing?",
|
|
516
|
+
"How high above the ground is the camera?\n\n# Example\n```ts\nconst pose = await snaptrude.core.camera.getPose()\nconsole.log(pose.eye, pose.yawInDegrees, pose.pitchInDegrees)\n```"
|
|
517
|
+
],
|
|
518
|
+
"argsType": null,
|
|
519
|
+
"resultType": "PluginCameraPose"
|
|
520
|
+
},
|
|
497
521
|
{
|
|
498
522
|
"path": "core.camera.getProjection",
|
|
499
523
|
"namespace": "core.camera",
|
|
@@ -519,6 +543,31 @@
|
|
|
519
543
|
"argsType": "Vec3Handle",
|
|
520
544
|
"resultType": "boolean"
|
|
521
545
|
},
|
|
546
|
+
{
|
|
547
|
+
"path": "core.camera.move",
|
|
548
|
+
"namespace": "core.camera",
|
|
549
|
+
"summary": "Walk or fly the camera by a displacement in its own frame: `forward` along the level view direction, `right` to its side and `up` vertically, in internal `babylon` units. The view direction does not change. With `options.followsFloor` the camera keeps its height above the floor as it goes, climbing and descending stairs and ramps the way the arrow keys do. Stops a playing walkthrough and switches from 2D plan view to 3D first. View-state only: not write-gated, not undoable.",
|
|
550
|
+
"examplePrompts": [
|
|
551
|
+
"Walk forward 3 metres",
|
|
552
|
+
"Step to the right a little",
|
|
553
|
+
"Walk up the stairs ahead",
|
|
554
|
+
"Raise the camera by 2 metres\n\n# Example\n```ts\nconst metre = 1 / 0.254\nawait snaptrude.core.camera.move(\n{ forward: 3 * metre },\n{ followsFloor: true, durationInSeconds: 2 },\n)\n```"
|
|
555
|
+
],
|
|
556
|
+
"argsType": "PluginCameraMoveDisplacement",
|
|
557
|
+
"resultType": "PluginCameraPose"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"path": "core.camera.rotate",
|
|
561
|
+
"namespace": "core.camera",
|
|
562
|
+
"summary": "Turn the camera in place by signed angles: `yawInDegrees` to the right (clockwise seen from above) and `pitchInDegrees` up. The eye does not move; the resulting pitch is kept within ±89°. Stops a playing walkthrough and switches from 2D plan view to 3D first. View-state only: not write-gated, not undoable.",
|
|
563
|
+
"examplePrompts": [
|
|
564
|
+
"Turn around",
|
|
565
|
+
"Look 45 degrees to the left",
|
|
566
|
+
"Tilt the camera down a bit\n\n# Example\n```ts\nawait snaptrude.core.camera.rotate(180, 0, { durationInSeconds: 1 })\n```"
|
|
567
|
+
],
|
|
568
|
+
"argsType": "number",
|
|
569
|
+
"resultType": "PluginCameraPose"
|
|
570
|
+
},
|
|
522
571
|
{
|
|
523
572
|
"path": "core.camera.setMode",
|
|
524
573
|
"namespace": "core.camera",
|
|
@@ -532,6 +581,19 @@
|
|
|
532
581
|
"argsType": "PluginCameraMode",
|
|
533
582
|
"resultType": "boolean"
|
|
534
583
|
},
|
|
584
|
+
{
|
|
585
|
+
"path": "core.camera.setPose",
|
|
586
|
+
"namespace": "core.camera",
|
|
587
|
+
"summary": "Place the camera, optionally easing there over `options.durationInSeconds`, and resolve once the new view has been drawn, so a capture that follows sees it without a fixed wait. `pose` is one of:",
|
|
588
|
+
"examplePrompts": [
|
|
589
|
+
"Stand in the living room at eye level facing the window",
|
|
590
|
+
"Move the camera to (40, 12, 30) looking at the entrance",
|
|
591
|
+
"Fly the camera smoothly over to the courtyard",
|
|
592
|
+
"Put me back at the viewpoint we saved earlier\n\n# Example\n```ts\nconst { camera } = snaptrude.core\nawait camera.setPose({ standAt: { x: 20, y: 0, z: 35 }, yawInDegrees: 90 })\nawait camera.setPose(\n{ eye: { x: 60, y: 25, z: 60 }, target: { x: 0, y: 5, z: 0 } },\n{ durationInSeconds: 1.5 },\n)\n```"
|
|
593
|
+
],
|
|
594
|
+
"argsType": "PluginCameraPoseInput",
|
|
595
|
+
"resultType": "PluginCameraPose"
|
|
596
|
+
},
|
|
535
597
|
{
|
|
536
598
|
"path": "core.camera.setProjection",
|
|
537
599
|
"namespace": "core.camera",
|
|
@@ -559,6 +621,18 @@
|
|
|
559
621
|
"argsType": "PluginStandardView",
|
|
560
622
|
"resultType": "boolean"
|
|
561
623
|
},
|
|
624
|
+
{
|
|
625
|
+
"path": "core.camera.updateNavigationSettings",
|
|
626
|
+
"namespace": "core.camera",
|
|
627
|
+
"summary": "Change arrow-key navigation settings; only the fields given change. `isKeyboardNavigationEnabled` is the user's Project Settings switch and is saved on this device; the other settings last for the session. Write-gated: this changes the user's preferences, not just the view.",
|
|
628
|
+
"examplePrompts": [
|
|
629
|
+
"Turn off arrow-key navigation",
|
|
630
|
+
"Use a 1.6 m eye height",
|
|
631
|
+
"Make walking stop at walls\n\n# Example\n```ts\nawait snaptrude.core.camera.updateNavigationSettings({\neyeHeight: 1.6 / 0.254,\nisCollisionEnabled: true,\n})\n```"
|
|
632
|
+
],
|
|
633
|
+
"argsType": "PluginCameraNavigationSettingsPatch",
|
|
634
|
+
"resultType": "PluginCameraNavigationSettings"
|
|
635
|
+
},
|
|
562
636
|
{
|
|
563
637
|
"path": "core.camera.zoomExtents",
|
|
564
638
|
"namespace": "core.camera",
|
|
@@ -817,7 +891,7 @@
|
|
|
817
891
|
{
|
|
818
892
|
"path": "core.geom.create.brepFromLoft",
|
|
819
893
|
"namespace": "core.geom.create",
|
|
820
|
-
"summary": "Create a closed solid **B-rep** by lofting between a bottom and a top contour, optionally through intermediate cross-sections. Host API call — returns a {@linkcode BrepHandle}. Sections with different edge counts are auto-matched: vertices are deterministically inserted on the smaller sections at the larger section's perimeter positions, so the same input always yields the same solid. For straight-edge (all-line) sections the seam is auto-aligned too — winding and start-vertex correspondence are chosen to avoid a twist, so outlines authored from any starting corner loft cleanly; arc-bearing sections keep the authored correspondence unchanged. A pair whose side faces would be non-planar under every correspondence still builds for hole-free straight-edged pairs — planar side quads stay quads and warped ones split into planar triangles (the triangulated
|
|
894
|
+
"summary": "Create a closed solid **B-rep** by lofting between a bottom and a top contour, optionally through intermediate cross-sections. Host API call — returns a {@linkcode BrepHandle}. Sections with different edge counts are auto-matched: vertices are deterministically inserted on the smaller sections at the larger section's perimeter positions, so the same input always yields the same solid. For straight-edge (all-line) sections the seam is auto-aligned too — winding and start-vertex correspondence are chosen to avoid a twist, so outlines authored from any starting corner loft cleanly; arc-bearing sections keep the authored correspondence unchanged. A pair whose side faces would be non-planar under every correspondence still builds for hole-free straight-edged pairs — planar side quads stay quads and warped ones split into planar triangles (the triangulated fallback); arc-bearing or holed twisted pairs are rejected, as is auto-matching that would pair an arc with a straight edge. Matching hole counts are allowed in the two-section form. With intermediates the loft is a chain of ruled segments folded into one solid: sections must be planar and hole-free, ordered bottom → intermediates → top. The contours are copied — the input handles are never mutated.",
|
|
821
895
|
"examplePrompts": [
|
|
822
896
|
"Make a tapered tower from these two outlines",
|
|
823
897
|
"Loft between a large base and a smaller top",
|
|
@@ -863,7 +937,7 @@
|
|
|
863
937
|
"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
938
|
"examplePrompts": [
|
|
865
939
|
"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.
|
|
940
|
+
"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.984, // 250 mm\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],\n1.181, // 300 mm\n{ continuity: \"tangent\" },\n)\n```"
|
|
867
941
|
],
|
|
868
942
|
"argsType": "(CurveHandle | OwnedEdge)[]",
|
|
869
943
|
"resultType": "BrepHandle"
|
|
@@ -898,7 +972,7 @@
|
|
|
898
972
|
{
|
|
899
973
|
"path": "core.geom.create.brepFromSphere",
|
|
900
974
|
"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`.",
|
|
975
|
+
"summary": "Create a solid **sphere** B-rep (boundary representation: the solid's exact faces, edges and vertices) 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
976
|
"examplePrompts": [
|
|
903
977
|
"Create a sphere of radius 5 at the origin",
|
|
904
978
|
"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```"
|
|
@@ -913,7 +987,7 @@
|
|
|
913
987
|
"examplePrompts": [
|
|
914
988
|
"Subtract the courtyard from the building mass",
|
|
915
989
|
"Cut this solid out of that one",
|
|
916
|
-
"
|
|
990
|
+
"Subtract this box solid from that solid\n\n# Example\n```ts\n// buildingBrep minus courtyardBrep — order matters\nconst carved = await snaptrude.core.geom.create.brepFromSubtraction(buildingBrep, courtyardBrep)\n```"
|
|
917
991
|
],
|
|
918
992
|
"argsType": "BrepHandle",
|
|
919
993
|
"resultType": "BrepHandle"
|
|
@@ -921,7 +995,7 @@
|
|
|
921
995
|
{
|
|
922
996
|
"path": "core.geom.create.brepFromSweep",
|
|
923
997
|
"namespace": "core.geom.create",
|
|
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
|
|
998
|
+
"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 a sharp mitred bend; `\"round\"` carries the section around each turning corner on a tangent circular arc, so the corner patch is a real curved surface (geometrically cylindrical; `getSurfaceKind` reports it as `\"spline\"`) 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 a varying scale only accepts straight paths, so it never meets a corner.",
|
|
925
999
|
"examplePrompts": [
|
|
926
1000
|
"Sweep this profile along the corridor path",
|
|
927
1001
|
"Extrude the railing section along this route",
|
|
@@ -938,7 +1012,7 @@
|
|
|
938
1012
|
{
|
|
939
1013
|
"path": "core.geom.create.brepFromSweepAlongCurve",
|
|
940
1014
|
"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
|
|
1015
|
+
"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`. The properties panel shows it read-only, because it is a text value, not a number. A railed sweep records nothing (`getParameters` answers `null`).",
|
|
942
1016
|
"examplePrompts": [
|
|
943
1017
|
"Sweep a 600x400 duct along this curved route and keep it upright",
|
|
944
1018
|
"Run this handrail along the curved stair edge",
|
|
@@ -1077,7 +1151,7 @@
|
|
|
1077
1151
|
{
|
|
1078
1152
|
"path": "core.geom.create.profileRect",
|
|
1079
1153
|
"namespace": "core.geom.create",
|
|
1080
|
-
"summary": "Create an axis-aligned **rectangle** profile
|
|
1154
|
+
"summary": "Create an axis-aligned **rectangle** profile in the XZ plane, `width` × `depth`, centred at `center` (defaults to the origin). Host API call — returns a handle.",
|
|
1081
1155
|
"examplePrompts": [
|
|
1082
1156
|
"Draw a 4m by 3m rectangle",
|
|
1083
1157
|
"Make a rectangular outline for a room footprint"
|
|
@@ -1090,8 +1164,7 @@
|
|
|
1090
1164
|
"namespace": "core.geom.create",
|
|
1091
1165
|
"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
1166
|
"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```"
|
|
1167
|
+
"Draw a smooth curve controlled by these four points\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
1168
|
],
|
|
1096
1169
|
"argsType": "Vec3Handle[]",
|
|
1097
1170
|
"resultType": "SplineHandle"
|
|
@@ -1189,7 +1262,7 @@
|
|
|
1189
1262
|
{
|
|
1190
1263
|
"path": "core.geom.query.brep.getCentroid",
|
|
1191
1264
|
"namespace": "core.geom.query.brep",
|
|
1192
|
-
"summary": "Get the centroid
|
|
1265
|
+
"summary": "Get the centroid of a brep: the mean of its vertex positions for planar and cylinder-sided solids; for a solid with sphere, cone, torus or spline geometry, its exact centre of mass (integrated over the surfaces; the vertex mean again if the kernel cannot integrate it, e.g. an open brep).",
|
|
1193
1266
|
"examplePrompts": [
|
|
1194
1267
|
"Find the centre point of this shape",
|
|
1195
1268
|
"What is the centroid of the selected object?\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst centroid = await snaptrude.core.geom.query.brep.getCentroid(brep)\nconsole.log(centroid.x, centroid.y, centroid.z)\n}\n```"
|
|
@@ -1200,7 +1273,7 @@
|
|
|
1200
1273
|
{
|
|
1201
1274
|
"path": "core.geom.query.brep.getDistance",
|
|
1202
1275
|
"namespace": "core.geom.query.brep",
|
|
1203
|
-
"summary": "Measures the minimum distance between two solids, with the closest
|
|
1276
|
+
"summary": "Measures the minimum distance between two solids, with the closest point on each. Touching or overlapping solids report a distance of 0 with contact points.",
|
|
1204
1277
|
"examplePrompts": [
|
|
1205
1278
|
"What is the clearance between these two masses?",
|
|
1206
1279
|
"How far apart are the tower and the neighbouring building?",
|
|
@@ -2349,7 +2422,7 @@
|
|
|
2349
2422
|
"summary": "Add a hole to a contour by appending an inner profile. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
2350
2423
|
"examplePrompts": [
|
|
2351
2424
|
"Cut a hole in this shape",
|
|
2352
|
-
"Punch an opening through this
|
|
2425
|
+
"Punch an opening through this outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(10, 8)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(outer)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 2)\nconst withHole = await snaptrude.core.geom.update.contour.addHole(contour, hole)\nconst count = await snaptrude.core.geom.query.contour.getHoleCount(withHole) // 1\n```"
|
|
2353
2426
|
],
|
|
2354
2427
|
"argsType": "ContourHandle",
|
|
2355
2428
|
"resultType": "ContourHandle"
|
|
@@ -2393,7 +2466,7 @@
|
|
|
2393
2466
|
"summary": "Remove a hole from a contour by inner-profile index. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
2394
2467
|
"examplePrompts": [
|
|
2395
2468
|
"Remove the hole from this shape",
|
|
2396
|
-
"Fill in the opening in this
|
|
2469
|
+
"Fill in the opening in this outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(10, 8)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 2)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst solid = await snaptrude.core.geom.update.contour.removeHole(contour, 0)\n```"
|
|
2397
2470
|
],
|
|
2398
2471
|
"argsType": "ContourHandle",
|
|
2399
2472
|
"resultType": "ContourHandle"
|
|
@@ -3250,14 +3323,55 @@
|
|
|
3250
3323
|
"argsType": "UnderlayHandle",
|
|
3251
3324
|
"resultType": "{ scaleFactor: number }"
|
|
3252
3325
|
},
|
|
3326
|
+
{
|
|
3327
|
+
"path": "core.layers.assign",
|
|
3328
|
+
"namespace": "core.layers",
|
|
3329
|
+
"summary": "Move objects onto a layer (picking a layer in the object properties panel).",
|
|
3330
|
+
"examplePrompts": [
|
|
3331
|
+
"Move the selected objects to the BIM layer",
|
|
3332
|
+
"Move the selected objects to the Furniture layer",
|
|
3333
|
+
"Assign the generated walls to the Structure layer",
|
|
3334
|
+
"Put these masses on layer 3f2a…\n\n# Example\n```ts\nconst { assigned, skipped } = await snaptrude.core.layers.assign(ids, layerId)\n```"
|
|
3335
|
+
],
|
|
3336
|
+
"argsType": "ComponentHandle[]",
|
|
3337
|
+
"resultType": "PluginCoreLayersAssignResult"
|
|
3338
|
+
},
|
|
3339
|
+
{
|
|
3340
|
+
"path": "core.layers.create",
|
|
3341
|
+
"namespace": "core.layers",
|
|
3342
|
+
"summary": "Create a new layer in the Layers panel (the panel's \"Add new layer\" button followed by naming it).",
|
|
3343
|
+
"examplePrompts": [
|
|
3344
|
+
"Create a new layer called Furniture",
|
|
3345
|
+
"Add a layer called Landscape",
|
|
3346
|
+
"Add a layer named Landscape to the Layers panel",
|
|
3347
|
+
"Make a new layer for the facade elements",
|
|
3348
|
+
"Create layers named Structure and Services\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.create(\"Furniture\")\nawait snaptrude.core.layers.setActive(layer.id)\n```"
|
|
3349
|
+
],
|
|
3350
|
+
"argsType": "string",
|
|
3351
|
+
"resultType": "PluginCoreLayersCreateResult"
|
|
3352
|
+
},
|
|
3353
|
+
{
|
|
3354
|
+
"path": "core.layers.delete",
|
|
3355
|
+
"namespace": "core.layers",
|
|
3356
|
+
"summary": "Delete a layer (the panel row's \"Delete layer\").",
|
|
3357
|
+
"examplePrompts": [
|
|
3358
|
+
"Delete the Furniture layer and everything on it",
|
|
3359
|
+
"Delete the Furniture layer and move its objects to Default",
|
|
3360
|
+
"Remove layer 3f2a… and move its objects to the default layer",
|
|
3361
|
+
"Merge the Services layer into Structure and delete it",
|
|
3362
|
+
"Delete every empty layer\n\n# Example\n```ts\nawait snaptrude.core.layers.delete(layerId, { deleteObjects: true })\nconst { layers } = await snaptrude.core.layers.list()\nconst def = layers.find((l) => l.isDefault)!\nawait snaptrude.core.layers.delete(otherId, { targetLayerId: def.id })\n```"
|
|
3363
|
+
],
|
|
3364
|
+
"argsType": "string",
|
|
3365
|
+
"resultType": "PluginCoreLayersDeleteResult"
|
|
3366
|
+
},
|
|
3253
3367
|
{
|
|
3254
3368
|
"path": "core.layers.get",
|
|
3255
3369
|
"namespace": "core.layers",
|
|
3256
|
-
"summary": "Get
|
|
3370
|
+
"summary": "Get one Layers-panel layer by id, including layers owned by other design options.",
|
|
3257
3371
|
"examplePrompts": [
|
|
3258
|
-
"Get the
|
|
3259
|
-
"Is layer
|
|
3260
|
-
"
|
|
3372
|
+
"Get the Layers-panel layer with id 3f2a…",
|
|
3373
|
+
"Is the Furniture layer locked or hidden?",
|
|
3374
|
+
"How many objects are on layer 3f2a…?\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.get(layerId)\nif (layer) console.log(layer.name, layer.objectCount)\n```"
|
|
3261
3375
|
],
|
|
3262
3376
|
"argsType": "string",
|
|
3263
3377
|
"resultType": "PluginCoreLayersGetResult"
|
|
@@ -3265,35 +3379,51 @@
|
|
|
3265
3379
|
{
|
|
3266
3380
|
"path": "core.layers.getActive",
|
|
3267
3381
|
"namespace": "core.layers",
|
|
3268
|
-
"summary": "Get the active
|
|
3382
|
+
"summary": "Get the active Layers-panel layer: the one new objects land on.",
|
|
3269
3383
|
"examplePrompts": [
|
|
3270
|
-
"Which
|
|
3271
|
-
"
|
|
3272
|
-
"What layer
|
|
3384
|
+
"Which layer is active?",
|
|
3385
|
+
"Which layer in the Layers panel is active?",
|
|
3386
|
+
"What layer will new objects go on?",
|
|
3387
|
+
"Which layer are new walls and masses being added to?\n\n# Example\n```ts\nconst active = await snaptrude.core.layers.getActive()\nif (active) console.log(active.name)\n```"
|
|
3273
3388
|
],
|
|
3274
|
-
"argsType":
|
|
3389
|
+
"argsType": null,
|
|
3275
3390
|
"resultType": "PluginCoreLayersGetActiveResult"
|
|
3276
3391
|
},
|
|
3277
3392
|
{
|
|
3278
3393
|
"path": "core.layers.list",
|
|
3279
3394
|
"namespace": "core.layers",
|
|
3280
|
-
"summary": "List the
|
|
3395
|
+
"summary": "List the layers in the Layers panel: the active design option's layers, default layer first, then in creation order.",
|
|
3281
3396
|
"examplePrompts": [
|
|
3282
|
-
"List the
|
|
3283
|
-
"Show
|
|
3284
|
-
"What
|
|
3397
|
+
"List all the layers in the Layers panel",
|
|
3398
|
+
"Show me the layers in the left sidebar",
|
|
3399
|
+
"What layers does this project have?",
|
|
3400
|
+
"Show every layer with whether it is locked or hidden",
|
|
3401
|
+
"Which layer is the default layer?",
|
|
3402
|
+
"Which layers are empty?\n\n# Example\n```ts\nconst { layers } = await snaptrude.core.layers.list()\nfor (const l of layers) console.log(l.name, l.objectCount, l.locked, l.hidden)\n```"
|
|
3285
3403
|
],
|
|
3286
|
-
"argsType":
|
|
3404
|
+
"argsType": null,
|
|
3287
3405
|
"resultType": "PluginCoreLayersListResult"
|
|
3288
3406
|
},
|
|
3407
|
+
{
|
|
3408
|
+
"path": "core.layers.rename",
|
|
3409
|
+
"namespace": "core.layers",
|
|
3410
|
+
"summary": "Rename a layer (the panel row's \"Rename layer\").",
|
|
3411
|
+
"examplePrompts": [
|
|
3412
|
+
"Rename the Furniture layer to Loose furniture",
|
|
3413
|
+
"Rename layer 3f2a… to Existing building",
|
|
3414
|
+
"Change the name of the Landscape layer\n\n# Example\n```ts\nawait snaptrude.core.layers.rename(layerId, \"Loose furniture\")\n```"
|
|
3415
|
+
],
|
|
3416
|
+
"argsType": "string",
|
|
3417
|
+
"resultType": "PluginCoreLayersRenameResult"
|
|
3418
|
+
},
|
|
3289
3419
|
{
|
|
3290
3420
|
"path": "core.layers.setActive",
|
|
3291
3421
|
"namespace": "core.layers",
|
|
3292
|
-
"summary": "Make a
|
|
3422
|
+
"summary": "Make a layer the active layer (clicking its row in the Layers panel).",
|
|
3293
3423
|
"examplePrompts": [
|
|
3294
|
-
"
|
|
3295
|
-
"Make
|
|
3296
|
-
"Switch the active layer to
|
|
3424
|
+
"Put new objects on the Furniture layer",
|
|
3425
|
+
"Make the Structure layer the active layer in the Layers panel",
|
|
3426
|
+
"Switch the active layer to Landscape\n\n# Example\n```ts\nawait snaptrude.core.layers.setActive(layerId)\n```"
|
|
3297
3427
|
],
|
|
3298
3428
|
"argsType": "string",
|
|
3299
3429
|
"resultType": "PluginCoreLayersSetActiveResult"
|
|
@@ -3301,11 +3431,12 @@
|
|
|
3301
3431
|
{
|
|
3302
3432
|
"path": "core.layers.update",
|
|
3303
3433
|
"namespace": "core.layers",
|
|
3304
|
-
"summary": "
|
|
3434
|
+
"summary": "Lock/unlock or show/hide a layer (the panel row's padlock and eye).",
|
|
3305
3435
|
"examplePrompts": [
|
|
3306
|
-
"
|
|
3307
|
-
"
|
|
3308
|
-
"Hide
|
|
3436
|
+
"Lock the Default layer",
|
|
3437
|
+
"Lock the Structure layer",
|
|
3438
|
+
"Hide the Landscape layer in the Layers panel",
|
|
3439
|
+
"Unlock layer 3f2a… and show it again\n\n# Example\n```ts\nawait snaptrude.core.layers.update(layerId, { locked: true, hidden: false })\n```"
|
|
3309
3440
|
],
|
|
3310
3441
|
"argsType": "string",
|
|
3311
3442
|
"resultType": "PluginCoreLayersUpdateResult"
|
|
@@ -4035,6 +4166,66 @@
|
|
|
4035
4166
|
"argsType": null,
|
|
4036
4167
|
"resultType": "number"
|
|
4037
4168
|
},
|
|
4169
|
+
{
|
|
4170
|
+
"path": "core.storeys.layers.get",
|
|
4171
|
+
"namespace": "core.storeys.layers",
|
|
4172
|
+
"summary": "Get a single storey layer by id.",
|
|
4173
|
+
"examplePrompts": [
|
|
4174
|
+
"Get the storey drawing layer with id ly_5",
|
|
4175
|
+
"Is storey layer ly_5 hidden?",
|
|
4176
|
+
"Look up a storey underlay layer by id\n\n# Example\n```ts\nconst layer = await snaptrude.core.storeys.layers.get(\"ly_5\")\nif (layer) console.log(layer.name, layer.hidden, layer.locked)\n```"
|
|
4177
|
+
],
|
|
4178
|
+
"argsType": "string",
|
|
4179
|
+
"resultType": "PluginCoreStoreysLayersGetResult"
|
|
4180
|
+
},
|
|
4181
|
+
{
|
|
4182
|
+
"path": "core.storeys.layers.getActive",
|
|
4183
|
+
"namespace": "core.storeys.layers",
|
|
4184
|
+
"summary": "Get the active storey layer of a storey.",
|
|
4185
|
+
"examplePrompts": [
|
|
4186
|
+
"Which sketch surface (Wall/Rough) is active on this storey?",
|
|
4187
|
+
"Get the active storey drawing layer on st_2",
|
|
4188
|
+
"Which storey layer is new sketch geometry drawn onto?\n\n# Example\n```ts\nconst active = await snaptrude.core.storeys.layers.getActive(\"st_2\")\nif (active) console.log(active.name)\n```"
|
|
4189
|
+
],
|
|
4190
|
+
"argsType": "string",
|
|
4191
|
+
"resultType": "PluginCoreStoreysLayersGetActiveResult"
|
|
4192
|
+
},
|
|
4193
|
+
{
|
|
4194
|
+
"path": "core.storeys.layers.list",
|
|
4195
|
+
"namespace": "core.storeys.layers",
|
|
4196
|
+
"summary": "List the storey layers of a storey.",
|
|
4197
|
+
"examplePrompts": [
|
|
4198
|
+
"List the sketch surfaces and underlays on this storey",
|
|
4199
|
+
"Show all the PDF underlays on storey st_2",
|
|
4200
|
+
"What CAD layers are on the ground floor?\n\n# Example\n```ts\nconst { layers } = await snaptrude.core.storeys.layers.list(\"st_2\")\nfor (const l of layers) console.log(l.name, l.layerType, l.hidden)\n```"
|
|
4201
|
+
],
|
|
4202
|
+
"argsType": "string",
|
|
4203
|
+
"resultType": "PluginCoreStoreysLayersListResult"
|
|
4204
|
+
},
|
|
4205
|
+
{
|
|
4206
|
+
"path": "core.storeys.layers.setActive",
|
|
4207
|
+
"namespace": "core.storeys.layers",
|
|
4208
|
+
"summary": "Make a storey layer the active layer of its storey.",
|
|
4209
|
+
"examplePrompts": [
|
|
4210
|
+
"Switch this storey's sketch surface to the Rough layer",
|
|
4211
|
+
"Make storey layer ly_5 the active sketch surface",
|
|
4212
|
+
"Switch the active storey layer to the CAD underlay\n\n# Example\n```ts\nawait snaptrude.core.storeys.layers.setActive(\"ly_5\")\n```"
|
|
4213
|
+
],
|
|
4214
|
+
"argsType": "string",
|
|
4215
|
+
"resultType": "PluginCoreStoreysLayersSetActiveResult"
|
|
4216
|
+
},
|
|
4217
|
+
{
|
|
4218
|
+
"path": "core.storeys.layers.update",
|
|
4219
|
+
"namespace": "core.storeys.layers",
|
|
4220
|
+
"summary": "Update a storey layer's visibility.",
|
|
4221
|
+
"examplePrompts": [
|
|
4222
|
+
"Hide the PDF underlay layer",
|
|
4223
|
+
"Show the CAD underlay again",
|
|
4224
|
+
"Hide storey layer ly_5\n\n# Example\n```ts\nconst layer = await snaptrude.core.storeys.layers.update(\"ly_5\", true)\n```"
|
|
4225
|
+
],
|
|
4226
|
+
"argsType": "string",
|
|
4227
|
+
"resultType": "PluginCoreStoreysLayersUpdateResult"
|
|
4228
|
+
},
|
|
4038
4229
|
{
|
|
4039
4230
|
"path": "core.storeys.list",
|
|
4040
4231
|
"namespace": "core.storeys",
|
|
@@ -4051,7 +4242,7 @@
|
|
|
4051
4242
|
{
|
|
4052
4243
|
"path": "core.storeys.setActive",
|
|
4053
4244
|
"namespace": "core.storeys",
|
|
4054
|
-
"summary": "Make a storey the active storey — the same as clicking it in the storey/layer panel. Subsequent draws and creates target this storey, and in 2D the viewport switches to it. This is a view/navigation change: it is **not** undoable and commits nothing to the model.",
|
|
4245
|
+
"summary": "Make a storey the active storey — the same as clicking it in the storey/layer panel. Subsequent draws and creates target this storey, and in 2D the viewport switches to that storey's plan (and its cut range), unless the active view is already a plan on it. This is a view/navigation change: it is **not** undoable and commits nothing to the model.",
|
|
4055
4246
|
"examplePrompts": [
|
|
4056
4247
|
"Switch to the second floor",
|
|
4057
4248
|
"Make the ground storey active",
|
|
@@ -4375,6 +4566,46 @@
|
|
|
4375
4566
|
"resultType": "boolean",
|
|
4376
4567
|
"deprecated": "core.camera.zoomSelection"
|
|
4377
4568
|
},
|
|
4569
|
+
{
|
|
4570
|
+
"path": "design.bim.create",
|
|
4571
|
+
"namespace": "design.bim",
|
|
4572
|
+
"summary": "Execute native Sketch-to-BIM. Revalidates scope, catalogue access and construction before mutation. Uses native progress/cancel controls and worker cancellation. Floors/roofs retain project defaults.",
|
|
4573
|
+
"examplePrompts": [
|
|
4574
|
+
"Convert these sketch rooms to BIM with wall layers chosen for each room boundary"
|
|
4575
|
+
],
|
|
4576
|
+
"argsType": "string",
|
|
4577
|
+
"resultType": "PluginBimResult"
|
|
4578
|
+
},
|
|
4579
|
+
{
|
|
4580
|
+
"path": "design.bim.getContext",
|
|
4581
|
+
"namespace": "design.bim",
|
|
4582
|
+
"summary": "Read room adjacency and native conversion eligibility in the active proposal.",
|
|
4583
|
+
"examplePrompts": [
|
|
4584
|
+
"Inspect the rooms on each side of these sketch wall boundaries"
|
|
4585
|
+
],
|
|
4586
|
+
"argsType": "PluginBimContextArgs",
|
|
4587
|
+
"resultType": "PluginBimContext"
|
|
4588
|
+
},
|
|
4589
|
+
{
|
|
4590
|
+
"path": "design.bim.prepare",
|
|
4591
|
+
"namespace": "design.bim",
|
|
4592
|
+
"summary": "Stage a complete wall-construction assignment. A new prepare replaces this plugin's prior plan.",
|
|
4593
|
+
"examplePrompts": [
|
|
4594
|
+
"Validate wall layer assignments before converting sketch rooms to BIM"
|
|
4595
|
+
],
|
|
4596
|
+
"argsType": "PluginBimPrepareArgs",
|
|
4597
|
+
"resultType": "PluginBimPreparation"
|
|
4598
|
+
},
|
|
4599
|
+
{
|
|
4600
|
+
"path": "design.bim.update",
|
|
4601
|
+
"namespace": "design.bim",
|
|
4602
|
+
"summary": "Add a partition graph with explicit connectivity and chosen wall families in one undo step. Validation is part of this call. PG2 splits intersections and generates floors with native lineage. Does not move/delete existing edges, infer face snapping, or change catalogue definitions.",
|
|
4603
|
+
"examplePrompts": [
|
|
4604
|
+
"Add bathroom partitions attached to these existing graph boundaries"
|
|
4605
|
+
],
|
|
4606
|
+
"argsType": "string",
|
|
4607
|
+
"resultType": "PluginBimUpdateResult"
|
|
4608
|
+
},
|
|
4378
4609
|
{
|
|
4379
4610
|
"path": "design.boolean.intersect",
|
|
4380
4611
|
"namespace": "design.boolean",
|
|
@@ -4416,6 +4647,38 @@
|
|
|
4416
4647
|
"argsType": "ComponentHandle[]",
|
|
4417
4648
|
"resultType": "BooleanOutcome"
|
|
4418
4649
|
},
|
|
4650
|
+
{
|
|
4651
|
+
"path": "design.catalog.get",
|
|
4652
|
+
"namespace": "design.catalog",
|
|
4653
|
+
"summary": "",
|
|
4654
|
+
"examplePrompts": [],
|
|
4655
|
+
"argsType": "PluginCatalogReference",
|
|
4656
|
+
"resultType": "PluginCatalogEntry | null"
|
|
4657
|
+
},
|
|
4658
|
+
{
|
|
4659
|
+
"path": "design.catalog.list",
|
|
4660
|
+
"namespace": "design.catalog",
|
|
4661
|
+
"summary": "",
|
|
4662
|
+
"examplePrompts": [],
|
|
4663
|
+
"argsType": "PluginCatalogKind",
|
|
4664
|
+
"resultType": "PluginCatalogEntry[]"
|
|
4665
|
+
},
|
|
4666
|
+
{
|
|
4667
|
+
"path": "design.catalog.listCategories",
|
|
4668
|
+
"namespace": "design.catalog",
|
|
4669
|
+
"summary": "Discover categories from accessible saved families and current project constructions. Omit parent for roots; pass a slash-separated returned path for its direct children. This metadata read does not fetch recipes, include unsaved drafts or legacy mesh inventories, or establish capabilities. Use search then get before placement. Names retain their case.",
|
|
4670
|
+
"examplePrompts": [],
|
|
4671
|
+
"argsType": "PluginCatalogListCategoriesArgs",
|
|
4672
|
+
"resultType": "PluginCatalogCategory[]"
|
|
4673
|
+
},
|
|
4674
|
+
{
|
|
4675
|
+
"path": "design.catalog.search",
|
|
4676
|
+
"namespace": "design.catalog",
|
|
4677
|
+
"summary": "Search accessible saved-family and project-construction metadata without downloading recipes. Categories are data, not an SDK enum. Legacy mesh inventories and unsaved drafts are excluded. Inspect selected references with get before placement; a search match does not prove validity or supported behavior. Pagination reads live data, not a snapshot. Failures reject.",
|
|
4678
|
+
"examplePrompts": [],
|
|
4679
|
+
"argsType": "PluginCatalogSearchArgs",
|
|
4680
|
+
"resultType": "PluginCatalogSearchResult"
|
|
4681
|
+
},
|
|
4419
4682
|
{
|
|
4420
4683
|
"path": "design.create.beam",
|
|
4421
4684
|
"namespace": "design.create",
|
|
@@ -4426,7 +4689,7 @@
|
|
|
4426
4689
|
"Run a 300x600 beam across the room",
|
|
4427
4690
|
"Extrude this cross-section into a 5m long beam\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.3, 0.6)\nconst section = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst alongX = await snaptrude.core.math.vec3.new(1, 0, 0)\nconst beam = await snaptrude.design.create.beam(section, 6, alongX)\n```"
|
|
4428
4691
|
],
|
|
4429
|
-
"argsType": "ContourHandle",
|
|
4692
|
+
"argsType": "| [section: ContourHandle, length: number, direction?: Vec3Handle]\n | [axis: LineHandle, options: PluginFamilyPlacement]",
|
|
4430
4693
|
"resultType": "ComponentHandle"
|
|
4431
4694
|
},
|
|
4432
4695
|
{
|
|
@@ -4442,6 +4705,17 @@
|
|
|
4442
4705
|
"argsType": "PluginBuildableEnvelopePolygonVertex[]",
|
|
4443
4706
|
"resultType": "PluginBuildableEnvelopeCreateResult"
|
|
4444
4707
|
},
|
|
4708
|
+
{
|
|
4709
|
+
"path": "design.create.buildableEnvelopeFromSite",
|
|
4710
|
+
"namespace": "design.create",
|
|
4711
|
+
"summary": "Create a default buildable envelope for an existing site — the same as the right panel's \"Create Buildable Envelope\" button. Front, side and rear distances are seeded from Site Analysis or the Program sheet, with a 10 ft fallback, and the envelope is linked to the site. Call it only after the user agrees (for example when `design.update.siteEdge` throws `NO_BUILDABLE_ENVELOPE`).",
|
|
4712
|
+
"examplePrompts": [
|
|
4713
|
+
"Create a buildable envelope for this site with default setbacks",
|
|
4714
|
+
"Add the zoning envelope to my site\n\n# Example\n```ts\nconst [{ siteId }] = (await snaptrude.program.site.listEdges()).sites\nconst { buildableEnvelopeId } =\nawait snaptrude.design.create.buildableEnvelopeFromSite(siteId)\n```"
|
|
4715
|
+
],
|
|
4716
|
+
"argsType": "string",
|
|
4717
|
+
"resultType": "PluginDesignCreateBuildableEnvelopeFromSiteResult"
|
|
4718
|
+
},
|
|
4445
4719
|
{
|
|
4446
4720
|
"path": "design.create.ceiling",
|
|
4447
4721
|
"namespace": "design.create",
|
|
@@ -4452,7 +4726,7 @@
|
|
|
4452
4726
|
"Put a dropped ceiling in the living room at 3 metres",
|
|
4453
4727
|
"Add a 50mm thick ceiling lifted 2800mm from floor level\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(5, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst ceiling = await snaptrude.design.create.ceiling(contour, 0.05, 2.8)\n```"
|
|
4454
4728
|
],
|
|
4455
|
-
"argsType": "ContourHandle",
|
|
4729
|
+
"argsType": "| [contour: ContourHandle, thickness: number, heightFromFloor?: number]\n | [contour: ContourHandle, options: PluginFamilyCeilingOptions]",
|
|
4456
4730
|
"resultType": "ComponentHandle"
|
|
4457
4731
|
},
|
|
4458
4732
|
{
|
|
@@ -4465,7 +4739,7 @@
|
|
|
4465
4739
|
"Create a 450mm square concrete column 4 metres high",
|
|
4466
4740
|
"Stand a column up from this base point\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.45, 0.45)\nconst crossSection = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst base = await snaptrude.core.math.vec3.new(4, 0, 4)\nconst column = await snaptrude.design.create.column(base, crossSection, 3)\n```"
|
|
4467
4741
|
],
|
|
4468
|
-
"argsType": "Vec3Handle",
|
|
4742
|
+
"argsType": "| [\n position: Vec3Handle,\n crossSection: ContourHandle,\n height: number,\n directionUp?: Vec3Handle,\n ]\n | [axis: LineHandle, options: PluginFamilyPlacement]",
|
|
4469
4743
|
"resultType": "ComponentHandle"
|
|
4470
4744
|
},
|
|
4471
4745
|
{
|
|
@@ -4482,13 +4756,12 @@
|
|
|
4482
4756
|
{
|
|
4483
4757
|
"path": "design.create.copy",
|
|
4484
4758
|
"namespace": "design.create",
|
|
4485
|
-
"summary": "**Copy** existing entities, offsetting each copy by `displacement * i` (i = 1…count), source positions preserved. Migrated from the removed `tools.copy`.
|
|
4759
|
+
"summary": "**Copy** existing entities, offsetting each copy by `displacement * i` (i = 1…count), source positions preserved. Migrated from the removed `tools.copy`. The created copies become the active selection. Undoable.",
|
|
4486
4760
|
"examplePrompts": [
|
|
4487
4761
|
"Copy this room 3 times spaced 6m apart",
|
|
4488
4762
|
"Duplicate the selected furniture along the X axis",
|
|
4489
4763
|
"Make 5 copies of this column at 4 metre intervals",
|
|
4490
|
-
"Array these walls with a 3m offset"
|
|
4491
|
-
"Clone the desk as a unique copy, not an instance"
|
|
4764
|
+
"Array these walls with a 3m offset"
|
|
4492
4765
|
],
|
|
4493
4766
|
"argsType": "ComponentHandle[]",
|
|
4494
4767
|
"resultType": "ComponentHandle[]",
|
|
@@ -4497,7 +4770,7 @@
|
|
|
4497
4770
|
{
|
|
4498
4771
|
"path": "design.create.door",
|
|
4499
4772
|
"namespace": "design.create",
|
|
4500
|
-
"summary": "Place a **door**
|
|
4773
|
+
"summary": "Place a parametric **door** family into a host wall.",
|
|
4501
4774
|
"examplePrompts": [
|
|
4502
4775
|
"Add a door to this wall here",
|
|
4503
4776
|
"Place a sliding door on the selected wall",
|
|
@@ -4514,7 +4787,7 @@
|
|
|
4514
4787
|
{
|
|
4515
4788
|
"path": "design.create.doors",
|
|
4516
4789
|
"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
|
|
4790
|
+
"summary": "Place **many doors** into host walls in one undoable operation (bulk plural of {@linkcode door}). Each item carries its own family 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
4791
|
"examplePrompts": [
|
|
4519
4792
|
"Add doors to all of these walls at once",
|
|
4520
4793
|
"Place a door in every room in one operation",
|
|
@@ -4524,7 +4797,7 @@
|
|
|
4524
4797
|
],
|
|
4525
4798
|
"argsType": "PluginCreateDoorItem[]",
|
|
4526
4799
|
"resultType": "ComponentHandle[]",
|
|
4527
|
-
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry
|
|
4800
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. 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([ { familyId: entry.id, hostWall: wall, position: await v.new(2, 0, 5), label: \"D-01\" }, { familyId: entry.id, hostWall: wall, position: await v.new(6, 0, 5), values: { width: \"1200mm\" } }, ]) // The host still resolves after both cuts: const currentWall = await snaptrude.design.query.getHost(front) ```"
|
|
4528
4801
|
},
|
|
4529
4802
|
{
|
|
4530
4803
|
"path": "design.create.floor",
|
|
@@ -4536,9 +4809,9 @@
|
|
|
4536
4809
|
"Lay flooring across the selected outline",
|
|
4537
4810
|
"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```"
|
|
4538
4811
|
],
|
|
4539
|
-
"argsType": "ContourHandle",
|
|
4540
|
-
"resultType": "ComponentHandle",
|
|
4541
|
-
"performance": "For
|
|
4812
|
+
"argsType": "| [contour: ContourHandle, thickness: number, position?: Vec3Handle]\n | [contour: ContourHandle, options: PluginFamilyFloorOptions]",
|
|
4813
|
+
"resultType": "ComponentHandle[]",
|
|
4814
|
+
"performance": "For dimensional floors, `design.create.floors(items[])` uses one host round-trip and one undo entry. That bulk method does not accept native family options; use this method for a family-backed floor."
|
|
4542
4815
|
},
|
|
4543
4816
|
{
|
|
4544
4817
|
"path": "design.create.floors",
|
|
@@ -4650,14 +4923,14 @@
|
|
|
4650
4923
|
{
|
|
4651
4924
|
"path": "design.create.opening",
|
|
4652
4925
|
"namespace": "design.create",
|
|
4653
|
-
"summary": "Place a
|
|
4926
|
+
"summary": "Place a parametric **door or window** into a host wall with parameter overrides.",
|
|
4654
4927
|
"examplePrompts": [
|
|
4655
4928
|
"Add a 1m wide door to this wall here",
|
|
4656
4929
|
"Place a window with a 0.9m sill height on the selected wall"
|
|
4657
4930
|
],
|
|
4658
4931
|
"argsType": "PluginDesignCreateOpeningOptions",
|
|
4659
4932
|
"resultType": "ComponentHandle",
|
|
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\",
|
|
4933
|
+
"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\", familyId: windowType.id, hostWall: wall, position: await snaptrude.core.math.vec3.new(3, 0, 5), width: 1.2, height: 1.5, sillHeight: 0.9, }) ```"
|
|
4661
4934
|
},
|
|
4662
4935
|
{
|
|
4663
4936
|
"path": "design.create.referenceLines",
|
|
@@ -4697,7 +4970,7 @@
|
|
|
4697
4970
|
"Make a basement slab that extrudes downward",
|
|
4698
4971
|
"Give this room outline a 6 inch slab\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(12, 10)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst slab = await snaptrude.design.create.slab(contour, 0.15, \"down\", \"Plinth\")\n```"
|
|
4699
4972
|
],
|
|
4700
|
-
"argsType": "ContourHandle",
|
|
4973
|
+
"argsType": "| [\n contour: ContourHandle,\n thickness: number,\n direction?: \"up\" | \"down\",\n slabType?: PluginSlabType,\n ]\n | [contour: ContourHandle, options: PluginFamilySlabOptions]",
|
|
4701
4974
|
"resultType": "ComponentHandle"
|
|
4702
4975
|
},
|
|
4703
4976
|
{
|
|
@@ -4759,20 +5032,54 @@
|
|
|
4759
5032
|
"argsType": "PluginStaircasePreset",
|
|
4760
5033
|
"resultType": "ComponentHandle"
|
|
4761
5034
|
},
|
|
5035
|
+
{
|
|
5036
|
+
"path": "design.create.void",
|
|
5037
|
+
"namespace": "design.create",
|
|
5038
|
+
"summary": "Cut a **void** — a hole, opening or shaft — through an existing FLAT slab, floor, roof or ceiling. The void is a selectable child object of its host (the \"Void\" of the Draw Void tool). It always cuts the full host thickness. It can be moved with `design.transform.move` (a move that would leave the host is shortened without a report) and removed with `design.delete.entities`; to resize, delete it and cut a new one (`design.update.space` refuses a void).",
|
|
5039
|
+
"examplePrompts": [
|
|
5040
|
+
"Cut a hole in this slab",
|
|
5041
|
+
"Add a 1.2m by 2.4m stair opening in the first-floor slab",
|
|
5042
|
+
"Make a 600 x 600 service penetration in the floor for the riser",
|
|
5043
|
+
"Put a skylight opening through the roof",
|
|
5044
|
+
"Cut a round 1m duct hole in the slab",
|
|
5045
|
+
"Make a cut-out in the ceiling for the light well",
|
|
5046
|
+
"Add a double-height atrium void in the level 2 floor"
|
|
5047
|
+
],
|
|
5048
|
+
"argsType": "ComponentHandle",
|
|
5049
|
+
"resultType": "ComponentHandle",
|
|
5050
|
+
"performance": "Single-void creator. For MORE THAN ONE void, call `design.create.voids(items[])`: one host round-trip, ONE undo entry, one cut per host."
|
|
5051
|
+
},
|
|
5052
|
+
{
|
|
5053
|
+
"path": "design.create.voids",
|
|
5054
|
+
"namespace": "design.create",
|
|
5055
|
+
"summary": "Cut **many voids** (holes, openings, shafts) through slabs, floors, roofs and ceilings in one undoable operation (bulk plural of {@linkcode void}). Items may share a host or use different hosts — one shaft outline on every storey's slab AND floor is one call. Validate-all-or-throw: one item whose host does not contain the outline rejects the whole batch, so pass only the hosts that contain it; `details.itemIndex` names the failing item (for two overlapping items of the batch, the earlier one). At most 50 voids per host and 200 in all per call. Same outline rules as {@linkcode void}: plan outline, 25.4 mm (0.1 SU) clearance, floor AND slab are separate hosts. Call it as `snaptrude.design.create.voids(...)`.",
|
|
5056
|
+
"examplePrompts": [
|
|
5057
|
+
"Cut a lift shaft through every floor slab of the core",
|
|
5058
|
+
"Cut a 2m x 2m shaft through all the slabs at this location",
|
|
5059
|
+
"Make stair openings in all the floors above the staircases",
|
|
5060
|
+
"Make holes in the roof for these three skylights",
|
|
5061
|
+
"Cut openings in each storey's slab matching this outline",
|
|
5062
|
+
"Punch the same riser penetration through every floor at once"
|
|
5063
|
+
],
|
|
5064
|
+
"argsType": "PluginCreateVoidItem[]",
|
|
5065
|
+
"resultType": "ComponentHandle[]",
|
|
5066
|
+
"performance": "ONE host round-trip, ONE undo entry, ONE cut per host. Never call `void` in a loop. Runs synchronously on the main thread: 50 voids on one host take about 1 s, and the time grows with the number of hosts (caps: 50 per host, 200 per call)."
|
|
5067
|
+
},
|
|
4762
5068
|
{
|
|
4763
5069
|
"path": "design.create.wallRuns",
|
|
4764
5070
|
"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.",
|
|
5071
|
+
"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. Per-curve `topProfiles` make raked or gabled walls (see {@linkcode PluginWallTopProfile}). Validate-all-or-throw; one command.",
|
|
4766
5072
|
"examplePrompts": [
|
|
4767
5073
|
"Draw all the walls of this floor plan at once",
|
|
4768
5074
|
"Build every room's perimeter in one operation",
|
|
4769
5075
|
"Bulk create wall runs from these centerlines",
|
|
4770
5076
|
"Create the walls for both storeys in a single undo step",
|
|
4771
|
-
"Turn these polylines into 200mm brick walls together"
|
|
5077
|
+
"Turn these polylines into 200mm brick walls together",
|
|
5078
|
+
"Import these raked walls with their top profiles in one go"
|
|
4772
5079
|
],
|
|
4773
5080
|
"argsType": "PluginCreateWallRunItem[]",
|
|
4774
5081
|
"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\") ```"
|
|
5082
|
+
"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 }, // one gable wall: 3m at both ends, 5m ridge in the middle { profile: upper, thickness: 0.2, storey: 3, topProfiles: [[{ along: 0, height: 3 }, { along: 0.5, height: 5 }, { along: 1, height: 3 }]] }, ]) console.log(groundWalls.length, \"walls on the ground floor\") ```"
|
|
4776
5083
|
},
|
|
4777
5084
|
{
|
|
4778
5085
|
"path": "design.create.walls",
|
|
@@ -4785,7 +5092,10 @@
|
|
|
4785
5092
|
"Turn this polyline sketch into walls",
|
|
4786
5093
|
"Add walls with mitred corners along the path",
|
|
4787
5094
|
"Draw brick walls with plaster along this outline",
|
|
4788
|
-
"Build the perimeter in exposed concrete walls
|
|
5095
|
+
"Build the perimeter in exposed concrete walls",
|
|
5096
|
+
"Create a raked wall that slopes from 3m to 5m",
|
|
5097
|
+
"Build a gable end wall with the ridge in the middle",
|
|
5098
|
+
"Draw a wall with a sloped top edge\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// …a raked wall (3m at the start, 5m at the end) on a single centerline:\nconst run = await snaptrude.core.geom.create.profileFromCurves([\nawait snaptrude.core.geom.create.line(await v.new(0, 0, 10), await v.new(8, 0, 10)),\n])\nconst [raked] = await snaptrude.design.create.walls(run, undefined, 0.2, undefined, undefined, [\n[{ along: 0, height: 3 }, { along: 1, height: 5 }],\n])\n```"
|
|
4789
5099
|
],
|
|
4790
5100
|
"argsType": "ProfileHandle",
|
|
4791
5101
|
"resultType": "ComponentHandle[]",
|
|
@@ -4794,7 +5104,7 @@
|
|
|
4794
5104
|
{
|
|
4795
5105
|
"path": "design.create.window",
|
|
4796
5106
|
"namespace": "design.create",
|
|
4797
|
-
"summary": "Place a **window**
|
|
5107
|
+
"summary": "Place a parametric **window** family into a host wall.",
|
|
4798
5108
|
"examplePrompts": [
|
|
4799
5109
|
"Add a window to this wall here",
|
|
4800
5110
|
"Place a casement window on the selected wall",
|
|
@@ -4810,7 +5120,7 @@
|
|
|
4810
5120
|
{
|
|
4811
5121
|
"path": "design.create.windows",
|
|
4812
5122
|
"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
|
|
5123
|
+
"summary": "Place **many windows** into host walls in one undoable operation (bulk plural of {@linkcode window}). Each item carries its own family 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
5124
|
"examplePrompts": [
|
|
4815
5125
|
"Add windows along this whole facade at once",
|
|
4816
5126
|
"Place a window in every bedroom in one operation",
|
|
@@ -4820,7 +5130,7 @@
|
|
|
4820
5130
|
],
|
|
4821
5131
|
"argsType": "PluginCreateWindowItem[]",
|
|
4822
5132
|
"resultType": "ComponentHandle[]",
|
|
4823
|
-
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry
|
|
5133
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. 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([ { familyId: casement.id, hostWall: wall, position: await v.new(2, 0, 5), values: { sill: \"900mm\" } }, { familyId: casement.id, hostWall: wall, position: await v.new(5, 0, 5), values: { sill: \"900mm\" } }, ]) const currentWall = await snaptrude.design.query.getHost(placed[0]) ```"
|
|
4824
5134
|
},
|
|
4825
5135
|
{
|
|
4826
5136
|
"path": "design.delete.entities",
|
|
@@ -4831,7 +5141,8 @@
|
|
|
4831
5141
|
"Remove these walls from the model",
|
|
4832
5142
|
"Get rid of this mass entirely",
|
|
4833
5143
|
"Delete all the furniture I picked",
|
|
4834
|
-
"Remove the door and window I just created"
|
|
5144
|
+
"Remove the door and window I just created",
|
|
5145
|
+
"Remove the void I cut in this slab"
|
|
4835
5146
|
],
|
|
4836
5147
|
"argsType": "ComponentHandle[]",
|
|
4837
5148
|
"resultType": "PluginDesignChangeResult",
|
|
@@ -4942,7 +5253,7 @@
|
|
|
4942
5253
|
{
|
|
4943
5254
|
"path": "design.doors.getDimensions",
|
|
4944
5255
|
"namespace": "design.doors",
|
|
4945
|
-
"summary": "Get
|
|
5256
|
+
"summary": "Get evaluated opening width/height and host thickness, in Snaptrude units. The opening can include allowances beyond the width/height input parameters.",
|
|
4946
5257
|
"examplePrompts": [
|
|
4947
5258
|
"What are the dimensions of this door?",
|
|
4948
5259
|
"How big is the selected door?",
|
|
@@ -4981,7 +5292,7 @@
|
|
|
4981
5292
|
{
|
|
4982
5293
|
"path": "design.doors.getSupportFloor",
|
|
4983
5294
|
"namespace": "design.doors",
|
|
4984
|
-
"summary": "
|
|
5295
|
+
"summary": "Returns null for recipe doors. Room floors own doorway infill; there is no separate support-floor entity.",
|
|
4985
5296
|
"examplePrompts": [
|
|
4986
5297
|
"Which floor is this door on?",
|
|
4987
5298
|
"What storey does the selected door belong to?",
|
|
@@ -4994,7 +5305,7 @@
|
|
|
4994
5305
|
{
|
|
4995
5306
|
"path": "design.doors.getSwingDirection",
|
|
4996
5307
|
"namespace": "design.doors",
|
|
4997
|
-
"summary": "
|
|
5308
|
+
"summary": "Read the saved hand parameter. left means local -X; right means local +X. Returns null when the recipe does not declare that control.",
|
|
4998
5309
|
"examplePrompts": [
|
|
4999
5310
|
"Which way does this door swing?",
|
|
5000
5311
|
"Is the selected door left-handed or right-handed?",
|
|
@@ -5059,7 +5370,7 @@
|
|
|
5059
5370
|
{
|
|
5060
5371
|
"path": "design.doors.mirror",
|
|
5061
5372
|
"namespace": "design.doors",
|
|
5062
|
-
"summary": "
|
|
5373
|
+
"summary": "Change authored controls in one undo step: x (default) toggles swing front/back; z toggles hand left/right. The recipe must declare these enums. Axis y rejects. No mesh reflection occurs. Recipes use outputs.swingSide (1 or -1) for the adjoining room's floor ownership. A door between two room floors requires this output; a missing or invalid report rejects the cut.",
|
|
5063
5374
|
"examplePrompts": [
|
|
5064
5375
|
"Flip this door's swing",
|
|
5065
5376
|
"Mirror the selected door",
|
|
@@ -5110,6 +5421,46 @@
|
|
|
5110
5421
|
"argsType": "ComponentHandle",
|
|
5111
5422
|
"resultType": "OffsetSplitOutcome"
|
|
5112
5423
|
},
|
|
5424
|
+
{
|
|
5425
|
+
"path": "design.electrical.context",
|
|
5426
|
+
"namespace": "design.electrical",
|
|
5427
|
+
"summary": "Read the active proposal's architectural context before authoring. Keep one revision across pages.",
|
|
5428
|
+
"examplePrompts": [],
|
|
5429
|
+
"argsType": "z.input<typeof NetworkContextArgs>",
|
|
5430
|
+
"resultType": "NetworkContextResult"
|
|
5431
|
+
},
|
|
5432
|
+
{
|
|
5433
|
+
"path": "design.electrical.create",
|
|
5434
|
+
"namespace": "design.electrical",
|
|
5435
|
+
"summary": "Construct each node on its authored storey, with one undo command and queued project persistence. Networks can span storeys. Reuse requestId on retry; components returns the durable node mapping. Coordinates are world millimetres, Y-up; rotations are degrees. No engineering rules are inferred. Throws for stale architecture, invalid references/geometry or conflicting retries.",
|
|
5436
|
+
"examplePrompts": [],
|
|
5437
|
+
"argsType": "z.input<typeof NetworkCreateArgs>",
|
|
5438
|
+
"resultType": "NetworkCreateResult"
|
|
5439
|
+
},
|
|
5440
|
+
{
|
|
5441
|
+
"path": "design.electrical.get",
|
|
5442
|
+
"namespace": "design.electrical",
|
|
5443
|
+
"summary": "Read one saved graph in the active proposal; null on miss. IDs are durable, not worker handles.",
|
|
5444
|
+
"examplePrompts": [],
|
|
5445
|
+
"argsType": "z.input<typeof NetworkGetArgs>",
|
|
5446
|
+
"resultType": "SavedNetworkGraph | null"
|
|
5447
|
+
},
|
|
5448
|
+
{
|
|
5449
|
+
"path": "design.electrical.query",
|
|
5450
|
+
"namespace": "design.electrical",
|
|
5451
|
+
"summary": "Read bounded authored topology in graph revision. Crossings do not connect. No clash/compliance claims.",
|
|
5452
|
+
"examplePrompts": [],
|
|
5453
|
+
"argsType": "z.input<typeof NetworkQueryArgs>",
|
|
5454
|
+
"resultType": "NetworkQueryResult"
|
|
5455
|
+
},
|
|
5456
|
+
{
|
|
5457
|
+
"path": "design.electrical.validate",
|
|
5458
|
+
"namespace": "design.electrical",
|
|
5459
|
+
"summary": "Validate authored JSON, pinned families and recipe evaluation without placing or saving anything. This does not build kernel meshes or certify engineering/code compliance.",
|
|
5460
|
+
"examplePrompts": [],
|
|
5461
|
+
"argsType": "z.input<typeof NetworkValidateArgs>",
|
|
5462
|
+
"resultType": "NetworkValidation"
|
|
5463
|
+
},
|
|
5113
5464
|
{
|
|
5114
5465
|
"path": "design.erase.edge",
|
|
5115
5466
|
"namespace": "design.erase",
|
|
@@ -5140,7 +5491,7 @@
|
|
|
5140
5491
|
{
|
|
5141
5492
|
"path": "design.family.create",
|
|
5142
5493
|
"namespace": "design.family",
|
|
5143
|
-
"summary": "
|
|
5494
|
+
"summary": "Save the prepared bundle to the library: the open project's team library in a team project, else the user's personal library. `teamId` picks another team, and `null` the personal library. {@linkcode PluginDesignFamilyApi.place} already saves generic components. Hosted doors/windows save without placement; they need a wall and position through `design.create.door` / `design.create.window`. For a non-hosted family with no placed instance, saving also drops one standalone sample at the current view centre on the active storey (`placed: true`). This includes architectural families: the sample does not assign a family to a native host.",
|
|
5144
5495
|
"examplePrompts": [
|
|
5145
5496
|
"Save this as a family called Vertical Louvre",
|
|
5146
5497
|
"Add it to my library\n\n# Example\n```ts\nconst { definitionId } = await snaptrude.design.family.create({ name: \"Louvre Screen\" })\n```"
|
|
@@ -5156,9 +5507,17 @@
|
|
|
5156
5507
|
"Delete the Louvre Screen family from my library",
|
|
5157
5508
|
"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
5509
|
],
|
|
5159
|
-
"argsType": "PluginDesignFamilyDeleteArgs",
|
|
5510
|
+
"argsType": "PluginDesignFamilyDeleteArgs | string",
|
|
5160
5511
|
"resultType": "PluginFamilyDeleteResult"
|
|
5161
5512
|
},
|
|
5513
|
+
{
|
|
5514
|
+
"path": "design.family.duplicate",
|
|
5515
|
+
"namespace": "design.family",
|
|
5516
|
+
"summary": "Assign one placed recipe family or parametric door/window to a new project family. Does not copy geometry, publish a library or alter native system families. Subsequent authored parameter edits no longer affect the original family. Undo restores the original family identity and name together. This is project-only. If the user requests both an independent project family and a library asset, call duplicate first, then saveToLibrary with the same component. If they request a library save later, call saveToLibrary alone; do not duplicate again.",
|
|
5517
|
+
"examplePrompts": [],
|
|
5518
|
+
"argsType": "PluginDesignFamilyDuplicateArgs",
|
|
5519
|
+
"resultType": "PluginFamilyDuplicateResult"
|
|
5520
|
+
},
|
|
5162
5521
|
{
|
|
5163
5522
|
"path": "design.family.flex",
|
|
5164
5523
|
"namespace": "design.family",
|
|
@@ -5178,9 +5537,28 @@
|
|
|
5178
5537
|
"Make the chairs I placed 50 mm wider",
|
|
5179
5538
|
"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
5539
|
],
|
|
5181
|
-
"argsType": "PluginDesignFamilyGetArgs",
|
|
5540
|
+
"argsType": "PluginDesignFamilyGetArgs | string",
|
|
5182
5541
|
"resultType": "PluginFamilyGetResult | null"
|
|
5183
5542
|
},
|
|
5543
|
+
{
|
|
5544
|
+
"path": "design.family.getDefinition",
|
|
5545
|
+
"namespace": "design.family",
|
|
5546
|
+
"summary": "Read one saved catalog definition without opening a draft or placing geometry. Both id and version are required. The catalog checks access on every read. Length defaults and bounds are in mm, ready for network graph overrides; angle parameters retain degrees, identified by each parameter's unit. existing getParameters/place/setParameters continue to use Snaptrude units. Defaults include current catalog overrides, which can change without a new version. No scene, registry, history, or persistence state is changed. Missing/inaccessible pins and invalid recipes fail; no latest-version fallback. This metadata does not certify connectors or engineering compatibility.",
|
|
5547
|
+
"examplePrompts": [],
|
|
5548
|
+
"argsType": "PluginDesignFamilyGetDefinitionArgs",
|
|
5549
|
+
"resultType": "PluginFamilyDefinition"
|
|
5550
|
+
},
|
|
5551
|
+
{
|
|
5552
|
+
"path": "design.family.getExamples",
|
|
5553
|
+
"namespace": "design.family",
|
|
5554
|
+
"summary": "Worked example families to learn from: real, tested bundles by discipline (architecture, structure, MEP, furniture). With no `id`, returns the catalogue — each example's id, label, discipline and the patterns it teaches — filtered by `discipline` / `tag` when given. With an `id`, returns that example's full bundle. Fetch the one closest to the task before authoring and borrow its patterns; examples are patterns to combine, not templates to copy whole.",
|
|
5555
|
+
"examplePrompts": [
|
|
5556
|
+
"Show me an example of a structural family",
|
|
5557
|
+
"How is a hosted door family written?\n\n# Example\n```ts\nconst list = await snaptrude.design.family.getExamples({ discipline: \"mep\" })\nconst ex = await snaptrude.design.family.getExamples({ id: list[0].id })\n```"
|
|
5558
|
+
],
|
|
5559
|
+
"argsType": "PluginDesignFamilyGetExamplesArgs | string",
|
|
5560
|
+
"resultType": "PluginFamilyExampleSummary[] | PluginFamilyExample"
|
|
5561
|
+
},
|
|
5184
5562
|
{
|
|
5185
5563
|
"path": "design.family.getParameters",
|
|
5186
5564
|
"namespace": "design.family",
|
|
@@ -5200,19 +5578,43 @@
|
|
|
5200
5578
|
"How do I write a parametric family spec?",
|
|
5201
5579
|
"Show me the family DSL\n\n# Example\n```ts\nconst { reference } = await snaptrude.design.family.getReference()\n```"
|
|
5202
5580
|
],
|
|
5203
|
-
"argsType":
|
|
5581
|
+
"argsType": "PluginDesignFamilyGetReferenceArgs | PluginFamilyReferenceSection",
|
|
5204
5582
|
"resultType": "PluginFamilyReference"
|
|
5205
5583
|
},
|
|
5584
|
+
{
|
|
5585
|
+
"path": "design.family.getTemplate",
|
|
5586
|
+
"namespace": "design.family",
|
|
5587
|
+
"summary": "Get a validated starter recipe for a door or window, with an opening contract, host wall-thickness binding and role-named parts. Edit profiles, panels, glazing, hardware and materials while preserving the contract. Use `prepare` / `flex` to check the recipe, then `create` to save it and `design.create.door(familyId, hostWall, position, { version, values }, facing)` (or `window`) to place it. Edit the resulting ParametricComponent through `getParameters` / `setParameters`, not a separate opening API.",
|
|
5588
|
+
"examplePrompts": [],
|
|
5589
|
+
"argsType": "PluginDesignFamilyGetTemplateArgs",
|
|
5590
|
+
"resultType": "PluginFamilyTemplateResult"
|
|
5591
|
+
},
|
|
5206
5592
|
{
|
|
5207
5593
|
"path": "design.family.list",
|
|
5208
5594
|
"namespace": "design.family",
|
|
5209
|
-
"summary": "Every parametric family
|
|
5595
|
+
"summary": "Every available parametric family, merging the session registry and catalog.",
|
|
5210
5596
|
"examplePrompts": [
|
|
5211
5597
|
"What families are available?\n\n# Example\n```ts\nconst families = await snaptrude.design.family.list()\n```"
|
|
5212
5598
|
],
|
|
5213
|
-
"argsType":
|
|
5599
|
+
"argsType": "PluginDesignFamilyListArgs & { compact: true }",
|
|
5600
|
+
"resultType": "string[]"
|
|
5601
|
+
},
|
|
5602
|
+
{
|
|
5603
|
+
"path": "design.family.list",
|
|
5604
|
+
"namespace": "design.family",
|
|
5605
|
+
"summary": "",
|
|
5606
|
+
"examplePrompts": [],
|
|
5607
|
+
"argsType": "PluginDesignFamilyListArgs & { compact?: false }",
|
|
5214
5608
|
"resultType": "PluginFamilySummary[]"
|
|
5215
5609
|
},
|
|
5610
|
+
{
|
|
5611
|
+
"path": "design.family.list",
|
|
5612
|
+
"namespace": "design.family",
|
|
5613
|
+
"summary": "",
|
|
5614
|
+
"examplePrompts": [],
|
|
5615
|
+
"argsType": "PluginDesignFamilyListArgs",
|
|
5616
|
+
"resultType": "PluginFamilySummary[] | string[]"
|
|
5617
|
+
},
|
|
5216
5618
|
{
|
|
5217
5619
|
"path": "design.family.place",
|
|
5218
5620
|
"namespace": "design.family",
|
|
@@ -5220,7 +5622,7 @@
|
|
|
5220
5622
|
"examplePrompts": [
|
|
5221
5623
|
"Place it in the model",
|
|
5222
5624
|
"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```"
|
|
5625
|
+
"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// on the first floor — position.y is an offset above storey 2's base\nawait snaptrude.design.family.place({ id: familyId, position: { x: 4, y: 0, z: 0 }, storey: 2 })\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
5626
|
],
|
|
5225
5627
|
"argsType": "PluginDesignFamilyPlaceArgs",
|
|
5226
5628
|
"resultType": "PluginFamilyPlaceResult"
|
|
@@ -5228,19 +5630,28 @@
|
|
|
5228
5630
|
{
|
|
5229
5631
|
"path": "design.family.prepare",
|
|
5230
5632
|
"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}
|
|
5633
|
+
"summary": "Validate, compile and preview a family spec. Nothing is committed to the model or the library — call {@linkcode PluginDesignFamilyApi.place} to put it in the model, which also saves it.",
|
|
5232
5634
|
"examplePrompts": [
|
|
5233
5635
|
"Make a louvre screen with adjustable blade count and tilt",
|
|
5234
5636
|
"Design a curtain wall panel family with 8 bays",
|
|
5235
|
-
"Create a railing family I can adjust
|
|
5637
|
+
"Create a railing family I can adjust",
|
|
5638
|
+
"Make a pendant lamp family with a domed shade I can resize\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
5639
|
],
|
|
5237
5640
|
"argsType": "PluginDesignFamilyPrepareArgs",
|
|
5238
5641
|
"resultType": "PluginFamilyPrepareResult"
|
|
5239
5642
|
},
|
|
5643
|
+
{
|
|
5644
|
+
"path": "design.family.saveToLibrary",
|
|
5645
|
+
"namespace": "design.family",
|
|
5646
|
+
"summary": "Save a placed recipe family or parametric door/window's current authored configuration as a separate library asset. Does not place geometry, reassign any model component, overwrite the original library asset or publish publicly.",
|
|
5647
|
+
"examplePrompts": [],
|
|
5648
|
+
"argsType": "PluginDesignFamilySaveToLibraryArgs",
|
|
5649
|
+
"resultType": "PluginFamilySaveToLibraryResult"
|
|
5650
|
+
},
|
|
5240
5651
|
{
|
|
5241
5652
|
"path": "design.family.setParameters",
|
|
5242
5653
|
"namespace": "design.family",
|
|
5243
|
-
"summary": "Change
|
|
5654
|
+
"summary": "Change authored parameters across the selected component's project family. Use `duplicate({ component, name })` first for an independent project variant. This never publishes or modifies a library. Only changed authored values propagate; placement, hosting, links and relations remain local. A locked family member or host refuses a shared edit. Mixed requests containing links, relations and parameters are not one atomic transaction.",
|
|
5244
5655
|
"examplePrompts": [
|
|
5245
5656
|
"Make that table seat 8",
|
|
5246
5657
|
"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```"
|
|
@@ -5654,6 +6065,86 @@
|
|
|
5654
6065
|
"argsType": "ComponentHandle",
|
|
5655
6066
|
"resultType": "PluginMaterialResult"
|
|
5656
6067
|
},
|
|
6068
|
+
{
|
|
6069
|
+
"path": "design.mechanical.context",
|
|
6070
|
+
"namespace": "design.mechanical",
|
|
6071
|
+
"summary": "Read the active proposal's architectural context before authoring. Keep one revision across pages.",
|
|
6072
|
+
"examplePrompts": [],
|
|
6073
|
+
"argsType": "z.input<typeof NetworkContextArgs>",
|
|
6074
|
+
"resultType": "NetworkContextResult"
|
|
6075
|
+
},
|
|
6076
|
+
{
|
|
6077
|
+
"path": "design.mechanical.create",
|
|
6078
|
+
"namespace": "design.mechanical",
|
|
6079
|
+
"summary": "Construct each node on its authored storey, with one undo command and queued project persistence. Networks can span storeys. Reuse requestId on retry; components returns the durable node mapping. Coordinates are world millimetres, Y-up; rotations are degrees. No engineering rules are inferred. Throws for stale architecture, invalid references/geometry or conflicting retries.",
|
|
6080
|
+
"examplePrompts": [],
|
|
6081
|
+
"argsType": "z.input<typeof NetworkCreateArgs>",
|
|
6082
|
+
"resultType": "NetworkCreateResult"
|
|
6083
|
+
},
|
|
6084
|
+
{
|
|
6085
|
+
"path": "design.mechanical.get",
|
|
6086
|
+
"namespace": "design.mechanical",
|
|
6087
|
+
"summary": "Read one saved graph in the active proposal; null on miss. IDs are durable, not worker handles.",
|
|
6088
|
+
"examplePrompts": [],
|
|
6089
|
+
"argsType": "z.input<typeof NetworkGetArgs>",
|
|
6090
|
+
"resultType": "SavedNetworkGraph | null"
|
|
6091
|
+
},
|
|
6092
|
+
{
|
|
6093
|
+
"path": "design.mechanical.query",
|
|
6094
|
+
"namespace": "design.mechanical",
|
|
6095
|
+
"summary": "Read bounded authored topology in graph revision. Crossings do not connect. No clash/compliance claims.",
|
|
6096
|
+
"examplePrompts": [],
|
|
6097
|
+
"argsType": "z.input<typeof NetworkQueryArgs>",
|
|
6098
|
+
"resultType": "NetworkQueryResult"
|
|
6099
|
+
},
|
|
6100
|
+
{
|
|
6101
|
+
"path": "design.mechanical.validate",
|
|
6102
|
+
"namespace": "design.mechanical",
|
|
6103
|
+
"summary": "Validate authored JSON, pinned families and recipe evaluation without placing or saving anything. This does not build kernel meshes or certify engineering/code compliance.",
|
|
6104
|
+
"examplePrompts": [],
|
|
6105
|
+
"argsType": "z.input<typeof NetworkValidateArgs>",
|
|
6106
|
+
"resultType": "NetworkValidation"
|
|
6107
|
+
},
|
|
6108
|
+
{
|
|
6109
|
+
"path": "design.plumbing.context",
|
|
6110
|
+
"namespace": "design.plumbing",
|
|
6111
|
+
"summary": "Read the active proposal's architectural context before authoring. Keep one revision across pages.",
|
|
6112
|
+
"examplePrompts": [],
|
|
6113
|
+
"argsType": "z.input<typeof NetworkContextArgs>",
|
|
6114
|
+
"resultType": "NetworkContextResult"
|
|
6115
|
+
},
|
|
6116
|
+
{
|
|
6117
|
+
"path": "design.plumbing.create",
|
|
6118
|
+
"namespace": "design.plumbing",
|
|
6119
|
+
"summary": "Construct each node on its authored storey, with one undo command and queued project persistence. Networks can span storeys. Reuse requestId on retry; components returns the durable node mapping. Coordinates are world millimetres, Y-up; rotations are degrees. No engineering rules are inferred. Throws for stale architecture, invalid references/geometry or conflicting retries.",
|
|
6120
|
+
"examplePrompts": [],
|
|
6121
|
+
"argsType": "z.input<typeof NetworkCreateArgs>",
|
|
6122
|
+
"resultType": "NetworkCreateResult"
|
|
6123
|
+
},
|
|
6124
|
+
{
|
|
6125
|
+
"path": "design.plumbing.get",
|
|
6126
|
+
"namespace": "design.plumbing",
|
|
6127
|
+
"summary": "Read one saved graph in the active proposal; null on miss. IDs are durable, not worker handles.",
|
|
6128
|
+
"examplePrompts": [],
|
|
6129
|
+
"argsType": "z.input<typeof NetworkGetArgs>",
|
|
6130
|
+
"resultType": "SavedNetworkGraph | null"
|
|
6131
|
+
},
|
|
6132
|
+
{
|
|
6133
|
+
"path": "design.plumbing.query",
|
|
6134
|
+
"namespace": "design.plumbing",
|
|
6135
|
+
"summary": "Read bounded authored topology in graph revision. Crossings do not connect. No clash/compliance claims.",
|
|
6136
|
+
"examplePrompts": [],
|
|
6137
|
+
"argsType": "z.input<typeof NetworkQueryArgs>",
|
|
6138
|
+
"resultType": "NetworkQueryResult"
|
|
6139
|
+
},
|
|
6140
|
+
{
|
|
6141
|
+
"path": "design.plumbing.validate",
|
|
6142
|
+
"namespace": "design.plumbing",
|
|
6143
|
+
"summary": "Validate authored JSON, pinned families and recipe evaluation without placing or saving anything. This does not build kernel meshes or certify engineering/code compliance.",
|
|
6144
|
+
"examplePrompts": [],
|
|
6145
|
+
"argsType": "z.input<typeof NetworkValidateArgs>",
|
|
6146
|
+
"resultType": "NetworkValidation"
|
|
6147
|
+
},
|
|
5657
6148
|
{
|
|
5658
6149
|
"path": "design.query.exists",
|
|
5659
6150
|
"namespace": "design.query",
|
|
@@ -5712,7 +6203,7 @@
|
|
|
5712
6203
|
{
|
|
5713
6204
|
"path": "design.query.geometry.getTriangulatedMeshes",
|
|
5714
6205
|
"namespace": "design.query.geometry",
|
|
5715
|
-
"summary": "Get the **triangulated render meshes** of scene components as plain, serializable arrays — flat world-space vertex `positions` (`[x0, y0, z0, x1, …]`) and triangle `indices` (three per triangle), one record per requested component.",
|
|
6206
|
+
"summary": "Get the **triangulated render meshes** of scene components as plain, serializable arrays — flat world-space vertex `positions` (`[x0, y0, z0, x1, …]`) and triangle `indices` (three per triangle), one record per requested component. The result is `{ meshes }`, not a bare array — destructure it before iterating.",
|
|
5716
6207
|
"examplePrompts": [
|
|
5717
6208
|
"Export the selected masses as a triangle mesh",
|
|
5718
6209
|
"Get the raw vertices and triangles of this wall in world coordinates",
|
|
@@ -5776,12 +6267,13 @@
|
|
|
5776
6267
|
{
|
|
5777
6268
|
"path": "design.query.getHost",
|
|
5778
6269
|
"namespace": "design.query",
|
|
5779
|
-
"summary": "Get an entity's host/parent entity (e.g. the wall a door is cut into).",
|
|
6270
|
+
"summary": "Get an entity's host/parent entity (e.g. the wall a door is cut into, or the slab, floor, roof or ceiling a void is cut through).",
|
|
5780
6271
|
"examplePrompts": [
|
|
5781
6272
|
"Which wall is this door in?",
|
|
5782
6273
|
"Find the parent of the selected window",
|
|
5783
6274
|
"What is this element attached to?",
|
|
5784
|
-
"Which wall hosts this window
|
|
6275
|
+
"Which wall hosts this window?",
|
|
6276
|
+
"Which slab is this shaft in?\n\n# Example\n```ts\n// From a door up to its host wall, then measure the wall\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst hostWall = door ? await snaptrude.design.query.getHost(door) : null\nif (hostWall) {\nconst m = await snaptrude.design.query.measure(hostWall)\nconsole.log(\"wall length:\", m?.length)\n}\n```"
|
|
5785
6277
|
],
|
|
5786
6278
|
"argsType": "ComponentHandle",
|
|
5787
6279
|
"resultType": "ComponentHandle | null"
|
|
@@ -5895,12 +6387,13 @@
|
|
|
5895
6387
|
{
|
|
5896
6388
|
"path": "design.query.listChildren",
|
|
5897
6389
|
"namespace": "design.query",
|
|
5898
|
-
"summary": "List an entity's direct child entities — for example the doors and windows hosted in a wall.",
|
|
6390
|
+
"summary": "List an entity's direct child entities — for example the doors and windows hosted in a wall, or the voids (holes, shafts, openings) cut in a slab, floor, roof or ceiling by `design.create.void`.",
|
|
5899
6391
|
"examplePrompts": [
|
|
5900
6392
|
"What's inside this wall — list its doors and windows",
|
|
5901
6393
|
"Show the child elements of the selected object",
|
|
5902
6394
|
"Which openings belong to this wall?",
|
|
5903
|
-
"List everything nested under this mass
|
|
6395
|
+
"List everything nested under this mass",
|
|
6396
|
+
"List all holes in this slab\n\n# Example\n```ts\n// Count the openings hosted in a wall, split by kind\nconst children = await snaptrude.design.query.listChildren(wall)\nlet doors = 0\nlet windows = 0\nfor (const child of children) {\nconst kind = await snaptrude.design.query.getEntityType(child)\nif (kind === \"door\") doors++\nif (kind === \"window\") windows++\n}\n```"
|
|
5904
6397
|
],
|
|
5905
6398
|
"argsType": "ComponentHandle",
|
|
5906
6399
|
"resultType": "ComponentHandle[]"
|
|
@@ -6076,6 +6569,14 @@
|
|
|
6076
6569
|
"argsType": "PluginEntityFilter",
|
|
6077
6570
|
"resultType": "ComponentHandle[]"
|
|
6078
6571
|
},
|
|
6572
|
+
{
|
|
6573
|
+
"path": "design.query.listVoids",
|
|
6574
|
+
"namespace": "design.query",
|
|
6575
|
+
"summary": "List Void components, excluding masses and spaces. Voids cut their hosts. Use family queries for authored parametric families with a cut relationship.",
|
|
6576
|
+
"examplePrompts": [],
|
|
6577
|
+
"argsType": "PluginEntityFilter",
|
|
6578
|
+
"resultType": "ComponentHandle[]"
|
|
6579
|
+
},
|
|
6079
6580
|
{
|
|
6080
6581
|
"path": "design.query.listWalls",
|
|
6081
6582
|
"namespace": "design.query",
|
|
@@ -6329,14 +6830,14 @@
|
|
|
6329
6830
|
{
|
|
6330
6831
|
"path": "design.types.get",
|
|
6331
6832
|
"namespace": "design.types",
|
|
6332
|
-
"summary": "Get one building type by its
|
|
6833
|
+
"summary": "Get one building type by its legacy id or exact native wall pin — its labelled layer stack (each layer's role, thickness and material) plus the summed total thickness.",
|
|
6333
6834
|
"examplePrompts": [
|
|
6334
6835
|
"What layers make up this wall type?",
|
|
6335
6836
|
"Show the construction of the exposed-concrete wall",
|
|
6336
6837
|
"What's the total thickness of this slab type?",
|
|
6337
|
-
"Which materials are in this roof assembly?\n\n# Example\n```ts\nconst [first] = await snaptrude.design.types.list(\"wall\")\nconst type = await snaptrude.design.types.get(first.id)\nif (type) for (const layer of type.layers) console.log(layer.name, layer.thickness)\n```"
|
|
6838
|
+
"Which materials are in this roof assembly?\n\n# Example\n```ts\nconst [first] = await snaptrude.design.types.list(\"wall\")\nconst type = await snaptrude.design.types.get(first.nativeFamily ?? first.id)\nif (type) for (const layer of type.layers) console.log(layer.name, layer.thickness)\n```"
|
|
6338
6839
|
],
|
|
6339
|
-
"argsType": "
|
|
6840
|
+
"argsType": "PluginWallType",
|
|
6340
6841
|
"resultType": "PluginBuildingType | null"
|
|
6341
6842
|
},
|
|
6342
6843
|
{
|
|
@@ -6378,6 +6879,14 @@
|
|
|
6378
6879
|
"argsType": "ComponentHandle[]",
|
|
6379
6880
|
"resultType": "PluginDesignChangeResult"
|
|
6380
6881
|
},
|
|
6882
|
+
{
|
|
6883
|
+
"path": "design.update.beam",
|
|
6884
|
+
"namespace": "design.update",
|
|
6885
|
+
"summary": "Replace a native beam family while preserving its authored axis. Values use mm/degrees.",
|
|
6886
|
+
"examplePrompts": [],
|
|
6887
|
+
"argsType": "ComponentHandle",
|
|
6888
|
+
"resultType": "PluginDesignChangeResult"
|
|
6889
|
+
},
|
|
6381
6890
|
{
|
|
6382
6891
|
"path": "design.update.buildableEnvelope",
|
|
6383
6892
|
"namespace": "design.update",
|
|
@@ -6403,6 +6912,14 @@
|
|
|
6403
6912
|
"argsType": "ComponentHandle",
|
|
6404
6913
|
"resultType": "PluginDesignChangeResult"
|
|
6405
6914
|
},
|
|
6915
|
+
{
|
|
6916
|
+
"path": "design.update.column",
|
|
6917
|
+
"namespace": "design.update",
|
|
6918
|
+
"summary": "Replace a native column family while preserving its authored axis. Values use mm/degrees.",
|
|
6919
|
+
"examplePrompts": [],
|
|
6920
|
+
"argsType": "ComponentHandle",
|
|
6921
|
+
"resultType": "PluginDesignChangeResult"
|
|
6922
|
+
},
|
|
6406
6923
|
{
|
|
6407
6924
|
"path": "design.update.floor",
|
|
6408
6925
|
"namespace": "design.update",
|
|
@@ -6440,6 +6957,14 @@
|
|
|
6440
6957
|
"argsType": "ComponentHandle",
|
|
6441
6958
|
"resultType": "MassParametersRecord"
|
|
6442
6959
|
},
|
|
6960
|
+
{
|
|
6961
|
+
"path": "design.update.referenceLine",
|
|
6962
|
+
"namespace": "design.update",
|
|
6963
|
+
"summary": "Apply a project style through the native reference-line property command. One saved undo step; no selection or tool preference changes. Saves the legacy thickness/mode mirror too. Requires Paper Pens and an editable line in the current proposal. A no-op creates no history entry.",
|
|
6964
|
+
"examplePrompts": [],
|
|
6965
|
+
"argsType": "string",
|
|
6966
|
+
"resultType": "PluginDesignUpdateReferenceLineResult"
|
|
6967
|
+
},
|
|
6443
6968
|
{
|
|
6444
6969
|
"path": "design.update.roof",
|
|
6445
6970
|
"namespace": "design.update",
|
|
@@ -6492,6 +7017,21 @@
|
|
|
6492
7017
|
"argsType": "ComponentHandle",
|
|
6493
7018
|
"resultType": "boolean"
|
|
6494
7019
|
},
|
|
7020
|
+
{
|
|
7021
|
+
"path": "design.update.setObjectType",
|
|
7022
|
+
"namespace": "design.update",
|
|
7023
|
+
"summary": "Change the **object type** of one or more masses — turn a mass into a real wall, roof, slab or floor: the properties panel's Object Type dropdown, headless. The geometry is kept exactly as it is (a wedge stays a wedge; nothing is flattened to a default thickness), so a sloped mass built with `design.create.massFromBrep` becomes a sloped roof or a raked wall. The component keeps its handle, label and storey; it gains the target type's construction layers and properties, and the type's default material when the mass still wore the default. One undoable operation for the whole list; undo turns them back into masses.",
|
|
7024
|
+
"examplePrompts": [
|
|
7025
|
+
"Convert this mass into a wall",
|
|
7026
|
+
"Turn the sloped mass into a roof",
|
|
7027
|
+
"Make these masses real slabs",
|
|
7028
|
+
"Change the object type of the selection to wall",
|
|
7029
|
+
"Convert the wedge I built into a raked wall",
|
|
7030
|
+
"Turn this mass into a floor\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromFaces(wedgeFaces)\nconst wedge = await snaptrude.design.create.massFromBrep(brep, \"Gable end\")\nconst { affected } = await snaptrude.design.update.setObjectType([wedge], \"wall\")\nconsole.log(await snaptrude.design.query.getEntityType(affected[0])) // \"wall\"\n```"
|
|
7031
|
+
],
|
|
7032
|
+
"argsType": "ComponentHandle[]",
|
|
7033
|
+
"resultType": "PluginDesignChangeResult"
|
|
7034
|
+
},
|
|
6495
7035
|
{
|
|
6496
7036
|
"path": "design.update.setStorey",
|
|
6497
7037
|
"namespace": "design.update",
|
|
@@ -6505,6 +7045,18 @@
|
|
|
6505
7045
|
"argsType": "ComponentHandle[]",
|
|
6506
7046
|
"resultType": "PluginDesignChangeResult"
|
|
6507
7047
|
},
|
|
7048
|
+
{
|
|
7049
|
+
"path": "design.update.siteEdge",
|
|
7050
|
+
"namespace": "design.update",
|
|
7051
|
+
"summary": "Change one site edge's type (front / side / rear) and/or give that edge its own setback distance, the same as editing a setback pill on the canvas. One undo step; the pills and Site Analysis sheet refresh.",
|
|
7052
|
+
"examplePrompts": [
|
|
7053
|
+
"Make edge 2 the front",
|
|
7054
|
+
"Set just the north edge setback to 8 m",
|
|
7055
|
+
"Remove the custom setback on edge 3\n\n# Example\n```ts\nconst [{ siteId }] = (await snaptrude.program.site.listEdges()).sites\nawait snaptrude.design.update.siteEdge(siteId, 2, { role: \"front\" })\nawait snaptrude.design.update.siteEdge(siteId, 3, { setback: 8, lengthUnit: \"m\" })\nawait snaptrude.design.update.siteEdge(siteId, 3, { setback: null })\n```"
|
|
7056
|
+
],
|
|
7057
|
+
"argsType": "string",
|
|
7058
|
+
"resultType": "PluginDesignUpdateSiteEdgeResult"
|
|
7059
|
+
},
|
|
6508
7060
|
{
|
|
6509
7061
|
"path": "design.update.slab",
|
|
6510
7062
|
"namespace": "design.update",
|
|
@@ -6655,7 +7207,7 @@
|
|
|
6655
7207
|
{
|
|
6656
7208
|
"path": "design.windows.getDimensions",
|
|
6657
7209
|
"namespace": "design.windows",
|
|
6658
|
-
"summary": "Get
|
|
7210
|
+
"summary": "Get evaluated opening width/height and host thickness in Snaptrude units. The opening can differ from the width/height input parameters.",
|
|
6659
7211
|
"examplePrompts": [
|
|
6660
7212
|
"What are the dimensions of this window?",
|
|
6661
7213
|
"How big is the selected window?",
|
|
@@ -7161,7 +7713,7 @@
|
|
|
7161
7713
|
"Add a red arrow from the title to the plan view",
|
|
7162
7714
|
"Point an arrow at the top-left view on the cover sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.arrow(\n\"sheet_1\",\n{ x: 100, y: 200 },\n{ x: 300, y: 250 },\n{ color: \"red\" },\n)\n```"
|
|
7163
7715
|
],
|
|
7164
|
-
"argsType": "string",
|
|
7716
|
+
"argsType": "string | undefined",
|
|
7165
7717
|
"resultType": "PluginPresentationAnnotateResult"
|
|
7166
7718
|
},
|
|
7167
7719
|
{
|
|
@@ -7173,7 +7725,7 @@
|
|
|
7173
7725
|
"Put a yellow note on the cover sheet",
|
|
7174
7726
|
"Leave a note next to the ground floor plan\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.note(\n\"sheet_1\",\n\"Review this wall\",\n{ position: { x: 60, y: 120 }, color: \"yellow\" },\n)\n```"
|
|
7175
7727
|
],
|
|
7176
|
-
"argsType": "string",
|
|
7728
|
+
"argsType": "string | undefined",
|
|
7177
7729
|
"resultType": "PluginPresentationAnnotateResult"
|
|
7178
7730
|
},
|
|
7179
7731
|
{
|
|
@@ -7185,7 +7737,7 @@
|
|
|
7185
7737
|
"Add a red rectangle highlight to the sheet",
|
|
7186
7738
|
"Draw an ellipse around the entrance on the cover sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.shape(\n\"sheet_1\",\n\"cloud\",\n{ x: 80, y: 80, w: 240, h: 160 },\n{ color: \"red\" },\n)\n```"
|
|
7187
7739
|
],
|
|
7188
|
-
"argsType": "string",
|
|
7740
|
+
"argsType": "string | undefined",
|
|
7189
7741
|
"resultType": "PluginPresentationAnnotateResult"
|
|
7190
7742
|
},
|
|
7191
7743
|
{
|
|
@@ -7198,9 +7750,73 @@
|
|
|
7198
7750
|
"Caption this view with \"Proposed layout\"",
|
|
7199
7751
|
"Put a red note on the sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.annotate.text(\n\"sheet_1\",\n\"Ground Floor\",\n{ position: { x: 40, y: 40 }, size: \"xl\", color: \"blue\" },\n)\n```"
|
|
7200
7752
|
],
|
|
7201
|
-
"argsType": "string",
|
|
7753
|
+
"argsType": "string | undefined",
|
|
7202
7754
|
"resultType": "PluginPresentationAnnotateTextResult"
|
|
7203
7755
|
},
|
|
7756
|
+
{
|
|
7757
|
+
"path": "presentation.camera.capture",
|
|
7758
|
+
"namespace": "presentation.camera",
|
|
7759
|
+
"summary": "Screenshot what the Present canvas currently shows.",
|
|
7760
|
+
"examplePrompts": [
|
|
7761
|
+
"Take a screenshot of the Present canvas",
|
|
7762
|
+
"Capture what I am looking at in Present mode",
|
|
7763
|
+
"Screenshot the presentation canvas as a JPEG",
|
|
7764
|
+
"Grab a high-res image of the current sheet view\n\n# Example\n```ts\nconst { image, width, height } = await snaptrude.presentation.camera.capture({\nformat: \"png\",\npixelRatio: 2,\n})\n```"
|
|
7765
|
+
],
|
|
7766
|
+
"argsType": "{\n format?: PluginPresentationImageFormat\n pixelRatio?: number\n }",
|
|
7767
|
+
"resultType": "PluginPresentationCameraCaptureResult"
|
|
7768
|
+
},
|
|
7769
|
+
{
|
|
7770
|
+
"path": "presentation.camera.get",
|
|
7771
|
+
"namespace": "presentation.camera",
|
|
7772
|
+
"summary": "Read the Present camera: pan, zoom, the visible page-space rectangle and the sheet under the centre of the view.",
|
|
7773
|
+
"examplePrompts": [
|
|
7774
|
+
"Where is the Present canvas camera?",
|
|
7775
|
+
"What zoom level is Present mode at?",
|
|
7776
|
+
"Which sheet is on screen right now?",
|
|
7777
|
+
"Read the visible area of the presentation canvas\n\n# Example\n```ts\nconst { zoom, sheetId } = await snaptrude.presentation.camera.get()\n```"
|
|
7778
|
+
],
|
|
7779
|
+
"argsType": null,
|
|
7780
|
+
"resultType": "PluginPresentationCameraState"
|
|
7781
|
+
},
|
|
7782
|
+
{
|
|
7783
|
+
"path": "presentation.camera.set",
|
|
7784
|
+
"namespace": "presentation.camera",
|
|
7785
|
+
"summary": "Pan and/or zoom the Present canvas. Fields left out keep their current value, so `{ zoom: 2 }` changes only the zoom (the page point at the viewport's top-left corner stays put) and `{ x, y }` pans at the current zoom. `zoom` is clamped to the editor's range (1% to 1000%); the requested `x`/`y` are always honoured. Immediate (no animation). View-state only — not undoable.",
|
|
7786
|
+
"examplePrompts": [
|
|
7787
|
+
"Zoom the Present canvas to 50%",
|
|
7788
|
+
"Pan the presentation canvas to the right",
|
|
7789
|
+
"Restore the Present camera I saved earlier",
|
|
7790
|
+
"Set the Present zoom to 200% without moving\n\n# Example\n```ts\nconst saved = await snaptrude.presentation.camera.get()\nawait snaptrude.presentation.camera.set({ zoom: 0.5 })\n// …later, restore the exact framing\nawait snaptrude.presentation.camera.set({ x: saved.x, y: saved.y, zoom: saved.zoom })\n```"
|
|
7791
|
+
],
|
|
7792
|
+
"argsType": "{\n x?: number\n y?: number\n zoom?: number\n }",
|
|
7793
|
+
"resultType": "PluginPresentationCameraState"
|
|
7794
|
+
},
|
|
7795
|
+
{
|
|
7796
|
+
"path": "presentation.camera.zoomTo",
|
|
7797
|
+
"namespace": "presentation.camera",
|
|
7798
|
+
"summary": "Frame one shape on the Present canvas: a sheet, a placed view, a keyed shape or an annotation — any id the other `presentation` namespaces hand out. Pair with {@linkcode PluginPresentationCameraApi.capture} to screenshot a single sheet or placed view as it appears on screen. Immediate, unlike `sheets.setActive`, which animates its move over half a second. View-state only — not undoable.",
|
|
7799
|
+
"examplePrompts": [
|
|
7800
|
+
"Zoom in on sheet 2 in Present mode",
|
|
7801
|
+
"Frame this placed view on the Present canvas",
|
|
7802
|
+
"Go to the cover sheet and screenshot it",
|
|
7803
|
+
"Centre the presentation view on that table\n\n# Example\n```ts\nconst { sheets } = await snaptrude.presentation.sheets.list()\nawait snaptrude.presentation.camera.zoomTo(sheets[1].id)\nconst { image } = await snaptrude.presentation.camera.capture()\n```"
|
|
7804
|
+
],
|
|
7805
|
+
"argsType": "string",
|
|
7806
|
+
"resultType": "PluginPresentationCameraState"
|
|
7807
|
+
},
|
|
7808
|
+
{
|
|
7809
|
+
"path": "presentation.camera.zoomToFit",
|
|
7810
|
+
"namespace": "presentation.camera",
|
|
7811
|
+
"summary": "Frame everything on the Present canvas — every sheet and loose shape — the Present-mode \"zoom to fit\". View-state only — not undoable.",
|
|
7812
|
+
"examplePrompts": [
|
|
7813
|
+
"Zoom out to see all the sheets",
|
|
7814
|
+
"Fit the whole presentation in the Present view",
|
|
7815
|
+
"Zoom to fit in Present mode\n\n# Example\n```ts\nawait snaptrude.presentation.camera.zoomToFit()\n```"
|
|
7816
|
+
],
|
|
7817
|
+
"argsType": null,
|
|
7818
|
+
"resultType": "PluginPresentationCameraState"
|
|
7819
|
+
},
|
|
7204
7820
|
{
|
|
7205
7821
|
"path": "presentation.diagrams.generateProgram",
|
|
7206
7822
|
"namespace": "presentation.diagrams",
|
|
@@ -7237,20 +7853,413 @@
|
|
|
7237
7853
|
"argsType": "string",
|
|
7238
7854
|
"resultType": "PluginPresentationDiagramsPlaceResult"
|
|
7239
7855
|
},
|
|
7856
|
+
{
|
|
7857
|
+
"path": "presentation.drawings.applyPreset",
|
|
7858
|
+
"namespace": "presentation.drawings",
|
|
7859
|
+
"summary": "Bind a native kernel plan to a view preset and clear its declared overrides, so it takes the preset's styles. Local title, proposal and building text is kept. One Present undo step. Presets apply only to drawings whose `getCapabilities(drawingId).presets` is `true`.",
|
|
7860
|
+
"examplePrompts": [
|
|
7861
|
+
"Apply the presentation plan preset to this drawing",
|
|
7862
|
+
"Use the Planning Issue style on every plan drawing",
|
|
7863
|
+
"Make this drawing look like the other plans\n\n# Example\n```ts\nconst presets = await snaptrude.presentation.viewPresets.list()\nconst preset = presets.find((each) => each.name === \"Planning Issue\")\nif (preset) await snaptrude.presentation.drawings.applyPreset(drawing.id, preset.id)\n```"
|
|
7864
|
+
],
|
|
7865
|
+
"argsType": "string",
|
|
7866
|
+
"resultType": "PluginDrawing"
|
|
7867
|
+
},
|
|
7868
|
+
{
|
|
7869
|
+
"path": "presentation.drawings.copy",
|
|
7870
|
+
"namespace": "presentation.drawings",
|
|
7871
|
+
"summary": "Duplicate a drawing with its labels and annotations (native duplication, offset slightly from the original). One Present undo step. The copy keeps the original's source view, scale, crop, styles and preset binding.",
|
|
7872
|
+
"examplePrompts": [
|
|
7873
|
+
"Duplicate this drawing",
|
|
7874
|
+
"Make a copy of the ground floor plan drawing",
|
|
7875
|
+
"Copy this drawing so I can try a different style\n\n# Example\n```ts\nconst copy = await snaptrude.presentation.drawings.copy(drawing.id)\nawait snaptrude.presentation.drawings.rename(copy.id, \"Ground Floor (option B)\")\n```"
|
|
7876
|
+
],
|
|
7877
|
+
"argsType": "string",
|
|
7878
|
+
"resultType": "PluginDrawing"
|
|
7879
|
+
},
|
|
7880
|
+
{
|
|
7881
|
+
"path": "presentation.drawings.create",
|
|
7882
|
+
"namespace": "presentation.drawings",
|
|
7883
|
+
"summary": "Generate a drawing from a saved view. Creates the drawing beside its source view on the canvas, never on a sheet; to put a drawing on a sheet use `presentation.sheets.place(sheetId, viewId)` (fits it to the sheet) or `presentation.sheets.placeDrawing(sheetId, drawingId)` (moves this drawing onto the sheet, scaled down to fit). Omit `position` unless the user asked for a specific place: the host puts the new drawing next to its source view, clear of other drawings. An explicit `position` (page coordinates, the drawing's centre) is kept and can land on top of an existing drawing. The user's selection is left as it was. Changes the drawing, not the Present camera. The Present view may follow the drawing as a courtesy to a user watching (never zooming in, not while the camera is locked); to look at it, call `presentation.camera.zoomTo(drawing.id)` then `presentation.camera.capture()`. `scale` must be a standard architectural scale denominator (100 means 1:100) in the project's unit system; any other value is rejected. Metric: 10, 20, 50, 100, 150, 200, 250, 500, 1000. Imperial detail: 12, 16, 24, 32, 48, 64, 96, 128, 192, 384, 768, 1536 (1\" = 1' to 1/128\" = 1'; 48 is 1/4\" = 1', 96 is 1/8\" = 1'). Imperial site: 120, 240, 360, 480, 600, 1200, 2400, 3600, 4800 (1\" = 10' to 1\" = 400'). Pick the LARGEST standard scale (smallest denominator) at which the view still fits its frame or sheet and its room labels stay readable: for a building floor plan that is usually 1:50 to 1:200 (1/4\" = 1' to 1/16\" = 1'). Never use a site-sized scale (1:500 and up, 1/64\" = 1' (768) and smaller, 1\" = 20' (240) and up) for a single building plan unless the user asked for it. `scale` applies to plans, site plans and elevations; leave it out for a 3D view. After creating, read `labels.getLayout(drawingId)`: when labels are unplaced and carry a `suggestedScale`, move to that larger scale with `setScale`. To apply a preset, create first and then call `applyPreset`.",
|
|
7884
|
+
"examplePrompts": [
|
|
7885
|
+
"Create a drawing from the ground floor view",
|
|
7886
|
+
"Make a 1:100 plan drawing of level 2",
|
|
7887
|
+
"Draw the north elevation at 1/8\" = 1'",
|
|
7888
|
+
"Put the site plan view on the Present canvas as a drawing\n\n# Example\n```ts\nconst { views } = await snaptrude.presentation.views.list()\nconst plan = views.find((view) => view.kind === \"plan\")!\nconst drawing = await snaptrude.presentation.drawings.create(plan.id, { scale: 100 })\nawait snaptrude.presentation.camera.zoomTo(drawing.id)\nconst { image } = await snaptrude.presentation.camera.capture()\n// To put it on a sheet: await snaptrude.presentation.sheets.placeDrawing(sheet.id, drawing.id)\n```"
|
|
7889
|
+
],
|
|
7890
|
+
"argsType": "string",
|
|
7891
|
+
"resultType": "PluginDrawing"
|
|
7892
|
+
},
|
|
7893
|
+
{
|
|
7894
|
+
"path": "presentation.drawings.delete",
|
|
7895
|
+
"namespace": "presentation.drawings",
|
|
7896
|
+
"summary": "Delete a drawing with its labels and annotations, as one Present undo step. The source saved view is not deleted.",
|
|
7897
|
+
"examplePrompts": [
|
|
7898
|
+
"Delete this drawing",
|
|
7899
|
+
"Remove the old elevation drawing from the canvas",
|
|
7900
|
+
"Get rid of the duplicate plan drawing\n\n# Example\n```ts\nawait snaptrude.presentation.drawings.delete(drawing.id)\n```"
|
|
7901
|
+
],
|
|
7902
|
+
"argsType": "string",
|
|
7903
|
+
"resultType": "void"
|
|
7904
|
+
},
|
|
7905
|
+
{
|
|
7906
|
+
"path": "presentation.drawings.export",
|
|
7907
|
+
"namespace": "presentation.drawings",
|
|
7908
|
+
"summary": "Export one drawing, with its labels and annotations, without a sheet. PDF size follows the drawing's canvas bounds; SVG and PDF keep vector content, raster fallbacks stay raster. `resolution` applies to raster formats. It does not wait for the canvas to paint, so it works while the user is on another browser tab. `download: true` starts a browser download and returns metadata only (never send large base64 to an agent); otherwise `files` carry `dataBase64`. `downloadStarted` means initiated, not proof of an OS-saved file. Layout warnings are returned. `fileName` is a base name WITHOUT an extension (\"Floor Pattern View\", never \"Floor Pattern View.pdf\"): the host appends .pdf/.svg/.png/.jpg for the format, and a name ending in .pdf, .svg, .png, .jpg or .jpeg, a dot or a space is rejected.",
|
|
7909
|
+
"examplePrompts": [
|
|
7910
|
+
"Export this drawing as a PDF",
|
|
7911
|
+
"Download the ground floor plan drawing as an SVG",
|
|
7912
|
+
"Save this drawing as a high-resolution PNG\n\n# Example\n```ts\nawait snaptrude.presentation.drawings.getStatus(drawing.id, { waitMs: 10_000 })\nconst result = await snaptrude.presentation.drawings.export(drawing.id, \"pdf\", {\nfileName: \"Ground Floor Plan\",\ndownload: true,\n})\n```"
|
|
7913
|
+
],
|
|
7914
|
+
"argsType": "string",
|
|
7915
|
+
"resultType": "PluginDrawingExportResult"
|
|
7916
|
+
},
|
|
7917
|
+
{
|
|
7918
|
+
"path": "presentation.drawings.get",
|
|
7919
|
+
"namespace": "presentation.drawings",
|
|
7920
|
+
"summary": "Read one drawing by its stable id.",
|
|
7921
|
+
"examplePrompts": [
|
|
7922
|
+
"Does the ground floor drawing still exist?",
|
|
7923
|
+
"What preset is this drawing using?",
|
|
7924
|
+
"Read the scale and crop of this drawing\n\n# Example\n```ts\nconst current = await snaptrude.presentation.drawings.get(drawing.id)\nif (current) console.log(current.scale, current.presetId)\n```"
|
|
7925
|
+
],
|
|
7926
|
+
"argsType": "string",
|
|
7927
|
+
"resultType": "PluginDrawing | null"
|
|
7928
|
+
},
|
|
7929
|
+
{
|
|
7930
|
+
"path": "presentation.drawings.getCapabilities",
|
|
7931
|
+
"namespace": "presentation.drawings",
|
|
7932
|
+
"summary": "Read what a drawing supports: its actual renderer, whether it takes presets (native kernel plans only), label layout and an architectural scale, the standard scales for this project, and its export formats. Read this before preset, scale, label-layout, style or export writes instead of inferring support from the source view.",
|
|
7933
|
+
"examplePrompts": [
|
|
7934
|
+
"What editing capabilities does this drawing support?",
|
|
7935
|
+
"Can I apply a preset to this drawing?",
|
|
7936
|
+
"Which scales can this drawing use?\n\n# Example\n```ts\nconst capabilities = await snaptrude.presentation.drawings.getCapabilities(drawing.id)\nif (capabilities.presets) {\nawait snaptrude.presentation.drawings.applyPreset(drawing.id, preset.id)\n}\n```"
|
|
7937
|
+
],
|
|
7938
|
+
"argsType": "string",
|
|
7939
|
+
"resultType": "PluginDrawingCapabilities"
|
|
7940
|
+
},
|
|
7941
|
+
{
|
|
7942
|
+
"path": "presentation.drawings.getStatus",
|
|
7943
|
+
"namespace": "presentation.drawings",
|
|
7944
|
+
"summary": "Read a drawing's generation, label-layout and asset-upload state, optionally waiting up to `waitMs` (0 by default, at most 30,000) for it to become export-ready and uploaded. A timeout is not an error: the current state is returned. Read this before export or before closing Present mode.",
|
|
7945
|
+
"examplePrompts": [
|
|
7946
|
+
"Is this drawing ready to export?",
|
|
7947
|
+
"Wait for the new drawing to finish generating",
|
|
7948
|
+
"Has the drawing been uploaded yet?\n\n# Example\n```ts\nconst status = await snaptrude.presentation.drawings.getStatus(drawing.id, {\nwaitMs: 10_000,\n})\nif (!status.exportReady) console.warn(status.warnings)\n```"
|
|
7949
|
+
],
|
|
7950
|
+
"argsType": "string",
|
|
7951
|
+
"resultType": "PluginDrawingStatus"
|
|
7952
|
+
},
|
|
7953
|
+
{
|
|
7954
|
+
"path": "presentation.drawings.getStyles",
|
|
7955
|
+
"namespace": "presentation.drawings",
|
|
7956
|
+
"summary": "Read a drawing's effective style categories (preset plus its own overrides) and the controls each category accepts. Always read this before {@linkcode PluginPresentationDrawingsApi.updateStyles}: accepted categories and controls depend on the drawing, and an `absent` category rejects writes. Do not echo a whole `settings` record as a patch (legacy reads may include the read-only `disable` flag and `-1` for unset opacity).",
|
|
7957
|
+
"examplePrompts": [
|
|
7958
|
+
"Show the editable styles for this drawing",
|
|
7959
|
+
"What line weight are the walls drawn with?",
|
|
7960
|
+
"Which categories can I restyle on this plan?\n\n# Example\n```ts\nconst styles = await snaptrude.presentation.drawings.getStyles(drawing.id)\nconst editable = styles.categories.filter((row) => !row.absent)\n```"
|
|
7961
|
+
],
|
|
7962
|
+
"argsType": "string",
|
|
7963
|
+
"resultType": "PluginDrawingStyles"
|
|
7964
|
+
},
|
|
7965
|
+
{
|
|
7966
|
+
"path": "presentation.drawings.labels.getLayout",
|
|
7967
|
+
"namespace": "presentation.drawings.labels",
|
|
7968
|
+
"summary": "Read the label-layout diagnostics of a drawing: labels that could not be placed cleanly (each with a `suggestedScale` at which it would fit), pinned labels, merged duplicates and dropped rows. Reading never hides a label: an unplaced label is still shown at a best-effort position.",
|
|
7969
|
+
"examplePrompts": [
|
|
7970
|
+
"Check this drawing for overlapping labels",
|
|
7971
|
+
"Do all the room names fit on the ground floor drawing?",
|
|
7972
|
+
"Which scale would make the labels on this plan readable?\n\n# Example\n```ts\nconst layout = await snaptrude.presentation.drawings.labels.getLayout(drawing.id)\nconst suggested = layout.unplaced.find((row) => row.suggestedScale)?.suggestedScale\nif (suggested) await snaptrude.presentation.drawings.setScale(drawing.id, suggested)\n```"
|
|
7973
|
+
],
|
|
7974
|
+
"argsType": "string",
|
|
7975
|
+
"resultType": "PluginDrawingLabelLayout"
|
|
7976
|
+
},
|
|
7977
|
+
{
|
|
7978
|
+
"path": "presentation.drawings.labels.list",
|
|
7979
|
+
"namespace": "presentation.drawings.labels",
|
|
7980
|
+
"summary": "List every text label on a drawing, including labels the user or the layout has hidden. An agent's own annotations under the drawing are not labels and are not listed.",
|
|
7981
|
+
"examplePrompts": [
|
|
7982
|
+
"List all labels in this drawing",
|
|
7983
|
+
"Which room labels are hidden on the ground floor drawing?",
|
|
7984
|
+
"Show me the text of every label on this plan\n\n# Example\n```ts\nconst labels = await snaptrude.presentation.drawings.labels.list(drawing.id)\nconst hidden = labels.filter((label) => label.hidden)\n```"
|
|
7985
|
+
],
|
|
7986
|
+
"argsType": "string",
|
|
7987
|
+
"resultType": "PluginPlacedViewLabel[]"
|
|
7988
|
+
},
|
|
7989
|
+
{
|
|
7990
|
+
"path": "presentation.drawings.labels.move",
|
|
7991
|
+
"namespace": "presentation.drawings.labels",
|
|
7992
|
+
"summary": "Move a label within its drawing. A room label keeps the new position as a native pin at the drawing's current architectural scale; other labels move as plain text shapes. One Present undo step.",
|
|
7993
|
+
"examplePrompts": [
|
|
7994
|
+
"Move the Kitchen label up a little",
|
|
7995
|
+
"Put the living room name in the middle of the room",
|
|
7996
|
+
"Nudge this label to the left\n\n# Example\n```ts\nconst [label] = await snaptrude.presentation.drawings.labels.list(drawing.id)\nawait snaptrude.presentation.drawings.labels.move(label.labelId, {\nx: label.position.x,\ny: label.position.y - 20,\n})\n```"
|
|
7997
|
+
],
|
|
7998
|
+
"argsType": "string",
|
|
7999
|
+
"resultType": "PluginPlacedViewLabel"
|
|
8000
|
+
},
|
|
8001
|
+
{
|
|
8002
|
+
"path": "presentation.drawings.labels.place",
|
|
8003
|
+
"namespace": "presentation.drawings.labels",
|
|
8004
|
+
"summary": "Pin a room label that could not be placed cleanly at the best position the native layout solver finds, at the current architectural scale. May wait up to ten seconds for a reloaded drawing's fit data. One Present undo step.",
|
|
8005
|
+
"examplePrompts": [
|
|
8006
|
+
"Place the labels that do not fit",
|
|
8007
|
+
"Pin the Kitchen label where it fits best",
|
|
8008
|
+
"Fix the overlapping room names on this drawing\n\n# Example\n```ts\nconst { unplaced } = await snaptrude.presentation.drawings.labels.getLayout(drawing.id)\nfor (const row of unplaced) {\nawait snaptrude.presentation.drawings.labels.place(row.labelId)\n}\n```"
|
|
8009
|
+
],
|
|
8010
|
+
"argsType": "string",
|
|
8011
|
+
"resultType": "boolean"
|
|
8012
|
+
},
|
|
8013
|
+
{
|
|
8014
|
+
"path": "presentation.drawings.labels.reset",
|
|
8015
|
+
"namespace": "presentation.drawings.labels",
|
|
8016
|
+
"summary": "Clear room-label pins (from `move`, `place` or the user) so the native layout places those labels again: at the current architectural scale by default, or at every scale with `{ scope: \"all\" }`. One Present undo step.",
|
|
8017
|
+
"examplePrompts": [
|
|
8018
|
+
"Reset the label positions on this drawing",
|
|
8019
|
+
"Undo all my label moves at every scale",
|
|
8020
|
+
"Let the room labels lay themselves out again\n\n# Example\n```ts\nconst cleared = await snaptrude.presentation.drawings.labels.reset(drawing.id, {\nscope: \"all\",\n})\n```"
|
|
8021
|
+
],
|
|
8022
|
+
"argsType": "string",
|
|
8023
|
+
"resultType": "number"
|
|
8024
|
+
},
|
|
8025
|
+
{
|
|
8026
|
+
"path": "presentation.drawings.labels.setHidden",
|
|
8027
|
+
"namespace": "presentation.drawings.labels",
|
|
8028
|
+
"summary": "Hide or show a label. This is the user's own visibility, independent of labels the layout or a crop hides. One Present undo step.",
|
|
8029
|
+
"examplePrompts": [
|
|
8030
|
+
"Hide the Store label on this drawing",
|
|
8031
|
+
"Show the corridor label again",
|
|
8032
|
+
"Turn off the label for the plant room\n\n# Example\n```ts\nconst labels = await snaptrude.presentation.drawings.labels.list(drawing.id)\nconst store = labels.find((label) => label.text.startsWith(\"Store\"))\nif (store) await snaptrude.presentation.drawings.labels.setHidden(store.labelId, true)\n```"
|
|
8033
|
+
],
|
|
8034
|
+
"argsType": "string",
|
|
8035
|
+
"resultType": "PluginPlacedViewLabel"
|
|
8036
|
+
},
|
|
8037
|
+
{
|
|
8038
|
+
"path": "presentation.drawings.list",
|
|
8039
|
+
"namespace": "presentation.drawings",
|
|
8040
|
+
"summary": "List the drawings on the current Present page, loose or on sheets.",
|
|
8041
|
+
"examplePrompts": [
|
|
8042
|
+
"List all drawings in this presentation",
|
|
8043
|
+
"Which drawings are not on a sheet yet?",
|
|
8044
|
+
"What scale is each plan drawing at?\n\n# Example\n```ts\nconst drawings = await snaptrude.presentation.drawings.list()\nconst loose = drawings.filter((drawing) => !drawing.sheetId)\n```"
|
|
8045
|
+
],
|
|
8046
|
+
"argsType": null,
|
|
8047
|
+
"resultType": "PluginDrawing[]"
|
|
8048
|
+
},
|
|
8049
|
+
{
|
|
8050
|
+
"path": "presentation.drawings.listFonts",
|
|
8051
|
+
"namespace": "presentation.drawings",
|
|
8052
|
+
"summary": "List the font families drawing text can use, from the native catalog (`\"DEFAULT\"` first). Use these names in a style patch's `fontFamily` instead of inventing one.",
|
|
8053
|
+
"examplePrompts": [
|
|
8054
|
+
"Which fonts can I use for drawing labels?",
|
|
8055
|
+
"Is Inter available as a drawing font?",
|
|
8056
|
+
"List the fonts for the title block\n\n# Example\n```ts\nconst fonts = await snaptrude.presentation.drawings.listFonts()\nconst family = fonts.includes(\"Inter\") ? \"Inter\" : \"DEFAULT\"\n```"
|
|
8057
|
+
],
|
|
8058
|
+
"argsType": null,
|
|
8059
|
+
"resultType": "string[]"
|
|
8060
|
+
},
|
|
8061
|
+
{
|
|
8062
|
+
"path": "presentation.drawings.listPatterns",
|
|
8063
|
+
"namespace": "presentation.drawings",
|
|
8064
|
+
"summary": "List the hatch patterns the native pattern catalog offers. Use these ids in a style patch's `pattern.id` instead of inventing one.",
|
|
8065
|
+
"examplePrompts": [
|
|
8066
|
+
"What hatch patterns can I use?",
|
|
8067
|
+
"List the brick and concrete patterns",
|
|
8068
|
+
"Which fill patterns are available for rooms?\n\n# Example\n```ts\nconst patterns = await snaptrude.presentation.drawings.listPatterns()\nconst brick = patterns.find((pattern) => pattern.label.toLowerCase().includes(\"brick\"))\n```"
|
|
8069
|
+
],
|
|
8070
|
+
"argsType": null,
|
|
8071
|
+
"resultType": "{ id: string; label: string; group: string }[]"
|
|
8072
|
+
},
|
|
8073
|
+
{
|
|
8074
|
+
"path": "presentation.drawings.rename",
|
|
8075
|
+
"namespace": "presentation.drawings",
|
|
8076
|
+
"summary": "Set the drawing's own title text. The source saved view keeps its name. One Present undo step.",
|
|
8077
|
+
"examplePrompts": [
|
|
8078
|
+
"Rename this drawing to Ground Floor Plan",
|
|
8079
|
+
"Change the title of the elevation drawing",
|
|
8080
|
+
"Call this drawing Level 2 General Arrangement\n\n# Example\n```ts\nawait snaptrude.presentation.drawings.rename(drawing.id, \"Ground Floor Plan\")\n```"
|
|
8081
|
+
],
|
|
8082
|
+
"argsType": "string",
|
|
8083
|
+
"resultType": "PluginDrawing"
|
|
8084
|
+
},
|
|
8085
|
+
{
|
|
8086
|
+
"path": "presentation.drawings.resetOverrides",
|
|
8087
|
+
"namespace": "presentation.drawings",
|
|
8088
|
+
"summary": "Drop a kernel plan's own style overrides so it matches its bound preset again. Local title, proposal and building text is kept. One Present undo step.",
|
|
8089
|
+
"examplePrompts": [
|
|
8090
|
+
"Reset this drawing to its preset styles",
|
|
8091
|
+
"Undo my style changes on the ground floor plan",
|
|
8092
|
+
"Clear the overrides on this drawing\n\n# Example\n```ts\nawait snaptrude.presentation.drawings.resetOverrides(drawing.id)\n```"
|
|
8093
|
+
],
|
|
8094
|
+
"argsType": "string",
|
|
8095
|
+
"resultType": "PluginDrawing"
|
|
8096
|
+
},
|
|
8097
|
+
{
|
|
8098
|
+
"path": "presentation.drawings.setCrop",
|
|
8099
|
+
"namespace": "presentation.drawings",
|
|
8100
|
+
"summary": "Crop a drawing to a window of itself, or pass `null` to remove the crop. Crop corners are 0–1 fractions of the uncropped drawing and must satisfy `topLeft < bottomRight` on both axes. One Present undo step. A loose drawing that grows over a neighbour it did not cover before (for example when the crop is removed) moves to the nearest free spot, which `placedViews.setCrop` does not do; an overlap the user made stays, and a drawing on a sheet never moves. Changes the drawing, not the Present camera. The Present view may follow the drawing as a courtesy to a user watching (never zooming in, not while the camera is locked); to look at it, call `presentation.camera.zoomTo(drawing.id)` then `presentation.camera.capture()`.",
|
|
8101
|
+
"examplePrompts": [
|
|
8102
|
+
"Crop this drawing to the left half",
|
|
8103
|
+
"Remove the crop from the site plan drawing",
|
|
8104
|
+
"Show only the top-right corner of this plan\n\n# Example\n```ts\nawait snaptrude.presentation.drawings.setCrop(drawing.id, {\ntopLeft: { x: 0, y: 0 },\nbottomRight: { x: 0.5, y: 1 },\n})\nawait snaptrude.presentation.drawings.setCrop(drawing.id, null)\n```"
|
|
8105
|
+
],
|
|
8106
|
+
"argsType": "string",
|
|
8107
|
+
"resultType": "PluginDrawing"
|
|
8108
|
+
},
|
|
8109
|
+
{
|
|
8110
|
+
"path": "presentation.drawings.setScale",
|
|
8111
|
+
"namespace": "presentation.drawings",
|
|
8112
|
+
"summary": "Set a drawing's architectural scale; perspective/isometric drawings reject this. `scale` must be a standard architectural scale denominator (100 means 1:100) in the project's unit system; any other value is rejected. Metric: 10, 20, 50, 100, 150, 200, 250, 500, 1000. Imperial detail: 12, 16, 24, 32, 48, 64, 96, 128, 192, 384, 768, 1536 (1\" = 1' to 1/128\" = 1'; 48 is 1/4\" = 1', 96 is 1/8\" = 1'). Imperial site: 120, 240, 360, 480, 600, 1200, 2400, 3600, 4800 (1\" = 10' to 1\" = 400'). Pick the LARGEST standard scale (smallest denominator) at which the view still fits its frame or sheet and its room labels stay readable: for a building floor plan that is usually 1:50 to 1:200 (1/4\" = 1' to 1/16\" = 1'). Never use a site-sized scale (1:500 and up, 1/64\" = 1' (768) and smaller, 1\" = 20' (240) and up) for a single building plan unless the user asked for it. A loose drawing that grows over a neighbour it did not cover before moves to the nearest free spot, which `placedViews.setScale` does not do; an overlap the user made stays, and a drawing on a sheet never moves. Changes the drawing, not the Present camera. The Present view may follow the drawing as a courtesy to a user watching (never zooming in, not while the camera is locked); to look at it, call `presentation.camera.zoomTo(drawing.id)` then `presentation.camera.capture()`.",
|
|
8113
|
+
"examplePrompts": [
|
|
8114
|
+
"Set this drawing to 1:50",
|
|
8115
|
+
"Change the plan drawing scale to 1/4\" = 1'",
|
|
8116
|
+
"Make the ground floor drawing bigger so the labels fit\n\n# Example\n```ts\nconst layout = await snaptrude.presentation.drawings.labels.getLayout(drawing.id)\nconst suggested = layout.unplaced.find((row) => row.suggestedScale)?.suggestedScale\nawait snaptrude.presentation.drawings.setScale(drawing.id, suggested ?? 50)\n```"
|
|
8117
|
+
],
|
|
8118
|
+
"argsType": "string",
|
|
8119
|
+
"resultType": "PluginDrawing"
|
|
8120
|
+
},
|
|
8121
|
+
{
|
|
8122
|
+
"path": "presentation.drawings.updateContent",
|
|
8123
|
+
"namespace": "presentation.drawings",
|
|
8124
|
+
"summary": "Regenerate one to 100 drawings from their source views, after the model or the view changed. Waits for the update to finish.",
|
|
8125
|
+
"examplePrompts": [
|
|
8126
|
+
"Update this drawing with my latest model changes",
|
|
8127
|
+
"Refresh all the drawings",
|
|
8128
|
+
"Regenerate the ground floor plan drawing\n\n# Example\n```ts\nconst drawings = await snaptrude.presentation.drawings.list()\nconst results = await snaptrude.presentation.drawings.updateContent(\ndrawings.map((drawing) => drawing.id),\n)\n```"
|
|
8129
|
+
],
|
|
8130
|
+
"argsType": "string[]",
|
|
8131
|
+
"resultType": "{ drawingId: string; updated: boolean }[]"
|
|
8132
|
+
},
|
|
8133
|
+
{
|
|
8134
|
+
"path": "presentation.drawings.updateStyles",
|
|
8135
|
+
"namespace": "presentation.drawings",
|
|
8136
|
+
"summary": "Merge a sparse style patch into one category of a drawing, as one Present undo step. Nested objects merge rather than replace the row. Line and outline weights are paper millimetres (0–2.11); opacity is 0–100; colours are `#rrggbb`. On a kernel plan the patch becomes the drawing's own overrides of its preset; other drawings take the legacy placed-view category patch. An absent category, an unsupported field or an invalid value rejects the whole write.",
|
|
8137
|
+
"examplePrompts": [
|
|
8138
|
+
"Make the walls on this drawing thicker",
|
|
8139
|
+
"Fill the rooms at 60% opacity with a larger hatch",
|
|
8140
|
+
"Turn off the door tags on this plan\n\n# Example\n```ts\nconst styles = await snaptrude.presentation.drawings.getStyles(drawing.id)\nconst space = styles.categories.find((row) => row.category === \"Space\")\nif (space && !space.absent && space.controls.some((control) => control.key === \"opacity\")) {\nawait snaptrude.presentation.drawings.updateStyles(drawing.id, \"Space\", {\nopacity: 60,\npattern: { scale: 1.5 },\n})\n}\n```"
|
|
8141
|
+
],
|
|
8142
|
+
"argsType": "string",
|
|
8143
|
+
"resultType": "PluginDrawingStyles"
|
|
8144
|
+
},
|
|
7240
8145
|
{
|
|
7241
8146
|
"path": "presentation.export",
|
|
7242
8147
|
"namespace": "presentation",
|
|
7243
|
-
"summary": "Export the presentation's layout sheets to a downloadable file (PDF / PNG / JPG)
|
|
8148
|
+
"summary": "Export the presentation's layout sheets to a downloadable file (PDF / PNG / JPG). Return base64 by default; `download: true` initiates browser downloads and returns metadata without base64. Requires Present mode to be open. `fileName` is a base name WITHOUT an extension (\"Floor Pattern View\", never \"Floor Pattern View.pdf\"): the host appends the extension for the format, and a name ending in .pdf, .svg, .png, .jpg or .jpeg, a dot or a space is rejected.",
|
|
7244
8149
|
"examplePrompts": [
|
|
7245
8150
|
"Export the presentation as a PDF",
|
|
7246
8151
|
"Download all sheets as a single PDF",
|
|
7247
8152
|
"Export sheet 1 as a PNG",
|
|
7248
8153
|
"Save the presentation sheets as JPG images",
|
|
7249
|
-
"Export these sheets to PDF at high resolution\n\n# Example\n```ts\nconst { files } = await snaptrude.presentation.export(\"pdf\")\n```"
|
|
8154
|
+
"Export these sheets to PDF at high resolution\n\n# Example\n```ts\nconst { files } = await snaptrude.presentation.export(\"pdf\")\nconst download = await snaptrude.presentation.export(\"pdf\", { download: true })\n```"
|
|
7250
8155
|
],
|
|
7251
8156
|
"argsType": "PluginPresentationExportFormat",
|
|
7252
8157
|
"resultType": "PluginPresentationExportResult"
|
|
7253
8158
|
},
|
|
8159
|
+
{
|
|
8160
|
+
"path": "presentation.export",
|
|
8161
|
+
"namespace": "presentation",
|
|
8162
|
+
"summary": "",
|
|
8163
|
+
"examplePrompts": [],
|
|
8164
|
+
"argsType": "PluginPresentationExportFormat",
|
|
8165
|
+
"resultType": "PluginPresentationExportDownloadResult"
|
|
8166
|
+
},
|
|
8167
|
+
{
|
|
8168
|
+
"path": "presentation.export",
|
|
8169
|
+
"namespace": "presentation",
|
|
8170
|
+
"summary": "",
|
|
8171
|
+
"examplePrompts": [],
|
|
8172
|
+
"argsType": "PluginPresentationExportFormat",
|
|
8173
|
+
"resultType": "PluginPresentationExportResult | PluginPresentationExportDownloadResult"
|
|
8174
|
+
},
|
|
8175
|
+
{
|
|
8176
|
+
"path": "presentation.graphics.disableThinLines",
|
|
8177
|
+
"namespace": "presentation.graphics",
|
|
8178
|
+
"summary": "Disable the viewer's Thin Lines preference. No model save, undo or peer change.",
|
|
8179
|
+
"examplePrompts": [],
|
|
8180
|
+
"argsType": null,
|
|
8181
|
+
"resultType": "boolean"
|
|
8182
|
+
},
|
|
8183
|
+
{
|
|
8184
|
+
"path": "presentation.graphics.enableThinLines",
|
|
8185
|
+
"namespace": "presentation.graphics",
|
|
8186
|
+
"summary": "Enable the viewer's Thin Lines preference. No model save, undo or peer change. capture_view and exported images deliberately suspend it and use real weights.",
|
|
8187
|
+
"examplePrompts": [],
|
|
8188
|
+
"argsType": null,
|
|
8189
|
+
"resultType": "boolean"
|
|
8190
|
+
},
|
|
8191
|
+
{
|
|
8192
|
+
"path": "presentation.graphics.get",
|
|
8193
|
+
"namespace": "presentation.graphics",
|
|
8194
|
+
"summary": "Read a view's scale denominator, detail and category overrides.",
|
|
8195
|
+
"examplePrompts": [
|
|
8196
|
+
"What scale is this plan drawn at?"
|
|
8197
|
+
],
|
|
8198
|
+
"argsType": "PluginGraphicsViewId",
|
|
8199
|
+
"resultType": "PluginViewGraphics | null"
|
|
8200
|
+
},
|
|
8201
|
+
{
|
|
8202
|
+
"path": "presentation.graphics.isEnabled",
|
|
8203
|
+
"namespace": "presentation.graphics",
|
|
8204
|
+
"summary": "Whether Paper Pens is enabled on this viewer. Never changes the feature flag.",
|
|
8205
|
+
"examplePrompts": [],
|
|
8206
|
+
"argsType": null,
|
|
8207
|
+
"resultType": "boolean"
|
|
8208
|
+
},
|
|
8209
|
+
{
|
|
8210
|
+
"path": "presentation.graphics.isThinLinesEnabled",
|
|
8211
|
+
"namespace": "presentation.graphics",
|
|
8212
|
+
"summary": "Read the remembered Thin Lines preference. A disabled feature or capture suspension can make the renderer ignore a true preference temporarily.",
|
|
8213
|
+
"examplePrompts": [],
|
|
8214
|
+
"argsType": null,
|
|
8215
|
+
"resultType": "boolean"
|
|
8216
|
+
},
|
|
8217
|
+
{
|
|
8218
|
+
"path": "presentation.graphics.listScales",
|
|
8219
|
+
"namespace": "presentation.graphics",
|
|
8220
|
+
"summary": "List the chip's scale choices for the project units, in the same order. Custom denominators need not be listed: any integer 1–24000 is valid.",
|
|
8221
|
+
"examplePrompts": [],
|
|
8222
|
+
"argsType": "PluginGraphicsViewId",
|
|
8223
|
+
"resultType": "PluginGraphicsScaleOption[]"
|
|
8224
|
+
},
|
|
8225
|
+
{
|
|
8226
|
+
"path": "presentation.graphics.reset",
|
|
8227
|
+
"namespace": "presentation.graphics",
|
|
8228
|
+
"summary": "Clear one category or all category overrides, as one saved undoable step. The view's scale and detail level are preserved.",
|
|
8229
|
+
"examplePrompts": [],
|
|
8230
|
+
"argsType": "PluginGraphicsResetOptions",
|
|
8231
|
+
"resultType": "PluginViewGraphics"
|
|
8232
|
+
},
|
|
8233
|
+
{
|
|
8234
|
+
"path": "presentation.graphics.setDetailLevel",
|
|
8235
|
+
"namespace": "presentation.graphics",
|
|
8236
|
+
"summary": "Set the active plan's Coarse/Fine drawing detail through the native setter. Fine draws wall layers; this does not enable the project's Detailed View take-off setting. Saved for a saved view, not a model undo step; unsaved current views are transient.",
|
|
8237
|
+
"examplePrompts": [
|
|
8238
|
+
"Show this plan in Fine detail"
|
|
8239
|
+
],
|
|
8240
|
+
"argsType": "PluginGraphicsDetailLevel",
|
|
8241
|
+
"resultType": "PluginViewGraphics"
|
|
8242
|
+
},
|
|
8243
|
+
{
|
|
8244
|
+
"path": "presentation.graphics.setScale",
|
|
8245
|
+
"namespace": "presentation.graphics",
|
|
8246
|
+
"summary": "Set a paper view's denominator through the same path as the scale chip. A saved view persists this change; it is not a model undo step. Without a saved current view, only viewer state changes. Does not switch the camera. An inactive target refuses NOT_ACTIVE_VIEW.",
|
|
8247
|
+
"examplePrompts": [
|
|
8248
|
+
"Set this plan to 1:50"
|
|
8249
|
+
],
|
|
8250
|
+
"argsType": "number",
|
|
8251
|
+
"resultType": "PluginViewGraphics"
|
|
8252
|
+
},
|
|
8253
|
+
{
|
|
8254
|
+
"path": "presentation.graphics.update",
|
|
8255
|
+
"namespace": "presentation.graphics",
|
|
8256
|
+
"summary": "Change only supplied category fields, as one saved and undoable step. Does not edit project standards. Requires a saved view.",
|
|
8257
|
+
"examplePrompts": [
|
|
8258
|
+
"Halftone the furniture in this view"
|
|
8259
|
+
],
|
|
8260
|
+
"argsType": "PluginGraphicsOverrides",
|
|
8261
|
+
"resultType": "PluginViewGraphics"
|
|
8262
|
+
},
|
|
7254
8263
|
{
|
|
7255
8264
|
"path": "presentation.import.image",
|
|
7256
8265
|
"namespace": "presentation.import",
|
|
@@ -7516,7 +8525,7 @@
|
|
|
7516
8525
|
{
|
|
7517
8526
|
"path": "presentation.placedViews.setScale",
|
|
7518
8527
|
"namespace": "presentation.placedViews",
|
|
7519
|
-
"summary": "Set a placed view's architectural scale.",
|
|
8528
|
+
"summary": "Set a placed view's architectural scale. `scale` must be a standard architectural scale denominator (100 means 1:100) in the project's unit system; any other value is rejected. Metric: 10, 20, 50, 100, 150, 200, 250, 500, 1000. Imperial detail: 12, 16, 24, 32, 48, 64, 96, 128, 192, 384, 768, 1536 (1\" = 1' to 1/128\" = 1'; 48 is 1/4\" = 1', 96 is 1/8\" = 1'). Imperial site: 120, 240, 360, 480, 600, 1200, 2400, 3600, 4800 (1\" = 10' to 1\" = 400'). Pick the LARGEST standard scale (smallest denominator) at which the view still fits its frame or sheet and its room labels stay readable: for a building floor plan that is usually 1:50 to 1:200 (1/4\" = 1' to 1/16\" = 1'). Never use a site-sized scale (1:500 and up, 1/64\" = 1' (768) and smaller, 1\" = 20' (240) and up) for a single building plan unless the user asked for it.",
|
|
7520
8529
|
"examplePrompts": [
|
|
7521
8530
|
"Set the plan to 1:100",
|
|
7522
8531
|
"Change the placed floor plan to 1:50 scale",
|
|
@@ -7551,6 +8560,99 @@
|
|
|
7551
8560
|
"argsType": "string",
|
|
7552
8561
|
"resultType": "PluginPlacedViewCategoryStyles"
|
|
7553
8562
|
},
|
|
8563
|
+
{
|
|
8564
|
+
"path": "presentation.sections.create",
|
|
8565
|
+
"namespace": "presentation.sections",
|
|
8566
|
+
"summary": "Draw a section line from `start` to `end` on the plan. The section looks along the line's direction turned a quarter turn — a line drawn toward +x looks toward +z; flip it with `update(id, { isFlipped: true })`. Its slice defaults to the building's full height and its depth to the far side of the model. Write-gated; one undo step.",
|
|
8567
|
+
"examplePrompts": [
|
|
8568
|
+
"Cut a section through the middle of the building, east to west",
|
|
8569
|
+
"Add a section across the stair core",
|
|
8570
|
+
"Draw a longitudinal section and open it\n\n# Example\n```ts\nconst section = await snaptrude.presentation.sections.create(\n{ x: -40, z: 10 },\n{ x: 40, z: 10 },\n{ name: \"Longitudinal\", isActive: true },\n)\n```"
|
|
8571
|
+
],
|
|
8572
|
+
"argsType": "PluginSectionPoint",
|
|
8573
|
+
"resultType": "PluginSection"
|
|
8574
|
+
},
|
|
8575
|
+
{
|
|
8576
|
+
"path": "presentation.sections.delete",
|
|
8577
|
+
"namespace": "presentation.sections",
|
|
8578
|
+
"summary": "Delete a section. Closes its view first if it is open. Write-gated; one undo step.",
|
|
8579
|
+
"examplePrompts": [
|
|
8580
|
+
"Delete Section B\n\n# Example\n```ts\nawait snaptrude.presentation.sections.delete(sectionId)\n```"
|
|
8581
|
+
],
|
|
8582
|
+
"argsType": "string",
|
|
8583
|
+
"resultType": "boolean"
|
|
8584
|
+
},
|
|
8585
|
+
{
|
|
8586
|
+
"path": "presentation.sections.get",
|
|
8587
|
+
"namespace": "presentation.sections",
|
|
8588
|
+
"summary": "Get one section by id.",
|
|
8589
|
+
"examplePrompts": [
|
|
8590
|
+
"Where does Section A run?",
|
|
8591
|
+
"How deep is this section?\n\n# Example\n```ts\nconst section = await snaptrude.presentation.sections.get(sectionId)\nconsole.log(section?.start, section?.end)\n```"
|
|
8592
|
+
],
|
|
8593
|
+
"argsType": "string",
|
|
8594
|
+
"resultType": "PluginSection | null"
|
|
8595
|
+
},
|
|
8596
|
+
{
|
|
8597
|
+
"path": "presentation.sections.getActive",
|
|
8598
|
+
"namespace": "presentation.sections",
|
|
8599
|
+
"summary": "Get the section whose view is open.",
|
|
8600
|
+
"examplePrompts": [
|
|
8601
|
+
"Which section am I looking at?\n\n# Example\n```ts\nconst open = await snaptrude.presentation.sections.getActive()\n```"
|
|
8602
|
+
],
|
|
8603
|
+
"argsType": null,
|
|
8604
|
+
"resultType": "PluginSection | null"
|
|
8605
|
+
},
|
|
8606
|
+
{
|
|
8607
|
+
"path": "presentation.sections.getCut",
|
|
8608
|
+
"namespace": "presentation.sections",
|
|
8609
|
+
"summary": "What a section cuts: every element its cutting plane passes through within the section's extents, with the cut's area, outline length and extent on the plane, largest first. Computed from the model, not from the drawing, so it needs no open view and works however the section is shown; furniture is left out, as in the drawing, and so is anything hidden in the model. Areas are exact for closed solids. Repeated calls reuse the cuts of elements that have not changed. Read-only.",
|
|
8610
|
+
"examplePrompts": [
|
|
8611
|
+
"Which walls does Section A cut?",
|
|
8612
|
+
"How thick is the slab where the section crosses it?",
|
|
8613
|
+
"Does this section go through the stair?",
|
|
8614
|
+
"What is the floor-to-floor height in this section?\n\n# Example\n```ts\nconst cut = await snaptrude.presentation.sections.getCut(sectionId)\nconst walls = cut.elements.filter((element) => element.type === \"wall\")\nconst thickest = walls[0]\nconsole.log(thickest.extent.uMax - thickest.extent.uMin)\n```"
|
|
8615
|
+
],
|
|
8616
|
+
"argsType": "string",
|
|
8617
|
+
"resultType": "PluginSectionCut"
|
|
8618
|
+
},
|
|
8619
|
+
{
|
|
8620
|
+
"path": "presentation.sections.list",
|
|
8621
|
+
"namespace": "presentation.sections",
|
|
8622
|
+
"summary": "List the project's sections, in Views panel order.",
|
|
8623
|
+
"examplePrompts": [
|
|
8624
|
+
"Which sections are there?",
|
|
8625
|
+
"List the section lines in this project",
|
|
8626
|
+
"Is there a section through the stair?\n\n# Example\n```ts\nconst sections = await snaptrude.presentation.sections.list()\n```"
|
|
8627
|
+
],
|
|
8628
|
+
"argsType": null,
|
|
8629
|
+
"resultType": "PluginSection[]"
|
|
8630
|
+
},
|
|
8631
|
+
{
|
|
8632
|
+
"path": "presentation.sections.setActive",
|
|
8633
|
+
"namespace": "presentation.sections",
|
|
8634
|
+
"summary": "Open a section's view, or close the open one with `null`. Opening frames the section's saved camera, or a straight-on view when it has none. Closing returns to 3D; with no section view open, `null` does nothing. Not an edit: nothing is added to the undo history.",
|
|
8635
|
+
"examplePrompts": [
|
|
8636
|
+
"Open Section A",
|
|
8637
|
+
"Show me the section through the atrium",
|
|
8638
|
+
"Close the section view\n\n# Example\n```ts\nawait snaptrude.presentation.sections.setActive(section.sectionId)\nawait snaptrude.presentation.sections.setActive(null)\n```"
|
|
8639
|
+
],
|
|
8640
|
+
"argsType": "string | null",
|
|
8641
|
+
"resultType": "PluginSection | null"
|
|
8642
|
+
},
|
|
8643
|
+
{
|
|
8644
|
+
"path": "presentation.sections.update",
|
|
8645
|
+
"namespace": "presentation.sections",
|
|
8646
|
+
"summary": "Change a section. Only the given fields change; the whole patch is one undo step. Flipping without a `depth` carries the depth to the far side of the model in the new direction, as `create` does. Write-gated.",
|
|
8647
|
+
"examplePrompts": [
|
|
8648
|
+
"Make Section A look the other way",
|
|
8649
|
+
"Only show the ground floor in this section",
|
|
8650
|
+
"Rename the section to \"Through atrium\"",
|
|
8651
|
+
"Move the section line 5 m north\n\n# Example\n```ts\nawait snaptrude.presentation.sections.update(sectionId, {\nisFlipped: true,\ndepth: 60,\n})\n```"
|
|
8652
|
+
],
|
|
8653
|
+
"argsType": "string",
|
|
8654
|
+
"resultType": "PluginSection"
|
|
8655
|
+
},
|
|
7554
8656
|
{
|
|
7555
8657
|
"path": "presentation.shapes.list",
|
|
7556
8658
|
"namespace": "presentation.shapes",
|
|
@@ -7653,17 +8755,31 @@
|
|
|
7653
8755
|
{
|
|
7654
8756
|
"path": "presentation.sheets.place",
|
|
7655
8757
|
"namespace": "presentation.sheets",
|
|
7656
|
-
"summary": "Place a saved view onto a sheet.",
|
|
8758
|
+
"summary": "Place a saved view onto a sheet. This is the call that puts a view on a sheet (`presentation.drawings.create` makes a drawing beside its source view, not on a sheet). When `scale` is omitted the view is fitted to the target sheet: a 2D or site-plan view is placed at the largest standard scale at which it fits inside the target sheet's margin, and never at a larger scale than the normal view drop would pick; a 3D view has no scale, so it is shrunk evenly to fit instead. This is the same fit as `placeDrawing`. Omit `position` unless the user asked for a specific place. Without a `position` the drawing goes to the sheet centre when that is free, otherwise to the nearest free spot to the centre inside the margin, beside the drawings already there; when there is no free spot it is centred anyway and the result has `overlaps: true`. With a `position` it is placed as given, and the result has `overlaps: true` when it covers another drawing, but it is not moved. In both cases only other drawings count (placed views and their title blocks and labels): text, images and other shapes on the sheet are ignored. Each call fits one view to the whole sheet, so a second fitted view often has no free spot: when several views should share a sheet, pass a `scale` small enough for all of them; otherwise use `sheets.create` per view. When the result's `overlaps` is true, move the drawing or put it on its own sheet. An explicit `scale` is always kept, even when the drawing (title block included) does not fit inside the sheet's margin at that scale; the result then has `overflows: true`. When it is true, pass a smaller scale (larger denominator), omit `scale` to fit, or use a larger sheet. `scale` must be a standard architectural scale denominator (100 means 1:100) in the project's unit system; any other value is rejected. Metric: 10, 20, 50, 100, 150, 200, 250, 500, 1000. Imperial detail: 12, 16, 24, 32, 48, 64, 96, 128, 192, 384, 768, 1536 (1\" = 1' to 1/128\" = 1'; 48 is 1/4\" = 1', 96 is 1/8\" = 1'). Imperial site: 120, 240, 360, 480, 600, 1200, 2400, 3600, 4800 (1\" = 10' to 1\" = 400'). Pick the LARGEST standard scale (smallest denominator) at which the view still fits its frame or sheet and its room labels stay readable: for a building floor plan that is usually 1:50 to 1:200 (1/4\" = 1' to 1/16\" = 1'). Never use a site-sized scale (1:500 and up, 1/64\" = 1' (768) and smaller, 1\" = 20' (240) and up) for a single building plan unless the user asked for it.",
|
|
7657
8759
|
"examplePrompts": [
|
|
7658
8760
|
"Place the floor plan on Sheet 1",
|
|
7659
8761
|
"Add this 3D view to the cover sheet",
|
|
7660
8762
|
"Drop the site plan onto the layout sheet at 100, 200",
|
|
7661
8763
|
"Put the Ground Floor view on sheet_1 at 1:100 scale",
|
|
7662
|
-
"Place the plan on the cover sheet at quarter-inch scale
|
|
8764
|
+
"Place the plan on the cover sheet at quarter-inch scale",
|
|
8765
|
+
"Add a floor plan drawing of each storey to this sheet\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.sheets.place(\"sheet_1\", \"view_123\", {\nscale: 100, // 1:100 (metric project)\n})\n```"
|
|
7663
8766
|
],
|
|
7664
8767
|
"argsType": "string",
|
|
7665
8768
|
"resultType": "PluginPresentationSheetsPlaceResult"
|
|
7666
8769
|
},
|
|
8770
|
+
{
|
|
8771
|
+
"path": "presentation.sheets.placeDrawing",
|
|
8772
|
+
"namespace": "presentation.sheets",
|
|
8773
|
+
"summary": "Move an existing drawing onto a sheet without copying or regenerating it, scaled down to fit the sheet when it is too big. `presentation.drawings.create` leaves a drawing beside its source view, not on a sheet; this is the call that puts it on one. To place a saved view on a sheet in one call, use `sheets.place(sheetId, viewId)`, which fits it the same way. By default (`fit` true or omitted) a drawing larger than the sheet's drawable area (the sheet inside its margin) is moved to the LARGEST standard architectural scale at which it fits; a drawing that already fits keeps its scale, and a drawing is never scaled up. A 3D drawing has no architectural scale, so it is shrunk uniformly to fit instead. With `fit: false` the scale is kept and a drawing that does not fit is rejected with an error naming the drawing, the sheet and the scale, and saying to call `placeDrawing` without `fit: false` to fit it, or use a larger sheet. When even the smallest standard scale does not fit, the call is rejected with an error suggesting a larger sheet size. Without a `position` the drawing goes to the sheet centre when that is free, otherwise to the nearest free spot to the centre inside the margin, beside the drawings already there; when there is no free spot it is centred anyway and the result has `overlaps: true`. With a `position` it is placed as given, and the result has `overlaps: true` when it covers another drawing, but it is not moved. In both cases only other drawings count (placed views and their title blocks and labels): text, images and other shapes on the sheet are ignored. Each call fits one drawing to the whole sheet, so a second fitted drawing often has no free spot: when several drawings should share a sheet, give them scales small enough for all of them; otherwise use `sheets.create` per drawing. The position is sheet-local. The drawing's stable id remains unchanged; `shapeId` therefore identifies the moved drawing. The result reports the architectural scale the drawing has on the sheet and whether this call changed it; a host that reports it also says whether the drawing `overlaps` another drawing on the sheet (move it or put it on its own sheet when true).",
|
|
8774
|
+
"examplePrompts": [
|
|
8775
|
+
"Move this drawing onto the cover sheet",
|
|
8776
|
+
"Place drawing_1 at the center of sheet_2",
|
|
8777
|
+
"Put the level 2 plan drawing on the Level 2 Plan sheet",
|
|
8778
|
+
"Add the floor plan drawings to this sheet\n\n# Example\n```ts\nconst { scale, rescaled } = await snaptrude.presentation.sheets.placeDrawing(\nsheet.id,\ndrawing.id,\n)\n```"
|
|
8779
|
+
],
|
|
8780
|
+
"argsType": "string",
|
|
8781
|
+
"resultType": "PluginPresentationSheetsPlaceDrawingResult"
|
|
8782
|
+
},
|
|
7667
8783
|
{
|
|
7668
8784
|
"path": "presentation.sheets.rename",
|
|
7669
8785
|
"namespace": "presentation.sheets",
|
|
@@ -7774,6 +8890,62 @@
|
|
|
7774
8890
|
"argsType": null,
|
|
7775
8891
|
"resultType": "PluginPresentationSlideshowState"
|
|
7776
8892
|
},
|
|
8893
|
+
{
|
|
8894
|
+
"path": "presentation.standards.export",
|
|
8895
|
+
"namespace": "presentation.standards",
|
|
8896
|
+
"summary": "Serialize the native standard-file format. No browser download or save. The file includes its stock/version and stores widths in paper mm.",
|
|
8897
|
+
"examplePrompts": [
|
|
8898
|
+
"Export the line standard"
|
|
8899
|
+
],
|
|
8900
|
+
"argsType": null,
|
|
8901
|
+
"resultType": "string"
|
|
8902
|
+
},
|
|
8903
|
+
{
|
|
8904
|
+
"path": "presentation.standards.get",
|
|
8905
|
+
"namespace": "presentation.standards",
|
|
8906
|
+
"summary": "Read the stored sparse standard; omitted fields inherit stock values.",
|
|
8907
|
+
"examplePrompts": [],
|
|
8908
|
+
"argsType": null,
|
|
8909
|
+
"resultType": "PluginGraphicStandard"
|
|
8910
|
+
},
|
|
8911
|
+
{
|
|
8912
|
+
"path": "presentation.standards.getResolved",
|
|
8913
|
+
"namespace": "presentation.standards",
|
|
8914
|
+
"summary": "Read the actual native resolution, including applicable view overrides. No camera, view, preference or project data changes.",
|
|
8915
|
+
"examplePrompts": [
|
|
8916
|
+
"How thick are the wall cut lines at 1:50?"
|
|
8917
|
+
],
|
|
8918
|
+
"argsType": "PluginGraphicStandardResolveOptions",
|
|
8919
|
+
"resultType": "PluginResolvedGraphicStandard | null"
|
|
8920
|
+
},
|
|
8921
|
+
{
|
|
8922
|
+
"path": "presentation.standards.import",
|
|
8923
|
+
"namespace": "presentation.standards",
|
|
8924
|
+
"summary": "Import native standard-file JSON exactly as the dialog does, replacing the project standard in one saved undo step. Never edits team preferences.",
|
|
8925
|
+
"examplePrompts": [
|
|
8926
|
+
"Match the line weights in this standard file"
|
|
8927
|
+
],
|
|
8928
|
+
"argsType": "string",
|
|
8929
|
+
"resultType": "PluginGraphicStandard"
|
|
8930
|
+
},
|
|
8931
|
+
{
|
|
8932
|
+
"path": "presentation.standards.reset",
|
|
8933
|
+
"namespace": "presentation.standards",
|
|
8934
|
+
"summary": "Reset an editable tab, or all tabs, through the native reset functions. One saved undo step; stock retention/pruning follows the native commit.",
|
|
8935
|
+
"examplePrompts": [],
|
|
8936
|
+
"argsType": "PluginGraphicStandardTab",
|
|
8937
|
+
"resultType": "PluginGraphicStandard"
|
|
8938
|
+
},
|
|
8939
|
+
{
|
|
8940
|
+
"path": "presentation.standards.update",
|
|
8941
|
+
"namespace": "presentation.standards",
|
|
8942
|
+
"summary": "Apply only supplied fields as one saved, undoable native commit. Validate the whole patch first; invalid fields never leave a partial edit behind.",
|
|
8943
|
+
"examplePrompts": [
|
|
8944
|
+
"Make wall cut lines heavier throughout the project"
|
|
8945
|
+
],
|
|
8946
|
+
"argsType": "PluginGraphicStandardPatch",
|
|
8947
|
+
"resultType": "PluginGraphicStandard"
|
|
8948
|
+
},
|
|
7777
8949
|
{
|
|
7778
8950
|
"path": "presentation.tables.place",
|
|
7779
8951
|
"namespace": "presentation.tables",
|
|
@@ -7787,6 +8959,90 @@
|
|
|
7787
8959
|
"argsType": "string",
|
|
7788
8960
|
"resultType": "PluginCanvasShape"
|
|
7789
8961
|
},
|
|
8962
|
+
{
|
|
8963
|
+
"path": "presentation.viewPresets.copy",
|
|
8964
|
+
"namespace": "presentation.viewPresets",
|
|
8965
|
+
"summary": "Duplicate a preset under a native-generated unique name. Drawing bindings do not change. Not undoable (catalog write). Built-ins can be copied.",
|
|
8966
|
+
"examplePrompts": [
|
|
8967
|
+
"Duplicate this preset",
|
|
8968
|
+
"Make an editable copy of the built-in preset",
|
|
8969
|
+
"Copy the Planning Issue preset so I can change it\n\n# Example\n```ts\nconst copy = await snaptrude.presentation.viewPresets.copy(preset.id)\nawait snaptrude.presentation.viewPresets.rename(copy.id, \"Planning Issue B\")\n```"
|
|
8970
|
+
],
|
|
8971
|
+
"argsType": "string",
|
|
8972
|
+
"resultType": "PluginViewPreset"
|
|
8973
|
+
},
|
|
8974
|
+
{
|
|
8975
|
+
"path": "presentation.viewPresets.create",
|
|
8976
|
+
"namespace": "presentation.viewPresets",
|
|
8977
|
+
"summary": "Save a kernel-plan drawing's effective styles as a new custom preset and bind that drawing to it. Not undoable (catalog write).",
|
|
8978
|
+
"examplePrompts": [
|
|
8979
|
+
"Save this drawing's styles as a new preset",
|
|
8980
|
+
"Make a preset called Planning Issue from this plan",
|
|
8981
|
+
"Turn my restyled drawing into a reusable style\n\n# Example\n```ts\nconst capabilities = await snaptrude.presentation.drawings.getCapabilities(drawing.id)\nif (capabilities.presets) {\nconst preset = await snaptrude.presentation.viewPresets.create(\"Planning Issue\", {\nfromDrawingId: drawing.id,\n})\n}\n```"
|
|
8982
|
+
],
|
|
8983
|
+
"argsType": "string",
|
|
8984
|
+
"resultType": "PluginViewPreset"
|
|
8985
|
+
},
|
|
8986
|
+
{
|
|
8987
|
+
"path": "presentation.viewPresets.delete",
|
|
8988
|
+
"namespace": "presentation.viewPresets",
|
|
8989
|
+
"summary": "Delete a custom preset and rebind its drawings to another existing preset. Built-ins cannot be deleted. Not undoable (catalog write).",
|
|
8990
|
+
"examplePrompts": [
|
|
8991
|
+
"Delete this preset",
|
|
8992
|
+
"Remove the old style preset and switch its drawings to the default",
|
|
8993
|
+
"Get rid of the Planning Issue B preset\n\n# Example\n```ts\nconst presets = await snaptrude.presentation.viewPresets.list()\nconst replacement = presets.find((each) => each.builtIn)!\nawait snaptrude.presentation.viewPresets.delete(customPreset.id, {\nreplacementId: replacement.id,\n})\n```"
|
|
8994
|
+
],
|
|
8995
|
+
"argsType": "string",
|
|
8996
|
+
"resultType": "void"
|
|
8997
|
+
},
|
|
8998
|
+
{
|
|
8999
|
+
"path": "presentation.viewPresets.get",
|
|
9000
|
+
"namespace": "presentation.viewPresets",
|
|
9001
|
+
"summary": "Read one preset by id.",
|
|
9002
|
+
"examplePrompts": [
|
|
9003
|
+
"Which preset is this drawing using?",
|
|
9004
|
+
"Is this preset a built-in one?",
|
|
9005
|
+
"Read the preset bound to the ground floor plan\n\n# Example\n```ts\nconst drawing = await snaptrude.presentation.drawings.get(drawingId)\nconst preset = drawing?.presetId\n? await snaptrude.presentation.viewPresets.get(drawing.presetId)\n: null\n```"
|
|
9006
|
+
],
|
|
9007
|
+
"argsType": "string",
|
|
9008
|
+
"resultType": "PluginViewPreset | null"
|
|
9009
|
+
},
|
|
9010
|
+
{
|
|
9011
|
+
"path": "presentation.viewPresets.list",
|
|
9012
|
+
"namespace": "presentation.viewPresets",
|
|
9013
|
+
"summary": "List the preset catalog: built-ins first, then custom presets by name.",
|
|
9014
|
+
"examplePrompts": [
|
|
9015
|
+
"List the available drawing style presets",
|
|
9016
|
+
"Which custom presets does this presentation have?",
|
|
9017
|
+
"Is there a Planning Issue preset?\n\n# Example\n```ts\nconst presets = await snaptrude.presentation.viewPresets.list()\nconst custom = presets.filter((preset) => !preset.builtIn)\n```"
|
|
9018
|
+
],
|
|
9019
|
+
"argsType": null,
|
|
9020
|
+
"resultType": "PluginViewPreset[]"
|
|
9021
|
+
},
|
|
9022
|
+
{
|
|
9023
|
+
"path": "presentation.viewPresets.rename",
|
|
9024
|
+
"namespace": "presentation.viewPresets",
|
|
9025
|
+
"summary": "Rename a custom preset. Names must stay unique; built-ins cannot be renamed. Not undoable (catalog write).",
|
|
9026
|
+
"examplePrompts": [
|
|
9027
|
+
"Rename this preset to Client Review",
|
|
9028
|
+
"Call the copied preset Planning Issue B",
|
|
9029
|
+
"Change the name of my custom drawing style\n\n# Example\n```ts\nawait snaptrude.presentation.viewPresets.rename(preset.id, \"Client Review\")\n```"
|
|
9030
|
+
],
|
|
9031
|
+
"argsType": "string",
|
|
9032
|
+
"resultType": "PluginViewPreset"
|
|
9033
|
+
},
|
|
9034
|
+
{
|
|
9035
|
+
"path": "presentation.viewPresets.update",
|
|
9036
|
+
"namespace": "presentation.viewPresets",
|
|
9037
|
+
"summary": "Replace a custom preset's values with the effective styles of a drawing already bound to it, then refresh every bound drawing. Built-ins cannot be updated. Not undoable (catalog write).",
|
|
9038
|
+
"examplePrompts": [
|
|
9039
|
+
"Update this preset from the current drawing styles",
|
|
9040
|
+
"Push my style changes to every drawing using this preset",
|
|
9041
|
+
"Save these overrides into the Planning Issue preset\n\n# Example\n```ts\nawait snaptrude.presentation.viewPresets.update(drawing.presetId!, {\nfromDrawingId: drawing.id,\n})\n```"
|
|
9042
|
+
],
|
|
9043
|
+
"argsType": "string",
|
|
9044
|
+
"resultType": "PluginViewPreset"
|
|
9045
|
+
},
|
|
7790
9046
|
{
|
|
7791
9047
|
"path": "presentation.views.capture",
|
|
7792
9048
|
"namespace": "presentation.views",
|
|
@@ -7858,7 +9114,9 @@
|
|
|
7858
9114
|
"What color mode is the Ground Floor view using?",
|
|
7859
9115
|
"Get the display settings for this view",
|
|
7860
9116
|
"Does the site plan view show axes and labels?",
|
|
7861
|
-
"Read the background color of the active view
|
|
9117
|
+
"Read the background color of the active view",
|
|
9118
|
+
"What is the cut height of this plan?",
|
|
9119
|
+
"How deep does this plan look below the cut?\n\n# Example\n```ts\nconst settings = await snaptrude.presentation.views.getSettings(\"view_123\")\nif (settings) console.log(settings.colorMode, settings.backgroundColor)\n```"
|
|
7862
9120
|
],
|
|
7863
9121
|
"argsType": "string",
|
|
7864
9122
|
"resultType": "PluginPresentationViewsGetSettingsResult"
|
|
@@ -7869,7 +9127,7 @@
|
|
|
7869
9127
|
"summary": "List the saved views in the active project.",
|
|
7870
9128
|
"examplePrompts": [
|
|
7871
9129
|
"List all the saved views",
|
|
7872
|
-
"What
|
|
9130
|
+
"What plan, 3D, and elevation views are in this project?",
|
|
7873
9131
|
"Which view is currently active?",
|
|
7874
9132
|
"Get the names of every presentation view",
|
|
7875
9133
|
"Show me the 3D views I can put on a sheet\n\n# Example\n```ts\nconst { views } = await snaptrude.presentation.views.list()\nconst active = views.find((v) => v.isActive)\nconst plans = views.filter((v) => v.type === \"2d\")\n```"
|
|
@@ -7912,11 +9170,240 @@
|
|
|
7912
9170
|
"Set the background of the active view to white",
|
|
7913
9171
|
"Show area labels on this view",
|
|
7914
9172
|
"Enable hidden-line mode for the section view",
|
|
7915
|
-
"Make the 3D view orthographic instead of perspective
|
|
9173
|
+
"Make the 3D view orthographic instead of perspective",
|
|
9174
|
+
"Raise the cut plane of the Ground Floor plan to 1.8 m",
|
|
9175
|
+
"Show the basement below in this plan",
|
|
9176
|
+
"Hide the overhead objects in this plan\n\n# Example\n```ts\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\ncolorMode: \"monochrome\",\nshowAxis: false,\n})\n// switch a 3D view to an isometric (orthographic) projection\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\nviewMode: \"isometric\",\n})\n// set a plan's range: cut 1.2 m up, show the basement below, no overhead\nawait snaptrude.presentation.views.updateSettings(\"plan_1\", {\ncutPlaneHeight: 4.72,\nviewDepthStorey: -1,\nshowOverheadObjects: false,\n})\n```"
|
|
7916
9177
|
],
|
|
7917
9178
|
"argsType": "string",
|
|
7918
9179
|
"resultType": "PluginPresentationViewsUpdateSettingsResult"
|
|
7919
9180
|
},
|
|
9181
|
+
{
|
|
9182
|
+
"path": "presentation.walkthroughs.cancelJob",
|
|
9183
|
+
"namespace": "presentation.walkthroughs",
|
|
9184
|
+
"summary": "Cancel an export job. The recording stops and nothing is placed; a job that has already finished is returned unchanged. Write-gated.",
|
|
9185
|
+
"examplePrompts": [
|
|
9186
|
+
"Cancel the video export\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.cancelJob(jobId)\n```"
|
|
9187
|
+
],
|
|
9188
|
+
"argsType": "string",
|
|
9189
|
+
"resultType": "PluginWalkthroughExportJob"
|
|
9190
|
+
},
|
|
9191
|
+
{
|
|
9192
|
+
"path": "presentation.walkthroughs.capture",
|
|
9193
|
+
"namespace": "presentation.walkthroughs",
|
|
9194
|
+
"summary": "Capture frames of a walkthrough as one contact-sheet image: a grid of views at evenly spaced moments (or at `options.timesInSeconds`), read left to right and top to bottom. The camera goes back to where it was afterwards. Switches from 2D plan view to 3D first.",
|
|
9195
|
+
"examplePrompts": [
|
|
9196
|
+
"Show me what the walkthrough looks like",
|
|
9197
|
+
"Capture six frames of the fly-over\n\n# Example\n```ts\nconst { image } = await snaptrude.presentation.walkthroughs.capture(walkthroughId, {\ncount: 6,\n})\n```"
|
|
9198
|
+
],
|
|
9199
|
+
"argsType": "string",
|
|
9200
|
+
"resultType": "PluginWalkthroughCaptureResult"
|
|
9201
|
+
},
|
|
9202
|
+
{
|
|
9203
|
+
"path": "presentation.walkthroughs.create",
|
|
9204
|
+
"namespace": "presentation.walkthroughs",
|
|
9205
|
+
"summary": "Create a walkthrough from full keyframes: where the camera stands at each and how it looks there (ahead along the path, at a target, or in a fixed direction). A keyframe that follows the floor stands at the walkthrough's eye height above the floor, stair, terrain or ground at or below its `eye`, and the path between two such keyframes climbs stairs and ramps. The new walkthrough opens in the walkthrough dock. Write-gated; one undo step.",
|
|
9206
|
+
"examplePrompts": [
|
|
9207
|
+
"Make a walkthrough through these three viewpoints",
|
|
9208
|
+
"Create a camera path that looks at the atrium the whole way\n\n# Example\n```ts\nconst walkthrough = await snaptrude.presentation.walkthroughs.create(\n[\n{ eye: { x: 0, y: 30, z: 80 }, look: { mode: \"target\", target: { x: 0, y: 10, z: 0 } } },\n{ eye: { x: 60, y: 30, z: 0 }, look: { mode: \"target\", target: { x: 0, y: 10, z: 0 } } },\n],\n{ name: \"Approach\", durationInSeconds: 10 },\n)\n```"
|
|
9209
|
+
],
|
|
9210
|
+
"argsType": "PluginWalkthroughKeyframeInput[]",
|
|
9211
|
+
"resultType": "PluginWalkthrough"
|
|
9212
|
+
},
|
|
9213
|
+
{
|
|
9214
|
+
"path": "presentation.walkthroughs.createFromPoints",
|
|
9215
|
+
"namespace": "presentation.walkthroughs",
|
|
9216
|
+
"summary": "Create a walkthrough that walks through points on the floor, the way the Walkthrough tool draws a route: the camera stands at eye height above the floor, stair, terrain or ground at each point, climbs stairs and ramps between them, and looks ahead along the path, or at `options.lookAt` the whole way. Write-gated; one undo step.",
|
|
9217
|
+
"examplePrompts": [
|
|
9218
|
+
"Walk from the entrance through the lobby to the stairs",
|
|
9219
|
+
"Make a walkthrough that visits every room on this floor",
|
|
9220
|
+
"Create a loop around the courtyard\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.createFromPoints(\n[{ x: 0, y: 0, z: 0 }, { x: 40, y: 0, z: 0 }, { x: 40, y: 0, z: 30 }],\n{ name: \"Ground floor tour\" },\n)\n```"
|
|
9221
|
+
],
|
|
9222
|
+
"argsType": "Vec3Components[]",
|
|
9223
|
+
"resultType": "PluginWalkthrough"
|
|
9224
|
+
},
|
|
9225
|
+
{
|
|
9226
|
+
"path": "presentation.walkthroughs.createFromPreset",
|
|
9227
|
+
"namespace": "presentation.walkthroughs",
|
|
9228
|
+
"summary": "Create a walkthrough from a camera move around a subject, as the Walkthrough button's menu does: `orbit` circles it facing its middle, `flyOver` passes above it looking ahead and down, `pushIn` and `pullBack` move toward and away from it, and `rise` cranes up from eye level. The subject is `options.subject`, else the selection, else the visible model without its terrain; the move is sized to fit it in view and starts on the side the camera is on. While the walkthrough is still a preset, {@linkcode PluginPresentationWalkthroughsApi.update} can change its distance, height and direction; editing a keyframe makes it ordinary. Write-gated; one undo step.",
|
|
9229
|
+
"examplePrompts": [
|
|
9230
|
+
"Orbit around the selected building",
|
|
9231
|
+
"Make a drone fly-over of the site",
|
|
9232
|
+
"Push in slowly toward the entrance",
|
|
9233
|
+
"Crane up to reveal the whole campus\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.createFromPreset(\"orbit\", {\nsubject: [towerId],\nheightInDegrees: 35,\ndurationInSeconds: 20,\n})\n```"
|
|
9234
|
+
],
|
|
9235
|
+
"argsType": "PluginWalkthroughPresetKind",
|
|
9236
|
+
"resultType": "PluginWalkthrough"
|
|
9237
|
+
},
|
|
9238
|
+
{
|
|
9239
|
+
"path": "presentation.walkthroughs.createKeyframe",
|
|
9240
|
+
"namespace": "presentation.walkthroughs",
|
|
9241
|
+
"summary": "Add a keyframe to a walkthrough at `index` (0 to the keyframe count; default: the end). A preset walkthrough becomes ordinary. Write-gated; one undo step.",
|
|
9242
|
+
"examplePrompts": [
|
|
9243
|
+
"Add a stop in the kitchen after the second point\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.createKeyframe(\nwalkthroughId,\n{ eye: { x: 12, y: 0, z: 30 }, followsFloor: true, holdInSeconds: 2 },\n2,\n)\n```"
|
|
9244
|
+
],
|
|
9245
|
+
"argsType": "string",
|
|
9246
|
+
"resultType": "PluginWalkthrough"
|
|
9247
|
+
},
|
|
9248
|
+
{
|
|
9249
|
+
"path": "presentation.walkthroughs.delete",
|
|
9250
|
+
"namespace": "presentation.walkthroughs",
|
|
9251
|
+
"summary": "Delete a walkthrough. Write-gated; one undo step.",
|
|
9252
|
+
"examplePrompts": [
|
|
9253
|
+
"Delete the old walkthrough\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.delete(walkthroughId)\n```"
|
|
9254
|
+
],
|
|
9255
|
+
"argsType": "string",
|
|
9256
|
+
"resultType": "boolean"
|
|
9257
|
+
},
|
|
9258
|
+
{
|
|
9259
|
+
"path": "presentation.walkthroughs.deleteKeyframe",
|
|
9260
|
+
"namespace": "presentation.walkthroughs",
|
|
9261
|
+
"summary": "Remove a keyframe; the path then runs straight from the keyframe before it to the one after. Removing the last keyframe deletes the walkthrough. A preset walkthrough becomes ordinary. Write-gated; one undo step.",
|
|
9262
|
+
"examplePrompts": [
|
|
9263
|
+
"Remove the third stop from the walkthrough\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.deleteKeyframe(walkthroughId, keyframeId)\n```"
|
|
9264
|
+
],
|
|
9265
|
+
"argsType": "string",
|
|
9266
|
+
"resultType": "PluginWalkthrough | null"
|
|
9267
|
+
},
|
|
9268
|
+
{
|
|
9269
|
+
"path": "presentation.walkthroughs.export",
|
|
9270
|
+
"namespace": "presentation.walkthroughs",
|
|
9271
|
+
"summary": "Record a walkthrough as a video and place it on the Present canvas, as an asynchronous job: this resolves at once with the queued job, and {@linkcode PluginPresentationWalkthroughsApi.getJob} reports it until it completes, fails or is cancelled. Recording plays the walkthrough in real time at the chosen size, so it takes about as long as the walkthrough plus the upload; the editor switches to Present mode to place the video, which keeps playing muted in a loop there. Only one export runs at a time. Write-gated.",
|
|
9272
|
+
"examplePrompts": [
|
|
9273
|
+
"Export the walkthrough as a video",
|
|
9274
|
+
"Put a 1080p video of the orbit on a sheet\n\n# Example\n```ts\nconst walkthroughs = snaptrude.presentation.walkthroughs\nlet job = await walkthroughs.export(walkthroughId, { quality: \"1080p\" })\nwhile (job.status === \"queued\" || job.status === \"running\") {\nawait new Promise((resolve) => setTimeout(resolve, 2000))\njob = (await walkthroughs.getJob(job.jobId))!\n}\nconsole.log(job.result?.shapeId)\n```"
|
|
9275
|
+
],
|
|
9276
|
+
"argsType": "string",
|
|
9277
|
+
"resultType": "PluginWalkthroughExportJob"
|
|
9278
|
+
},
|
|
9279
|
+
{
|
|
9280
|
+
"path": "presentation.walkthroughs.get",
|
|
9281
|
+
"namespace": "presentation.walkthroughs",
|
|
9282
|
+
"summary": "Get one walkthrough by id.",
|
|
9283
|
+
"examplePrompts": [
|
|
9284
|
+
"Show me the keyframes of the orbit walkthrough",
|
|
9285
|
+
"How long does this walkthrough take?\n\n# Example\n```ts\nconst walkthrough = await snaptrude.presentation.walkthroughs.get(walkthroughId)\nconsole.log(walkthrough?.durationInSeconds)\n```"
|
|
9286
|
+
],
|
|
9287
|
+
"argsType": "string",
|
|
9288
|
+
"resultType": "PluginWalkthrough | null"
|
|
9289
|
+
},
|
|
9290
|
+
{
|
|
9291
|
+
"path": "presentation.walkthroughs.getJob",
|
|
9292
|
+
"namespace": "presentation.walkthroughs",
|
|
9293
|
+
"summary": "Get an export job by id.",
|
|
9294
|
+
"examplePrompts": [
|
|
9295
|
+
"Is the video export done yet?\n\n# Example\n```ts\nconst job = await snaptrude.presentation.walkthroughs.getJob(jobId)\n```"
|
|
9296
|
+
],
|
|
9297
|
+
"argsType": "string",
|
|
9298
|
+
"resultType": "PluginWalkthroughExportJob | null"
|
|
9299
|
+
},
|
|
9300
|
+
{
|
|
9301
|
+
"path": "presentation.walkthroughs.getState",
|
|
9302
|
+
"namespace": "presentation.walkthroughs",
|
|
9303
|
+
"summary": "Read the playback state: which walkthrough is playing or paused, and how far through it.",
|
|
9304
|
+
"examplePrompts": [
|
|
9305
|
+
"Is the walkthrough still playing?\n\n# Example\n```ts\nconst { status, timeInSeconds } = await snaptrude.presentation.walkthroughs.getState()\n```"
|
|
9306
|
+
],
|
|
9307
|
+
"argsType": null,
|
|
9308
|
+
"resultType": "PluginWalkthroughPlaybackState"
|
|
9309
|
+
},
|
|
9310
|
+
{
|
|
9311
|
+
"path": "presentation.walkthroughs.list",
|
|
9312
|
+
"namespace": "presentation.walkthroughs",
|
|
9313
|
+
"summary": "List the open project's walkthroughs, oldest first.",
|
|
9314
|
+
"examplePrompts": [
|
|
9315
|
+
"Which walkthroughs are there?",
|
|
9316
|
+
"List the camera paths in this project\n\n# Example\n```ts\nconst { walkthroughs } = await snaptrude.presentation.walkthroughs.list()\n```"
|
|
9317
|
+
],
|
|
9318
|
+
"argsType": null,
|
|
9319
|
+
"resultType": "PluginWalkthroughsListResult"
|
|
9320
|
+
},
|
|
9321
|
+
{
|
|
9322
|
+
"path": "presentation.walkthroughs.listIssues",
|
|
9323
|
+
"namespace": "presentation.walkthroughs",
|
|
9324
|
+
"summary": "Find places where a walkthrough's camera passes through the model: through anything walking would stop at, such as a wall, glazing, a column, a slab or a roof, which would show the inside of the geometry on screen. Doors, furniture and room masses don't count, as walking passes through them. Each issue gives the first moment and point of one pass. The camera itself does not move.",
|
|
9325
|
+
"examplePrompts": [
|
|
9326
|
+
"Does the walkthrough go through any walls?",
|
|
9327
|
+
"Check the camera path for clashes and fix them\n\n# Example\n```ts\nconst { issues } = await snaptrude.presentation.walkthroughs.listIssues(walkthroughId)\nfor (const issue of issues) console.log(issue.timeInSeconds, issue.componentId)\n```"
|
|
9328
|
+
],
|
|
9329
|
+
"argsType": "string",
|
|
9330
|
+
"resultType": "PluginWalkthroughListIssuesResult"
|
|
9331
|
+
},
|
|
9332
|
+
{
|
|
9333
|
+
"path": "presentation.walkthroughs.listJobs",
|
|
9334
|
+
"namespace": "presentation.walkthroughs",
|
|
9335
|
+
"summary": "List export jobs, newest first: running ones and those that finished in the last 30 minutes.",
|
|
9336
|
+
"examplePrompts": [
|
|
9337
|
+
"Which video exports are running?\n\n# Example\n```ts\nconst { jobs } = await snaptrude.presentation.walkthroughs.listJobs()\n```"
|
|
9338
|
+
],
|
|
9339
|
+
"argsType": null,
|
|
9340
|
+
"resultType": "PluginWalkthroughListJobsResult"
|
|
9341
|
+
},
|
|
9342
|
+
{
|
|
9343
|
+
"path": "presentation.walkthroughs.reorderKeyframe",
|
|
9344
|
+
"namespace": "presentation.walkthroughs",
|
|
9345
|
+
"summary": "Move a keyframe to position `index` in the walkthrough's order (the `presentation.sheets.reorder` convention). A preset walkthrough becomes ordinary. Write-gated; one undo step.",
|
|
9346
|
+
"examplePrompts": [
|
|
9347
|
+
"Visit the terrace before the living room\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.reorderKeyframe(walkthroughId, keyframeId, 0)\n```"
|
|
9348
|
+
],
|
|
9349
|
+
"argsType": "string",
|
|
9350
|
+
"resultType": "PluginWalkthrough"
|
|
9351
|
+
},
|
|
9352
|
+
{
|
|
9353
|
+
"path": "presentation.walkthroughs.sample",
|
|
9354
|
+
"namespace": "presentation.walkthroughs",
|
|
9355
|
+
"summary": "Sample where the camera is and which way it looks at given moments of a walkthrough's playback, without moving the camera.",
|
|
9356
|
+
"examplePrompts": [
|
|
9357
|
+
"Where is the camera halfway through the walkthrough?",
|
|
9358
|
+
"Check how high the camera flies over the roof\n\n# Example\n```ts\nconst walkthrough = await snaptrude.presentation.walkthroughs.get(walkthroughId)\nconst { samples } = await snaptrude.presentation.walkthroughs.sample(walkthroughId, [\n0,\nwalkthrough!.durationInSeconds / 2,\n])\n```"
|
|
9359
|
+
],
|
|
9360
|
+
"argsType": "string",
|
|
9361
|
+
"resultType": "PluginWalkthroughSampleResult"
|
|
9362
|
+
},
|
|
9363
|
+
{
|
|
9364
|
+
"path": "presentation.walkthroughs.start",
|
|
9365
|
+
"namespace": "presentation.walkthroughs",
|
|
9366
|
+
"summary": "Play a walkthrough in the viewport, from the start or `options.fromTimeInSeconds`. Arrow-key navigation pauses while it plays; {@linkcode PluginPresentationWalkthroughsApi.stop} puts the camera back where it was. Switches from 2D plan view to 3D first. Resolves once playback has started; a walkthrough that is already playing keeps playing.",
|
|
9367
|
+
"examplePrompts": [
|
|
9368
|
+
"Play the walkthrough",
|
|
9369
|
+
"Show me the orbit\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.start(walkthroughId)\n```"
|
|
9370
|
+
],
|
|
9371
|
+
"argsType": "string",
|
|
9372
|
+
"resultType": "PluginWalkthroughPlaybackState"
|
|
9373
|
+
},
|
|
9374
|
+
{
|
|
9375
|
+
"path": "presentation.walkthroughs.stop",
|
|
9376
|
+
"namespace": "presentation.walkthroughs",
|
|
9377
|
+
"summary": "Stop playback and put the camera back where it was before it started. A no-op when nothing is playing.",
|
|
9378
|
+
"examplePrompts": [
|
|
9379
|
+
"Stop the walkthrough\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.stop()\n```"
|
|
9380
|
+
],
|
|
9381
|
+
"argsType": null,
|
|
9382
|
+
"resultType": "PluginWalkthroughPlaybackState"
|
|
9383
|
+
},
|
|
9384
|
+
{
|
|
9385
|
+
"path": "presentation.walkthroughs.update",
|
|
9386
|
+
"namespace": "presentation.walkthroughs",
|
|
9387
|
+
"summary": "Change a walkthrough: only the fields given change. Speed and duration are two ways to set one thing, so give at most one of them. `preset` changes a preset walkthrough's camera move and makes its keyframes again, keeping its duration; changing `isLoop` of a preset walkthrough makes it ordinary. Write-gated; one undo step.",
|
|
9388
|
+
"examplePrompts": [
|
|
9389
|
+
"Slow the walkthrough down to 30 seconds",
|
|
9390
|
+
"Rename it to \"Evening approach\"",
|
|
9391
|
+
"Make the orbit go the other way round and higher up\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.update(walkthroughId, {\ndurationInSeconds: 30,\nisRepeating: true,\n})\n```"
|
|
9392
|
+
],
|
|
9393
|
+
"argsType": "string",
|
|
9394
|
+
"resultType": "PluginWalkthrough"
|
|
9395
|
+
},
|
|
9396
|
+
{
|
|
9397
|
+
"path": "presentation.walkthroughs.updateKeyframe",
|
|
9398
|
+
"namespace": "presentation.walkthroughs",
|
|
9399
|
+
"summary": "Change a keyframe: only the fields given change. A preset walkthrough becomes ordinary. Write-gated; one undo step.",
|
|
9400
|
+
"examplePrompts": [
|
|
9401
|
+
"Pause for three seconds at the second point",
|
|
9402
|
+
"Make the last point look at the fireplace\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.updateKeyframe(walkthroughId, keyframeId, {\nlook: { mode: \"target\", target: { x: 5, y: 4, z: 10 } },\n})\n```"
|
|
9403
|
+
],
|
|
9404
|
+
"argsType": "string",
|
|
9405
|
+
"resultType": "PluginWalkthrough"
|
|
9406
|
+
},
|
|
7920
9407
|
{
|
|
7921
9408
|
"path": "program.adjacency.compute",
|
|
7922
9409
|
"namespace": "program.adjacency",
|