@snaptrude/plugin-core 1.0.3 → 1.0.4
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 +6 -0
- package/api-manifest.json +146 -2135
- package/dist/api/core/camera/index.d.ts +16 -6
- 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/core/storeys/index.d.ts +5 -0
- package/dist/api/core/storeys/index.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 +84 -16
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +134 -59
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +18 -6
- package/dist/api/design/create/opening-fields.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/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/opening-placement.d.ts +15 -3
- package/dist/api/design/opening-placement.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/entity/story.d.ts +4 -0
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/presentation/drawings.d.ts +1 -1
- package/dist/api/presentation/views.d.ts +5 -1
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/handles.d.ts +8 -0
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +96 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +95 -82
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/api/core/camera/index.ts +9 -7
- 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/core/storeys/index.ts +5 -0
- package/src/api/design/boolean/index.ts +2 -2
- package/src/api/design/create/bulk-items.ts +7 -2
- package/src/api/design/create/index.ts +34 -46
- package/src/api/design/create/opening-fields.ts +7 -7
- 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/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/api/entity/story.ts +4 -0
- package/src/api/presentation/views.ts +7 -2
- package/src/handles.ts +11 -0
- package/test/handles.test.mjs +36 -0
package/api-manifest.json
CHANGED
|
@@ -494,30 +494,6 @@
|
|
|
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
|
-
},
|
|
521
497
|
{
|
|
522
498
|
"path": "core.camera.getProjection",
|
|
523
499
|
"namespace": "core.camera",
|
|
@@ -543,31 +519,6 @@
|
|
|
543
519
|
"argsType": "Vec3Handle",
|
|
544
520
|
"resultType": "boolean"
|
|
545
521
|
},
|
|
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
|
-
},
|
|
571
522
|
{
|
|
572
523
|
"path": "core.camera.setMode",
|
|
573
524
|
"namespace": "core.camera",
|
|
@@ -581,19 +532,6 @@
|
|
|
581
532
|
"argsType": "PluginCameraMode",
|
|
582
533
|
"resultType": "boolean"
|
|
583
534
|
},
|
|
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
|
-
},
|
|
597
535
|
{
|
|
598
536
|
"path": "core.camera.setProjection",
|
|
599
537
|
"namespace": "core.camera",
|
|
@@ -621,18 +559,6 @@
|
|
|
621
559
|
"argsType": "PluginStandardView",
|
|
622
560
|
"resultType": "boolean"
|
|
623
561
|
},
|
|
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
|
-
},
|
|
636
562
|
{
|
|
637
563
|
"path": "core.camera.zoomExtents",
|
|
638
564
|
"namespace": "core.camera",
|
|
@@ -698,6 +624,19 @@
|
|
|
698
624
|
"argsType": "CommentHandle",
|
|
699
625
|
"resultType": "PluginCommentDetails | null"
|
|
700
626
|
},
|
|
627
|
+
{
|
|
628
|
+
"path": "core.comment.goTo",
|
|
629
|
+
"namespace": "core.comment",
|
|
630
|
+
"summary": "Take the camera to a comment's pin — mirrors clicking the comment in the sidebar: switches proposal if the comment belongs to another design option, activates its storey in 2D, restores the camera the comment was posted from, and selects it. Returns `false` for an unknown comment, a reply (replies have no pin), or an un-anchored project comment with no camera to restore.",
|
|
631
|
+
"examplePrompts": [
|
|
632
|
+
"Take me to the comment about the staircase",
|
|
633
|
+
"Show me where this comment is pinned",
|
|
634
|
+
"Jump the camera to the open comment on the roof",
|
|
635
|
+
"Navigate to the first unresolved comment\n\n# Example\n```ts\nconst [open] = await snaptrude.core.comment.list({ resolved: false })\nif (open) await snaptrude.core.comment.goTo(open)\n```"
|
|
636
|
+
],
|
|
637
|
+
"argsType": "CommentHandle",
|
|
638
|
+
"resultType": "boolean"
|
|
639
|
+
},
|
|
701
640
|
{
|
|
702
641
|
"path": "core.comment.isResolved",
|
|
703
642
|
"namespace": "core.comment",
|
|
@@ -714,16 +653,30 @@
|
|
|
714
653
|
{
|
|
715
654
|
"path": "core.comment.list",
|
|
716
655
|
"namespace": "core.comment",
|
|
717
|
-
"summary": "List every comment in the project (deleted ones are excluded), returned as comment handles you can pass to the other comment methods.",
|
|
656
|
+
"summary": "List every comment in the project (deleted ones are excluded), returned as comment handles you can pass to the other comment methods. Pass a `filter` to narrow by resolved state, storey, or anchored component.",
|
|
718
657
|
"examplePrompts": [
|
|
719
658
|
"List all the comments in this project",
|
|
720
659
|
"How many comments are on this model?",
|
|
721
660
|
"Show every note in the file",
|
|
722
|
-
"
|
|
661
|
+
"Which comments are still open on the second floor?",
|
|
662
|
+
"Get all comments so I can check which are resolved\n\n# Example\n```ts\nconst comments = await snaptrude.core.comment.list()\nconsole.log(`${comments.length} comments in the project`)\nconst open = await snaptrude.core.comment.list({ resolved: false, storey: 2 })\n```"
|
|
723
663
|
],
|
|
724
|
-
"argsType":
|
|
664
|
+
"argsType": "PluginCommentListFilter",
|
|
725
665
|
"resultType": "CommentHandle[]"
|
|
726
666
|
},
|
|
667
|
+
{
|
|
668
|
+
"path": "core.comment.listMentionableUsers",
|
|
669
|
+
"namespace": "core.comment",
|
|
670
|
+
"summary": "List the teammates who can be",
|
|
671
|
+
"examplePrompts": [
|
|
672
|
+
"Who can I tag in a comment on this project?",
|
|
673
|
+
"List the teammates I can mention",
|
|
674
|
+
"Find the structural engineer's email so I can tag them",
|
|
675
|
+
"Show me everyone on this project's team\n\n# Example\n```ts\nconst users = await snaptrude.core.comment.listMentionableUsers()\nconst alex = users.find((u) => u.name.toLowerCase().includes(\"alex\"))\nif (alex) await snaptrude.core.comment.tag(comment, alex.email)\n```"
|
|
676
|
+
],
|
|
677
|
+
"argsType": null,
|
|
678
|
+
"resultType": "PluginCommentAuthor[]"
|
|
679
|
+
},
|
|
727
680
|
{
|
|
728
681
|
"path": "core.comment.reopen",
|
|
729
682
|
"namespace": "core.comment",
|
|
@@ -803,9 +756,8 @@
|
|
|
803
756
|
{
|
|
804
757
|
"path": "core.geom.create.brepFromChamfer",
|
|
805
758
|
"namespace": "core.geom.create",
|
|
806
|
-
"summary": "Bevels the given edges of a solid with a symmetric planar cut. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
|
|
759
|
+
"summary": "Bevels the given straight edges of a solid with a symmetric planar cut. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
|
|
807
760
|
"examplePrompts": [
|
|
808
|
-
"Chamfer the top edge of the cylinder",
|
|
809
761
|
"Bevel these edges by 100mm",
|
|
810
762
|
"Chamfer the top edges of the plinth",
|
|
811
763
|
"Cut a 45-degree flat along the corners of this mass\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst edges = await snaptrude.core.geom.query.brep.listEdges(brep)\nconst beveled = await snaptrude.core.geom.create.brepFromChamfer(brep, [edges[0]], 0.1)\n```"
|
|
@@ -813,28 +765,6 @@
|
|
|
813
765
|
"argsType": "BrepHandle",
|
|
814
766
|
"resultType": "BrepHandle"
|
|
815
767
|
},
|
|
816
|
-
{
|
|
817
|
-
"path": "core.geom.create.brepFromCone",
|
|
818
|
-
"namespace": "core.geom.create",
|
|
819
|
-
"summary": "Create a solid **cone or frustum** B-rep: bottom-cap centre, axis, base radius, height, and an optional top radius (default 0 — a full cone to a point; > 0 — a frustum / tapered column). Host API call — returns a {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. Carries a creation recipe (radii + height), editable through `design.update.parameters`.",
|
|
820
|
-
"examplePrompts": [
|
|
821
|
-
"Create a cone roof 4m wide and 3m tall",
|
|
822
|
-
"Make a tapered column narrowing from 1m to 0.6m\n\n# Example\n```ts\nconst roof = await snaptrude.core.geom.create.brepFromCone(\n{ x: 0, y: 9, z: 0 },\n{ x: 0, y: 1, z: 0 },\n2,\n3,\n)\n```"
|
|
823
|
-
],
|
|
824
|
-
"argsType": "Vec3Components",
|
|
825
|
-
"resultType": "BrepHandle"
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
"path": "core.geom.create.brepFromCylinder",
|
|
829
|
-
"namespace": "core.geom.create",
|
|
830
|
-
"summary": "Create a solid **cylinder** B-rep from its bottom-cap centre, axis direction, radius and height. Host API call — returns a {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. The bottom cap sits AT `base` and the solid extends `height` along `axis` — place `base` on the floor and use axis `{x: 0, y: 1, z: 0}` for an upright column. Carries a creation recipe (radius, height), editable through `design.update.parameters`.",
|
|
831
|
-
"examplePrompts": [
|
|
832
|
-
"Create a cylinder 2m across and 4m tall",
|
|
833
|
-
"Add a circular column here\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromCylinder(\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 1, z: 0 },\n1,\n4,\n)\nconst column = await snaptrude.design.create.massFromBrep(brep, \"Column\")\n```"
|
|
834
|
-
],
|
|
835
|
-
"argsType": "Vec3Components",
|
|
836
|
-
"resultType": "BrepHandle"
|
|
837
|
-
},
|
|
838
768
|
{
|
|
839
769
|
"path": "core.geom.create.brepFromExtrusion",
|
|
840
770
|
"namespace": "core.geom.create",
|
|
@@ -842,9 +772,7 @@
|
|
|
842
772
|
"examplePrompts": [
|
|
843
773
|
"Extrude this profile 3 metres up",
|
|
844
774
|
"Make a solid by extruding this outline",
|
|
845
|
-
"Create a cylinder from a circle profile"
|
|
846
|
-
"Extrude this floor plate 40m up with a 90 degree twist",
|
|
847
|
-
"Taper this tower to 60 percent of its footprint at the top\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6\n```"
|
|
775
|
+
"Create a cylinder from a circle profile\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(4, 3)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6\n```"
|
|
848
776
|
],
|
|
849
777
|
"argsType": "ContourHandle",
|
|
850
778
|
"resultType": "BrepHandle"
|
|
@@ -864,14 +792,11 @@
|
|
|
864
792
|
{
|
|
865
793
|
"path": "core.geom.create.brepFromFillet",
|
|
866
794
|
"namespace": "core.geom.create",
|
|
867
|
-
"summary": "Rounds the given edges of a solid with a constant radius. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
|
|
795
|
+
"summary": "Rounds the given straight edges of a solid with a constant radius. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
|
|
868
796
|
"examplePrompts": [
|
|
869
|
-
"Round the
|
|
870
|
-
"Soften where the dome meets the wall",
|
|
797
|
+
"Round the edges of this mass",
|
|
871
798
|
"Fillet the corners of the podium with a 0.5m radius",
|
|
872
|
-
"Soften the vertical edges of this tower"
|
|
873
|
-
"Blend this edge from 200mm at one end to 600mm at the other",
|
|
874
|
-
"Round this rim wider at the back than at the front\n\n# Example\n```ts\n// Rim = every edge between the cylinder side and a plane cap\nconst edges = await snaptrude.core.geom.query.brep.listEdges(column)\nconst rim = []\nfor (const edge of edges) {\nconst faces = await snaptrude.core.geom.query.edge.listFaces(edge)\nconst kinds = await Promise.all(\nfaces.map((f) => snaptrude.core.geom.query.face.getSurfaceKind(f)),\n)\nif (kinds.includes(\"cylinder\") && kinds.includes(\"plane\")) rim.push(edge)\n}\nconst rounded = await snaptrude.core.geom.create.brepFromFillet(column, rim, 0.787) // 200 mm\n```"
|
|
799
|
+
"Soften the vertical edges of this tower\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst edges = await snaptrude.core.geom.query.brep.listEdges(brep)\nconst rounded = await snaptrude.core.geom.create.brepFromFillet(brep, [edges[0]], 0.3)\n```"
|
|
875
800
|
],
|
|
876
801
|
"argsType": "BrepHandle",
|
|
877
802
|
"resultType": "BrepHandle"
|
|
@@ -891,7 +816,7 @@
|
|
|
891
816
|
{
|
|
892
817
|
"path": "core.geom.create.brepFromLoft",
|
|
893
818
|
"namespace": "core.geom.create",
|
|
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
|
|
819
|
+
"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 lane); 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.",
|
|
895
820
|
"examplePrompts": [
|
|
896
821
|
"Make a tapered tower from these two outlines",
|
|
897
822
|
"Loft between a large base and a smaller top",
|
|
@@ -900,8 +825,7 @@
|
|
|
900
825
|
"Loft a four-sided base to a five-sided top",
|
|
901
826
|
"Loft these outlines even though their corners don't line up",
|
|
902
827
|
"Loft these outlines exactly as authored, corner to corner",
|
|
903
|
-
"Fail the loft if my sections don't have matching edge counts"
|
|
904
|
-
"Loft these three outlines with smoothly curving sides\n\n# Example\n```ts\n// A square frustum: 4m base lofted to a 2m top, 3m up\nconst base = await snaptrude.core.geom.create.profileRect(4, 4)\nconst top = await snaptrude.core.geom.create.profileRect(2, 2, await snaptrude.core.math.vec3.new(0, 3, 0))\nconst brep = await snaptrude.core.geom.create.brepFromLoft(\nawait snaptrude.core.geom.create.contourFromProfile(base),\nawait snaptrude.core.geom.create.contourFromProfile(top),\n)\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6\n```"
|
|
828
|
+
"Fail the loft if my sections don't have matching edge counts\n\n# Example\n```ts\n// A square frustum: 4m base lofted to a 2m top, 3m up\nconst base = await snaptrude.core.geom.create.profileRect(4, 4)\nconst top = await snaptrude.core.geom.create.profileRect(2, 2, await snaptrude.core.math.vec3.new(0, 3, 0))\nconst brep = await snaptrude.core.geom.create.brepFromLoft(\nawait snaptrude.core.geom.create.contourFromProfile(base),\nawait snaptrude.core.geom.create.contourFromProfile(top),\n)\nconst faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6\n```"
|
|
905
829
|
],
|
|
906
830
|
"argsType": "ContourHandle",
|
|
907
831
|
"resultType": "BrepHandle"
|
|
@@ -923,7 +847,6 @@
|
|
|
923
847
|
"namespace": "core.geom.create",
|
|
924
848
|
"summary": "Grows or shrinks a solid by offsetting every face — positive distance moves faces outward, negative moves them inward. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only.",
|
|
925
849
|
"examplePrompts": [
|
|
926
|
-
"Thicken the torus ring by 100 mm",
|
|
927
850
|
"Grow this solid by 0.5m in every direction",
|
|
928
851
|
"Shrink this mass by 200mm",
|
|
929
852
|
"Offset the building envelope outward by 1m\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst grown = await snaptrude.core.geom.create.brepFromOffset(brep, 0.5)\n```"
|
|
@@ -931,27 +854,14 @@
|
|
|
931
854
|
"argsType": "BrepHandle",
|
|
932
855
|
"resultType": "BrepHandle"
|
|
933
856
|
},
|
|
934
|
-
{
|
|
935
|
-
"path": "core.geom.create.brepFromPatch",
|
|
936
|
-
"namespace": "core.geom.create",
|
|
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.",
|
|
938
|
-
"examplePrompts": [
|
|
939
|
-
"Patch a roof over these four boundary curves, 250 mm thick",
|
|
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```"
|
|
941
|
-
],
|
|
942
|
-
"argsType": "(CurveHandle | OwnedEdge)[]",
|
|
943
|
-
"resultType": "BrepHandle"
|
|
944
|
-
},
|
|
945
857
|
{
|
|
946
858
|
"path": "core.geom.create.brepFromRevolution",
|
|
947
859
|
"namespace": "core.geom.create",
|
|
948
|
-
"summary": "Revolves a planar profile about an axis to make a solid of revolution — a full turn by default. Host API call — returns a new {@linkcode BrepHandle}; the input contour is read-only. Holes in the profile are allowed
|
|
860
|
+
"summary": "Revolves a planar profile about an axis to make a solid of revolution — a full turn by default. Host API call — returns a new {@linkcode BrepHandle}; the input contour is read-only. Holes in the profile are allowed. Profile segments must stay parallel or perpendicular to the axis — inclined or arc segments would revolve into surfaces Snaptrude cannot represent.",
|
|
949
861
|
"examplePrompts": [
|
|
950
862
|
"Create a dome from this section",
|
|
951
863
|
"Revolve this profile 360 degrees around the vertical axis",
|
|
952
|
-
"Build a rotunda by revolving this wall section"
|
|
953
|
-
"Make a dome by revolving a quarter-circle about the vertical axis",
|
|
954
|
-
"Turn this curved outline into a vase\n\n# Example\n```ts\n// A cylinder: revolve a 2m-wide, 3m-tall rectangle about the Y axis at\n// its edge — the left edge sits ON the axis, which is legal.\nconst rect = await snaptrude.core.geom.create.profileFromLinePoints([\nawait snaptrude.core.math.vec3.new(0, 0, 0),\nawait snaptrude.core.math.vec3.new(2, 0, 0),\nawait snaptrude.core.math.vec3.new(2, 3, 0),\nawait snaptrude.core.math.vec3.new(0, 3, 0),\n])\nconst profile = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst cylinder = await snaptrude.core.geom.create.brepFromRevolution(\nprofile,\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 1, z: 0 },\n)\n```"
|
|
864
|
+
"Build a rotunda by revolving this wall section\n\n# Example\n```ts\n// A cylinder: revolve a 2m-wide, 3m-tall rectangle about the Y axis at its edge\nconst rect = await snaptrude.core.geom.create.profileFromLinePoints([\nawait snaptrude.core.math.vec3.new(0, 0, 0),\nawait snaptrude.core.math.vec3.new(2, 0, 0),\nawait snaptrude.core.math.vec3.new(2, 3, 0),\nawait snaptrude.core.math.vec3.new(0, 3, 0),\n])\nconst profile = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst cylinder = await snaptrude.core.geom.create.brepFromRevolution(\nprofile,\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 1, z: 0 },\n)\n```"
|
|
955
865
|
],
|
|
956
866
|
"argsType": "ContourHandle",
|
|
957
867
|
"resultType": "BrepHandle"
|
|
@@ -961,25 +871,13 @@
|
|
|
961
871
|
"namespace": "core.geom.create",
|
|
962
872
|
"summary": "Hollows a solid into constant-thickness walls, removing the given faces as openings. Host API call — returns a new {@linkcode BrepHandle}; the input brep is read-only. The outer surface is kept and the walls grow inward.",
|
|
963
873
|
"examplePrompts": [
|
|
964
|
-
"Hollow the dome into a 300 mm shell, open at the base",
|
|
965
874
|
"Hollow this mass into 200mm walls",
|
|
966
875
|
"Shell this form with the top face open",
|
|
967
|
-
"Turn this solid tower into a tube open at both ends\n\n# Example\n```ts\
|
|
876
|
+
"Turn this solid tower into a tube open at both ends\n\n# Example\n```ts\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst faces = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst hollow = await snaptrude.core.geom.create.brepFromShell(brep, [faces[0]], 0.2)\n```"
|
|
968
877
|
],
|
|
969
878
|
"argsType": "BrepHandle",
|
|
970
879
|
"resultType": "BrepHandle"
|
|
971
880
|
},
|
|
972
|
-
{
|
|
973
|
-
"path": "core.geom.create.brepFromSphere",
|
|
974
|
-
"namespace": "core.geom.create",
|
|
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`.",
|
|
976
|
-
"examplePrompts": [
|
|
977
|
-
"Create a sphere of radius 5 at the origin",
|
|
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```"
|
|
979
|
-
],
|
|
980
|
-
"argsType": "Vec3Components",
|
|
981
|
-
"resultType": "BrepHandle"
|
|
982
|
-
},
|
|
983
881
|
{
|
|
984
882
|
"path": "core.geom.create.brepFromSubtraction",
|
|
985
883
|
"namespace": "core.geom.create",
|
|
@@ -987,7 +885,7 @@
|
|
|
987
885
|
"examplePrompts": [
|
|
988
886
|
"Subtract the courtyard from the building mass",
|
|
989
887
|
"Cut this solid out of that one",
|
|
990
|
-
"
|
|
888
|
+
"Punch a hole through the slab with this box\n\n# Example\n```ts\n// buildingBrep minus courtyardBrep — order matters\nconst carved = await snaptrude.core.geom.create.brepFromSubtraction(buildingBrep, courtyardBrep)\n```"
|
|
991
889
|
],
|
|
992
890
|
"argsType": "BrepHandle",
|
|
993
891
|
"resultType": "BrepHandle"
|
|
@@ -995,7 +893,7 @@
|
|
|
995
893
|
{
|
|
996
894
|
"path": "core.geom.create.brepFromSweep",
|
|
997
895
|
"namespace": "core.geom.create",
|
|
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
|
|
896
|
+
"summary": "Sweeps a planar profile along a polyline path, with mitred corners at each bend. Host API call — returns a new {@linkcode BrepHandle}; the input contour is read-only. The profile must be hole-free and must not lie in a plane containing the first path segment's direction. Repeating the first point as the last closes the path into a ring solid (a picture frame): closed paths must be flat and straight-segmented and take a straight-edged (arc-free) profile — the ring's cross-section is the authored profile projected along the first leg onto the first mitre plane, so a profile not perpendicular to the first leg appears sheared. An optional scale law tapers the sweep: `startScale`/`endScale` interpolate linearly by arc length, or `scales` gives one factor per path point (scaling is about the profile centroid). A uniform scale (all factors equal) works on any path today's sweep accepts; a varying scale takes straight (collinear) open paths with straight-edged profiles — tapering across a bend or along an arc edge would create faces Snaptrude cannot represent and throws (sweep each straight run separately and union the results instead). An optional `transition` picks the corner treatment: `\"miter\"` (default) is today's sharp mitred bend; `{ bevel: b }` chamfers each turning corner by cutting `b` back along both adjacent legs (works on open and closed paths — each leg must be long enough for its cuts). On a corner-less path `transition` has no effect, and the varying-scale lane takes straight paths, so it never sees a corner.",
|
|
999
897
|
"examplePrompts": [
|
|
1000
898
|
"Sweep this profile along the corridor path",
|
|
1001
899
|
"Extrude the railing section along this route",
|
|
@@ -1003,35 +901,11 @@
|
|
|
1003
901
|
"Sweep a frame profile around a closed rectangular loop",
|
|
1004
902
|
"Taper this duct from 1x1 to 2x2 along its run",
|
|
1005
903
|
"Sweep a column section that narrows toward the top",
|
|
1006
|
-
"Chamfer the corners of this swept frame by 200mm"
|
|
1007
|
-
"Sweep this handrail with rounded corners at the bends\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.4, 0.4)\nconst profile = await snaptrude.core.geom.create.contourFromProfile(rect)\n// profileRect lies in the XZ plane, so the path must START out of that\n// plane (here: straight up), then it can run horizontally.\nconst duct = await snaptrude.core.geom.create.brepFromSweep(profile, [\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 2.8, z: 0 },\n{ x: 10, y: 2.8, z: 0 },\n])\n// A closed ring (picture frame): repeat the first point as the last\nconst frame = await snaptrude.core.geom.create.brepFromSweep(profile, [\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 3, z: 0 },\n{ x: 4, y: 3, z: 0 },\n{ x: 4, y: 0, z: 0 },\n{ x: 0, y: 0, z: 0 },\n])\n// A tapered straight run: 0.4x0.4 at the start, 0.8x0.8 at the end\nconst flue = await snaptrude.core.geom.create.brepFromSweep(\nprofile,\n[\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 10, z: 0 },\n],\n{ startScale: 1, endScale: 2 },\n)\n```"
|
|
1008
|
-
],
|
|
1009
|
-
"argsType": "ContourHandle",
|
|
1010
|
-
"resultType": "BrepHandle"
|
|
1011
|
-
},
|
|
1012
|
-
{
|
|
1013
|
-
"path": "core.geom.create.brepFromSweepAlongCurve",
|
|
1014
|
-
"namespace": "core.geom.create",
|
|
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`).",
|
|
1016
|
-
"examplePrompts": [
|
|
1017
|
-
"Sweep a 600x400 duct along this curved route and keep it upright",
|
|
1018
|
-
"Run this handrail along the curved stair edge",
|
|
1019
|
-
"Bend this footprint along the arc\n\n# Example\n```ts\nconst route = await snaptrude.core.geom.create.splineFromPoints(points)\nconst duct = await snaptrude.core.geom.create.brepFromSweepAlongCurve(profile, [route], {\norientation: \"upright\",\n})\n```"
|
|
904
|
+
"Chamfer the corners of this swept frame by 200mm\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.4, 0.4)\nconst profile = await snaptrude.core.geom.create.contourFromProfile(rect)\n// profileRect lies in the XZ plane, so the path must START out of that\n// plane (here: straight up), then it can run horizontally.\nconst duct = await snaptrude.core.geom.create.brepFromSweep(profile, [\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 2.8, z: 0 },\n{ x: 10, y: 2.8, z: 0 },\n])\n// A closed ring (picture frame): repeat the first point as the last\nconst frame = await snaptrude.core.geom.create.brepFromSweep(profile, [\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 3, z: 0 },\n{ x: 4, y: 3, z: 0 },\n{ x: 4, y: 0, z: 0 },\n{ x: 0, y: 0, z: 0 },\n])\n// A tapered straight run: 0.4x0.4 at the start, 0.8x0.8 at the end\nconst flue = await snaptrude.core.geom.create.brepFromSweep(\nprofile,\n[\n{ x: 0, y: 0, z: 0 },\n{ x: 0, y: 10, z: 0 },\n],\n{ startScale: 1, endScale: 2 },\n)\n```"
|
|
1020
905
|
],
|
|
1021
906
|
"argsType": "ContourHandle",
|
|
1022
907
|
"resultType": "BrepHandle"
|
|
1023
908
|
},
|
|
1024
|
-
{
|
|
1025
|
-
"path": "core.geom.create.brepFromTorus",
|
|
1026
|
-
"namespace": "core.geom.create",
|
|
1027
|
-
"summary": "Create a solid **torus** (ring / donut) B-rep from its centre, plane normal, ring radius and tube radius. Host API call — returns a {@linkcode BrepHandle}; commit with `design.create.massFromBrep`. `majorRadius` is centre-to-tube-centre; `minorRadius` is the tube's own radius and must be strictly smaller. Carries a creation recipe, editable through `design.update.parameters`.",
|
|
1028
|
-
"examplePrompts": [
|
|
1029
|
-
"Create a donut-shaped ring 10m across with a 1m tube",
|
|
1030
|
-
"Add a torus canopy around the tower\n\n# Example\n```ts\nconst ring = await snaptrude.core.geom.create.brepFromTorus(\n{ x: 0, y: 6, z: 0 },\n{ x: 0, y: 1, z: 0 },\n5,\n1,\n)\n```"
|
|
1031
|
-
],
|
|
1032
|
-
"argsType": "Vec3Components",
|
|
1033
|
-
"resultType": "BrepHandle"
|
|
1034
|
-
},
|
|
1035
909
|
{
|
|
1036
910
|
"path": "core.geom.create.brepFromUnion",
|
|
1037
911
|
"namespace": "core.geom.create",
|
|
@@ -1056,16 +930,6 @@
|
|
|
1056
930
|
"argsType": "BrepHandle",
|
|
1057
931
|
"resultType": "BrepHandle[]"
|
|
1058
932
|
},
|
|
1059
|
-
{
|
|
1060
|
-
"path": "core.geom.create.brepsFromSplitByFace",
|
|
1061
|
-
"namespace": "core.geom.create",
|
|
1062
|
-
"summary": "Cuts a solid with a FACE of another solid — the curved twin of {@linkcode PluginGeomCreateApi.brepsFromSplit}, which cuts with a plane. Host API call — returns new {@linkcode BrepHandle}s; both inputs are read-only. BOTH breps must be in the same frame: read scene masses with `design.query.geometry.getBrep(x, { frame: \"world\" })` (the default is each mass's own local frame, and two masses have two). The pieces come back in DESCENDING volume order; pick the one you want with `core.geom.query.brep.getCentroid` or `getVolume` and commit it. A piece carries no recipe — label it.",
|
|
1063
|
-
"examplePrompts": [
|
|
1064
|
-
"Cut this mass with the curved roof surface and keep the lower part\n\n# Example\n```ts\nconst target = await snaptrude.design.query.geometry.getBrep(tower, { frame: \"world\" })\nconst tool = await snaptrude.design.query.geometry.getBrep(roof, { frame: \"world\" })\nconst [toolFace] = await snaptrude.core.geom.query.brep.listFaces(tool)\nconst pieces = await snaptrude.core.geom.create.brepsFromSplitByFace(target, toolFace, tool)\n```"
|
|
1065
|
-
],
|
|
1066
|
-
"argsType": "BrepHandle",
|
|
1067
|
-
"resultType": "BrepHandle[]"
|
|
1068
|
-
},
|
|
1069
933
|
{
|
|
1070
934
|
"path": "core.geom.create.circle",
|
|
1071
935
|
"namespace": "core.geom.create",
|
|
@@ -1096,14 +960,6 @@
|
|
|
1096
960
|
"argsType": "ProfileHandle",
|
|
1097
961
|
"resultType": "ContourHandle"
|
|
1098
962
|
},
|
|
1099
|
-
{
|
|
1100
|
-
"path": "core.geom.create.curvesFromProjection",
|
|
1101
|
-
"namespace": "core.geom.create",
|
|
1102
|
-
"summary": "Drops a curve onto a face along the face's normal and returns the curves it lands on — one per connected run, empty when the curve misses the face entirely. Host API call — returns new curve handles; the inputs are read-only. No lengths are involved: the result is a curve in the same internal length units as its inputs.",
|
|
1103
|
-
"examplePrompts": [],
|
|
1104
|
-
"argsType": "CurveHandle",
|
|
1105
|
-
"resultType": "CurveHandle[]"
|
|
1106
|
-
},
|
|
1107
963
|
{
|
|
1108
964
|
"path": "core.geom.create.line",
|
|
1109
965
|
"namespace": "core.geom.create",
|
|
@@ -1136,22 +992,10 @@
|
|
|
1136
992
|
"argsType": "Vec3Handle[]",
|
|
1137
993
|
"resultType": "ProfileHandle"
|
|
1138
994
|
},
|
|
1139
|
-
{
|
|
1140
|
-
"path": "core.geom.create.profileFromSplinePoints",
|
|
1141
|
-
"namespace": "core.geom.create",
|
|
1142
|
-
"summary": "Create a CLOSED smooth profile passing through each point, in order, with the loop closed smoothly back from the last point to the first (do NOT repeat the first point). Host API call — returns a handle. This is the closed counterpart of {@linkcode PluginGeomCreateApi.splineFromPoints} and the one-call route from points to an extrudable outline: wrap in `contourFromProfile` and extrude/loft/sweep as usual.",
|
|
1143
|
-
"examplePrompts": [
|
|
1144
|
-
"Make a blob-shaped floor plate through these points",
|
|
1145
|
-
"Organic curved outline through these corners",
|
|
1146
|
-
"Freeform podium profile\n\n# Example\n```ts\nconst profile = await snaptrude.core.geom.create.profileFromSplinePoints([p0, p1, p2, p3, p4])\nconst contour = await snaptrude.core.geom.create.contourFromProfile(profile)\nconst brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)\nconst podium = await snaptrude.design.create.massFromBrep(brep, \"Podium\")\n```"
|
|
1147
|
-
],
|
|
1148
|
-
"argsType": "Vec3Handle[]",
|
|
1149
|
-
"resultType": "ProfileHandle"
|
|
1150
|
-
},
|
|
1151
995
|
{
|
|
1152
996
|
"path": "core.geom.create.profileRect",
|
|
1153
997
|
"namespace": "core.geom.create",
|
|
1154
|
-
"summary": "Create an axis-aligned **rectangle** profile
|
|
998
|
+
"summary": "Create an axis-aligned **rectangle** profile (XZ plane) of `width` × `depth`, centred at `center` (defaults to the origin). Host API call — returns a handle.",
|
|
1155
999
|
"examplePrompts": [
|
|
1156
1000
|
"Draw a 4m by 3m rectangle",
|
|
1157
1001
|
"Make a rectangular outline for a room footprint"
|
|
@@ -1159,28 +1003,6 @@
|
|
|
1159
1003
|
"argsType": "number",
|
|
1160
1004
|
"resultType": "ProfileHandle"
|
|
1161
1005
|
},
|
|
1162
|
-
{
|
|
1163
|
-
"path": "core.geom.create.splineFromControlPoints",
|
|
1164
|
-
"namespace": "core.geom.create",
|
|
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}.",
|
|
1166
|
-
"examplePrompts": [
|
|
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```"
|
|
1168
|
-
],
|
|
1169
|
-
"argsType": "Vec3Handle[]",
|
|
1170
|
-
"resultType": "SplineHandle"
|
|
1171
|
-
},
|
|
1172
|
-
{
|
|
1173
|
-
"path": "core.geom.create.splineFromPoints",
|
|
1174
|
-
"namespace": "core.geom.create",
|
|
1175
|
-
"summary": "Create an open NURBS curve passing exactly THROUGH each point, in order (centripetal Catmull-Rom fit → clamped cubic B-spline; C1-smooth, no cusps on uneven spacing). Host API call — returns a handle. The points are interpolated, NOT control points. For a CLOSED smooth loop use {@linkcode PluginGeomCreateApi.profileFromSplinePoints} — closed splines exist only as profiles, never as a single curve handle.",
|
|
1176
|
-
"examplePrompts": [
|
|
1177
|
-
"Draw a smooth curve through these points",
|
|
1178
|
-
"Make a wavy edge that passes through A, B, C and D",
|
|
1179
|
-
"Freeform curved wall path through these clicks\n\n# Example\n```ts\nconst spline = await snaptrude.core.geom.create.splineFromPoints([p0, p1, p2, p3])\n// Mixed profile: smooth top, straight closing base\nconst base = await snaptrude.core.geom.create.line(p3, p0)\nconst profile = await snaptrude.core.geom.create.profileFromCurves([spline, base])\n```"
|
|
1180
|
-
],
|
|
1181
|
-
"argsType": "Vec3Handle[]",
|
|
1182
|
-
"resultType": "SplineHandle"
|
|
1183
|
-
},
|
|
1184
1006
|
{
|
|
1185
1007
|
"path": "core.geom.delete.contour",
|
|
1186
1008
|
"namespace": "core.geom.delete",
|
|
@@ -1262,7 +1084,7 @@
|
|
|
1262
1084
|
{
|
|
1263
1085
|
"path": "core.geom.query.brep.getCentroid",
|
|
1264
1086
|
"namespace": "core.geom.query.brep",
|
|
1265
|
-
"summary": "Get the centroid
|
|
1087
|
+
"summary": "Get the centroid (mean of all vertex positions) of a brep.",
|
|
1266
1088
|
"examplePrompts": [
|
|
1267
1089
|
"Find the centre point of this shape",
|
|
1268
1090
|
"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```"
|
|
@@ -1273,7 +1095,7 @@
|
|
|
1273
1095
|
{
|
|
1274
1096
|
"path": "core.geom.query.brep.getDistance",
|
|
1275
1097
|
"namespace": "core.geom.query.brep",
|
|
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.",
|
|
1098
|
+
"summary": "Measures the minimum distance between two solids, with the closest witness point on each. Touching or overlapping solids report a distance of 0 with contact points.",
|
|
1277
1099
|
"examplePrompts": [
|
|
1278
1100
|
"What is the clearance between these two masses?",
|
|
1279
1101
|
"How far apart are the tower and the neighbouring building?",
|
|
@@ -1306,11 +1128,10 @@
|
|
|
1306
1128
|
"Read the radius of this curved edge",
|
|
1307
1129
|
"Is this edge straight or an arc?",
|
|
1308
1130
|
"Get the exact start and end points of this edge",
|
|
1309
|
-
"Measure the length of each edge of this mass",
|
|
1310
|
-
"Read the control points of this curved edge\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst edges = await snaptrude.core.geom.query.brep.listEdges(brep)\nfor (const edge of edges) {\nconst curve = await snaptrude.core.geom.query.brep.getEdgeCurve(brep, edge)\nif (curve.type === \"arc\") console.log(\"arc radius:\", curve.radius)\n}\n}\n```"
|
|
1131
|
+
"Measure the length of each edge of this mass\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst edges = await snaptrude.core.geom.query.brep.listEdges(brep)\nfor (const edge of edges) {\nconst curve = await snaptrude.core.geom.query.brep.getEdgeCurve(brep, edge)\nif (curve.type === \"arc\") console.log(\"arc radius:\", curve.radius)\n}\n}\n```"
|
|
1311
1132
|
],
|
|
1312
1133
|
"argsType": "BrepHandle",
|
|
1313
|
-
"resultType": "| { type: \"line\"; startPoint: Vec3Components; endPoint: Vec3Components; length: number }\n | {\n type: \"arc\"\n startPoint: Vec3Components\n endPoint: Vec3Components\n centre: Vec3Components\n axis: Vec3Components\n radius: number\n length: number\n }\n | {\n type: \"circle\"\n centre: Vec3Components\n axis: Vec3Components\n radius: number\n length: number\n }
|
|
1134
|
+
"resultType": "| { type: \"line\"; startPoint: Vec3Components; endPoint: Vec3Components; length: number }\n | {\n type: \"arc\"\n startPoint: Vec3Components\n endPoint: Vec3Components\n centre: Vec3Components\n axis: Vec3Components\n radius: number\n length: number\n }\n | {\n type: \"circle\"\n centre: Vec3Components\n axis: Vec3Components\n radius: number\n length: number\n }"
|
|
1314
1135
|
},
|
|
1315
1136
|
{
|
|
1316
1137
|
"path": "core.geom.query.brep.getFaceCount",
|
|
@@ -1344,18 +1165,6 @@
|
|
|
1344
1165
|
"argsType": "BrepHandle",
|
|
1345
1166
|
"resultType": "Vec3Components"
|
|
1346
1167
|
},
|
|
1347
|
-
{
|
|
1348
|
-
"path": "core.geom.query.brep.getVolume",
|
|
1349
|
-
"namespace": "core.geom.query.brep",
|
|
1350
|
-
"summary": "Get the enclosed **volume** of a closed solid, integrated from its exact surfaces. Curved faces are measured analytically, not from their tessellation — a real sphere of radius 5 reports 523.6, whatever its triangle count. That makes this the reliable way to confirm a solid is the shape you intended (a torus should measure 2·π²·R·r²).",
|
|
1351
|
-
"examplePrompts": [
|
|
1352
|
-
"What is the volume of this mass?",
|
|
1353
|
-
"How much concrete is in this shape?",
|
|
1354
|
-
"Check the volume of the dome I just made\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst volume = await snaptrude.core.geom.query.brep.getVolume(brep)\nconsole.log(\"volume:\", volume)\n}\n```"
|
|
1355
|
-
],
|
|
1356
|
-
"argsType": "BrepHandle",
|
|
1357
|
-
"resultType": "number"
|
|
1358
|
-
},
|
|
1359
1168
|
{
|
|
1360
1169
|
"path": "core.geom.query.brep.hasEdge",
|
|
1361
1170
|
"namespace": "core.geom.query.brep",
|
|
@@ -1960,7 +1769,7 @@
|
|
|
1960
1769
|
{
|
|
1961
1770
|
"path": "core.geom.query.edge.getCurve",
|
|
1962
1771
|
"namespace": "core.geom.query.edge",
|
|
1963
|
-
"summary": "Get the underlying curve geometry of an edge (a line
|
|
1772
|
+
"summary": "Get the underlying curve geometry of an edge (a line or arc).",
|
|
1964
1773
|
"examplePrompts": [],
|
|
1965
1774
|
"argsType": "EdgeHandle",
|
|
1966
1775
|
"resultType": "CurveHandle | null"
|
|
@@ -1997,28 +1806,6 @@
|
|
|
1997
1806
|
"argsType": "EdgeHandle",
|
|
1998
1807
|
"resultType": "VertexHandle[]"
|
|
1999
1808
|
},
|
|
2000
|
-
{
|
|
2001
|
-
"path": "core.geom.query.face.getArea",
|
|
2002
|
-
"namespace": "core.geom.query.face",
|
|
2003
|
-
"summary": "Exact surface area of one face of `brep`, in internal length units SQUARED — integrated off the face's own surface, not its facets, so a curved patch reads exactly rather than as its triangles. Needs the parent brep: a face handle cannot name its own solid.",
|
|
2004
|
-
"examplePrompts": [
|
|
2005
|
-
"How big is this roof patch?",
|
|
2006
|
-
"Which face of this mass has the largest area?\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst faces = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst areas = await Promise.all(\nfaces.map((f) => snaptrude.core.geom.query.face.getArea(f, brep)),\n)\n}\n```"
|
|
2007
|
-
],
|
|
2008
|
-
"argsType": "FaceHandle",
|
|
2009
|
-
"resultType": "number"
|
|
2010
|
-
},
|
|
2011
|
-
{
|
|
2012
|
-
"path": "core.geom.query.face.getCentroid",
|
|
2013
|
-
"namespace": "core.geom.query.face",
|
|
2014
|
-
"summary": "Centre of area of one face of `brep`, as a point in that brep's frame (internal length units). On a solid whose every face reads `\"spline\"` this is the read that tells two patches apart — the top of a thickened patch from its bottom, one quarter of a closed surface from the next.",
|
|
2015
|
-
"examplePrompts": [
|
|
2016
|
-
"Where is the middle of this face?",
|
|
2017
|
-
"Pick the topmost face of this curved mass\n\n# Example\n```ts\nconst centre = await snaptrude.core.geom.query.face.getCentroid(face, brep)\n```"
|
|
2018
|
-
],
|
|
2019
|
-
"argsType": "FaceHandle",
|
|
2020
|
-
"resultType": "Vec3Components"
|
|
2021
|
-
},
|
|
2022
1809
|
{
|
|
2023
1810
|
"path": "core.geom.query.face.getHalfEdge",
|
|
2024
1811
|
"namespace": "core.geom.query.face",
|
|
@@ -2059,19 +1846,6 @@
|
|
|
2059
1846
|
"argsType": "FaceHandle",
|
|
2060
1847
|
"resultType": "number"
|
|
2061
1848
|
},
|
|
2062
|
-
{
|
|
2063
|
-
"path": "core.geom.query.face.getSurfaceKind",
|
|
2064
|
-
"namespace": "core.geom.query.face",
|
|
2065
|
-
"summary": "Read what KIND of surface a face lies on. This is the one read that tells a genuinely curved face from a faceted approximation of one: every face of a 200-triangle \"dome\" answers `\"plane\"`, while a real dome has faces answering `\"sphere\"`. Use it to confirm a curved solid actually came out curved.",
|
|
2066
|
-
"examplePrompts": [
|
|
2067
|
-
"Is this face flat or curved?",
|
|
2068
|
-
"Check that this dome is a real sphere, not a faceted approximation",
|
|
2069
|
-
"What kind of surface is this face?",
|
|
2070
|
-
"How many curved faces does this mass have?\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses()\nconst brep = await snaptrude.design.query.geometry.getBrep(mass)\nif (brep) {\nconst faces = await snaptrude.core.geom.query.brep.listFaces(brep)\nconst kinds = []\nfor (const face of faces) kinds.push(await snaptrude.core.geom.query.face.getSurfaceKind(face))\nconsole.log(\"spherical faces:\", kinds.filter((k) => k === \"sphere\").length)\n}\n```"
|
|
2071
|
-
],
|
|
2072
|
-
"argsType": "FaceHandle",
|
|
2073
|
-
"resultType": "\"plane\" | \"cylinder\" | \"cone\" | \"sphere\" | \"torus\" | \"spline\" | null"
|
|
2074
|
-
},
|
|
2075
1849
|
{
|
|
2076
1850
|
"path": "core.geom.query.face.hasHoles",
|
|
2077
1851
|
"namespace": "core.geom.query.face",
|
|
@@ -2422,7 +2196,7 @@
|
|
|
2422
2196
|
"summary": "Add a hole to a contour by appending an inner profile. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
2423
2197
|
"examplePrompts": [
|
|
2424
2198
|
"Cut a hole in this shape",
|
|
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```"
|
|
2199
|
+
"Punch an opening through this floor outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(10, 8)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(outer)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 2)\nconst withHole = await snaptrude.core.geom.update.contour.addHole(contour, hole)\nconst count = await snaptrude.core.geom.query.contour.getHoleCount(withHole) // 1\n```"
|
|
2426
2200
|
],
|
|
2427
2201
|
"argsType": "ContourHandle",
|
|
2428
2202
|
"resultType": "ContourHandle"
|
|
@@ -2466,7 +2240,7 @@
|
|
|
2466
2240
|
"summary": "Remove a hole from a contour by inner-profile index. Immutable — returns a NEW contour and leaves the input unchanged.",
|
|
2467
2241
|
"examplePrompts": [
|
|
2468
2242
|
"Remove the hole from this shape",
|
|
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```"
|
|
2243
|
+
"Fill in the opening in this floor outline\n\n# Example\n```ts\nconst outer = await snaptrude.core.geom.create.profileRect(10, 8)\nconst hole = await snaptrude.core.geom.create.profileRect(2, 2)\nconst contour = await snaptrude.core.geom.create.contourFromProfiles(outer, [hole])\nconst solid = await snaptrude.core.geom.update.contour.removeHole(contour, 0)\n```"
|
|
2470
2244
|
],
|
|
2471
2245
|
"argsType": "ContourHandle",
|
|
2472
2246
|
"resultType": "ContourHandle"
|
|
@@ -3323,55 +3097,14 @@
|
|
|
3323
3097
|
"argsType": "UnderlayHandle",
|
|
3324
3098
|
"resultType": "{ scaleFactor: number }"
|
|
3325
3099
|
},
|
|
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
|
-
},
|
|
3367
3100
|
{
|
|
3368
3101
|
"path": "core.layers.get",
|
|
3369
3102
|
"namespace": "core.layers",
|
|
3370
|
-
"summary": "Get
|
|
3103
|
+
"summary": "Get a single drawing layer by id.",
|
|
3371
3104
|
"examplePrompts": [
|
|
3372
|
-
"Get the
|
|
3373
|
-
"Is
|
|
3374
|
-
"
|
|
3105
|
+
"Get the drawing layer with id ly_5",
|
|
3106
|
+
"Is layer ly_5 hidden or locked?",
|
|
3107
|
+
"Look up a single drawing layer by its id\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.get(\"ly_5\")\nif (layer) console.log(layer.name, layer.hidden, layer.locked)\n```"
|
|
3375
3108
|
],
|
|
3376
3109
|
"argsType": "string",
|
|
3377
3110
|
"resultType": "PluginCoreLayersGetResult"
|
|
@@ -3379,51 +3112,35 @@
|
|
|
3379
3112
|
{
|
|
3380
3113
|
"path": "core.layers.getActive",
|
|
3381
3114
|
"namespace": "core.layers",
|
|
3382
|
-
"summary": "Get the active
|
|
3115
|
+
"summary": "Get the active drawing layer of a storey.",
|
|
3383
3116
|
"examplePrompts": [
|
|
3384
|
-
"Which layer is active?",
|
|
3385
|
-
"
|
|
3386
|
-
"What layer
|
|
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```"
|
|
3117
|
+
"Which drawing layer is active on this storey?",
|
|
3118
|
+
"Get the current layer on storey st_2",
|
|
3119
|
+
"What layer am I drawing on?\n\n# Example\n```ts\nconst active = await snaptrude.core.layers.getActive(\"st_2\")\nif (active) console.log(active.name)\n```"
|
|
3388
3120
|
],
|
|
3389
|
-
"argsType":
|
|
3121
|
+
"argsType": "string",
|
|
3390
3122
|
"resultType": "PluginCoreLayersGetActiveResult"
|
|
3391
3123
|
},
|
|
3392
3124
|
{
|
|
3393
3125
|
"path": "core.layers.list",
|
|
3394
3126
|
"namespace": "core.layers",
|
|
3395
|
-
"summary": "List the
|
|
3396
|
-
"examplePrompts": [
|
|
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```"
|
|
3403
|
-
],
|
|
3404
|
-
"argsType": null,
|
|
3405
|
-
"resultType": "PluginCoreLayersListResult"
|
|
3406
|
-
},
|
|
3407
|
-
{
|
|
3408
|
-
"path": "core.layers.rename",
|
|
3409
|
-
"namespace": "core.layers",
|
|
3410
|
-
"summary": "Rename a layer (the panel row's \"Rename layer\").",
|
|
3127
|
+
"summary": "List the drawing layers of a storey.",
|
|
3411
3128
|
"examplePrompts": [
|
|
3412
|
-
"
|
|
3413
|
-
"
|
|
3414
|
-
"
|
|
3129
|
+
"List the drawing layers on this storey",
|
|
3130
|
+
"Show all the PDF underlays on storey st_2",
|
|
3131
|
+
"What CAD layers are on the ground floor?\n\n# Example\n```ts\nconst { layers } = await snaptrude.core.layers.list(\"st_2\")\nfor (const l of layers) console.log(l.name, l.layerType, l.hidden)\n```"
|
|
3415
3132
|
],
|
|
3416
3133
|
"argsType": "string",
|
|
3417
|
-
"resultType": "
|
|
3134
|
+
"resultType": "PluginCoreLayersListResult"
|
|
3418
3135
|
},
|
|
3419
3136
|
{
|
|
3420
3137
|
"path": "core.layers.setActive",
|
|
3421
3138
|
"namespace": "core.layers",
|
|
3422
|
-
"summary": "Make a layer the active layer
|
|
3139
|
+
"summary": "Make a drawing layer the active layer of its storey.",
|
|
3423
3140
|
"examplePrompts": [
|
|
3424
|
-
"
|
|
3425
|
-
"Make
|
|
3426
|
-
"Switch the active layer to
|
|
3141
|
+
"Draw on layer ly_5",
|
|
3142
|
+
"Make this the active layer",
|
|
3143
|
+
"Switch the active layer to the CAD underlay\n\n# Example\n```ts\nawait snaptrude.core.layers.setActive(\"ly_5\")\n```"
|
|
3427
3144
|
],
|
|
3428
3145
|
"argsType": "string",
|
|
3429
3146
|
"resultType": "PluginCoreLayersSetActiveResult"
|
|
@@ -3431,12 +3148,11 @@
|
|
|
3431
3148
|
{
|
|
3432
3149
|
"path": "core.layers.update",
|
|
3433
3150
|
"namespace": "core.layers",
|
|
3434
|
-
"summary": "
|
|
3151
|
+
"summary": "Update a drawing layer's visibility.",
|
|
3435
3152
|
"examplePrompts": [
|
|
3436
|
-
"
|
|
3437
|
-
"
|
|
3438
|
-
"Hide
|
|
3439
|
-
"Unlock layer 3f2a… and show it again\n\n# Example\n```ts\nawait snaptrude.core.layers.update(layerId, { locked: true, hidden: false })\n```"
|
|
3153
|
+
"Hide the PDF underlay layer",
|
|
3154
|
+
"Show the CAD layer again",
|
|
3155
|
+
"Hide layer ly_5\n\n# Example\n```ts\nconst layer = await snaptrude.core.layers.update(\"ly_5\", true)\n```"
|
|
3440
3156
|
],
|
|
3441
3157
|
"argsType": "string",
|
|
3442
3158
|
"resultType": "PluginCoreLayersUpdateResult"
|
|
@@ -4166,66 +3882,6 @@
|
|
|
4166
3882
|
"argsType": null,
|
|
4167
3883
|
"resultType": "number"
|
|
4168
3884
|
},
|
|
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
|
-
},
|
|
4229
3885
|
{
|
|
4230
3886
|
"path": "core.storeys.list",
|
|
4231
3887
|
"namespace": "core.storeys",
|
|
@@ -4242,7 +3898,7 @@
|
|
|
4242
3898
|
{
|
|
4243
3899
|
"path": "core.storeys.setActive",
|
|
4244
3900
|
"namespace": "core.storeys",
|
|
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
|
|
3901
|
+
"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.",
|
|
4246
3902
|
"examplePrompts": [
|
|
4247
3903
|
"Switch to the second floor",
|
|
4248
3904
|
"Make the ground storey active",
|
|
@@ -4566,46 +4222,6 @@
|
|
|
4566
4222
|
"resultType": "boolean",
|
|
4567
4223
|
"deprecated": "core.camera.zoomSelection"
|
|
4568
4224
|
},
|
|
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
|
-
},
|
|
4609
4225
|
{
|
|
4610
4226
|
"path": "design.boolean.intersect",
|
|
4611
4227
|
"namespace": "design.boolean",
|
|
@@ -4647,38 +4263,6 @@
|
|
|
4647
4263
|
"argsType": "ComponentHandle[]",
|
|
4648
4264
|
"resultType": "BooleanOutcome"
|
|
4649
4265
|
},
|
|
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
|
-
},
|
|
4682
4266
|
{
|
|
4683
4267
|
"path": "design.create.beam",
|
|
4684
4268
|
"namespace": "design.create",
|
|
@@ -4689,7 +4273,7 @@
|
|
|
4689
4273
|
"Run a 300x600 beam across the room",
|
|
4690
4274
|
"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```"
|
|
4691
4275
|
],
|
|
4692
|
-
"argsType": "
|
|
4276
|
+
"argsType": "ContourHandle",
|
|
4693
4277
|
"resultType": "ComponentHandle"
|
|
4694
4278
|
},
|
|
4695
4279
|
{
|
|
@@ -4705,17 +4289,6 @@
|
|
|
4705
4289
|
"argsType": "PluginBuildableEnvelopePolygonVertex[]",
|
|
4706
4290
|
"resultType": "PluginBuildableEnvelopeCreateResult"
|
|
4707
4291
|
},
|
|
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
|
-
},
|
|
4719
4292
|
{
|
|
4720
4293
|
"path": "design.create.ceiling",
|
|
4721
4294
|
"namespace": "design.create",
|
|
@@ -4726,7 +4299,7 @@
|
|
|
4726
4299
|
"Put a dropped ceiling in the living room at 3 metres",
|
|
4727
4300
|
"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```"
|
|
4728
4301
|
],
|
|
4729
|
-
"argsType": "
|
|
4302
|
+
"argsType": "ContourHandle",
|
|
4730
4303
|
"resultType": "ComponentHandle"
|
|
4731
4304
|
},
|
|
4732
4305
|
{
|
|
@@ -4739,29 +4312,19 @@
|
|
|
4739
4312
|
"Create a 450mm square concrete column 4 metres high",
|
|
4740
4313
|
"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```"
|
|
4741
4314
|
],
|
|
4742
|
-
"argsType": "
|
|
4315
|
+
"argsType": "Vec3Handle",
|
|
4743
4316
|
"resultType": "ComponentHandle"
|
|
4744
4317
|
},
|
|
4745
|
-
{
|
|
4746
|
-
"path": "design.create.columnsFromGrids",
|
|
4747
|
-
"namespace": "design.create",
|
|
4748
|
-
"summary": "Create **columns at every grid-line intersection** of the given grid groups, sized `width` × `depth` and oriented to the grid axes, on the grids' storey. All columns commit as ONE undoable unit.",
|
|
4749
|
-
"examplePrompts": [
|
|
4750
|
-
"Generate columns on this grid",
|
|
4751
|
-
"Place 450mm square columns at every grid intersection\n\n# Example\n```ts\nconst grids = await snaptrude.design.query.listGrids()\nconst columns = await snaptrude.design.create.columnsFromGrids(grids, 0.45, 0.45)\n```"
|
|
4752
|
-
],
|
|
4753
|
-
"argsType": "ComponentHandle[]",
|
|
4754
|
-
"resultType": "ComponentHandle[]"
|
|
4755
|
-
},
|
|
4756
4318
|
{
|
|
4757
4319
|
"path": "design.create.copy",
|
|
4758
4320
|
"namespace": "design.create",
|
|
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.",
|
|
4321
|
+
"summary": "**Copy** existing entities, offsetting each copy by `displacement * i` (i = 1…count), source positions preserved. Migrated from the removed `tools.copy`. In `\"instance\"` mode copies stay in the source's instance family where possible; `\"unique\"` makes independent geometry. The created copies become the active selection. Undoable.",
|
|
4760
4322
|
"examplePrompts": [
|
|
4761
4323
|
"Copy this room 3 times spaced 6m apart",
|
|
4762
4324
|
"Duplicate the selected furniture along the X axis",
|
|
4763
4325
|
"Make 5 copies of this column at 4 metre intervals",
|
|
4764
|
-
"Array these walls with a 3m offset"
|
|
4326
|
+
"Array these walls with a 3m offset",
|
|
4327
|
+
"Clone the desk as a unique copy, not an instance"
|
|
4765
4328
|
],
|
|
4766
4329
|
"argsType": "ComponentHandle[]",
|
|
4767
4330
|
"resultType": "ComponentHandle[]",
|
|
@@ -4770,7 +4333,7 @@
|
|
|
4770
4333
|
{
|
|
4771
4334
|
"path": "design.create.door",
|
|
4772
4335
|
"namespace": "design.create",
|
|
4773
|
-
"summary": "Place a
|
|
4336
|
+
"summary": "Place a **door** from the catalog into a host wall.",
|
|
4774
4337
|
"examplePrompts": [
|
|
4775
4338
|
"Add a door to this wall here",
|
|
4776
4339
|
"Place a sliding door on the selected wall",
|
|
@@ -4787,17 +4350,17 @@
|
|
|
4787
4350
|
{
|
|
4788
4351
|
"path": "design.create.doors",
|
|
4789
4352
|
"namespace": "design.create",
|
|
4790
|
-
"summary": "Place **many doors** into host walls in one undoable operation (bulk plural of {@linkcode door}). Each item carries its own
|
|
4353
|
+
"summary": "Place **many doors** into host walls in one undoable operation (bulk plural of {@linkcode door}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width` and `height` — the same fields as a `\"door\"` {@linkcode PluginDesignCreateOpeningOptions}. Validate-all-or-throw; one command.",
|
|
4791
4354
|
"examplePrompts": [
|
|
4792
4355
|
"Add doors to all of these walls at once",
|
|
4793
4356
|
"Place a door in every room in one operation",
|
|
4794
4357
|
"Bulk add the entrance doors from this schedule",
|
|
4795
4358
|
"Put three doors on this wall in a single undo step",
|
|
4796
|
-
"Add all the doors for this floor plan together
|
|
4359
|
+
"Add all the doors for this floor plan together"
|
|
4797
4360
|
],
|
|
4798
4361
|
"argsType": "PluginCreateDoorItem[]",
|
|
4799
4362
|
"resultType": "ComponentHandle[]",
|
|
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([ {
|
|
4363
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.door` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [entry] = await snaptrude.design.doors.listCatalog() const [front, side] = await snaptrude.design.create.doors([ { catalogId: entry.id, hostWall: wall, position: await v.new(2, 0, 5), label: \"D-01\" }, { catalogId: entry.id, hostWall: wall, position: await v.new(6, 0, 5), width: 1.2 }, ]) // `wall` was re-cut twice and no longer resolves — ask the opening for its host: const currentWall = await snaptrude.design.query.getHost(front) ```"
|
|
4801
4364
|
},
|
|
4802
4365
|
{
|
|
4803
4366
|
"path": "design.create.floor",
|
|
@@ -4809,9 +4372,9 @@
|
|
|
4809
4372
|
"Lay flooring across the selected outline",
|
|
4810
4373
|
"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```"
|
|
4811
4374
|
],
|
|
4812
|
-
"argsType": "
|
|
4813
|
-
"resultType": "ComponentHandle
|
|
4814
|
-
"performance": "For
|
|
4375
|
+
"argsType": "ContourHandle",
|
|
4376
|
+
"resultType": "ComponentHandle",
|
|
4377
|
+
"performance": "For MORE THAN ONE floor, call `design.create.floors(items[])` — one host round-trip and ONE undo entry for the whole batch. Looping this single-floor creator is N round-trips and N undo entries."
|
|
4815
4378
|
},
|
|
4816
4379
|
{
|
|
4817
4380
|
"path": "design.create.floors",
|
|
@@ -4860,50 +4423,14 @@
|
|
|
4860
4423
|
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.furniture` in a loop: build the full `items[]` array first (all positions and angles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [chair] = await snaptrude.design.furniture.listCatalog() const placed = await snaptrude.design.create.furnitureItems([ { catalogId: chair.id, position: await v.new(3, 0, 5), label: \"Chair-01\" }, { catalogId: chair.id, position: await v.new(4, 0, 5), angleInDegrees: 90 }, { catalogId: chair.id, position: await v.new(5, 0, 5), angleInDegrees: 180 }, ]) ```"
|
|
4861
4424
|
},
|
|
4862
4425
|
{
|
|
4863
|
-
"path": "design.create.
|
|
4426
|
+
"path": "design.create.mass",
|
|
4864
4427
|
"namespace": "design.create",
|
|
4865
|
-
"summary": "Create a
|
|
4428
|
+
"summary": "Create a **mass** — a generic extruded prism (default `massType` \"Generic mass\"). Same footprint-extrude path as {@linkcode PluginDesignCreateApi.space}.",
|
|
4866
4429
|
"examplePrompts": [
|
|
4867
|
-
"Create a
|
|
4868
|
-
"
|
|
4869
|
-
"
|
|
4870
|
-
|
|
4871
|
-
"argsType": "number",
|
|
4872
|
-
"resultType": "ComponentHandle"
|
|
4873
|
-
},
|
|
4874
|
-
{
|
|
4875
|
-
"path": "design.create.gridFromCurve",
|
|
4876
|
-
"namespace": "design.create",
|
|
4877
|
-
"summary": "Create a **structural grid from a single curve** — one grid group holding one wing with one line (the draw tool's output). The curve may be a line or an arc; circles are rejected with `VALIDATION`. Undoable.",
|
|
4878
|
-
"examplePrompts": [
|
|
4879
|
-
"Draw a grid line from A to B",
|
|
4880
|
-
"Add a curved grid line through these points",
|
|
4881
|
-
"Create grid line \"C\" along this wall\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\nconst from = await vec3.new(0, 0, 0)\nconst to = await vec3.new(30, 0, 0)\nconst curve = await snaptrude.core.geom.create.line(from, to)\nconst grid = await snaptrude.design.create.gridFromCurve(curve, { tag: \"A\" })\n```"
|
|
4882
|
-
],
|
|
4883
|
-
"argsType": "CurveHandle",
|
|
4884
|
-
"resultType": "ComponentHandle"
|
|
4885
|
-
},
|
|
4886
|
-
{
|
|
4887
|
-
"path": "design.create.gridsFromMasses",
|
|
4888
|
-
"namespace": "design.create",
|
|
4889
|
-
"summary": "Generate **structural grids fitted to mass footprints** — one grid group per footprint cluster, with counts and orientation derived from each footprint's geometry and the given spacings. All created groups commit as ONE undoable unit.",
|
|
4890
|
-
"examplePrompts": [
|
|
4891
|
-
"Generate grids for the selected masses",
|
|
4892
|
-
"Auto-generate a 6m structural grid on this building",
|
|
4893
|
-
"Fit column grids to every mass on this storey\n\n# Example\n```ts\nconst masses = await snaptrude.design.query.listMasses({ storeys: [1] })\nconst grids = await snaptrude.design.create.gridsFromMasses(masses, 6, 6)\n```"
|
|
4894
|
-
],
|
|
4895
|
-
"argsType": "ComponentHandle[]",
|
|
4896
|
-
"resultType": "ComponentHandle[]"
|
|
4897
|
-
},
|
|
4898
|
-
{
|
|
4899
|
-
"path": "design.create.mass",
|
|
4900
|
-
"namespace": "design.create",
|
|
4901
|
-
"summary": "Create a **mass** — a generic extruded prism (default `massType` \"Generic mass\"). Same footprint-extrude path as {@linkcode PluginDesignCreateApi.space}.",
|
|
4902
|
-
"examplePrompts": [
|
|
4903
|
-
"Create a generic mass 30m tall from this footprint",
|
|
4904
|
-
"Block out a conceptual massing volume for the site",
|
|
4905
|
-
"Extrude this shape into a building mass",
|
|
4906
|
-
"Add a simple study-model volume at the origin\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(20, 15)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst tower = await snaptrude.design.create.mass(contour, 30, \"Tower A\", undefined, \"Building\")\n```"
|
|
4430
|
+
"Create a generic mass 30m tall from this footprint",
|
|
4431
|
+
"Block out a conceptual massing volume for the site",
|
|
4432
|
+
"Extrude this shape into a building mass",
|
|
4433
|
+
"Add a simple study-model volume at the origin\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(20, 15)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst tower = await snaptrude.design.create.mass(contour, 30, \"Tower A\", undefined, \"Building\")\n```"
|
|
4907
4434
|
],
|
|
4908
4435
|
"argsType": "ContourHandle",
|
|
4909
4436
|
"resultType": "ComponentHandle"
|
|
@@ -4923,14 +4450,14 @@
|
|
|
4923
4450
|
{
|
|
4924
4451
|
"path": "design.create.opening",
|
|
4925
4452
|
"namespace": "design.create",
|
|
4926
|
-
"summary": "Place a
|
|
4453
|
+
"summary": "Place a catalog **door or window** into a host wall with optional size overrides.",
|
|
4927
4454
|
"examplePrompts": [
|
|
4928
4455
|
"Add a 1m wide door to this wall here",
|
|
4929
4456
|
"Place a window with a 0.9m sill height on the selected wall"
|
|
4930
4457
|
],
|
|
4931
4458
|
"argsType": "PluginDesignCreateOpeningOptions",
|
|
4932
4459
|
"resultType": "ComponentHandle",
|
|
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\",
|
|
4460
|
+
"performance": "Single-opening creator — use it for one hosted opening. For MORE THAN ONE, call `design.create.doors(items[])` / `design.create.windows(items[])`: the same per-item fields, one host round-trip, ONE undo entry. # Example ```ts const opening = await snaptrude.design.create.opening({ kind: \"window\", catalogId: windowType.id, hostWall: wall, position: await snaptrude.core.math.vec3.new(3, 0, 5), width: 1.2, height: 1.5, sillHeight: 0.9, }) ```"
|
|
4934
4461
|
},
|
|
4935
4462
|
{
|
|
4936
4463
|
"path": "design.create.referenceLines",
|
|
@@ -4970,7 +4497,7 @@
|
|
|
4970
4497
|
"Make a basement slab that extrudes downward",
|
|
4971
4498
|
"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```"
|
|
4972
4499
|
],
|
|
4973
|
-
"argsType": "
|
|
4500
|
+
"argsType": "ContourHandle",
|
|
4974
4501
|
"resultType": "ComponentHandle"
|
|
4975
4502
|
},
|
|
4976
4503
|
{
|
|
@@ -5032,54 +4559,20 @@
|
|
|
5032
4559
|
"argsType": "PluginStaircasePreset",
|
|
5033
4560
|
"resultType": "ComponentHandle"
|
|
5034
4561
|
},
|
|
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
|
-
},
|
|
5068
4562
|
{
|
|
5069
4563
|
"path": "design.create.wallRuns",
|
|
5070
4564
|
"namespace": "design.create",
|
|
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.
|
|
4565
|
+
"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.",
|
|
5072
4566
|
"examplePrompts": [
|
|
5073
4567
|
"Draw all the walls of this floor plan at once",
|
|
5074
4568
|
"Build every room's perimeter in one operation",
|
|
5075
4569
|
"Bulk create wall runs from these centerlines",
|
|
5076
4570
|
"Create the walls for both storeys in a single undo step",
|
|
5077
|
-
"Turn these polylines into 200mm brick walls together"
|
|
5078
|
-
"Import these raked walls with their top profiles in one go"
|
|
4571
|
+
"Turn these polylines into 200mm brick walls together"
|
|
5079
4572
|
],
|
|
5080
4573
|
"argsType": "PluginCreateWallRunItem[]",
|
|
5081
4574
|
"resultType": "ComponentHandle[][]",
|
|
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 },
|
|
4575
|
+
"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\") ```"
|
|
5083
4576
|
},
|
|
5084
4577
|
{
|
|
5085
4578
|
"path": "design.create.walls",
|
|
@@ -5092,10 +4585,7 @@
|
|
|
5092
4585
|
"Turn this polyline sketch into walls",
|
|
5093
4586
|
"Add walls with mitred corners along the path",
|
|
5094
4587
|
"Draw brick walls with plaster along this outline",
|
|
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```"
|
|
4588
|
+
"Build the perimeter in exposed concrete walls\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst centerlines = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(8, 0, 0),\nawait v.new(8, 0, 6),\n])\nconst walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)\n// …built as a specific wall type (layers/material/thickness from the type):\nconst [brick] = await snaptrude.design.types.list(\"wall\")\nconst brickWalls = await snaptrude.design.create.walls(\ncenterlines, 3, undefined, brick.label,\n)\n```"
|
|
5099
4589
|
],
|
|
5100
4590
|
"argsType": "ProfileHandle",
|
|
5101
4591
|
"resultType": "ComponentHandle[]",
|
|
@@ -5104,7 +4594,7 @@
|
|
|
5104
4594
|
{
|
|
5105
4595
|
"path": "design.create.window",
|
|
5106
4596
|
"namespace": "design.create",
|
|
5107
|
-
"summary": "Place a
|
|
4597
|
+
"summary": "Place a **window** from the catalog into a host wall.",
|
|
5108
4598
|
"examplePrompts": [
|
|
5109
4599
|
"Add a window to this wall here",
|
|
5110
4600
|
"Place a casement window on the selected wall",
|
|
@@ -5120,17 +4610,17 @@
|
|
|
5120
4610
|
{
|
|
5121
4611
|
"path": "design.create.windows",
|
|
5122
4612
|
"namespace": "design.create",
|
|
5123
|
-
"summary": "Place **many windows** into host walls in one undoable operation (bulk plural of {@linkcode window}). Each item carries its own
|
|
4613
|
+
"summary": "Place **many windows** into host walls in one undoable operation (bulk plural of {@linkcode window}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width`, `height` and `sillHeight` — the same fields as a `\"window\"` {@linkcode PluginDesignCreateOpeningOptions}. `sillHeight` is measured from the host wall base to the BOTTOM of the window. Validate-all-or-throw; one command.",
|
|
5124
4614
|
"examplePrompts": [
|
|
5125
4615
|
"Add windows along this whole facade at once",
|
|
5126
4616
|
"Place a window in every bedroom in one operation",
|
|
5127
4617
|
"Bulk add the windows from this schedule",
|
|
5128
4618
|
"Put four windows on this wall in a single undo step",
|
|
5129
|
-
"Add all the windows with a 0.9m sill height together
|
|
4619
|
+
"Add all the windows with a 0.9m sill height together"
|
|
5130
4620
|
],
|
|
5131
4621
|
"argsType": "PluginCreateWindowItem[]",
|
|
5132
4622
|
"resultType": "ComponentHandle[]",
|
|
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([ {
|
|
4623
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.window` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [casement] = await snaptrude.design.windows.listCatalog() const placed = await snaptrude.design.create.windows([ { catalogId: casement.id, hostWall: wall, position: await v.new(2, 0, 5), sillHeight: 0.9 }, { catalogId: casement.id, hostWall: wall, position: await v.new(5, 0, 5), sillHeight: 0.9 }, ]) const currentWall = await snaptrude.design.query.getHost(placed[0]) ```"
|
|
5134
4624
|
},
|
|
5135
4625
|
{
|
|
5136
4626
|
"path": "design.delete.entities",
|
|
@@ -5141,8 +4631,7 @@
|
|
|
5141
4631
|
"Remove these walls from the model",
|
|
5142
4632
|
"Get rid of this mass entirely",
|
|
5143
4633
|
"Delete all the furniture I picked",
|
|
5144
|
-
"Remove the door and window I just created"
|
|
5145
|
-
"Remove the void I cut in this slab"
|
|
4634
|
+
"Remove the door and window I just created"
|
|
5146
4635
|
],
|
|
5147
4636
|
"argsType": "ComponentHandle[]",
|
|
5148
4637
|
"resultType": "PluginDesignChangeResult",
|
|
@@ -5224,16 +4713,6 @@
|
|
|
5224
4713
|
"resultType": "PluginDimensionsChangeResult",
|
|
5225
4714
|
"performance": "Array API — one host round-trip and one undo entry for the whole set. # Example ```ts const dims = snaptrude.design.dimensions const hidden = await dims.list({ isHidden: true }) await dims.show(hidden.map((d) => d.id)) ```"
|
|
5226
4715
|
},
|
|
5227
|
-
{
|
|
5228
|
-
"path": "design.doors.checkPlacement",
|
|
5229
|
-
"namespace": "design.doors",
|
|
5230
|
-
"summary": "Trial the native host fit and geometry rebuild, then restore the model without publishing commands. The first result uses the creation options; subsequent results use candidateWidths in input order. Widths are authored parameters, not physical envelopes or a guaranteed maximum width. No catalog save, history entry or model persistence occurs. Rerun after model edits. A failed fit leaves cut unverified. Family-host cuts are also unverified: their rebuild cannot supply a reversible, authoritative trial result. Material clearance checks evaluated parts against physical neighbours across hosts. The intended host uses native fit/cut checks. Creation repeats clearance immediately before placement; this report grants no later approval. Editing permission is required; locked hosts and an active opening tool reject. It does not say which room the door opens into: read `opensInto` from `design.validation.access()` after placement (see {@linkcode getSwingDirection}). A requested width/height on a family sized by its Type (Custom Sizes off) picks the Type within 25 mm, else turns Custom Sizes on; each result's `sizing` says which. Creation (`design.create.door(s)`) applies the same rule, so the size you pass is the size built.",
|
|
5231
|
-
"examplePrompts": [
|
|
5232
|
-
"Check which door widths fit this host without placing a door"
|
|
5233
|
-
],
|
|
5234
|
-
"argsType": "PluginOpeningPlacementArgs",
|
|
5235
|
-
"resultType": "PluginOpeningPlacementResult"
|
|
5236
|
-
},
|
|
5237
4716
|
{
|
|
5238
4717
|
"path": "design.doors.exists",
|
|
5239
4718
|
"namespace": "design.doors",
|
|
@@ -5263,7 +4742,7 @@
|
|
|
5263
4742
|
{
|
|
5264
4743
|
"path": "design.doors.getDimensions",
|
|
5265
4744
|
"namespace": "design.doors",
|
|
5266
|
-
"summary": "Get
|
|
4745
|
+
"summary": "Get a door's full dimensions in one call — width along the wall, vertical height, and thickness through the wall — measured in the door's local oriented space. Parity with {@linkcode PluginDesignWindowsApi.getDimensions}.",
|
|
5267
4746
|
"examplePrompts": [
|
|
5268
4747
|
"What are the dimensions of this door?",
|
|
5269
4748
|
"How big is the selected door?",
|
|
@@ -5302,7 +4781,7 @@
|
|
|
5302
4781
|
{
|
|
5303
4782
|
"path": "design.doors.getSupportFloor",
|
|
5304
4783
|
"namespace": "design.doors",
|
|
5305
|
-
"summary": "
|
|
4784
|
+
"summary": "Get the floor a door is hosted on — the storey/level component that supports the door.",
|
|
5306
4785
|
"examplePrompts": [
|
|
5307
4786
|
"Which floor is this door on?",
|
|
5308
4787
|
"What storey does the selected door belong to?",
|
|
@@ -5315,13 +4794,12 @@
|
|
|
5315
4794
|
{
|
|
5316
4795
|
"path": "design.doors.getSwingDirection",
|
|
5317
4796
|
"namespace": "design.doors",
|
|
5318
|
-
"summary": "
|
|
4797
|
+
"summary": "Get a door's swing (hinge) handedness. Stand on the side the door swings open to, facing the door: `'left'` when the hinged jamb is on your left, `'right'` when it is on your right. Derived from the placed mesh's orientation (the same reflection `mirror` and the `hinge` placement option apply), not a persisted field.",
|
|
5319
4798
|
"examplePrompts": [
|
|
5320
4799
|
"Which way does this door swing?",
|
|
5321
4800
|
"Is the selected door left-handed or right-handed?",
|
|
5322
4801
|
"Check the hinge side of this door",
|
|
5323
|
-
"Does the entrance door open to the left or the right
|
|
5324
|
-
"Which room does this door open into?\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst swing = await snaptrude.design.doors.getSwingDirection(door)\nif (swing) console.log(\"opens as a\", swing, \"hand door\")\n// Which room it opens into\nconst { topology } = await snaptrude.design.validation.access()\nconst side = topology.rooms.flatMap((r) => r.doors).find((d) => d.door === door)?.opensInto\n```"
|
|
4802
|
+
"Does the entrance door open to the left or the right?\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst swing = await snaptrude.design.doors.getSwingDirection(door)\nif (swing) console.log(\"opens as a\", swing, \"hand door\")\n```"
|
|
5325
4803
|
],
|
|
5326
4804
|
"argsType": "ComponentHandle",
|
|
5327
4805
|
"resultType": "\"left\" | \"right\" | null"
|
|
@@ -5381,7 +4859,7 @@
|
|
|
5381
4859
|
{
|
|
5382
4860
|
"path": "design.doors.mirror",
|
|
5383
4861
|
"namespace": "design.doors",
|
|
5384
|
-
"summary": "
|
|
4862
|
+
"summary": "Mirror a door about its own axes. `'x'` (default) flips the swing side — the door opens to the other side of the wall; `'z'` swaps the hinged jamb (left-hand ↔ right-hand, same swing side); `'y'` turns it upside down. Undoable as a single command.",
|
|
5385
4863
|
"examplePrompts": [
|
|
5386
4864
|
"Flip this door's swing",
|
|
5387
4865
|
"Mirror the selected door",
|
|
@@ -5432,46 +4910,6 @@
|
|
|
5432
4910
|
"argsType": "ComponentHandle",
|
|
5433
4911
|
"resultType": "OffsetSplitOutcome"
|
|
5434
4912
|
},
|
|
5435
|
-
{
|
|
5436
|
-
"path": "design.electrical.context",
|
|
5437
|
-
"namespace": "design.electrical",
|
|
5438
|
-
"summary": "Read the active proposal's architectural context before authoring. Keep one revision across pages.",
|
|
5439
|
-
"examplePrompts": [],
|
|
5440
|
-
"argsType": "z.input<typeof NetworkContextArgs>",
|
|
5441
|
-
"resultType": "NetworkContextResult"
|
|
5442
|
-
},
|
|
5443
|
-
{
|
|
5444
|
-
"path": "design.electrical.create",
|
|
5445
|
-
"namespace": "design.electrical",
|
|
5446
|
-
"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.",
|
|
5447
|
-
"examplePrompts": [],
|
|
5448
|
-
"argsType": "z.input<typeof NetworkCreateArgs>",
|
|
5449
|
-
"resultType": "NetworkCreateResult"
|
|
5450
|
-
},
|
|
5451
|
-
{
|
|
5452
|
-
"path": "design.electrical.get",
|
|
5453
|
-
"namespace": "design.electrical",
|
|
5454
|
-
"summary": "Read one saved graph in the active proposal; null on miss. IDs are durable, not worker handles.",
|
|
5455
|
-
"examplePrompts": [],
|
|
5456
|
-
"argsType": "z.input<typeof NetworkGetArgs>",
|
|
5457
|
-
"resultType": "SavedNetworkGraph | null"
|
|
5458
|
-
},
|
|
5459
|
-
{
|
|
5460
|
-
"path": "design.electrical.query",
|
|
5461
|
-
"namespace": "design.electrical",
|
|
5462
|
-
"summary": "Read bounded authored topology in graph revision. Crossings do not connect. No clash/compliance claims.",
|
|
5463
|
-
"examplePrompts": [],
|
|
5464
|
-
"argsType": "z.input<typeof NetworkQueryArgs>",
|
|
5465
|
-
"resultType": "NetworkQueryResult"
|
|
5466
|
-
},
|
|
5467
|
-
{
|
|
5468
|
-
"path": "design.electrical.validate",
|
|
5469
|
-
"namespace": "design.electrical",
|
|
5470
|
-
"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.",
|
|
5471
|
-
"examplePrompts": [],
|
|
5472
|
-
"argsType": "z.input<typeof NetworkValidateArgs>",
|
|
5473
|
-
"resultType": "NetworkValidation"
|
|
5474
|
-
},
|
|
5475
4913
|
{
|
|
5476
4914
|
"path": "design.erase.edge",
|
|
5477
4915
|
"namespace": "design.erase",
|
|
@@ -5499,177 +4937,6 @@
|
|
|
5499
4937
|
"argsType": "PluginDesignListErasableEdgesArgs",
|
|
5500
4938
|
"resultType": "ErasableEdgeRef[]"
|
|
5501
4939
|
},
|
|
5502
|
-
{
|
|
5503
|
-
"path": "design.family.create",
|
|
5504
|
-
"namespace": "design.family",
|
|
5505
|
-
"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.",
|
|
5506
|
-
"examplePrompts": [
|
|
5507
|
-
"Save this as a family called Vertical Louvre",
|
|
5508
|
-
"Add it to my library\n\n# Example\n```ts\nconst { definitionId } = await snaptrude.design.family.create({ name: \"Louvre Screen\" })\n```"
|
|
5509
|
-
],
|
|
5510
|
-
"argsType": "PluginDesignFamilyCreateArgs",
|
|
5511
|
-
"resultType": "PluginFamilyCreateResult"
|
|
5512
|
-
},
|
|
5513
|
-
{
|
|
5514
|
-
"path": "design.family.delete",
|
|
5515
|
-
"namespace": "design.family",
|
|
5516
|
-
"summary": "Remove a family from the library: its catalog row is archived, so it leaves the Families panel. Placed instances are untouched — in this project and every other — because archived pins keep resolving. Pass `instances: true` to ALSO delete this project's instances in one undoable command; do that only when the user asks for the instances to go.",
|
|
5517
|
-
"examplePrompts": [
|
|
5518
|
-
"Delete the Louvre Screen family from my library",
|
|
5519
|
-
"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```"
|
|
5520
|
-
],
|
|
5521
|
-
"argsType": "PluginDesignFamilyDeleteArgs | string",
|
|
5522
|
-
"resultType": "PluginFamilyDeleteResult"
|
|
5523
|
-
},
|
|
5524
|
-
{
|
|
5525
|
-
"path": "design.family.duplicate",
|
|
5526
|
-
"namespace": "design.family",
|
|
5527
|
-
"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.",
|
|
5528
|
-
"examplePrompts": [],
|
|
5529
|
-
"argsType": "PluginDesignFamilyDuplicateArgs",
|
|
5530
|
-
"resultType": "PluginFamilyDuplicateResult"
|
|
5531
|
-
},
|
|
5532
|
-
{
|
|
5533
|
-
"path": "design.family.flex",
|
|
5534
|
-
"namespace": "design.family",
|
|
5535
|
-
"summary": "Re-run the prepared family's recipe at new parameter values.",
|
|
5536
|
-
"examplePrompts": [
|
|
5537
|
-
"Change it to 6 bays",
|
|
5538
|
-
"Show me what happens with 20 blades\n\n# Example\n```ts\nconst { changed } = await snaptrude.design.family.flex({ values: { bays: 6 } })\nconsole.log(`removed ${changed.removed}, rebuilt ${changed.rebuilt}`)\n```"
|
|
5539
|
-
],
|
|
5540
|
-
"argsType": "PluginDesignFamilyFlexArgs",
|
|
5541
|
-
"resultType": "PluginFamilyFlexResult"
|
|
5542
|
-
},
|
|
5543
|
-
{
|
|
5544
|
-
"path": "design.family.get",
|
|
5545
|
-
"namespace": "design.family",
|
|
5546
|
-
"summary": "A family's spec bundle: the prepared draft's, or — to CHANGE a saved family — that family's recipe, opened as the new draft.",
|
|
5547
|
-
"examplePrompts": [
|
|
5548
|
-
"Make the chairs I placed 50 mm wider",
|
|
5549
|
-
"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```"
|
|
5550
|
-
],
|
|
5551
|
-
"argsType": "PluginDesignFamilyGetArgs | string",
|
|
5552
|
-
"resultType": "PluginFamilyGetResult | null"
|
|
5553
|
-
},
|
|
5554
|
-
{
|
|
5555
|
-
"path": "design.family.getDefinition",
|
|
5556
|
-
"namespace": "design.family",
|
|
5557
|
-
"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.",
|
|
5558
|
-
"examplePrompts": [],
|
|
5559
|
-
"argsType": "PluginDesignFamilyGetDefinitionArgs",
|
|
5560
|
-
"resultType": "PluginFamilyDefinition"
|
|
5561
|
-
},
|
|
5562
|
-
{
|
|
5563
|
-
"path": "design.family.getExamples",
|
|
5564
|
-
"namespace": "design.family",
|
|
5565
|
-
"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.",
|
|
5566
|
-
"examplePrompts": [
|
|
5567
|
-
"Show me an example of a structural family",
|
|
5568
|
-
"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```"
|
|
5569
|
-
],
|
|
5570
|
-
"argsType": "PluginDesignFamilyGetExamplesArgs | string",
|
|
5571
|
-
"resultType": "PluginFamilyExampleSummary[] | PluginFamilyExample"
|
|
5572
|
-
},
|
|
5573
|
-
{
|
|
5574
|
-
"path": "design.family.getParameters",
|
|
5575
|
-
"namespace": "design.family",
|
|
5576
|
-
"summary": "Read a placed component's current parameter values and its sheet.",
|
|
5577
|
-
"examplePrompts": [
|
|
5578
|
-
"What size is that table?",
|
|
5579
|
-
"Show me the parameters on this partition\n\n# Example\n```ts\nconst { values, parameters } = await snaptrude.design.family.getParameters({ component })\n```"
|
|
5580
|
-
],
|
|
5581
|
-
"argsType": "PluginDesignFamilyGetParametersArgs",
|
|
5582
|
-
"resultType": "PluginFamilyInstanceParameters | null"
|
|
5583
|
-
},
|
|
5584
|
-
{
|
|
5585
|
-
"path": "design.family.getReference",
|
|
5586
|
-
"namespace": "design.family",
|
|
5587
|
-
"summary": "Read the family-spec DSL reference: grammar, the op table, the expression whitelist, the coordinate convention, the repair contract, and a worked example taken from a registered family.",
|
|
5588
|
-
"examplePrompts": [
|
|
5589
|
-
"How do I write a parametric family spec?",
|
|
5590
|
-
"Show me the family DSL\n\n# Example\n```ts\nconst { reference } = await snaptrude.design.family.getReference()\n```"
|
|
5591
|
-
],
|
|
5592
|
-
"argsType": "PluginDesignFamilyGetReferenceArgs | PluginFamilyReferenceSection",
|
|
5593
|
-
"resultType": "PluginFamilyReference"
|
|
5594
|
-
},
|
|
5595
|
-
{
|
|
5596
|
-
"path": "design.family.getTemplate",
|
|
5597
|
-
"namespace": "design.family",
|
|
5598
|
-
"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.",
|
|
5599
|
-
"examplePrompts": [],
|
|
5600
|
-
"argsType": "PluginDesignFamilyGetTemplateArgs",
|
|
5601
|
-
"resultType": "PluginFamilyTemplateResult"
|
|
5602
|
-
},
|
|
5603
|
-
{
|
|
5604
|
-
"path": "design.family.list",
|
|
5605
|
-
"namespace": "design.family",
|
|
5606
|
-
"summary": "Every available parametric family, merging the session registry and catalog.",
|
|
5607
|
-
"examplePrompts": [
|
|
5608
|
-
"What families are available?\n\n# Example\n```ts\nconst families = await snaptrude.design.family.list()\n```"
|
|
5609
|
-
],
|
|
5610
|
-
"argsType": "PluginDesignFamilyListArgs & { compact: true }",
|
|
5611
|
-
"resultType": "string[]"
|
|
5612
|
-
},
|
|
5613
|
-
{
|
|
5614
|
-
"path": "design.family.list",
|
|
5615
|
-
"namespace": "design.family",
|
|
5616
|
-
"summary": "",
|
|
5617
|
-
"examplePrompts": [],
|
|
5618
|
-
"argsType": "PluginDesignFamilyListArgs & { compact?: false }",
|
|
5619
|
-
"resultType": "PluginFamilySummary[]"
|
|
5620
|
-
},
|
|
5621
|
-
{
|
|
5622
|
-
"path": "design.family.list",
|
|
5623
|
-
"namespace": "design.family",
|
|
5624
|
-
"summary": "",
|
|
5625
|
-
"examplePrompts": [],
|
|
5626
|
-
"argsType": "PluginDesignFamilyListArgs",
|
|
5627
|
-
"resultType": "PluginFamilySummary[] | string[]"
|
|
5628
|
-
},
|
|
5629
|
-
{
|
|
5630
|
-
"path": "design.family.place",
|
|
5631
|
-
"namespace": "design.family",
|
|
5632
|
-
"summary": "Put a family into the model — either the prepared draft or any family from {@linkcode PluginDesignFamilyApi.list}.",
|
|
5633
|
-
"examplePrompts": [
|
|
5634
|
-
"Place it in the model",
|
|
5635
|
-
"Put a louvre screen at the origin",
|
|
5636
|
-
"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```"
|
|
5637
|
-
],
|
|
5638
|
-
"argsType": "PluginDesignFamilyPlaceArgs",
|
|
5639
|
-
"resultType": "PluginFamilyPlaceResult"
|
|
5640
|
-
},
|
|
5641
|
-
{
|
|
5642
|
-
"path": "design.family.prepare",
|
|
5643
|
-
"namespace": "design.family",
|
|
5644
|
-
"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.",
|
|
5645
|
-
"examplePrompts": [
|
|
5646
|
-
"Make a louvre screen with adjustable blade count and tilt",
|
|
5647
|
-
"Design a curtain wall panel family with 8 bays",
|
|
5648
|
-
"Create a railing family I can adjust",
|
|
5649
|
-
"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```"
|
|
5650
|
-
],
|
|
5651
|
-
"argsType": "PluginDesignFamilyPrepareArgs",
|
|
5652
|
-
"resultType": "PluginFamilyPrepareResult"
|
|
5653
|
-
},
|
|
5654
|
-
{
|
|
5655
|
-
"path": "design.family.saveToLibrary",
|
|
5656
|
-
"namespace": "design.family",
|
|
5657
|
-
"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.",
|
|
5658
|
-
"examplePrompts": [],
|
|
5659
|
-
"argsType": "PluginDesignFamilySaveToLibraryArgs",
|
|
5660
|
-
"resultType": "PluginFamilySaveToLibraryResult"
|
|
5661
|
-
},
|
|
5662
|
-
{
|
|
5663
|
-
"path": "design.family.setParameters",
|
|
5664
|
-
"namespace": "design.family",
|
|
5665
|
-
"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.",
|
|
5666
|
-
"examplePrompts": [
|
|
5667
|
-
"Make that table seat 8",
|
|
5668
|
-
"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```"
|
|
5669
|
-
],
|
|
5670
|
-
"argsType": "PluginDesignFamilySetParametersArgs",
|
|
5671
|
-
"resultType": "PluginFamilyInstanceParameters"
|
|
5672
|
-
},
|
|
5673
4940
|
{
|
|
5674
4941
|
"path": "design.furniture.exists",
|
|
5675
4942
|
"namespace": "design.furniture",
|
|
@@ -5761,51 +5028,6 @@
|
|
|
5761
5028
|
"argsType": "ComponentHandle",
|
|
5762
5029
|
"resultType": "PluginDesignChangeResult"
|
|
5763
5030
|
},
|
|
5764
|
-
{
|
|
5765
|
-
"path": "design.grids.addLine",
|
|
5766
|
-
"namespace": "design.grids",
|
|
5767
|
-
"summary": "Insert a parallel grid line into a wing at an explicit position along the wing's spacing axis (Snaptrude units, wing-local — line 0's position can be read from its curve). Sibling lines do not shift; the wing's tag sequence is renumbered. Undoable.",
|
|
5768
|
-
"examplePrompts": [
|
|
5769
|
-
"Add a grid line between lines 2 and 3",
|
|
5770
|
-
"Insert an extra grid line 4 metres from line A\n\n# Example\n```ts\nawait snaptrude.design.grids.addLine(grid, 0, 12.5)\n```"
|
|
5771
|
-
],
|
|
5772
|
-
"argsType": "ComponentHandle",
|
|
5773
|
-
"resultType": "boolean"
|
|
5774
|
-
},
|
|
5775
|
-
{
|
|
5776
|
-
"path": "design.grids.removeLines",
|
|
5777
|
-
"namespace": "design.grids",
|
|
5778
|
-
"summary": "Remove grid lines by positional address, as ONE undoable step. With `tagPolicy: \"rewrite\"` (default) each affected wing renumbers its tag sequence; `\"preserve\"` keeps surviving tags unchanged. A wing emptied of lines is dropped from the group.",
|
|
5779
|
-
"examplePrompts": [
|
|
5780
|
-
"Delete grid line B",
|
|
5781
|
-
"Remove the last two lines of this grid without renumbering\n\n# Example\n```ts\nawait snaptrude.design.grids.removeLines(grid, [{ wing: 0, line: 2 }], \"preserve\")\n```"
|
|
5782
|
-
],
|
|
5783
|
-
"argsType": "ComponentHandle",
|
|
5784
|
-
"resultType": "boolean"
|
|
5785
|
-
},
|
|
5786
|
-
{
|
|
5787
|
-
"path": "design.grids.updateLines",
|
|
5788
|
-
"namespace": "design.grids",
|
|
5789
|
-
"summary": "Update one or more **lines** of a grid with sparse per-line entries — `tag`, `distanceToPrevious`/`distanceToNext` (typed distance to the neighbour on that side; mutually exclusive), `props` (per-line style overrides), and `visible: false` (hide). Every change routes through the exact setters the native panel uses — each changed field commits its own undoable command, identical to editing that field in the panel.",
|
|
5790
|
-
"examplePrompts": [
|
|
5791
|
-
"Rename grid line 2 to \"B\"",
|
|
5792
|
-
"Move this grid line 4 metres from its neighbour",
|
|
5793
|
-
"Hide grid line 3 on this grid\n\n# Example\n```ts\nawait snaptrude.design.grids.updateLines(grid, [\n{ wing: 0, line: 1, tag: \"B\", distanceToPrevious: 4 },\n])\n```"
|
|
5794
|
-
],
|
|
5795
|
-
"argsType": "ComponentHandle",
|
|
5796
|
-
"resultType": "boolean"
|
|
5797
|
-
},
|
|
5798
|
-
{
|
|
5799
|
-
"path": "design.grids.updateWings",
|
|
5800
|
-
"namespace": "design.grids",
|
|
5801
|
-
"summary": "Update one or more **wings** of a grid with sparse per-wing entries — `spacing` (uniform re-space), `count` (grow/truncate + tag renumber), `spanMin`/`spanMax` (family length handles). Every change routes through the exact setters the native panel uses — each changed field commits its own undoable command, identical to editing that field in the panel.",
|
|
5802
|
-
"examplePrompts": [
|
|
5803
|
-
"Change this grid's spacing to 8 metres",
|
|
5804
|
-
"Make this grid 10 by 12 lines\n\n# Example\n```ts\nawait snaptrude.design.grids.updateWings(grid, [{ wing: 0, spacing: 8, count: 10 }])\n```"
|
|
5805
|
-
],
|
|
5806
|
-
"argsType": "ComponentHandle",
|
|
5807
|
-
"resultType": "boolean"
|
|
5808
|
-
},
|
|
5809
5031
|
{
|
|
5810
5032
|
"path": "design.isAreaLocked",
|
|
5811
5033
|
"namespace": "design",
|
|
@@ -6076,86 +5298,6 @@
|
|
|
6076
5298
|
"argsType": "ComponentHandle",
|
|
6077
5299
|
"resultType": "PluginMaterialResult"
|
|
6078
5300
|
},
|
|
6079
|
-
{
|
|
6080
|
-
"path": "design.mechanical.context",
|
|
6081
|
-
"namespace": "design.mechanical",
|
|
6082
|
-
"summary": "Read the active proposal's architectural context before authoring. Keep one revision across pages.",
|
|
6083
|
-
"examplePrompts": [],
|
|
6084
|
-
"argsType": "z.input<typeof NetworkContextArgs>",
|
|
6085
|
-
"resultType": "NetworkContextResult"
|
|
6086
|
-
},
|
|
6087
|
-
{
|
|
6088
|
-
"path": "design.mechanical.create",
|
|
6089
|
-
"namespace": "design.mechanical",
|
|
6090
|
-
"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.",
|
|
6091
|
-
"examplePrompts": [],
|
|
6092
|
-
"argsType": "z.input<typeof NetworkCreateArgs>",
|
|
6093
|
-
"resultType": "NetworkCreateResult"
|
|
6094
|
-
},
|
|
6095
|
-
{
|
|
6096
|
-
"path": "design.mechanical.get",
|
|
6097
|
-
"namespace": "design.mechanical",
|
|
6098
|
-
"summary": "Read one saved graph in the active proposal; null on miss. IDs are durable, not worker handles.",
|
|
6099
|
-
"examplePrompts": [],
|
|
6100
|
-
"argsType": "z.input<typeof NetworkGetArgs>",
|
|
6101
|
-
"resultType": "SavedNetworkGraph | null"
|
|
6102
|
-
},
|
|
6103
|
-
{
|
|
6104
|
-
"path": "design.mechanical.query",
|
|
6105
|
-
"namespace": "design.mechanical",
|
|
6106
|
-
"summary": "Read bounded authored topology in graph revision. Crossings do not connect. No clash/compliance claims.",
|
|
6107
|
-
"examplePrompts": [],
|
|
6108
|
-
"argsType": "z.input<typeof NetworkQueryArgs>",
|
|
6109
|
-
"resultType": "NetworkQueryResult"
|
|
6110
|
-
},
|
|
6111
|
-
{
|
|
6112
|
-
"path": "design.mechanical.validate",
|
|
6113
|
-
"namespace": "design.mechanical",
|
|
6114
|
-
"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.",
|
|
6115
|
-
"examplePrompts": [],
|
|
6116
|
-
"argsType": "z.input<typeof NetworkValidateArgs>",
|
|
6117
|
-
"resultType": "NetworkValidation"
|
|
6118
|
-
},
|
|
6119
|
-
{
|
|
6120
|
-
"path": "design.plumbing.context",
|
|
6121
|
-
"namespace": "design.plumbing",
|
|
6122
|
-
"summary": "Read the active proposal's architectural context before authoring. Keep one revision across pages.",
|
|
6123
|
-
"examplePrompts": [],
|
|
6124
|
-
"argsType": "z.input<typeof NetworkContextArgs>",
|
|
6125
|
-
"resultType": "NetworkContextResult"
|
|
6126
|
-
},
|
|
6127
|
-
{
|
|
6128
|
-
"path": "design.plumbing.create",
|
|
6129
|
-
"namespace": "design.plumbing",
|
|
6130
|
-
"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.",
|
|
6131
|
-
"examplePrompts": [],
|
|
6132
|
-
"argsType": "z.input<typeof NetworkCreateArgs>",
|
|
6133
|
-
"resultType": "NetworkCreateResult"
|
|
6134
|
-
},
|
|
6135
|
-
{
|
|
6136
|
-
"path": "design.plumbing.get",
|
|
6137
|
-
"namespace": "design.plumbing",
|
|
6138
|
-
"summary": "Read one saved graph in the active proposal; null on miss. IDs are durable, not worker handles.",
|
|
6139
|
-
"examplePrompts": [],
|
|
6140
|
-
"argsType": "z.input<typeof NetworkGetArgs>",
|
|
6141
|
-
"resultType": "SavedNetworkGraph | null"
|
|
6142
|
-
},
|
|
6143
|
-
{
|
|
6144
|
-
"path": "design.plumbing.query",
|
|
6145
|
-
"namespace": "design.plumbing",
|
|
6146
|
-
"summary": "Read bounded authored topology in graph revision. Crossings do not connect. No clash/compliance claims.",
|
|
6147
|
-
"examplePrompts": [],
|
|
6148
|
-
"argsType": "z.input<typeof NetworkQueryArgs>",
|
|
6149
|
-
"resultType": "NetworkQueryResult"
|
|
6150
|
-
},
|
|
6151
|
-
{
|
|
6152
|
-
"path": "design.plumbing.validate",
|
|
6153
|
-
"namespace": "design.plumbing",
|
|
6154
|
-
"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.",
|
|
6155
|
-
"examplePrompts": [],
|
|
6156
|
-
"argsType": "z.input<typeof NetworkValidateArgs>",
|
|
6157
|
-
"resultType": "NetworkValidation"
|
|
6158
|
-
},
|
|
6159
5301
|
{
|
|
6160
5302
|
"path": "design.query.exists",
|
|
6161
5303
|
"namespace": "design.query",
|
|
@@ -6189,7 +5331,6 @@
|
|
|
6189
5331
|
"summary": "Get the boundary representation (B-rep) of a scene component — the solid geometry (faces, edges, vertices) behind a wall, slab, room or any other scene entity, as a reusable {@linkcode BrepHandle} for the `core.geom.query.brep.*` reads.",
|
|
6190
5332
|
"examplePrompts": [
|
|
6191
5333
|
"Get the 3D solid geometry of the selected wall",
|
|
6192
|
-
"Round the top rim of this column and put it back where it is",
|
|
6193
5334
|
"How many faces does this mass have?",
|
|
6194
5335
|
"Inspect the mesh of this slab so I can look at its faces and edges",
|
|
6195
5336
|
"Read the vertices of the selected column's geometry"
|
|
@@ -6214,7 +5355,7 @@
|
|
|
6214
5355
|
{
|
|
6215
5356
|
"path": "design.query.geometry.getTriangulatedMeshes",
|
|
6216
5357
|
"namespace": "design.query.geometry",
|
|
6217
|
-
"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.
|
|
5358
|
+
"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.",
|
|
6218
5359
|
"examplePrompts": [
|
|
6219
5360
|
"Export the selected masses as a triangle mesh",
|
|
6220
5361
|
"Get the raw vertices and triangles of this wall in world coordinates",
|
|
@@ -6278,13 +5419,12 @@
|
|
|
6278
5419
|
{
|
|
6279
5420
|
"path": "design.query.getHost",
|
|
6280
5421
|
"namespace": "design.query",
|
|
6281
|
-
"summary": "Get an entity's host/parent entity (e.g. the wall a door is cut into
|
|
5422
|
+
"summary": "Get an entity's host/parent entity (e.g. the wall a door is cut into).",
|
|
6282
5423
|
"examplePrompts": [
|
|
6283
5424
|
"Which wall is this door in?",
|
|
6284
5425
|
"Find the parent of the selected window",
|
|
6285
5426
|
"What is this element attached to?",
|
|
6286
|
-
"Which wall hosts this window?",
|
|
6287
|
-
"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```"
|
|
5427
|
+
"Which wall hosts this window?\n\n# Example\n```ts\n// From a door up to its host wall, then measure the wall\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst hostWall = door ? await snaptrude.design.query.getHost(door) : null\nif (hostWall) {\nconst m = await snaptrude.design.query.measure(hostWall)\nconsole.log(\"wall length:\", m?.length)\n}\n```"
|
|
6288
5428
|
],
|
|
6289
5429
|
"argsType": "ComponentHandle",
|
|
6290
5430
|
"resultType": "ComponentHandle | null"
|
|
@@ -6302,19 +5442,6 @@
|
|
|
6302
5442
|
"argsType": "ComponentHandle",
|
|
6303
5443
|
"resultType": "string"
|
|
6304
5444
|
},
|
|
6305
|
-
{
|
|
6306
|
-
"path": "design.query.getParameters",
|
|
6307
|
-
"namespace": "design.query",
|
|
6308
|
-
"summary": "Read a mass's creation-parameter record — the recipe it was built from (`kind` plus the values that constructor was called with). Present on masses committed from a `core.geom.create` brep constructor that carries a recipe: {@linkcode MassParametersRecord} covers the four primitives (sphere, cylinder, cone, torus), extrusions, revolutions, lofts and sweeps.",
|
|
6309
|
-
"examplePrompts": [
|
|
6310
|
-
"What radius is this sphere?",
|
|
6311
|
-
"Is this mass parametric?",
|
|
6312
|
-
"Read back the dome's creation parameters",
|
|
6313
|
-
"How tall was this cylinder made?\n\n# Example\n```ts\nconst [mass] = await snaptrude.design.query.listMasses({ isSelected: true })\nconst params = await snaptrude.design.query.getParameters(mass)\nif (params?.kind === \"sphere\") console.log(\"radius:\", params.values.radius)\n```"
|
|
6314
|
-
],
|
|
6315
|
-
"argsType": "ComponentHandle",
|
|
6316
|
-
"resultType": "MassParametersRecord | null"
|
|
6317
|
-
},
|
|
6318
5445
|
{
|
|
6319
5446
|
"path": "design.query.getProperties",
|
|
6320
5447
|
"namespace": "design.query",
|
|
@@ -6343,19 +5470,6 @@
|
|
|
6343
5470
|
"argsType": "ComponentHandle",
|
|
6344
5471
|
"resultType": "PluginStaircaseParams | null"
|
|
6345
5472
|
},
|
|
6346
|
-
{
|
|
6347
|
-
"path": "design.query.grids.get",
|
|
6348
|
-
"namespace": "design.query.grids",
|
|
6349
|
-
"summary": "Get properties of a grid by its ID.",
|
|
6350
|
-
"examplePrompts": [
|
|
6351
|
-
"What is the spacing of this grid?",
|
|
6352
|
-
"Read the grid line tags on this structural grid",
|
|
6353
|
-
"Get the geometry of every line in this grid",
|
|
6354
|
-
"Which storeys is this grid hidden on?\n\n# Example\n```ts\nconst [grid] = await snaptrude.design.query.listGrids()\nconst { wings } = await snaptrude.design.query.grids.get(grid, [\"wings\"])\n// wings[0].lines[0].curve is an opaque CurveHandle in world space;\n// read its coordinates via `snaptrude.core.geom.curve`.\n```"
|
|
6355
|
-
],
|
|
6356
|
-
"argsType": "string",
|
|
6357
|
-
"resultType": "PluginGridGetResult"
|
|
6358
|
-
},
|
|
6359
5473
|
{
|
|
6360
5474
|
"path": "design.query.listBeams",
|
|
6361
5475
|
"namespace": "design.query",
|
|
@@ -6398,13 +5512,12 @@
|
|
|
6398
5512
|
{
|
|
6399
5513
|
"path": "design.query.listChildren",
|
|
6400
5514
|
"namespace": "design.query",
|
|
6401
|
-
"summary": "List an entity's direct child entities — for example the doors and windows hosted in a wall
|
|
5515
|
+
"summary": "List an entity's direct child entities — for example the doors and windows hosted in a wall.",
|
|
6402
5516
|
"examplePrompts": [
|
|
6403
5517
|
"What's inside this wall — list its doors and windows",
|
|
6404
5518
|
"Show the child elements of the selected object",
|
|
6405
5519
|
"Which openings belong to this wall?",
|
|
6406
|
-
"List everything nested under this mass"
|
|
6407
|
-
"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```"
|
|
5520
|
+
"List everything nested under this mass\n\n# Example\n```ts\n// Count the openings hosted in a wall, split by kind\nconst children = await snaptrude.design.query.listChildren(wall)\nlet doors = 0\nlet windows = 0\nfor (const child of children) {\nconst kind = await snaptrude.design.query.getEntityType(child)\nif (kind === \"door\") doors++\nif (kind === \"window\") windows++\n}\n```"
|
|
6408
5521
|
],
|
|
6409
5522
|
"argsType": "ComponentHandle",
|
|
6410
5523
|
"resultType": "ComponentHandle[]"
|
|
@@ -6475,19 +5588,6 @@
|
|
|
6475
5588
|
"argsType": "PluginEntityFilter",
|
|
6476
5589
|
"resultType": "ComponentHandle[]"
|
|
6477
5590
|
},
|
|
6478
|
-
{
|
|
6479
|
-
"path": "design.query.listGrids",
|
|
6480
|
-
"namespace": "design.query",
|
|
6481
|
-
"summary": "List all the structural grids (grid groups) in the project, optionally filtered by storey, building, selection state, or region.",
|
|
6482
|
-
"examplePrompts": [
|
|
6483
|
-
"List all the structural grids in the model",
|
|
6484
|
-
"How many grids are on the ground floor?",
|
|
6485
|
-
"Show the grids on this storey",
|
|
6486
|
-
"Which grids are currently selected?\n\n# Example\n```ts\nconst groundFloorGrids = await snaptrude.design.query.listGrids({ storeys: [1] })\n```"
|
|
6487
|
-
],
|
|
6488
|
-
"argsType": "PluginEntityFilter",
|
|
6489
|
-
"resultType": "ComponentHandle[]"
|
|
6490
|
-
},
|
|
6491
5591
|
{
|
|
6492
5592
|
"path": "design.query.listMasses",
|
|
6493
5593
|
"namespace": "design.query",
|
|
@@ -6580,14 +5680,6 @@
|
|
|
6580
5680
|
"argsType": "PluginEntityFilter",
|
|
6581
5681
|
"resultType": "ComponentHandle[]"
|
|
6582
5682
|
},
|
|
6583
|
-
{
|
|
6584
|
-
"path": "design.query.listVoids",
|
|
6585
|
-
"namespace": "design.query",
|
|
6586
|
-
"summary": "List Void components, excluding masses and spaces. Voids cut their hosts. Use family queries for authored parametric families with a cut relationship.",
|
|
6587
|
-
"examplePrompts": [],
|
|
6588
|
-
"argsType": "PluginEntityFilter",
|
|
6589
|
-
"resultType": "ComponentHandle[]"
|
|
6590
|
-
},
|
|
6591
5683
|
{
|
|
6592
5684
|
"path": "design.query.listWalls",
|
|
6593
5685
|
"namespace": "design.query",
|
|
@@ -6778,66 +5870,6 @@
|
|
|
6778
5870
|
"argsType": "PluginSelectionFilter",
|
|
6779
5871
|
"resultType": "PluginDesignChangeResult"
|
|
6780
5872
|
},
|
|
6781
|
-
{
|
|
6782
|
-
"path": "design.text.create",
|
|
6783
|
-
"namespace": "design.text",
|
|
6784
|
-
"summary": "Place a text, or an annotation when `options.arrowhead` is given.",
|
|
6785
|
-
"examplePrompts": [
|
|
6786
|
-
"Label the living room \"LIVING\" on the plan",
|
|
6787
|
-
"Add an annotation pointing at this column saying \"RCC 300x300\"",
|
|
6788
|
-
"Write \"NORTH ENTRY\" in red bold text at the entrance on level 2\n\n# Example\n```ts\nconst { design, core } = snaptrude\nconst v = core.math.vec3\n// A plain label on storey 1.\nawait design.text.create(await v.new(10, 0, 20), \"LIVING\", { storey: 1 })\n// An annotation whose leader points at a wall corner.\nawait design.text.create(await v.new(30, 0, 40), \"Shear wall\", {\narrowhead: await v.new(22, 0, 32),\ncolor: \"#c62828\",\nfontStyle: \"Bold\",\n})\n```"
|
|
6789
|
-
],
|
|
6790
|
-
"argsType": "Vec3Handle",
|
|
6791
|
-
"resultType": "ComponentHandle"
|
|
6792
|
-
},
|
|
6793
|
-
{
|
|
6794
|
-
"path": "design.text.get",
|
|
6795
|
-
"namespace": "design.text",
|
|
6796
|
-
"summary": "Read one text by handle.",
|
|
6797
|
-
"examplePrompts": [
|
|
6798
|
-
"What does this text say?",
|
|
6799
|
-
"Read the annotation I just placed\n\n# Example\n```ts\nconst t = await snaptrude.design.text.get(handle)\nif (t?.leader) console.log(t.content, \"points at\", t.leader.arrowhead)\n```"
|
|
6800
|
-
],
|
|
6801
|
-
"argsType": "ComponentHandle",
|
|
6802
|
-
"resultType": "PluginText | null"
|
|
6803
|
-
},
|
|
6804
|
-
{
|
|
6805
|
-
"path": "design.text.list",
|
|
6806
|
-
"namespace": "design.text",
|
|
6807
|
-
"summary": "List the texts and annotations of every building in the active design option as full records (each carries its `buildingId`).",
|
|
6808
|
-
"examplePrompts": [
|
|
6809
|
-
"List all the text labels on level 1",
|
|
6810
|
-
"Which annotations are in this model?",
|
|
6811
|
-
"Find the text that says \"LOBBY\""
|
|
6812
|
-
],
|
|
6813
|
-
"argsType": "{\n storeys?: number[]\n kind?: PluginTextKind\n isHidden?: boolean\n }",
|
|
6814
|
-
"resultType": "PluginText[]",
|
|
6815
|
-
"performance": "Array read — one host round-trip returns every record. Filter in one call rather than calling `get` per text. # Example ```ts const texts = await snaptrude.design.text.list({ storeys: [1] }) const lobby = texts.find((t) => t.content === \"LOBBY\") ```"
|
|
6816
|
-
},
|
|
6817
|
-
{
|
|
6818
|
-
"path": "design.text.setLeader",
|
|
6819
|
-
"namespace": "design.text",
|
|
6820
|
-
"summary": "Point a text's leader at a new place — the same edit as dragging an annotation's arrowhead with the Edit tool. Passing `null` removes the leader (the annotation becomes a plain text); giving a plain text an arrowhead turns it into an annotation. The text itself does not move. To move the text while its arrowhead stays put, move it with `design.transform.move`, then call this with the old `leader.arrowhead`.",
|
|
6821
|
-
"examplePrompts": [
|
|
6822
|
-
"Point this annotation at the door instead",
|
|
6823
|
-
"Remove the leader from this label\n\n# Example\n```ts\nconst { design, core } = snaptrude\nawait design.text.setLeader(handle, await core.math.vec3.new(12, 0, 8))\n```"
|
|
6824
|
-
],
|
|
6825
|
-
"argsType": "ComponentHandle",
|
|
6826
|
-
"resultType": "PluginText"
|
|
6827
|
-
},
|
|
6828
|
-
{
|
|
6829
|
-
"path": "design.text.update",
|
|
6830
|
-
"namespace": "design.text",
|
|
6831
|
-
"summary": "Change the words, colour or font of one or more texts — the same edit as the Properties panel. Fields left out keep each text's own value. A font style the (new) family does not have falls back to `\"Regular\"`, as in the panel. One undo entry for the whole batch.",
|
|
6832
|
-
"examplePrompts": [
|
|
6833
|
-
"Make all the room labels bold",
|
|
6834
|
-
"Change this annotation to read \"Fire exit\"",
|
|
6835
|
-
"Use Roboto in blue for every text on level 2"
|
|
6836
|
-
],
|
|
6837
|
-
"argsType": "ComponentHandle[]",
|
|
6838
|
-
"resultType": "PluginTextChangeResult",
|
|
6839
|
-
"performance": "Array API — pass the whole set in one call (one host round-trip, one undo entry). Never loop this per text. # Example ```ts const text = snaptrude.design.text const level2 = await text.list({ storeys: [2] }) await text.update(level2.map((t) => t.id), { fontFamily: \"Roboto\", color: \"#1565c0\" }) ```"
|
|
6840
|
-
},
|
|
6841
5873
|
{
|
|
6842
5874
|
"path": "design.transform.align",
|
|
6843
5875
|
"namespace": "design.transform",
|
|
@@ -6901,14 +5933,14 @@
|
|
|
6901
5933
|
{
|
|
6902
5934
|
"path": "design.types.get",
|
|
6903
5935
|
"namespace": "design.types",
|
|
6904
|
-
"summary": "Get one building type by its
|
|
5936
|
+
"summary": "Get one building type by its `\"<kind>:<name>\"` id — its labelled layer stack (each layer's role, thickness and material) plus the summed total thickness.",
|
|
6905
5937
|
"examplePrompts": [
|
|
6906
5938
|
"What layers make up this wall type?",
|
|
6907
5939
|
"Show the construction of the exposed-concrete wall",
|
|
6908
5940
|
"What's the total thickness of this slab type?",
|
|
6909
|
-
"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.
|
|
5941
|
+
"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```"
|
|
6910
5942
|
],
|
|
6911
|
-
"argsType": "
|
|
5943
|
+
"argsType": "string",
|
|
6912
5944
|
"resultType": "PluginBuildingType | null"
|
|
6913
5945
|
},
|
|
6914
5946
|
{
|
|
@@ -6950,14 +5982,6 @@
|
|
|
6950
5982
|
"argsType": "ComponentHandle[]",
|
|
6951
5983
|
"resultType": "PluginDesignChangeResult"
|
|
6952
5984
|
},
|
|
6953
|
-
{
|
|
6954
|
-
"path": "design.update.beam",
|
|
6955
|
-
"namespace": "design.update",
|
|
6956
|
-
"summary": "Replace a native beam family while preserving its authored axis. Values use mm/degrees.",
|
|
6957
|
-
"examplePrompts": [],
|
|
6958
|
-
"argsType": "ComponentHandle",
|
|
6959
|
-
"resultType": "PluginDesignChangeResult"
|
|
6960
|
-
},
|
|
6961
5985
|
{
|
|
6962
5986
|
"path": "design.update.buildableEnvelope",
|
|
6963
5987
|
"namespace": "design.update",
|
|
@@ -6983,14 +6007,6 @@
|
|
|
6983
6007
|
"argsType": "ComponentHandle",
|
|
6984
6008
|
"resultType": "PluginDesignChangeResult"
|
|
6985
6009
|
},
|
|
6986
|
-
{
|
|
6987
|
-
"path": "design.update.column",
|
|
6988
|
-
"namespace": "design.update",
|
|
6989
|
-
"summary": "Replace a native column family while preserving its authored axis. Values use mm/degrees.",
|
|
6990
|
-
"examplePrompts": [],
|
|
6991
|
-
"argsType": "ComponentHandle",
|
|
6992
|
-
"resultType": "PluginDesignChangeResult"
|
|
6993
|
-
},
|
|
6994
6010
|
{
|
|
6995
6011
|
"path": "design.update.floor",
|
|
6996
6012
|
"namespace": "design.update",
|
|
@@ -7004,66 +6020,33 @@
|
|
|
7004
6020
|
"resultType": "PluginDesignChangeResult"
|
|
7005
6021
|
},
|
|
7006
6022
|
{
|
|
7007
|
-
"path": "design.update.
|
|
6023
|
+
"path": "design.update.roof",
|
|
7008
6024
|
"namespace": "design.update",
|
|
7009
|
-
"summary": "
|
|
6025
|
+
"summary": "Edit a **roof's** thickness and/or overhang — the same commands the roof panel's Thickness field and Overhang slider drive (shares the slab-family machinery). Sparse: only the fields you provide change. Undoable. Both values are in **engine units** (the `design.doors.setWidth` convention); thickness must be `> 0`, overhang is an absolute offset (negative insets the roof) and re-applying the current overhang is a no-op.",
|
|
7010
6026
|
"examplePrompts": [
|
|
7011
|
-
"
|
|
7012
|
-
"
|
|
7013
|
-
"
|
|
6027
|
+
"Make this roof 300mm thick",
|
|
6028
|
+
"Set the roof slab thickness to 250",
|
|
6029
|
+
"Give the roof a 600 overhang",
|
|
6030
|
+
"Pull the roof overhang back to 0\n\n# Example\n```ts\nconst [roof] = await snaptrude.design.query.listRoofs()\nawait snaptrude.design.update.roof(roof, { overhang: 600 })\n```"
|
|
7014
6031
|
],
|
|
7015
6032
|
"argsType": "ComponentHandle",
|
|
7016
|
-
"resultType": "
|
|
6033
|
+
"resultType": "PluginDesignChangeResult"
|
|
7017
6034
|
},
|
|
7018
6035
|
{
|
|
7019
|
-
"path": "design.update.
|
|
6036
|
+
"path": "design.update.setBaseOffset",
|
|
7020
6037
|
"namespace": "design.update",
|
|
7021
|
-
"summary": "
|
|
6038
|
+
"summary": "Set a component's **base offset** — its vertical distance above its own storey's base level. Moves the component so its base lands at `storeyBase + offset`, composed over the same command-backed move machinery as {@linkcode setElevation} (undoable, persisted, per-type invariants kept in sync). Use this instead of {@linkcode setElevation} when you want an offset relative to the storey rather than an absolute world height. `offset` is in **engine units** (the `design.doors.setWidth` convention); `0` sits the base flush with the storey base. Re-applying the current offset is a no-op.",
|
|
7022
6039
|
"examplePrompts": [
|
|
7023
|
-
"
|
|
7024
|
-
"
|
|
7025
|
-
"
|
|
7026
|
-
"
|
|
6040
|
+
"Lift this element 300 above its floor",
|
|
6041
|
+
"Set this staircase's base offset to 0",
|
|
6042
|
+
"Raise the selected mass 500 off the storey base",
|
|
6043
|
+
"Offset this slab 150 above the floor level\n\n# Example\n```ts\nconst [stair] = await snaptrude.design.query.listStaircases()\nawait snaptrude.design.update.setBaseOffset(stair, 0)\n```"
|
|
7027
6044
|
],
|
|
7028
6045
|
"argsType": "ComponentHandle",
|
|
7029
|
-
"resultType": "
|
|
6046
|
+
"resultType": "PluginDesignChangeResult"
|
|
7030
6047
|
},
|
|
7031
6048
|
{
|
|
7032
|
-
"path": "design.update.
|
|
7033
|
-
"namespace": "design.update",
|
|
7034
|
-
"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.",
|
|
7035
|
-
"examplePrompts": [],
|
|
7036
|
-
"argsType": "string",
|
|
7037
|
-
"resultType": "PluginDesignUpdateReferenceLineResult"
|
|
7038
|
-
},
|
|
7039
|
-
{
|
|
7040
|
-
"path": "design.update.roof",
|
|
7041
|
-
"namespace": "design.update",
|
|
7042
|
-
"summary": "Edit a **roof's** thickness and/or overhang — the same commands the roof panel's Thickness field and Overhang slider drive (shares the slab-family machinery). Sparse: only the fields you provide change. Undoable. Both values are in **engine units** (the `design.doors.setWidth` convention); thickness must be `> 0`, overhang is an absolute offset (negative insets the roof) and re-applying the current overhang is a no-op.",
|
|
7043
|
-
"examplePrompts": [
|
|
7044
|
-
"Make this roof 300mm thick",
|
|
7045
|
-
"Set the roof slab thickness to 250",
|
|
7046
|
-
"Give the roof a 600 overhang",
|
|
7047
|
-
"Pull the roof overhang back to 0\n\n# Example\n```ts\nconst [roof] = await snaptrude.design.query.listRoofs()\nawait snaptrude.design.update.roof(roof, { overhang: 600 })\n```"
|
|
7048
|
-
],
|
|
7049
|
-
"argsType": "ComponentHandle",
|
|
7050
|
-
"resultType": "PluginDesignChangeResult"
|
|
7051
|
-
},
|
|
7052
|
-
{
|
|
7053
|
-
"path": "design.update.setBaseOffset",
|
|
7054
|
-
"namespace": "design.update",
|
|
7055
|
-
"summary": "Set a component's **base offset** — its vertical distance above its own storey's base level. Moves the component so its base lands at `storeyBase + offset`, composed over the same command-backed move machinery as {@linkcode setElevation} (undoable, persisted, per-type invariants kept in sync). Use this instead of {@linkcode setElevation} when you want an offset relative to the storey rather than an absolute world height. `offset` is in **engine units** (the `design.doors.setWidth` convention); `0` sits the base flush with the storey base. Re-applying the current offset is a no-op.",
|
|
7056
|
-
"examplePrompts": [
|
|
7057
|
-
"Lift this element 300 above its floor",
|
|
7058
|
-
"Set this staircase's base offset to 0",
|
|
7059
|
-
"Raise the selected mass 500 off the storey base",
|
|
7060
|
-
"Offset this slab 150 above the floor level\n\n# Example\n```ts\nconst [stair] = await snaptrude.design.query.listStaircases()\nawait snaptrude.design.update.setBaseOffset(stair, 0)\n```"
|
|
7061
|
-
],
|
|
7062
|
-
"argsType": "ComponentHandle",
|
|
7063
|
-
"resultType": "PluginDesignChangeResult"
|
|
7064
|
-
},
|
|
7065
|
-
{
|
|
7066
|
-
"path": "design.update.setElevation",
|
|
6049
|
+
"path": "design.update.setElevation",
|
|
7067
6050
|
"namespace": "design.update",
|
|
7068
6051
|
"summary": "Set a component's **absolute world elevation** — moves it vertically so its base (the bounding-box bottom, world Y) lands at `elevation`. Composed over the canonical command-backed move machinery, so it is undoable and persisted exactly like dragging the element up or down; per-type invariants (e.g. a staircase's base offset) stay in sync. `elevation` is in **engine units** (the `design.doors.setWidth` convention). Re-applying the current elevation is a no-op.",
|
|
7069
6052
|
"examplePrompts": [
|
|
@@ -7088,21 +6071,6 @@
|
|
|
7088
6071
|
"argsType": "ComponentHandle",
|
|
7089
6072
|
"resultType": "boolean"
|
|
7090
6073
|
},
|
|
7091
|
-
{
|
|
7092
|
-
"path": "design.update.setObjectType",
|
|
7093
|
-
"namespace": "design.update",
|
|
7094
|
-
"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.",
|
|
7095
|
-
"examplePrompts": [
|
|
7096
|
-
"Convert this mass into a wall",
|
|
7097
|
-
"Turn the sloped mass into a roof",
|
|
7098
|
-
"Make these masses real slabs",
|
|
7099
|
-
"Change the object type of the selection to wall",
|
|
7100
|
-
"Convert the wedge I built into a raked wall",
|
|
7101
|
-
"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```"
|
|
7102
|
-
],
|
|
7103
|
-
"argsType": "ComponentHandle[]",
|
|
7104
|
-
"resultType": "PluginDesignChangeResult"
|
|
7105
|
-
},
|
|
7106
6074
|
{
|
|
7107
6075
|
"path": "design.update.setStorey",
|
|
7108
6076
|
"namespace": "design.update",
|
|
@@ -7116,18 +6084,6 @@
|
|
|
7116
6084
|
"argsType": "ComponentHandle[]",
|
|
7117
6085
|
"resultType": "PluginDesignChangeResult"
|
|
7118
6086
|
},
|
|
7119
|
-
{
|
|
7120
|
-
"path": "design.update.siteEdge",
|
|
7121
|
-
"namespace": "design.update",
|
|
7122
|
-
"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.",
|
|
7123
|
-
"examplePrompts": [
|
|
7124
|
-
"Make edge 2 the front",
|
|
7125
|
-
"Set just the north edge setback to 8 m",
|
|
7126
|
-
"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```"
|
|
7127
|
-
],
|
|
7128
|
-
"argsType": "string",
|
|
7129
|
-
"resultType": "PluginDesignUpdateSiteEdgeResult"
|
|
7130
|
-
},
|
|
7131
6087
|
{
|
|
7132
6088
|
"path": "design.update.slab",
|
|
7133
6089
|
"namespace": "design.update",
|
|
@@ -7249,16 +6205,6 @@
|
|
|
7249
6205
|
"argsType": null,
|
|
7250
6206
|
"resultType": "PluginDesignChangeResult"
|
|
7251
6207
|
},
|
|
7252
|
-
{
|
|
7253
|
-
"path": "design.windows.checkPlacement",
|
|
7254
|
-
"namespace": "design.windows",
|
|
7255
|
-
"summary": "Trial the native host fit and geometry rebuild, then restore the model without publishing commands. The first result uses the creation options; subsequent results use candidateWidths in input order. Widths are authored parameters, not physical envelopes or a guaranteed maximum width. No catalog save, history entry or model persistence occurs. Rerun after model edits. A failed fit leaves cut unverified. Family-host cuts are also unverified: their rebuild cannot supply a reversible, authoritative trial result. Material clearance checks evaluated parts against physical neighbours across hosts. The intended host uses native fit/cut checks. Creation repeats clearance immediately before placement; this report grants no later approval. Editing permission is required; locked hosts and an active opening tool reject. A requested width/height on a family sized by its Type (Custom Sizes off) picks the Type within 25 mm, else turns Custom Sizes on; each result's `sizing` says which. Creation (`design.create.window(s)`) applies the same rule, so the size you pass is the size built.",
|
|
7256
|
-
"examplePrompts": [
|
|
7257
|
-
"Check whether this window fits and its host can be cut"
|
|
7258
|
-
],
|
|
7259
|
-
"argsType": "PluginOpeningPlacementArgs",
|
|
7260
|
-
"resultType": "PluginOpeningPlacementResult"
|
|
7261
|
-
},
|
|
7262
6208
|
{
|
|
7263
6209
|
"path": "design.windows.exists",
|
|
7264
6210
|
"namespace": "design.windows",
|
|
@@ -7288,7 +6234,7 @@
|
|
|
7288
6234
|
{
|
|
7289
6235
|
"path": "design.windows.getDimensions",
|
|
7290
6236
|
"namespace": "design.windows",
|
|
7291
|
-
"summary": "Get
|
|
6237
|
+
"summary": "Get a window's full dimensions in one call — width along the wall, vertical height, and thickness through the wall — measured in the window's local oriented space.",
|
|
7292
6238
|
"examplePrompts": [
|
|
7293
6239
|
"What are the dimensions of this window?",
|
|
7294
6240
|
"How big is the selected window?",
|
|
@@ -7794,7 +6740,7 @@
|
|
|
7794
6740
|
"Add a red arrow from the title to the plan view",
|
|
7795
6741
|
"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```"
|
|
7796
6742
|
],
|
|
7797
|
-
"argsType": "string
|
|
6743
|
+
"argsType": "string",
|
|
7798
6744
|
"resultType": "PluginPresentationAnnotateResult"
|
|
7799
6745
|
},
|
|
7800
6746
|
{
|
|
@@ -7806,7 +6752,7 @@
|
|
|
7806
6752
|
"Put a yellow note on the cover sheet",
|
|
7807
6753
|
"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```"
|
|
7808
6754
|
],
|
|
7809
|
-
"argsType": "string
|
|
6755
|
+
"argsType": "string",
|
|
7810
6756
|
"resultType": "PluginPresentationAnnotateResult"
|
|
7811
6757
|
},
|
|
7812
6758
|
{
|
|
@@ -7818,7 +6764,7 @@
|
|
|
7818
6764
|
"Add a red rectangle highlight to the sheet",
|
|
7819
6765
|
"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```"
|
|
7820
6766
|
],
|
|
7821
|
-
"argsType": "string
|
|
6767
|
+
"argsType": "string",
|
|
7822
6768
|
"resultType": "PluginPresentationAnnotateResult"
|
|
7823
6769
|
},
|
|
7824
6770
|
{
|
|
@@ -7831,72 +6777,8 @@
|
|
|
7831
6777
|
"Caption this view with \"Proposed layout\"",
|
|
7832
6778
|
"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```"
|
|
7833
6779
|
],
|
|
7834
|
-
"argsType": "string | undefined",
|
|
7835
|
-
"resultType": "PluginPresentationAnnotateTextResult"
|
|
7836
|
-
},
|
|
7837
|
-
{
|
|
7838
|
-
"path": "presentation.camera.capture",
|
|
7839
|
-
"namespace": "presentation.camera",
|
|
7840
|
-
"summary": "Screenshot what the Present canvas currently shows.",
|
|
7841
|
-
"examplePrompts": [
|
|
7842
|
-
"Take a screenshot of the Present canvas",
|
|
7843
|
-
"Capture what I am looking at in Present mode",
|
|
7844
|
-
"Screenshot the presentation canvas as a JPEG",
|
|
7845
|
-
"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```"
|
|
7846
|
-
],
|
|
7847
|
-
"argsType": "{\n format?: PluginPresentationImageFormat\n pixelRatio?: number\n }",
|
|
7848
|
-
"resultType": "PluginPresentationCameraCaptureResult"
|
|
7849
|
-
},
|
|
7850
|
-
{
|
|
7851
|
-
"path": "presentation.camera.get",
|
|
7852
|
-
"namespace": "presentation.camera",
|
|
7853
|
-
"summary": "Read the Present camera: pan, zoom, the visible page-space rectangle and the sheet under the centre of the view.",
|
|
7854
|
-
"examplePrompts": [
|
|
7855
|
-
"Where is the Present canvas camera?",
|
|
7856
|
-
"What zoom level is Present mode at?",
|
|
7857
|
-
"Which sheet is on screen right now?",
|
|
7858
|
-
"Read the visible area of the presentation canvas\n\n# Example\n```ts\nconst { zoom, sheetId } = await snaptrude.presentation.camera.get()\n```"
|
|
7859
|
-
],
|
|
7860
|
-
"argsType": null,
|
|
7861
|
-
"resultType": "PluginPresentationCameraState"
|
|
7862
|
-
},
|
|
7863
|
-
{
|
|
7864
|
-
"path": "presentation.camera.set",
|
|
7865
|
-
"namespace": "presentation.camera",
|
|
7866
|
-
"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.",
|
|
7867
|
-
"examplePrompts": [
|
|
7868
|
-
"Zoom the Present canvas to 50%",
|
|
7869
|
-
"Pan the presentation canvas to the right",
|
|
7870
|
-
"Restore the Present camera I saved earlier",
|
|
7871
|
-
"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```"
|
|
7872
|
-
],
|
|
7873
|
-
"argsType": "{\n x?: number\n y?: number\n zoom?: number\n }",
|
|
7874
|
-
"resultType": "PluginPresentationCameraState"
|
|
7875
|
-
},
|
|
7876
|
-
{
|
|
7877
|
-
"path": "presentation.camera.zoomTo",
|
|
7878
|
-
"namespace": "presentation.camera",
|
|
7879
|
-
"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.",
|
|
7880
|
-
"examplePrompts": [
|
|
7881
|
-
"Zoom in on sheet 2 in Present mode",
|
|
7882
|
-
"Frame this placed view on the Present canvas",
|
|
7883
|
-
"Go to the cover sheet and screenshot it",
|
|
7884
|
-
"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```"
|
|
7885
|
-
],
|
|
7886
6780
|
"argsType": "string",
|
|
7887
|
-
"resultType": "
|
|
7888
|
-
},
|
|
7889
|
-
{
|
|
7890
|
-
"path": "presentation.camera.zoomToFit",
|
|
7891
|
-
"namespace": "presentation.camera",
|
|
7892
|
-
"summary": "Frame everything on the Present canvas — every sheet and loose shape — the Present-mode \"zoom to fit\". View-state only — not undoable.",
|
|
7893
|
-
"examplePrompts": [
|
|
7894
|
-
"Zoom out to see all the sheets",
|
|
7895
|
-
"Fit the whole presentation in the Present view",
|
|
7896
|
-
"Zoom to fit in Present mode\n\n# Example\n```ts\nawait snaptrude.presentation.camera.zoomToFit()\n```"
|
|
7897
|
-
],
|
|
7898
|
-
"argsType": null,
|
|
7899
|
-
"resultType": "PluginPresentationCameraState"
|
|
6781
|
+
"resultType": "PluginPresentationAnnotateTextResult"
|
|
7900
6782
|
},
|
|
7901
6783
|
{
|
|
7902
6784
|
"path": "presentation.diagrams.generateProgram",
|
|
@@ -7934,413 +6816,20 @@
|
|
|
7934
6816
|
"argsType": "string",
|
|
7935
6817
|
"resultType": "PluginPresentationDiagramsPlaceResult"
|
|
7936
6818
|
},
|
|
7937
|
-
{
|
|
7938
|
-
"path": "presentation.drawings.applyPreset",
|
|
7939
|
-
"namespace": "presentation.drawings",
|
|
7940
|
-
"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`.",
|
|
7941
|
-
"examplePrompts": [
|
|
7942
|
-
"Apply the presentation plan preset to this drawing",
|
|
7943
|
-
"Use the Planning Issue style on every plan drawing",
|
|
7944
|
-
"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```"
|
|
7945
|
-
],
|
|
7946
|
-
"argsType": "string",
|
|
7947
|
-
"resultType": "PluginDrawing"
|
|
7948
|
-
},
|
|
7949
|
-
{
|
|
7950
|
-
"path": "presentation.drawings.copy",
|
|
7951
|
-
"namespace": "presentation.drawings",
|
|
7952
|
-
"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.",
|
|
7953
|
-
"examplePrompts": [
|
|
7954
|
-
"Duplicate this drawing",
|
|
7955
|
-
"Make a copy of the ground floor plan drawing",
|
|
7956
|
-
"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```"
|
|
7957
|
-
],
|
|
7958
|
-
"argsType": "string",
|
|
7959
|
-
"resultType": "PluginDrawing"
|
|
7960
|
-
},
|
|
7961
|
-
{
|
|
7962
|
-
"path": "presentation.drawings.create",
|
|
7963
|
-
"namespace": "presentation.drawings",
|
|
7964
|
-
"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`.",
|
|
7965
|
-
"examplePrompts": [
|
|
7966
|
-
"Create a drawing from the ground floor view",
|
|
7967
|
-
"Make a 1:100 plan drawing of level 2",
|
|
7968
|
-
"Draw the north elevation at 1/8\" = 1'",
|
|
7969
|
-
"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```"
|
|
7970
|
-
],
|
|
7971
|
-
"argsType": "string",
|
|
7972
|
-
"resultType": "PluginDrawing"
|
|
7973
|
-
},
|
|
7974
|
-
{
|
|
7975
|
-
"path": "presentation.drawings.delete",
|
|
7976
|
-
"namespace": "presentation.drawings",
|
|
7977
|
-
"summary": "Delete a drawing with its labels and annotations, as one Present undo step. The source saved view is not deleted.",
|
|
7978
|
-
"examplePrompts": [
|
|
7979
|
-
"Delete this drawing",
|
|
7980
|
-
"Remove the old elevation drawing from the canvas",
|
|
7981
|
-
"Get rid of the duplicate plan drawing\n\n# Example\n```ts\nawait snaptrude.presentation.drawings.delete(drawing.id)\n```"
|
|
7982
|
-
],
|
|
7983
|
-
"argsType": "string",
|
|
7984
|
-
"resultType": "void"
|
|
7985
|
-
},
|
|
7986
|
-
{
|
|
7987
|
-
"path": "presentation.drawings.export",
|
|
7988
|
-
"namespace": "presentation.drawings",
|
|
7989
|
-
"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.",
|
|
7990
|
-
"examplePrompts": [
|
|
7991
|
-
"Export this drawing as a PDF",
|
|
7992
|
-
"Download the ground floor plan drawing as an SVG",
|
|
7993
|
-
"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```"
|
|
7994
|
-
],
|
|
7995
|
-
"argsType": "string",
|
|
7996
|
-
"resultType": "PluginDrawingExportResult"
|
|
7997
|
-
},
|
|
7998
|
-
{
|
|
7999
|
-
"path": "presentation.drawings.get",
|
|
8000
|
-
"namespace": "presentation.drawings",
|
|
8001
|
-
"summary": "Read one drawing by its stable id.",
|
|
8002
|
-
"examplePrompts": [
|
|
8003
|
-
"Does the ground floor drawing still exist?",
|
|
8004
|
-
"What preset is this drawing using?",
|
|
8005
|
-
"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```"
|
|
8006
|
-
],
|
|
8007
|
-
"argsType": "string",
|
|
8008
|
-
"resultType": "PluginDrawing | null"
|
|
8009
|
-
},
|
|
8010
|
-
{
|
|
8011
|
-
"path": "presentation.drawings.getCapabilities",
|
|
8012
|
-
"namespace": "presentation.drawings",
|
|
8013
|
-
"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.",
|
|
8014
|
-
"examplePrompts": [
|
|
8015
|
-
"What editing capabilities does this drawing support?",
|
|
8016
|
-
"Can I apply a preset to this drawing?",
|
|
8017
|
-
"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```"
|
|
8018
|
-
],
|
|
8019
|
-
"argsType": "string",
|
|
8020
|
-
"resultType": "PluginDrawingCapabilities"
|
|
8021
|
-
},
|
|
8022
|
-
{
|
|
8023
|
-
"path": "presentation.drawings.getStatus",
|
|
8024
|
-
"namespace": "presentation.drawings",
|
|
8025
|
-
"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.",
|
|
8026
|
-
"examplePrompts": [
|
|
8027
|
-
"Is this drawing ready to export?",
|
|
8028
|
-
"Wait for the new drawing to finish generating",
|
|
8029
|
-
"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```"
|
|
8030
|
-
],
|
|
8031
|
-
"argsType": "string",
|
|
8032
|
-
"resultType": "PluginDrawingStatus"
|
|
8033
|
-
},
|
|
8034
|
-
{
|
|
8035
|
-
"path": "presentation.drawings.getStyles",
|
|
8036
|
-
"namespace": "presentation.drawings",
|
|
8037
|
-
"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).",
|
|
8038
|
-
"examplePrompts": [
|
|
8039
|
-
"Show the editable styles for this drawing",
|
|
8040
|
-
"What line weight are the walls drawn with?",
|
|
8041
|
-
"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```"
|
|
8042
|
-
],
|
|
8043
|
-
"argsType": "string",
|
|
8044
|
-
"resultType": "PluginDrawingStyles"
|
|
8045
|
-
},
|
|
8046
|
-
{
|
|
8047
|
-
"path": "presentation.drawings.labels.getLayout",
|
|
8048
|
-
"namespace": "presentation.drawings.labels",
|
|
8049
|
-
"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.",
|
|
8050
|
-
"examplePrompts": [
|
|
8051
|
-
"Check this drawing for overlapping labels",
|
|
8052
|
-
"Do all the room names fit on the ground floor drawing?",
|
|
8053
|
-
"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```"
|
|
8054
|
-
],
|
|
8055
|
-
"argsType": "string",
|
|
8056
|
-
"resultType": "PluginDrawingLabelLayout"
|
|
8057
|
-
},
|
|
8058
|
-
{
|
|
8059
|
-
"path": "presentation.drawings.labels.list",
|
|
8060
|
-
"namespace": "presentation.drawings.labels",
|
|
8061
|
-
"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.",
|
|
8062
|
-
"examplePrompts": [
|
|
8063
|
-
"List all labels in this drawing",
|
|
8064
|
-
"Which room labels are hidden on the ground floor drawing?",
|
|
8065
|
-
"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```"
|
|
8066
|
-
],
|
|
8067
|
-
"argsType": "string",
|
|
8068
|
-
"resultType": "PluginPlacedViewLabel[]"
|
|
8069
|
-
},
|
|
8070
|
-
{
|
|
8071
|
-
"path": "presentation.drawings.labels.move",
|
|
8072
|
-
"namespace": "presentation.drawings.labels",
|
|
8073
|
-
"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.",
|
|
8074
|
-
"examplePrompts": [
|
|
8075
|
-
"Move the Kitchen label up a little",
|
|
8076
|
-
"Put the living room name in the middle of the room",
|
|
8077
|
-
"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```"
|
|
8078
|
-
],
|
|
8079
|
-
"argsType": "string",
|
|
8080
|
-
"resultType": "PluginPlacedViewLabel"
|
|
8081
|
-
},
|
|
8082
|
-
{
|
|
8083
|
-
"path": "presentation.drawings.labels.place",
|
|
8084
|
-
"namespace": "presentation.drawings.labels",
|
|
8085
|
-
"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.",
|
|
8086
|
-
"examplePrompts": [
|
|
8087
|
-
"Place the labels that do not fit",
|
|
8088
|
-
"Pin the Kitchen label where it fits best",
|
|
8089
|
-
"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```"
|
|
8090
|
-
],
|
|
8091
|
-
"argsType": "string",
|
|
8092
|
-
"resultType": "boolean"
|
|
8093
|
-
},
|
|
8094
|
-
{
|
|
8095
|
-
"path": "presentation.drawings.labels.reset",
|
|
8096
|
-
"namespace": "presentation.drawings.labels",
|
|
8097
|
-
"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.",
|
|
8098
|
-
"examplePrompts": [
|
|
8099
|
-
"Reset the label positions on this drawing",
|
|
8100
|
-
"Undo all my label moves at every scale",
|
|
8101
|
-
"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```"
|
|
8102
|
-
],
|
|
8103
|
-
"argsType": "string",
|
|
8104
|
-
"resultType": "number"
|
|
8105
|
-
},
|
|
8106
|
-
{
|
|
8107
|
-
"path": "presentation.drawings.labels.setHidden",
|
|
8108
|
-
"namespace": "presentation.drawings.labels",
|
|
8109
|
-
"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.",
|
|
8110
|
-
"examplePrompts": [
|
|
8111
|
-
"Hide the Store label on this drawing",
|
|
8112
|
-
"Show the corridor label again",
|
|
8113
|
-
"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```"
|
|
8114
|
-
],
|
|
8115
|
-
"argsType": "string",
|
|
8116
|
-
"resultType": "PluginPlacedViewLabel"
|
|
8117
|
-
},
|
|
8118
|
-
{
|
|
8119
|
-
"path": "presentation.drawings.list",
|
|
8120
|
-
"namespace": "presentation.drawings",
|
|
8121
|
-
"summary": "List the drawings on the current Present page, loose or on sheets.",
|
|
8122
|
-
"examplePrompts": [
|
|
8123
|
-
"List all drawings in this presentation",
|
|
8124
|
-
"Which drawings are not on a sheet yet?",
|
|
8125
|
-
"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```"
|
|
8126
|
-
],
|
|
8127
|
-
"argsType": null,
|
|
8128
|
-
"resultType": "PluginDrawing[]"
|
|
8129
|
-
},
|
|
8130
|
-
{
|
|
8131
|
-
"path": "presentation.drawings.listFonts",
|
|
8132
|
-
"namespace": "presentation.drawings",
|
|
8133
|
-
"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.",
|
|
8134
|
-
"examplePrompts": [
|
|
8135
|
-
"Which fonts can I use for drawing labels?",
|
|
8136
|
-
"Is Inter available as a drawing font?",
|
|
8137
|
-
"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```"
|
|
8138
|
-
],
|
|
8139
|
-
"argsType": null,
|
|
8140
|
-
"resultType": "string[]"
|
|
8141
|
-
},
|
|
8142
|
-
{
|
|
8143
|
-
"path": "presentation.drawings.listPatterns",
|
|
8144
|
-
"namespace": "presentation.drawings",
|
|
8145
|
-
"summary": "List the hatch patterns the native pattern catalog offers. Use these ids in a style patch's `pattern.id` instead of inventing one.",
|
|
8146
|
-
"examplePrompts": [
|
|
8147
|
-
"What hatch patterns can I use?",
|
|
8148
|
-
"List the brick and concrete patterns",
|
|
8149
|
-
"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```"
|
|
8150
|
-
],
|
|
8151
|
-
"argsType": null,
|
|
8152
|
-
"resultType": "{ id: string; label: string; group: string }[]"
|
|
8153
|
-
},
|
|
8154
|
-
{
|
|
8155
|
-
"path": "presentation.drawings.rename",
|
|
8156
|
-
"namespace": "presentation.drawings",
|
|
8157
|
-
"summary": "Set the drawing's own title text. The source saved view keeps its name. One Present undo step.",
|
|
8158
|
-
"examplePrompts": [
|
|
8159
|
-
"Rename this drawing to Ground Floor Plan",
|
|
8160
|
-
"Change the title of the elevation drawing",
|
|
8161
|
-
"Call this drawing Level 2 General Arrangement\n\n# Example\n```ts\nawait snaptrude.presentation.drawings.rename(drawing.id, \"Ground Floor Plan\")\n```"
|
|
8162
|
-
],
|
|
8163
|
-
"argsType": "string",
|
|
8164
|
-
"resultType": "PluginDrawing"
|
|
8165
|
-
},
|
|
8166
|
-
{
|
|
8167
|
-
"path": "presentation.drawings.resetOverrides",
|
|
8168
|
-
"namespace": "presentation.drawings",
|
|
8169
|
-
"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.",
|
|
8170
|
-
"examplePrompts": [
|
|
8171
|
-
"Reset this drawing to its preset styles",
|
|
8172
|
-
"Undo my style changes on the ground floor plan",
|
|
8173
|
-
"Clear the overrides on this drawing\n\n# Example\n```ts\nawait snaptrude.presentation.drawings.resetOverrides(drawing.id)\n```"
|
|
8174
|
-
],
|
|
8175
|
-
"argsType": "string",
|
|
8176
|
-
"resultType": "PluginDrawing"
|
|
8177
|
-
},
|
|
8178
|
-
{
|
|
8179
|
-
"path": "presentation.drawings.setCrop",
|
|
8180
|
-
"namespace": "presentation.drawings",
|
|
8181
|
-
"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()`.",
|
|
8182
|
-
"examplePrompts": [
|
|
8183
|
-
"Crop this drawing to the left half",
|
|
8184
|
-
"Remove the crop from the site plan drawing",
|
|
8185
|
-
"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```"
|
|
8186
|
-
],
|
|
8187
|
-
"argsType": "string",
|
|
8188
|
-
"resultType": "PluginDrawing"
|
|
8189
|
-
},
|
|
8190
|
-
{
|
|
8191
|
-
"path": "presentation.drawings.setScale",
|
|
8192
|
-
"namespace": "presentation.drawings",
|
|
8193
|
-
"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()`.",
|
|
8194
|
-
"examplePrompts": [
|
|
8195
|
-
"Set this drawing to 1:50",
|
|
8196
|
-
"Change the plan drawing scale to 1/4\" = 1'",
|
|
8197
|
-
"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```"
|
|
8198
|
-
],
|
|
8199
|
-
"argsType": "string",
|
|
8200
|
-
"resultType": "PluginDrawing"
|
|
8201
|
-
},
|
|
8202
|
-
{
|
|
8203
|
-
"path": "presentation.drawings.updateContent",
|
|
8204
|
-
"namespace": "presentation.drawings",
|
|
8205
|
-
"summary": "Regenerate one to 100 drawings from their source views, after the model or the view changed. Waits for the update to finish.",
|
|
8206
|
-
"examplePrompts": [
|
|
8207
|
-
"Update this drawing with my latest model changes",
|
|
8208
|
-
"Refresh all the drawings",
|
|
8209
|
-
"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```"
|
|
8210
|
-
],
|
|
8211
|
-
"argsType": "string[]",
|
|
8212
|
-
"resultType": "{ drawingId: string; updated: boolean }[]"
|
|
8213
|
-
},
|
|
8214
|
-
{
|
|
8215
|
-
"path": "presentation.drawings.updateStyles",
|
|
8216
|
-
"namespace": "presentation.drawings",
|
|
8217
|
-
"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.",
|
|
8218
|
-
"examplePrompts": [
|
|
8219
|
-
"Make the walls on this drawing thicker",
|
|
8220
|
-
"Fill the rooms at 60% opacity with a larger hatch",
|
|
8221
|
-
"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```"
|
|
8222
|
-
],
|
|
8223
|
-
"argsType": "string",
|
|
8224
|
-
"resultType": "PluginDrawingStyles"
|
|
8225
|
-
},
|
|
8226
6819
|
{
|
|
8227
6820
|
"path": "presentation.export",
|
|
8228
6821
|
"namespace": "presentation",
|
|
8229
|
-
"summary": "Export the presentation's layout sheets to a downloadable file (PDF / PNG / JPG)
|
|
6822
|
+
"summary": "Export the presentation's layout sheets to a downloadable file (PDF / PNG / JPG) and return the encoded bytes as base64. Wraps the Present-mode Export dialog pipeline headlessly. Requires Present mode to be open.",
|
|
8230
6823
|
"examplePrompts": [
|
|
8231
6824
|
"Export the presentation as a PDF",
|
|
8232
6825
|
"Download all sheets as a single PDF",
|
|
8233
6826
|
"Export sheet 1 as a PNG",
|
|
8234
6827
|
"Save the presentation sheets as JPG images",
|
|
8235
|
-
"Export these sheets to PDF at high resolution\n\n# Example\n```ts\nconst { files } = await snaptrude.presentation.export(\"pdf\")\
|
|
6828
|
+
"Export these sheets to PDF at high resolution\n\n# Example\n```ts\nconst { files } = await snaptrude.presentation.export(\"pdf\")\n```"
|
|
8236
6829
|
],
|
|
8237
6830
|
"argsType": "PluginPresentationExportFormat",
|
|
8238
6831
|
"resultType": "PluginPresentationExportResult"
|
|
8239
6832
|
},
|
|
8240
|
-
{
|
|
8241
|
-
"path": "presentation.export",
|
|
8242
|
-
"namespace": "presentation",
|
|
8243
|
-
"summary": "",
|
|
8244
|
-
"examplePrompts": [],
|
|
8245
|
-
"argsType": "PluginPresentationExportFormat",
|
|
8246
|
-
"resultType": "PluginPresentationExportDownloadResult"
|
|
8247
|
-
},
|
|
8248
|
-
{
|
|
8249
|
-
"path": "presentation.export",
|
|
8250
|
-
"namespace": "presentation",
|
|
8251
|
-
"summary": "",
|
|
8252
|
-
"examplePrompts": [],
|
|
8253
|
-
"argsType": "PluginPresentationExportFormat",
|
|
8254
|
-
"resultType": "PluginPresentationExportResult | PluginPresentationExportDownloadResult"
|
|
8255
|
-
},
|
|
8256
|
-
{
|
|
8257
|
-
"path": "presentation.graphics.disableThinLines",
|
|
8258
|
-
"namespace": "presentation.graphics",
|
|
8259
|
-
"summary": "Disable the viewer's Thin Lines preference. No model save, undo or peer change.",
|
|
8260
|
-
"examplePrompts": [],
|
|
8261
|
-
"argsType": null,
|
|
8262
|
-
"resultType": "boolean"
|
|
8263
|
-
},
|
|
8264
|
-
{
|
|
8265
|
-
"path": "presentation.graphics.enableThinLines",
|
|
8266
|
-
"namespace": "presentation.graphics",
|
|
8267
|
-
"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.",
|
|
8268
|
-
"examplePrompts": [],
|
|
8269
|
-
"argsType": null,
|
|
8270
|
-
"resultType": "boolean"
|
|
8271
|
-
},
|
|
8272
|
-
{
|
|
8273
|
-
"path": "presentation.graphics.get",
|
|
8274
|
-
"namespace": "presentation.graphics",
|
|
8275
|
-
"summary": "Read a view's scale denominator, detail and category overrides.",
|
|
8276
|
-
"examplePrompts": [
|
|
8277
|
-
"What scale is this plan drawn at?"
|
|
8278
|
-
],
|
|
8279
|
-
"argsType": "PluginGraphicsViewId",
|
|
8280
|
-
"resultType": "PluginViewGraphics | null"
|
|
8281
|
-
},
|
|
8282
|
-
{
|
|
8283
|
-
"path": "presentation.graphics.isEnabled",
|
|
8284
|
-
"namespace": "presentation.graphics",
|
|
8285
|
-
"summary": "Whether Paper Pens is enabled on this viewer. Never changes the feature flag.",
|
|
8286
|
-
"examplePrompts": [],
|
|
8287
|
-
"argsType": null,
|
|
8288
|
-
"resultType": "boolean"
|
|
8289
|
-
},
|
|
8290
|
-
{
|
|
8291
|
-
"path": "presentation.graphics.isThinLinesEnabled",
|
|
8292
|
-
"namespace": "presentation.graphics",
|
|
8293
|
-
"summary": "Read the remembered Thin Lines preference. A disabled feature or capture suspension can make the renderer ignore a true preference temporarily.",
|
|
8294
|
-
"examplePrompts": [],
|
|
8295
|
-
"argsType": null,
|
|
8296
|
-
"resultType": "boolean"
|
|
8297
|
-
},
|
|
8298
|
-
{
|
|
8299
|
-
"path": "presentation.graphics.listScales",
|
|
8300
|
-
"namespace": "presentation.graphics",
|
|
8301
|
-
"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.",
|
|
8302
|
-
"examplePrompts": [],
|
|
8303
|
-
"argsType": "PluginGraphicsViewId",
|
|
8304
|
-
"resultType": "PluginGraphicsScaleOption[]"
|
|
8305
|
-
},
|
|
8306
|
-
{
|
|
8307
|
-
"path": "presentation.graphics.reset",
|
|
8308
|
-
"namespace": "presentation.graphics",
|
|
8309
|
-
"summary": "Clear one category or all category overrides, as one saved undoable step. The view's scale and detail level are preserved.",
|
|
8310
|
-
"examplePrompts": [],
|
|
8311
|
-
"argsType": "PluginGraphicsResetOptions",
|
|
8312
|
-
"resultType": "PluginViewGraphics"
|
|
8313
|
-
},
|
|
8314
|
-
{
|
|
8315
|
-
"path": "presentation.graphics.setDetailLevel",
|
|
8316
|
-
"namespace": "presentation.graphics",
|
|
8317
|
-
"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.",
|
|
8318
|
-
"examplePrompts": [
|
|
8319
|
-
"Show this plan in Fine detail"
|
|
8320
|
-
],
|
|
8321
|
-
"argsType": "PluginGraphicsDetailLevel",
|
|
8322
|
-
"resultType": "PluginViewGraphics"
|
|
8323
|
-
},
|
|
8324
|
-
{
|
|
8325
|
-
"path": "presentation.graphics.setScale",
|
|
8326
|
-
"namespace": "presentation.graphics",
|
|
8327
|
-
"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.",
|
|
8328
|
-
"examplePrompts": [
|
|
8329
|
-
"Set this plan to 1:50"
|
|
8330
|
-
],
|
|
8331
|
-
"argsType": "number",
|
|
8332
|
-
"resultType": "PluginViewGraphics"
|
|
8333
|
-
},
|
|
8334
|
-
{
|
|
8335
|
-
"path": "presentation.graphics.update",
|
|
8336
|
-
"namespace": "presentation.graphics",
|
|
8337
|
-
"summary": "Change only supplied category fields, as one saved and undoable step. Does not edit project standards. Requires a saved view.",
|
|
8338
|
-
"examplePrompts": [
|
|
8339
|
-
"Halftone the furniture in this view"
|
|
8340
|
-
],
|
|
8341
|
-
"argsType": "PluginGraphicsOverrides",
|
|
8342
|
-
"resultType": "PluginViewGraphics"
|
|
8343
|
-
},
|
|
8344
6833
|
{
|
|
8345
6834
|
"path": "presentation.import.image",
|
|
8346
6835
|
"namespace": "presentation.import",
|
|
@@ -8606,7 +7095,7 @@
|
|
|
8606
7095
|
{
|
|
8607
7096
|
"path": "presentation.placedViews.setScale",
|
|
8608
7097
|
"namespace": "presentation.placedViews",
|
|
8609
|
-
"summary": "Set a placed view's architectural scale.
|
|
7098
|
+
"summary": "Set a placed view's architectural scale.",
|
|
8610
7099
|
"examplePrompts": [
|
|
8611
7100
|
"Set the plan to 1:100",
|
|
8612
7101
|
"Change the placed floor plan to 1:50 scale",
|
|
@@ -8641,99 +7130,6 @@
|
|
|
8641
7130
|
"argsType": "string",
|
|
8642
7131
|
"resultType": "PluginPlacedViewCategoryStyles"
|
|
8643
7132
|
},
|
|
8644
|
-
{
|
|
8645
|
-
"path": "presentation.sections.create",
|
|
8646
|
-
"namespace": "presentation.sections",
|
|
8647
|
-
"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.",
|
|
8648
|
-
"examplePrompts": [
|
|
8649
|
-
"Cut a section through the middle of the building, east to west",
|
|
8650
|
-
"Add a section across the stair core",
|
|
8651
|
-
"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```"
|
|
8652
|
-
],
|
|
8653
|
-
"argsType": "PluginSectionPoint",
|
|
8654
|
-
"resultType": "PluginSection"
|
|
8655
|
-
},
|
|
8656
|
-
{
|
|
8657
|
-
"path": "presentation.sections.delete",
|
|
8658
|
-
"namespace": "presentation.sections",
|
|
8659
|
-
"summary": "Delete a section. Closes its view first if it is open. Write-gated; one undo step.",
|
|
8660
|
-
"examplePrompts": [
|
|
8661
|
-
"Delete Section B\n\n# Example\n```ts\nawait snaptrude.presentation.sections.delete(sectionId)\n```"
|
|
8662
|
-
],
|
|
8663
|
-
"argsType": "string",
|
|
8664
|
-
"resultType": "boolean"
|
|
8665
|
-
},
|
|
8666
|
-
{
|
|
8667
|
-
"path": "presentation.sections.get",
|
|
8668
|
-
"namespace": "presentation.sections",
|
|
8669
|
-
"summary": "Get one section by id.",
|
|
8670
|
-
"examplePrompts": [
|
|
8671
|
-
"Where does Section A run?",
|
|
8672
|
-
"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```"
|
|
8673
|
-
],
|
|
8674
|
-
"argsType": "string",
|
|
8675
|
-
"resultType": "PluginSection | null"
|
|
8676
|
-
},
|
|
8677
|
-
{
|
|
8678
|
-
"path": "presentation.sections.getActive",
|
|
8679
|
-
"namespace": "presentation.sections",
|
|
8680
|
-
"summary": "Get the section whose view is open.",
|
|
8681
|
-
"examplePrompts": [
|
|
8682
|
-
"Which section am I looking at?\n\n# Example\n```ts\nconst open = await snaptrude.presentation.sections.getActive()\n```"
|
|
8683
|
-
],
|
|
8684
|
-
"argsType": null,
|
|
8685
|
-
"resultType": "PluginSection | null"
|
|
8686
|
-
},
|
|
8687
|
-
{
|
|
8688
|
-
"path": "presentation.sections.getCut",
|
|
8689
|
-
"namespace": "presentation.sections",
|
|
8690
|
-
"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.",
|
|
8691
|
-
"examplePrompts": [
|
|
8692
|
-
"Which walls does Section A cut?",
|
|
8693
|
-
"How thick is the slab where the section crosses it?",
|
|
8694
|
-
"Does this section go through the stair?",
|
|
8695
|
-
"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```"
|
|
8696
|
-
],
|
|
8697
|
-
"argsType": "string",
|
|
8698
|
-
"resultType": "PluginSectionCut"
|
|
8699
|
-
},
|
|
8700
|
-
{
|
|
8701
|
-
"path": "presentation.sections.list",
|
|
8702
|
-
"namespace": "presentation.sections",
|
|
8703
|
-
"summary": "List the project's sections, in Views panel order.",
|
|
8704
|
-
"examplePrompts": [
|
|
8705
|
-
"Which sections are there?",
|
|
8706
|
-
"List the section lines in this project",
|
|
8707
|
-
"Is there a section through the stair?\n\n# Example\n```ts\nconst sections = await snaptrude.presentation.sections.list()\n```"
|
|
8708
|
-
],
|
|
8709
|
-
"argsType": null,
|
|
8710
|
-
"resultType": "PluginSection[]"
|
|
8711
|
-
},
|
|
8712
|
-
{
|
|
8713
|
-
"path": "presentation.sections.setActive",
|
|
8714
|
-
"namespace": "presentation.sections",
|
|
8715
|
-
"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.",
|
|
8716
|
-
"examplePrompts": [
|
|
8717
|
-
"Open Section A",
|
|
8718
|
-
"Show me the section through the atrium",
|
|
8719
|
-
"Close the section view\n\n# Example\n```ts\nawait snaptrude.presentation.sections.setActive(section.sectionId)\nawait snaptrude.presentation.sections.setActive(null)\n```"
|
|
8720
|
-
],
|
|
8721
|
-
"argsType": "string | null",
|
|
8722
|
-
"resultType": "PluginSection | null"
|
|
8723
|
-
},
|
|
8724
|
-
{
|
|
8725
|
-
"path": "presentation.sections.update",
|
|
8726
|
-
"namespace": "presentation.sections",
|
|
8727
|
-
"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.",
|
|
8728
|
-
"examplePrompts": [
|
|
8729
|
-
"Make Section A look the other way",
|
|
8730
|
-
"Only show the ground floor in this section",
|
|
8731
|
-
"Rename the section to \"Through atrium\"",
|
|
8732
|
-
"Move the section line 5 m north\n\n# Example\n```ts\nawait snaptrude.presentation.sections.update(sectionId, {\nisFlipped: true,\ndepth: 60,\n})\n```"
|
|
8733
|
-
],
|
|
8734
|
-
"argsType": "string",
|
|
8735
|
-
"resultType": "PluginSection"
|
|
8736
|
-
},
|
|
8737
7133
|
{
|
|
8738
7134
|
"path": "presentation.shapes.list",
|
|
8739
7135
|
"namespace": "presentation.shapes",
|
|
@@ -8836,31 +7232,17 @@
|
|
|
8836
7232
|
{
|
|
8837
7233
|
"path": "presentation.sheets.place",
|
|
8838
7234
|
"namespace": "presentation.sheets",
|
|
8839
|
-
"summary": "Place a saved view onto a sheet.
|
|
7235
|
+
"summary": "Place a saved view onto a sheet.",
|
|
8840
7236
|
"examplePrompts": [
|
|
8841
7237
|
"Place the floor plan on Sheet 1",
|
|
8842
7238
|
"Add this 3D view to the cover sheet",
|
|
8843
7239
|
"Drop the site plan onto the layout sheet at 100, 200",
|
|
8844
7240
|
"Put the Ground Floor view on sheet_1 at 1:100 scale",
|
|
8845
|
-
"Place the plan on the cover sheet at quarter-inch scale",
|
|
8846
|
-
"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```"
|
|
7241
|
+
"Place the plan on the cover sheet at quarter-inch scale\n\n# Example\n```ts\nconst { shapeId } = await snaptrude.presentation.sheets.place(\"sheet_1\", \"view_123\", {\nscale: 100, // 1:100 (metric project)\n})\n```"
|
|
8847
7242
|
],
|
|
8848
7243
|
"argsType": "string",
|
|
8849
7244
|
"resultType": "PluginPresentationSheetsPlaceResult"
|
|
8850
7245
|
},
|
|
8851
|
-
{
|
|
8852
|
-
"path": "presentation.sheets.placeDrawing",
|
|
8853
|
-
"namespace": "presentation.sheets",
|
|
8854
|
-
"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).",
|
|
8855
|
-
"examplePrompts": [
|
|
8856
|
-
"Move this drawing onto the cover sheet",
|
|
8857
|
-
"Place drawing_1 at the center of sheet_2",
|
|
8858
|
-
"Put the level 2 plan drawing on the Level 2 Plan sheet",
|
|
8859
|
-
"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```"
|
|
8860
|
-
],
|
|
8861
|
-
"argsType": "string",
|
|
8862
|
-
"resultType": "PluginPresentationSheetsPlaceDrawingResult"
|
|
8863
|
-
},
|
|
8864
7246
|
{
|
|
8865
7247
|
"path": "presentation.sheets.rename",
|
|
8866
7248
|
"namespace": "presentation.sheets",
|
|
@@ -8971,62 +7353,6 @@
|
|
|
8971
7353
|
"argsType": null,
|
|
8972
7354
|
"resultType": "PluginPresentationSlideshowState"
|
|
8973
7355
|
},
|
|
8974
|
-
{
|
|
8975
|
-
"path": "presentation.standards.export",
|
|
8976
|
-
"namespace": "presentation.standards",
|
|
8977
|
-
"summary": "Serialize the native standard-file format. No browser download or save. The file includes its stock/version and stores widths in paper mm.",
|
|
8978
|
-
"examplePrompts": [
|
|
8979
|
-
"Export the line standard"
|
|
8980
|
-
],
|
|
8981
|
-
"argsType": null,
|
|
8982
|
-
"resultType": "string"
|
|
8983
|
-
},
|
|
8984
|
-
{
|
|
8985
|
-
"path": "presentation.standards.get",
|
|
8986
|
-
"namespace": "presentation.standards",
|
|
8987
|
-
"summary": "Read the stored sparse standard; omitted fields inherit stock values.",
|
|
8988
|
-
"examplePrompts": [],
|
|
8989
|
-
"argsType": null,
|
|
8990
|
-
"resultType": "PluginGraphicStandard"
|
|
8991
|
-
},
|
|
8992
|
-
{
|
|
8993
|
-
"path": "presentation.standards.getResolved",
|
|
8994
|
-
"namespace": "presentation.standards",
|
|
8995
|
-
"summary": "Read the actual native resolution, including applicable view overrides. No camera, view, preference or project data changes.",
|
|
8996
|
-
"examplePrompts": [
|
|
8997
|
-
"How thick are the wall cut lines at 1:50?"
|
|
8998
|
-
],
|
|
8999
|
-
"argsType": "PluginGraphicStandardResolveOptions",
|
|
9000
|
-
"resultType": "PluginResolvedGraphicStandard | null"
|
|
9001
|
-
},
|
|
9002
|
-
{
|
|
9003
|
-
"path": "presentation.standards.import",
|
|
9004
|
-
"namespace": "presentation.standards",
|
|
9005
|
-
"summary": "Import native standard-file JSON exactly as the dialog does, replacing the project standard in one saved undo step. Never edits team preferences.",
|
|
9006
|
-
"examplePrompts": [
|
|
9007
|
-
"Match the line weights in this standard file"
|
|
9008
|
-
],
|
|
9009
|
-
"argsType": "string",
|
|
9010
|
-
"resultType": "PluginGraphicStandard"
|
|
9011
|
-
},
|
|
9012
|
-
{
|
|
9013
|
-
"path": "presentation.standards.reset",
|
|
9014
|
-
"namespace": "presentation.standards",
|
|
9015
|
-
"summary": "Reset an editable tab, or all tabs, through the native reset functions. One saved undo step; stock retention/pruning follows the native commit.",
|
|
9016
|
-
"examplePrompts": [],
|
|
9017
|
-
"argsType": "PluginGraphicStandardTab",
|
|
9018
|
-
"resultType": "PluginGraphicStandard"
|
|
9019
|
-
},
|
|
9020
|
-
{
|
|
9021
|
-
"path": "presentation.standards.update",
|
|
9022
|
-
"namespace": "presentation.standards",
|
|
9023
|
-
"summary": "Apply only supplied fields as one saved, undoable native commit. Validate the whole patch first; invalid fields never leave a partial edit behind.",
|
|
9024
|
-
"examplePrompts": [
|
|
9025
|
-
"Make wall cut lines heavier throughout the project"
|
|
9026
|
-
],
|
|
9027
|
-
"argsType": "PluginGraphicStandardPatch",
|
|
9028
|
-
"resultType": "PluginGraphicStandard"
|
|
9029
|
-
},
|
|
9030
7356
|
{
|
|
9031
7357
|
"path": "presentation.tables.place",
|
|
9032
7358
|
"namespace": "presentation.tables",
|
|
@@ -9040,90 +7366,6 @@
|
|
|
9040
7366
|
"argsType": "string",
|
|
9041
7367
|
"resultType": "PluginCanvasShape"
|
|
9042
7368
|
},
|
|
9043
|
-
{
|
|
9044
|
-
"path": "presentation.viewPresets.copy",
|
|
9045
|
-
"namespace": "presentation.viewPresets",
|
|
9046
|
-
"summary": "Duplicate a preset under a native-generated unique name. Drawing bindings do not change. Not undoable (catalog write). Built-ins can be copied.",
|
|
9047
|
-
"examplePrompts": [
|
|
9048
|
-
"Duplicate this preset",
|
|
9049
|
-
"Make an editable copy of the built-in preset",
|
|
9050
|
-
"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```"
|
|
9051
|
-
],
|
|
9052
|
-
"argsType": "string",
|
|
9053
|
-
"resultType": "PluginViewPreset"
|
|
9054
|
-
},
|
|
9055
|
-
{
|
|
9056
|
-
"path": "presentation.viewPresets.create",
|
|
9057
|
-
"namespace": "presentation.viewPresets",
|
|
9058
|
-
"summary": "Save a kernel-plan drawing's effective styles as a new custom preset and bind that drawing to it. Not undoable (catalog write).",
|
|
9059
|
-
"examplePrompts": [
|
|
9060
|
-
"Save this drawing's styles as a new preset",
|
|
9061
|
-
"Make a preset called Planning Issue from this plan",
|
|
9062
|
-
"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```"
|
|
9063
|
-
],
|
|
9064
|
-
"argsType": "string",
|
|
9065
|
-
"resultType": "PluginViewPreset"
|
|
9066
|
-
},
|
|
9067
|
-
{
|
|
9068
|
-
"path": "presentation.viewPresets.delete",
|
|
9069
|
-
"namespace": "presentation.viewPresets",
|
|
9070
|
-
"summary": "Delete a custom preset and rebind its drawings to another existing preset. Built-ins cannot be deleted. Not undoable (catalog write).",
|
|
9071
|
-
"examplePrompts": [
|
|
9072
|
-
"Delete this preset",
|
|
9073
|
-
"Remove the old style preset and switch its drawings to the default",
|
|
9074
|
-
"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```"
|
|
9075
|
-
],
|
|
9076
|
-
"argsType": "string",
|
|
9077
|
-
"resultType": "void"
|
|
9078
|
-
},
|
|
9079
|
-
{
|
|
9080
|
-
"path": "presentation.viewPresets.get",
|
|
9081
|
-
"namespace": "presentation.viewPresets",
|
|
9082
|
-
"summary": "Read one preset by id.",
|
|
9083
|
-
"examplePrompts": [
|
|
9084
|
-
"Which preset is this drawing using?",
|
|
9085
|
-
"Is this preset a built-in one?",
|
|
9086
|
-
"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```"
|
|
9087
|
-
],
|
|
9088
|
-
"argsType": "string",
|
|
9089
|
-
"resultType": "PluginViewPreset | null"
|
|
9090
|
-
},
|
|
9091
|
-
{
|
|
9092
|
-
"path": "presentation.viewPresets.list",
|
|
9093
|
-
"namespace": "presentation.viewPresets",
|
|
9094
|
-
"summary": "List the preset catalog: built-ins first, then custom presets by name.",
|
|
9095
|
-
"examplePrompts": [
|
|
9096
|
-
"List the available drawing style presets",
|
|
9097
|
-
"Which custom presets does this presentation have?",
|
|
9098
|
-
"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```"
|
|
9099
|
-
],
|
|
9100
|
-
"argsType": null,
|
|
9101
|
-
"resultType": "PluginViewPreset[]"
|
|
9102
|
-
},
|
|
9103
|
-
{
|
|
9104
|
-
"path": "presentation.viewPresets.rename",
|
|
9105
|
-
"namespace": "presentation.viewPresets",
|
|
9106
|
-
"summary": "Rename a custom preset. Names must stay unique; built-ins cannot be renamed. Not undoable (catalog write).",
|
|
9107
|
-
"examplePrompts": [
|
|
9108
|
-
"Rename this preset to Client Review",
|
|
9109
|
-
"Call the copied preset Planning Issue B",
|
|
9110
|
-
"Change the name of my custom drawing style\n\n# Example\n```ts\nawait snaptrude.presentation.viewPresets.rename(preset.id, \"Client Review\")\n```"
|
|
9111
|
-
],
|
|
9112
|
-
"argsType": "string",
|
|
9113
|
-
"resultType": "PluginViewPreset"
|
|
9114
|
-
},
|
|
9115
|
-
{
|
|
9116
|
-
"path": "presentation.viewPresets.update",
|
|
9117
|
-
"namespace": "presentation.viewPresets",
|
|
9118
|
-
"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).",
|
|
9119
|
-
"examplePrompts": [
|
|
9120
|
-
"Update this preset from the current drawing styles",
|
|
9121
|
-
"Push my style changes to every drawing using this preset",
|
|
9122
|
-
"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```"
|
|
9123
|
-
],
|
|
9124
|
-
"argsType": "string",
|
|
9125
|
-
"resultType": "PluginViewPreset"
|
|
9126
|
-
},
|
|
9127
7369
|
{
|
|
9128
7370
|
"path": "presentation.views.capture",
|
|
9129
7371
|
"namespace": "presentation.views",
|
|
@@ -9195,9 +7437,7 @@
|
|
|
9195
7437
|
"What color mode is the Ground Floor view using?",
|
|
9196
7438
|
"Get the display settings for this view",
|
|
9197
7439
|
"Does the site plan view show axes and labels?",
|
|
9198
|
-
"Read the background color of the active view",
|
|
9199
|
-
"What is the cut height of this plan?",
|
|
9200
|
-
"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```"
|
|
7440
|
+
"Read the background color of the active view\n\n# Example\n```ts\nconst settings = await snaptrude.presentation.views.getSettings(\"view_123\")\nif (settings) console.log(settings.colorMode, settings.backgroundColor)\n```"
|
|
9201
7441
|
],
|
|
9202
7442
|
"argsType": "string",
|
|
9203
7443
|
"resultType": "PluginPresentationViewsGetSettingsResult"
|
|
@@ -9208,7 +7448,7 @@
|
|
|
9208
7448
|
"summary": "List the saved views in the active project.",
|
|
9209
7449
|
"examplePrompts": [
|
|
9210
7450
|
"List all the saved views",
|
|
9211
|
-
"What
|
|
7451
|
+
"What 2D and 3D views are in this project?",
|
|
9212
7452
|
"Which view is currently active?",
|
|
9213
7453
|
"Get the names of every presentation view",
|
|
9214
7454
|
"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```"
|
|
@@ -9251,240 +7491,11 @@
|
|
|
9251
7491
|
"Set the background of the active view to white",
|
|
9252
7492
|
"Show area labels on this view",
|
|
9253
7493
|
"Enable hidden-line mode for the section view",
|
|
9254
|
-
"Make the 3D view orthographic instead of perspective",
|
|
9255
|
-
"Raise the cut plane of the Ground Floor plan to 1.8 m",
|
|
9256
|
-
"Show the basement below in this plan",
|
|
9257
|
-
"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```"
|
|
7494
|
+
"Make the 3D view orthographic instead of perspective\n\n# Example\n```ts\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\ncolorMode: \"monochrome\",\nshowAxis: false,\n})\n// switch a 3D view to an isometric (orthographic) projection\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\nviewMode: \"isometric\",\n})\n```"
|
|
9258
7495
|
],
|
|
9259
7496
|
"argsType": "string",
|
|
9260
7497
|
"resultType": "PluginPresentationViewsUpdateSettingsResult"
|
|
9261
7498
|
},
|
|
9262
|
-
{
|
|
9263
|
-
"path": "presentation.walkthroughs.cancelJob",
|
|
9264
|
-
"namespace": "presentation.walkthroughs",
|
|
9265
|
-
"summary": "Cancel an export job. The recording stops and nothing is placed; a job that has already finished is returned unchanged. Write-gated.",
|
|
9266
|
-
"examplePrompts": [
|
|
9267
|
-
"Cancel the video export\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.cancelJob(jobId)\n```"
|
|
9268
|
-
],
|
|
9269
|
-
"argsType": "string",
|
|
9270
|
-
"resultType": "PluginWalkthroughExportJob"
|
|
9271
|
-
},
|
|
9272
|
-
{
|
|
9273
|
-
"path": "presentation.walkthroughs.capture",
|
|
9274
|
-
"namespace": "presentation.walkthroughs",
|
|
9275
|
-
"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.",
|
|
9276
|
-
"examplePrompts": [
|
|
9277
|
-
"Show me what the walkthrough looks like",
|
|
9278
|
-
"Capture six frames of the fly-over\n\n# Example\n```ts\nconst { image } = await snaptrude.presentation.walkthroughs.capture(walkthroughId, {\ncount: 6,\n})\n```"
|
|
9279
|
-
],
|
|
9280
|
-
"argsType": "string",
|
|
9281
|
-
"resultType": "PluginWalkthroughCaptureResult"
|
|
9282
|
-
},
|
|
9283
|
-
{
|
|
9284
|
-
"path": "presentation.walkthroughs.create",
|
|
9285
|
-
"namespace": "presentation.walkthroughs",
|
|
9286
|
-
"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.",
|
|
9287
|
-
"examplePrompts": [
|
|
9288
|
-
"Make a walkthrough through these three viewpoints",
|
|
9289
|
-
"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```"
|
|
9290
|
-
],
|
|
9291
|
-
"argsType": "PluginWalkthroughKeyframeInput[]",
|
|
9292
|
-
"resultType": "PluginWalkthrough"
|
|
9293
|
-
},
|
|
9294
|
-
{
|
|
9295
|
-
"path": "presentation.walkthroughs.createFromPoints",
|
|
9296
|
-
"namespace": "presentation.walkthroughs",
|
|
9297
|
-
"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.",
|
|
9298
|
-
"examplePrompts": [
|
|
9299
|
-
"Walk from the entrance through the lobby to the stairs",
|
|
9300
|
-
"Make a walkthrough that visits every room on this floor",
|
|
9301
|
-
"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```"
|
|
9302
|
-
],
|
|
9303
|
-
"argsType": "Vec3Components[]",
|
|
9304
|
-
"resultType": "PluginWalkthrough"
|
|
9305
|
-
},
|
|
9306
|
-
{
|
|
9307
|
-
"path": "presentation.walkthroughs.createFromPreset",
|
|
9308
|
-
"namespace": "presentation.walkthroughs",
|
|
9309
|
-
"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.",
|
|
9310
|
-
"examplePrompts": [
|
|
9311
|
-
"Orbit around the selected building",
|
|
9312
|
-
"Make a drone fly-over of the site",
|
|
9313
|
-
"Push in slowly toward the entrance",
|
|
9314
|
-
"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```"
|
|
9315
|
-
],
|
|
9316
|
-
"argsType": "PluginWalkthroughPresetKind",
|
|
9317
|
-
"resultType": "PluginWalkthrough"
|
|
9318
|
-
},
|
|
9319
|
-
{
|
|
9320
|
-
"path": "presentation.walkthroughs.createKeyframe",
|
|
9321
|
-
"namespace": "presentation.walkthroughs",
|
|
9322
|
-
"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.",
|
|
9323
|
-
"examplePrompts": [
|
|
9324
|
-
"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```"
|
|
9325
|
-
],
|
|
9326
|
-
"argsType": "string",
|
|
9327
|
-
"resultType": "PluginWalkthrough"
|
|
9328
|
-
},
|
|
9329
|
-
{
|
|
9330
|
-
"path": "presentation.walkthroughs.delete",
|
|
9331
|
-
"namespace": "presentation.walkthroughs",
|
|
9332
|
-
"summary": "Delete a walkthrough. Write-gated; one undo step.",
|
|
9333
|
-
"examplePrompts": [
|
|
9334
|
-
"Delete the old walkthrough\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.delete(walkthroughId)\n```"
|
|
9335
|
-
],
|
|
9336
|
-
"argsType": "string",
|
|
9337
|
-
"resultType": "boolean"
|
|
9338
|
-
},
|
|
9339
|
-
{
|
|
9340
|
-
"path": "presentation.walkthroughs.deleteKeyframe",
|
|
9341
|
-
"namespace": "presentation.walkthroughs",
|
|
9342
|
-
"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.",
|
|
9343
|
-
"examplePrompts": [
|
|
9344
|
-
"Remove the third stop from the walkthrough\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.deleteKeyframe(walkthroughId, keyframeId)\n```"
|
|
9345
|
-
],
|
|
9346
|
-
"argsType": "string",
|
|
9347
|
-
"resultType": "PluginWalkthrough | null"
|
|
9348
|
-
},
|
|
9349
|
-
{
|
|
9350
|
-
"path": "presentation.walkthroughs.export",
|
|
9351
|
-
"namespace": "presentation.walkthroughs",
|
|
9352
|
-
"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.",
|
|
9353
|
-
"examplePrompts": [
|
|
9354
|
-
"Export the walkthrough as a video",
|
|
9355
|
-
"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```"
|
|
9356
|
-
],
|
|
9357
|
-
"argsType": "string",
|
|
9358
|
-
"resultType": "PluginWalkthroughExportJob"
|
|
9359
|
-
},
|
|
9360
|
-
{
|
|
9361
|
-
"path": "presentation.walkthroughs.get",
|
|
9362
|
-
"namespace": "presentation.walkthroughs",
|
|
9363
|
-
"summary": "Get one walkthrough by id.",
|
|
9364
|
-
"examplePrompts": [
|
|
9365
|
-
"Show me the keyframes of the orbit walkthrough",
|
|
9366
|
-
"How long does this walkthrough take?\n\n# Example\n```ts\nconst walkthrough = await snaptrude.presentation.walkthroughs.get(walkthroughId)\nconsole.log(walkthrough?.durationInSeconds)\n```"
|
|
9367
|
-
],
|
|
9368
|
-
"argsType": "string",
|
|
9369
|
-
"resultType": "PluginWalkthrough | null"
|
|
9370
|
-
},
|
|
9371
|
-
{
|
|
9372
|
-
"path": "presentation.walkthroughs.getJob",
|
|
9373
|
-
"namespace": "presentation.walkthroughs",
|
|
9374
|
-
"summary": "Get an export job by id.",
|
|
9375
|
-
"examplePrompts": [
|
|
9376
|
-
"Is the video export done yet?\n\n# Example\n```ts\nconst job = await snaptrude.presentation.walkthroughs.getJob(jobId)\n```"
|
|
9377
|
-
],
|
|
9378
|
-
"argsType": "string",
|
|
9379
|
-
"resultType": "PluginWalkthroughExportJob | null"
|
|
9380
|
-
},
|
|
9381
|
-
{
|
|
9382
|
-
"path": "presentation.walkthroughs.getState",
|
|
9383
|
-
"namespace": "presentation.walkthroughs",
|
|
9384
|
-
"summary": "Read the playback state: which walkthrough is playing or paused, and how far through it.",
|
|
9385
|
-
"examplePrompts": [
|
|
9386
|
-
"Is the walkthrough still playing?\n\n# Example\n```ts\nconst { status, timeInSeconds } = await snaptrude.presentation.walkthroughs.getState()\n```"
|
|
9387
|
-
],
|
|
9388
|
-
"argsType": null,
|
|
9389
|
-
"resultType": "PluginWalkthroughPlaybackState"
|
|
9390
|
-
},
|
|
9391
|
-
{
|
|
9392
|
-
"path": "presentation.walkthroughs.list",
|
|
9393
|
-
"namespace": "presentation.walkthroughs",
|
|
9394
|
-
"summary": "List the open project's walkthroughs, oldest first.",
|
|
9395
|
-
"examplePrompts": [
|
|
9396
|
-
"Which walkthroughs are there?",
|
|
9397
|
-
"List the camera paths in this project\n\n# Example\n```ts\nconst { walkthroughs } = await snaptrude.presentation.walkthroughs.list()\n```"
|
|
9398
|
-
],
|
|
9399
|
-
"argsType": null,
|
|
9400
|
-
"resultType": "PluginWalkthroughsListResult"
|
|
9401
|
-
},
|
|
9402
|
-
{
|
|
9403
|
-
"path": "presentation.walkthroughs.listIssues",
|
|
9404
|
-
"namespace": "presentation.walkthroughs",
|
|
9405
|
-
"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.",
|
|
9406
|
-
"examplePrompts": [
|
|
9407
|
-
"Does the walkthrough go through any walls?",
|
|
9408
|
-
"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```"
|
|
9409
|
-
],
|
|
9410
|
-
"argsType": "string",
|
|
9411
|
-
"resultType": "PluginWalkthroughListIssuesResult"
|
|
9412
|
-
},
|
|
9413
|
-
{
|
|
9414
|
-
"path": "presentation.walkthroughs.listJobs",
|
|
9415
|
-
"namespace": "presentation.walkthroughs",
|
|
9416
|
-
"summary": "List export jobs, newest first: running ones and those that finished in the last 30 minutes.",
|
|
9417
|
-
"examplePrompts": [
|
|
9418
|
-
"Which video exports are running?\n\n# Example\n```ts\nconst { jobs } = await snaptrude.presentation.walkthroughs.listJobs()\n```"
|
|
9419
|
-
],
|
|
9420
|
-
"argsType": null,
|
|
9421
|
-
"resultType": "PluginWalkthroughListJobsResult"
|
|
9422
|
-
},
|
|
9423
|
-
{
|
|
9424
|
-
"path": "presentation.walkthroughs.reorderKeyframe",
|
|
9425
|
-
"namespace": "presentation.walkthroughs",
|
|
9426
|
-
"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.",
|
|
9427
|
-
"examplePrompts": [
|
|
9428
|
-
"Visit the terrace before the living room\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.reorderKeyframe(walkthroughId, keyframeId, 0)\n```"
|
|
9429
|
-
],
|
|
9430
|
-
"argsType": "string",
|
|
9431
|
-
"resultType": "PluginWalkthrough"
|
|
9432
|
-
},
|
|
9433
|
-
{
|
|
9434
|
-
"path": "presentation.walkthroughs.sample",
|
|
9435
|
-
"namespace": "presentation.walkthroughs",
|
|
9436
|
-
"summary": "Sample where the camera is and which way it looks at given moments of a walkthrough's playback, without moving the camera.",
|
|
9437
|
-
"examplePrompts": [
|
|
9438
|
-
"Where is the camera halfway through the walkthrough?",
|
|
9439
|
-
"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```"
|
|
9440
|
-
],
|
|
9441
|
-
"argsType": "string",
|
|
9442
|
-
"resultType": "PluginWalkthroughSampleResult"
|
|
9443
|
-
},
|
|
9444
|
-
{
|
|
9445
|
-
"path": "presentation.walkthroughs.start",
|
|
9446
|
-
"namespace": "presentation.walkthroughs",
|
|
9447
|
-
"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.",
|
|
9448
|
-
"examplePrompts": [
|
|
9449
|
-
"Play the walkthrough",
|
|
9450
|
-
"Show me the orbit\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.start(walkthroughId)\n```"
|
|
9451
|
-
],
|
|
9452
|
-
"argsType": "string",
|
|
9453
|
-
"resultType": "PluginWalkthroughPlaybackState"
|
|
9454
|
-
},
|
|
9455
|
-
{
|
|
9456
|
-
"path": "presentation.walkthroughs.stop",
|
|
9457
|
-
"namespace": "presentation.walkthroughs",
|
|
9458
|
-
"summary": "Stop playback and put the camera back where it was before it started. A no-op when nothing is playing.",
|
|
9459
|
-
"examplePrompts": [
|
|
9460
|
-
"Stop the walkthrough\n\n# Example\n```ts\nawait snaptrude.presentation.walkthroughs.stop()\n```"
|
|
9461
|
-
],
|
|
9462
|
-
"argsType": null,
|
|
9463
|
-
"resultType": "PluginWalkthroughPlaybackState"
|
|
9464
|
-
},
|
|
9465
|
-
{
|
|
9466
|
-
"path": "presentation.walkthroughs.update",
|
|
9467
|
-
"namespace": "presentation.walkthroughs",
|
|
9468
|
-
"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.",
|
|
9469
|
-
"examplePrompts": [
|
|
9470
|
-
"Slow the walkthrough down to 30 seconds",
|
|
9471
|
-
"Rename it to \"Evening approach\"",
|
|
9472
|
-
"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```"
|
|
9473
|
-
],
|
|
9474
|
-
"argsType": "string",
|
|
9475
|
-
"resultType": "PluginWalkthrough"
|
|
9476
|
-
},
|
|
9477
|
-
{
|
|
9478
|
-
"path": "presentation.walkthroughs.updateKeyframe",
|
|
9479
|
-
"namespace": "presentation.walkthroughs",
|
|
9480
|
-
"summary": "Change a keyframe: only the fields given change. A preset walkthrough becomes ordinary. Write-gated; one undo step.",
|
|
9481
|
-
"examplePrompts": [
|
|
9482
|
-
"Pause for three seconds at the second point",
|
|
9483
|
-
"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```"
|
|
9484
|
-
],
|
|
9485
|
-
"argsType": "string",
|
|
9486
|
-
"resultType": "PluginWalkthrough"
|
|
9487
|
-
},
|
|
9488
7499
|
{
|
|
9489
7500
|
"path": "program.adjacency.compute",
|
|
9490
7501
|
"namespace": "program.adjacency",
|