@snaptrude/plugin-core 1.1.0-pbr-20261102.1 → 1.1.0-pbr-20261102.3

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.
Files changed (98) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/api-manifest.json +35 -37
  3. package/dist/api/core/camera/index.d.ts +16 -6
  4. package/dist/api/core/camera/index.d.ts.map +1 -1
  5. package/dist/api/core/comment/index.d.ts +7 -3
  6. package/dist/api/core/comment/index.d.ts.map +1 -1
  7. package/dist/api/core/geom/create/index.d.ts +69 -21
  8. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  9. package/dist/api/core/geom/query/circle.d.ts +31 -11
  10. package/dist/api/core/geom/query/circle.d.ts.map +1 -1
  11. package/dist/api/core/geom/query/contour.d.ts +19 -7
  12. package/dist/api/core/geom/query/contour.d.ts.map +1 -1
  13. package/dist/api/core/geom/query/curve.d.ts +72 -24
  14. package/dist/api/core/geom/query/curve.d.ts.map +1 -1
  15. package/dist/api/core/geom/query/profile.d.ts +19 -7
  16. package/dist/api/core/geom/query/profile.d.ts.map +1 -1
  17. package/dist/api/core/geom/update/contour.d.ts +36 -12
  18. package/dist/api/core/geom/update/contour.d.ts.map +1 -1
  19. package/dist/api/core/geom/update/curve.d.ts +13 -5
  20. package/dist/api/core/geom/update/curve.d.ts.map +1 -1
  21. package/dist/api/core/geom/update/profile.d.ts +36 -12
  22. package/dist/api/core/geom/update/profile.d.ts.map +1 -1
  23. package/dist/api/core/io/import/index.d.ts +7 -3
  24. package/dist/api/core/io/import/index.d.ts.map +1 -1
  25. package/dist/api/core/math/quat.d.ts +2 -2
  26. package/dist/api/core/math/quat.d.ts.map +1 -1
  27. package/dist/api/core/math/vec3.d.ts +15 -15
  28. package/dist/api/core/math/vec3.d.ts.map +1 -1
  29. package/dist/api/core/storeys/index.d.ts +5 -0
  30. package/dist/api/core/storeys/index.d.ts.map +1 -1
  31. package/dist/api/design/boolean/index.d.ts +20 -4
  32. package/dist/api/design/boolean/index.d.ts.map +1 -1
  33. package/dist/api/design/create/bulk-items.d.ts +84 -16
  34. package/dist/api/design/create/bulk-items.d.ts.map +1 -1
  35. package/dist/api/design/create/index.d.ts +134 -59
  36. package/dist/api/design/create/index.d.ts.map +1 -1
  37. package/dist/api/design/create/opening-fields.d.ts +18 -6
  38. package/dist/api/design/create/opening-fields.d.ts.map +1 -1
  39. package/dist/api/design/delete/index.d.ts +14 -7
  40. package/dist/api/design/delete/index.d.ts.map +1 -1
  41. package/dist/api/design/dimensions.d.ts +12 -4
  42. package/dist/api/design/dimensions.d.ts.map +1 -1
  43. package/dist/api/design/edit/index.d.ts +7 -3
  44. package/dist/api/design/edit/index.d.ts.map +1 -1
  45. package/dist/api/design/family.d.ts +5 -1
  46. package/dist/api/design/family.d.ts.map +1 -1
  47. package/dist/api/design/lock.d.ts +3 -0
  48. package/dist/api/design/lock.d.ts.map +1 -1
  49. package/dist/api/design/opening-placement.d.ts +15 -3
  50. package/dist/api/design/opening-placement.d.ts.map +1 -1
  51. package/dist/api/design/transform/index.d.ts +28 -8
  52. package/dist/api/design/transform/index.d.ts.map +1 -1
  53. package/dist/api/entity/space.d.ts +30 -6
  54. package/dist/api/entity/space.d.ts.map +1 -1
  55. package/dist/api/entity/story.d.ts +4 -0
  56. package/dist/api/entity/story.d.ts.map +1 -1
  57. package/dist/api/presentation/drawings.d.ts +1 -1
  58. package/dist/api/presentation/lighting.d.ts +28 -5
  59. package/dist/api/presentation/lighting.d.ts.map +1 -1
  60. package/dist/api/presentation/views.d.ts +15 -3
  61. package/dist/api/presentation/views.d.ts.map +1 -1
  62. package/dist/handles.d.ts +8 -0
  63. package/dist/handles.d.ts.map +1 -1
  64. package/dist/index.cjs +105 -83
  65. package/dist/index.cjs.map +1 -1
  66. package/dist/index.js +103 -83
  67. package/dist/index.js.map +1 -1
  68. package/package.json +1 -1
  69. package/src/api/core/camera/index.ts +9 -7
  70. package/src/api/core/comment/index.ts +3 -3
  71. package/src/api/core/geom/create/index.ts +25 -25
  72. package/src/api/core/geom/query/circle.ts +11 -11
  73. package/src/api/core/geom/query/contour.ts +7 -6
  74. package/src/api/core/geom/query/curve.ts +25 -25
  75. package/src/api/core/geom/query/profile.ts +7 -6
  76. package/src/api/core/geom/update/contour.ts +12 -11
  77. package/src/api/core/geom/update/curve.ts +5 -5
  78. package/src/api/core/geom/update/profile.ts +12 -11
  79. package/src/api/core/io/import/index.ts +3 -2
  80. package/src/api/core/math/quat.ts +2 -2
  81. package/src/api/core/math/vec3.ts +16 -16
  82. package/src/api/core/storeys/index.ts +5 -0
  83. package/src/api/design/boolean/index.ts +2 -2
  84. package/src/api/design/create/bulk-items.ts +7 -2
  85. package/src/api/design/create/index.ts +34 -46
  86. package/src/api/design/create/opening-fields.ts +7 -7
  87. package/src/api/design/delete/index.ts +14 -7
  88. package/src/api/design/dimensions.ts +5 -4
  89. package/src/api/design/edit/index.ts +3 -3
  90. package/src/api/design/family.ts +2 -1
  91. package/src/api/design/lock.ts +6 -0
  92. package/src/api/design/transform/index.ts +15 -7
  93. package/src/api/entity/space.ts +5 -4
  94. package/src/api/entity/story.ts +4 -0
  95. package/src/api/presentation/lighting.ts +29 -5
  96. package/src/api/presentation/views.ts +17 -4
  97. package/src/handles.ts +11 -0
  98. package/test/handles.test.mjs +36 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @snaptrude/plugin-core
2
2
 
3
+ ## 1.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 3862bd8: handles: new `Vec3Input` (a `Vec3Handle` in any inbound form, or a plain finite `{ x, y, z }` point) is the type of every vec3 ARGUMENT — transform displacement/axis/pivot, create positions and directions, opening facing/hinge, dimension ends, camera eye/target, `core.math.vec3` operands, geometry create/update/query points. Geometry reads return plain points, so they can be passed straight back; hosts from Oct 2026 resolve the point as a vector, older hosts reject it as an invalid handle. Returns stay `Vec3Handle`. `PluginDesignChangeResult` gains optional `cascaded`, `missing` and `rejected` (delete only). design.delete / design.transform JSDoc updated. The openings' `position` / `facing` / `hinge` (`design.create.door` / `window` / `doors` / `windows` / `opening`) take `Vec3Input` too. `PluginPresentationViewsCreateResult` declares the `framed` flag `views.create` already returns.
8
+
9
+ ## 1.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Add `design.doors.checkPlacement` and `design.windows.checkPlacement` — trial an opening's host fit, cut and material clearance (plus up to 12 `candidateWidths`) and restore the model without publishing commands, history or saves. A width/height on a family sized by its Type (Custom Sizes off) now picks the Type within 25 mm, else turns Custom Sizes on; `checkPlacement` reports which as `sizing`, and `design.create.door(s)` / `window(s)` apply the same rule. Door docs: a room door's `facing` goes inside the room it serves, and `getSwingDirection` / `mirror` point to `design.validation.access()` `opensInto` for which room a door opens into.
14
+
3
15
  ## 1.0.2
4
16
 
5
17
  ### Patch Changes
package/api-manifest.json CHANGED
@@ -540,7 +540,7 @@
540
540
  "Point the camera at the centre of the building from the side",
541
541
  "Set the eye to this point and aim it at that point\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\nawait snaptrude.core.camera.lookFrom(vec3.new(50, 30, 50), vec3.new(0, 0, 0))\n```"
542
542
  ],
543
- "argsType": "Vec3Handle",
543
+ "argsType": "Vec3Input",
544
544
  "resultType": "boolean"
545
545
  },
546
546
  {
@@ -797,7 +797,7 @@
797
797
  "Draw an arc between these two points around a centre",
798
798
  "Add a curved segment from A to B"
799
799
  ],
800
- "argsType": "Vec3Handle",
800
+ "argsType": "Vec3Input",
801
801
  "resultType": "ArcHandle"
802
802
  },
803
803
  {
@@ -1074,7 +1074,7 @@
1074
1074
  "Make a circle of radius 2 at this point",
1075
1075
  "Draw a circular outline 5m across"
1076
1076
  ],
1077
- "argsType": "Vec3Handle",
1077
+ "argsType": "Vec3Input",
1078
1078
  "resultType": "CircleHandle"
1079
1079
  },
1080
1080
  {
@@ -1112,7 +1112,7 @@
1112
1112
  "Draw a line from point A to point B",
1113
1113
  "Draw a straight edge between these two points"
1114
1114
  ],
1115
- "argsType": "Vec3Handle",
1115
+ "argsType": "Vec3Input",
1116
1116
  "resultType": "LineHandle"
1117
1117
  },
1118
1118
  {
@@ -1133,7 +1133,7 @@
1133
1133
  "Draw a closed polygon through these corner points",
1134
1134
  "Create an L-shaped outline from a list of points"
1135
1135
  ],
1136
- "argsType": "Vec3Handle[]",
1136
+ "argsType": "Vec3Input[]",
1137
1137
  "resultType": "ProfileHandle"
1138
1138
  },
1139
1139
  {
@@ -1145,7 +1145,7 @@
1145
1145
  "Organic curved outline through these corners",
1146
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
1147
  ],
1148
- "argsType": "Vec3Handle[]",
1148
+ "argsType": "Vec3Input[]",
1149
1149
  "resultType": "ProfileHandle"
1150
1150
  },
1151
1151
  {
@@ -1166,7 +1166,7 @@
1166
1166
  "examplePrompts": [
1167
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
1168
  ],
1169
- "argsType": "Vec3Handle[]",
1169
+ "argsType": "Vec3Input[]",
1170
1170
  "resultType": "SplineHandle"
1171
1171
  },
1172
1172
  {
@@ -1178,7 +1178,7 @@
1178
1178
  "Make a wavy edge that passes through A, B, C and D",
1179
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
1180
  ],
1181
- "argsType": "Vec3Handle[]",
1181
+ "argsType": "Vec3Input[]",
1182
1182
  "resultType": "SplineHandle"
1183
1183
  },
1184
1184
  {
@@ -3486,7 +3486,7 @@
3486
3486
  "namespace": "core.math.quat",
3487
3487
  "summary": "Build a quaternion from a rotation axis and an angle in radians.",
3488
3488
  "examplePrompts": [],
3489
- "argsType": "Vec3Handle",
3489
+ "argsType": "Vec3Input",
3490
3490
  "resultType": "QuatHandle"
3491
3491
  },
3492
3492
  {
@@ -3566,7 +3566,7 @@
3566
3566
  "namespace": "core.math.vec3",
3567
3567
  "summary": "Add two vectors component-wise (`a + b`).",
3568
3568
  "examplePrompts": [],
3569
- "argsType": "Vec3Handle",
3569
+ "argsType": "Vec3Input",
3570
3570
  "resultType": "Vec3Handle"
3571
3571
  },
3572
3572
  {
@@ -3574,7 +3574,7 @@
3574
3574
  "namespace": "core.math.vec3",
3575
3575
  "summary": "Read the primitive `{ x, y, z }` components of a vector handle.",
3576
3576
  "examplePrompts": [],
3577
- "argsType": "Vec3Handle",
3577
+ "argsType": "Vec3Input",
3578
3578
  "resultType": "Vec3Components"
3579
3579
  },
3580
3580
  {
@@ -3582,7 +3582,7 @@
3582
3582
  "namespace": "core.math.vec3",
3583
3583
  "summary": "Compute the cross product `a × b` — the vector perpendicular to both.",
3584
3584
  "examplePrompts": [],
3585
- "argsType": "Vec3Handle",
3585
+ "argsType": "Vec3Input",
3586
3586
  "resultType": "Vec3Handle"
3587
3587
  },
3588
3588
  {
@@ -3593,7 +3593,7 @@
3593
3593
  "What is the distance between these two points?",
3594
3594
  "Measure how far apart these two points are\n\n# Example\n```ts\nconst a = await snaptrude.core.math.vec3.new(0, 0, 0)\nconst b = await snaptrude.core.math.vec3.new(3, 4, 0)\nconst dist = await snaptrude.core.math.vec3.distance(a, b) // 5\n```"
3595
3595
  ],
3596
- "argsType": "Vec3Handle",
3596
+ "argsType": "Vec3Input",
3597
3597
  "resultType": "number"
3598
3598
  },
3599
3599
  {
@@ -3601,7 +3601,7 @@
3601
3601
  "namespace": "core.math.vec3",
3602
3602
  "summary": "Compute the dot product of two vectors.",
3603
3603
  "examplePrompts": [],
3604
- "argsType": "Vec3Handle",
3604
+ "argsType": "Vec3Input",
3605
3605
  "resultType": "number"
3606
3606
  },
3607
3607
  {
@@ -3609,7 +3609,7 @@
3609
3609
  "namespace": "core.math.vec3",
3610
3610
  "summary": "Test whether two vectors have exactly equal components.",
3611
3611
  "examplePrompts": [],
3612
- "argsType": "Vec3Handle",
3612
+ "argsType": "Vec3Input",
3613
3613
  "resultType": "boolean"
3614
3614
  },
3615
3615
  {
@@ -3617,7 +3617,7 @@
3617
3617
  "namespace": "core.math.vec3",
3618
3618
  "summary": "Test whether two vectors are equal within a tolerance `epsilon` (default `1e-6`).",
3619
3619
  "examplePrompts": [],
3620
- "argsType": "Vec3Handle",
3620
+ "argsType": "Vec3Input",
3621
3621
  "resultType": "boolean"
3622
3622
  },
3623
3623
  {
@@ -3625,7 +3625,7 @@
3625
3625
  "namespace": "core.math.vec3",
3626
3626
  "summary": "Compute the Euclidean length (magnitude) of a vector.",
3627
3627
  "examplePrompts": [],
3628
- "argsType": "Vec3Handle",
3628
+ "argsType": "Vec3Input",
3629
3629
  "resultType": "number"
3630
3630
  },
3631
3631
  {
@@ -3633,7 +3633,7 @@
3633
3633
  "namespace": "core.math.vec3",
3634
3634
  "summary": "Compute the squared Euclidean length of a vector (avoids the sqrt).",
3635
3635
  "examplePrompts": [],
3636
- "argsType": "Vec3Handle",
3636
+ "argsType": "Vec3Input",
3637
3637
  "resultType": "number"
3638
3638
  },
3639
3639
  {
@@ -3641,7 +3641,7 @@
3641
3641
  "namespace": "core.math.vec3",
3642
3642
  "summary": "Linearly interpolate between two vectors: `a + (b - a) * t`.",
3643
3643
  "examplePrompts": [],
3644
- "argsType": "Vec3Handle",
3644
+ "argsType": "Vec3Input",
3645
3645
  "resultType": "Vec3Handle"
3646
3646
  },
3647
3647
  {
@@ -3649,7 +3649,7 @@
3649
3649
  "namespace": "core.math.vec3",
3650
3650
  "summary": "Negate a vector, reversing its direction.",
3651
3651
  "examplePrompts": [],
3652
- "argsType": "Vec3Handle",
3652
+ "argsType": "Vec3Input",
3653
3653
  "resultType": "Vec3Handle"
3654
3654
  },
3655
3655
  {
@@ -3665,7 +3665,7 @@
3665
3665
  "namespace": "core.math.vec3",
3666
3666
  "summary": "Return the unit vector in the same direction (the zero vector if length is 0).",
3667
3667
  "examplePrompts": [],
3668
- "argsType": "Vec3Handle",
3668
+ "argsType": "Vec3Input",
3669
3669
  "resultType": "Vec3Handle"
3670
3670
  },
3671
3671
  {
@@ -3673,7 +3673,7 @@
3673
3673
  "namespace": "core.math.vec3",
3674
3674
  "summary": "Scale `v` by a scalar.",
3675
3675
  "examplePrompts": [],
3676
- "argsType": "Vec3Handle",
3676
+ "argsType": "Vec3Input",
3677
3677
  "resultType": "Vec3Handle"
3678
3678
  },
3679
3679
  {
@@ -3681,7 +3681,7 @@
3681
3681
  "namespace": "core.math.vec3",
3682
3682
  "summary": "Subtract vector `b` from `a` component-wise (`a - b`).",
3683
3683
  "examplePrompts": [],
3684
- "argsType": "Vec3Handle",
3684
+ "argsType": "Vec3Input",
3685
3685
  "resultType": "Vec3Handle"
3686
3686
  },
3687
3687
  {
@@ -4689,7 +4689,7 @@
4689
4689
  "Run a 300x600 beam across the room",
4690
4690
  "Extrude this cross-section into a 5m long beam\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.3, 0.6)\nconst section = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst alongX = await snaptrude.core.math.vec3.new(1, 0, 0)\nconst beam = await snaptrude.design.create.beam(section, 6, alongX)\n```"
4691
4691
  ],
4692
- "argsType": "| [section: ContourHandle, length: number, direction?: Vec3Handle]\n | [axis: LineHandle, options: PluginFamilyPlacement]",
4692
+ "argsType": "| [section: ContourHandle, length: number, direction?: Vec3Input]\n | [axis: LineHandle, options: PluginFamilyPlacement]",
4693
4693
  "resultType": "ComponentHandle"
4694
4694
  },
4695
4695
  {
@@ -4739,7 +4739,7 @@
4739
4739
  "Create a 450mm square concrete column 4 metres high",
4740
4740
  "Stand a column up from this base point\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(0.45, 0.45)\nconst crossSection = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst base = await snaptrude.core.math.vec3.new(4, 0, 4)\nconst column = await snaptrude.design.create.column(base, crossSection, 3)\n```"
4741
4741
  ],
4742
- "argsType": "| [\n position: Vec3Handle,\n crossSection: ContourHandle,\n height: number,\n directionUp?: Vec3Handle,\n ]\n | [axis: LineHandle, options: PluginFamilyPlacement]",
4742
+ "argsType": "| [\n position: Vec3Input,\n crossSection: ContourHandle,\n height: number,\n directionUp?: Vec3Input,\n ]\n | [axis: LineHandle, options: PluginFamilyPlacement]",
4743
4743
  "resultType": "ComponentHandle"
4744
4744
  },
4745
4745
  {
@@ -4809,7 +4809,7 @@
4809
4809
  "Lay flooring across the selected outline",
4810
4810
  "Put a floor at this position with 150mm thickness\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(5, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst floor = await snaptrude.design.create.floor(contour, 0.1)\n```"
4811
4811
  ],
4812
- "argsType": "| [contour: ContourHandle, thickness: number, position?: Vec3Handle]\n | [contour: ContourHandle, options: PluginFamilyFloorOptions]",
4812
+ "argsType": "| [contour: ContourHandle, thickness: number, position?: Vec3Input]\n | [contour: ContourHandle, options: PluginFamilyFloorOptions]",
4813
4813
  "resultType": "ComponentHandle[]",
4814
4814
  "performance": "For dimensional floors, `design.create.floors(items[])` uses one host round-trip and one undo entry. That bulk method does not accept native family options; use this method for a family-backed floor."
4815
4815
  },
@@ -5068,18 +5068,17 @@
5068
5068
  {
5069
5069
  "path": "design.create.wallRuns",
5070
5070
  "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. Per-curve `topProfiles` make raked or gabled walls (see {@linkcode PluginWallTopProfile}). Validate-all-or-throw; one command.",
5071
+ "summary": "Create **many wall runs** in one undoable operation (bulk plural of {@linkcode walls}). Each item is one full run — a wall per curve in that item's profile chain, mitred at shared endpoints. Junctions resolve within a run, not between runs. Each item carries its own dimensions, `wallType` and `storey`, so a single call can build a whole floor plate or several storeys at once. Walls have one height: a non-null `topProfiles` entry is refused with `PRECONDITION_FAILED` (`details.itemIndex` names the item) and nothing is created. Validate-all-or-throw; one command.",
5072
5072
  "examplePrompts": [
5073
5073
  "Draw all the walls of this floor plan at once",
5074
5074
  "Build every room's perimeter in one operation",
5075
5075
  "Bulk create wall runs from these centerlines",
5076
5076
  "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"
5077
+ "Turn these polylines into 200mm brick walls together"
5079
5078
  ],
5080
5079
  "argsType": "PluginCreateWallRunItem[]",
5081
5080
  "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 }, // one gable wall: 3m at both ends, 5m ridge in the middle { profile: upper, thickness: 0.2, storey: 3, topProfiles: [[{ along: 0, height: 3 }, { along: 0.5, height: 5 }, { along: 1, height: 3 }]] }, ]) console.log(groundWalls.length, \"walls on the ground floor\") ```"
5081
+ "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
5082
  },
5084
5083
  {
5085
5084
  "path": "design.create.walls",
@@ -5092,10 +5091,7 @@
5092
5091
  "Turn this polyline sketch into walls",
5093
5092
  "Add walls with mitred corners along the path",
5094
5093
  "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```"
5094
+ "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
5095
  ],
5100
5096
  "argsType": "ProfileHandle",
5101
5097
  "resultType": "ComponentHandle[]",
@@ -5157,7 +5153,7 @@
5157
5153
  "Add a dimension line along this wall",
5158
5154
  "Measure the width of this room and label it on the plan\n\n# Example\n```ts\nconst { design, core } = snaptrude\nconst v = core.math.vec3\nconst curve = core.geom.query.curve\nfor (const wall of await design.query.listWalls({ storeys: [2] })) {\nconst cl = await design.query.geometry.getCenterline(wall)\nif (!cl) continue\nconst a = await curve.getStartPoint(cl)\nconst b = await curve.getEndPoint(cl)\nawait design.dimensions.create(\nawait v.new(a.x, a.y, a.z),\nawait v.new(b.x, b.y, b.z),\nwall,\n)\n}\n```"
5159
5155
  ],
5160
- "argsType": "Vec3Handle",
5156
+ "argsType": "Vec3Input",
5161
5157
  "resultType": "DimensionHandle"
5162
5158
  },
5163
5159
  {
@@ -8441,7 +8437,7 @@
8441
8437
  "examplePrompts": [
8442
8438
  "Turn on realistic rendering",
8443
8439
  "Show the model in realistic mode",
8444
- "Switch the 3D view to the realistic look with sky and materials\n\n# Example\n```ts\nconst { realisticAvailable } = await snaptrude.presentation.lighting.get()\nif (realisticAvailable) {\nawait snaptrude.presentation.lighting.enableRealistic()\nawait snaptrude.presentation.lighting.applyPreset(\"golden\")\n}\n```"
8440
+ "Switch the 3D view to the realistic look with sky and materials\n\n# Example\n```ts\nconst { realisticUnavailableReason } =\nawait snaptrude.presentation.lighting.get()\nif (realisticUnavailableReason === null) {\nawait snaptrude.presentation.lighting.enableRealistic()\nawait snaptrude.presentation.lighting.applyPreset(\"golden\")\n} else if (realisticUnavailableReason === \"REALISTIC_SUSPENDED\") {\n// Ask the user to turn Realistic on in View settings; do not retry.\n}\n```"
8445
8441
  ],
8446
8442
  "argsType": null,
8447
8443
  "resultType": "PluginPresentationLightingState"
@@ -8453,6 +8449,7 @@
8453
8449
  "examplePrompts": [
8454
8450
  "Is realistic rendering on?",
8455
8451
  "Can I turn on the realistic view?",
8452
+ "Why can't realistic mode be turned on?",
8456
8453
  "Which lighting preset is active?",
8457
8454
  "Are clouds showing in the sky?\n\n# Example\n```ts\nconst { realistic, realisticAvailable, preset, atmosphere } =\nawait snaptrude.presentation.lighting.get()\n```"
8458
8455
  ],
@@ -9238,7 +9235,8 @@
9238
9235
  "Take a screenshot of the current view",
9239
9236
  "Capture this view as a PNG",
9240
9237
  "Render the Site Plan view to an image",
9241
- "Export a high-res image of what I'm looking at\n\n# Example\n```ts\nconst { image } = await snaptrude.presentation.views.capture({ format: \"png\" })\n```"
9238
+ "Export a high-res image of what I'm looking at",
9239
+ "Did the realistic render finish before the screenshot?\n\n# Example\n```ts\nconst shot = await snaptrude.presentation.views.capture({ format: \"png\" })\nif (shot.realisticPending) {\n// Drawn with the Design look: realistic rendering was still compiling.\n}\n```"
9242
9240
  ],
9243
9241
  "argsType": "{\n viewId?: string\n format?: \"png\" | \"jpeg\"\n resolution?: string\n }",
9244
9242
  "resultType": "PluginPresentationViewsCaptureResult"
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../../types";
3
- import { Vec3Handle } from "../../../handles";
3
+ import { Vec3Input } from "../../../handles";
4
4
  /**
5
5
  * Camera controls.
6
6
  *
@@ -28,12 +28,14 @@ export declare abstract class PluginCameraApi {
28
28
  * Point the camera: place its eye at `eye` looking toward `target` (world
29
29
  * coordinates, internal `babylon` units). View-state only — not undoable.
30
30
  *
31
+ * From a 2D plan the camera first switches to 3D (a plan's camera is pinned
32
+ * top-down, so an eye there would be ignored); read `getPose().mode` after.
31
33
  * While Present is open this sets the Design frame a view saved in Present
32
34
  * is taken from; it never moves the Present sheet canvas; use
33
35
  * `presentation.camera` for that.
34
36
  *
35
- * @param eye - Camera position as a {@linkcode Vec3Handle}
36
- * @param target - Point the camera looks at as a {@linkcode Vec3Handle}
37
+ * @param eye - Camera position: a {@linkcode Vec3Handle} or a plain `{ x, y, z }`
38
+ * @param target - Point the camera looks at: a {@linkcode Vec3Handle} or a plain `{ x, y, z }`
37
39
  * @returns `true` once the camera has been positioned.
38
40
  *
39
41
  * @examplePrompt Look at the model from above the north-east corner
@@ -47,7 +49,7 @@ export declare abstract class PluginCameraApi {
47
49
  * await snaptrude.core.camera.lookFrom(vec3.new(50, 30, 50), vec3.new(0, 0, 0))
48
50
  * ```
49
51
  */
50
- abstract lookFrom(eye: Vec3Handle, target: Vec3Handle): PluginApiReturn<boolean>;
52
+ abstract lookFrom(eye: Vec3Input, target: Vec3Input): PluginApiReturn<boolean>;
51
53
  /**
52
54
  * Snap the camera to a standard view — the five orthographic elevations
53
55
  * (`top` / `front` / `back` / `left` / `right`) or the 3D `iso` (isometric
@@ -400,8 +402,16 @@ export type PluginCameraProjection = z.infer<typeof PluginCameraProjection>;
400
402
  * | `target` | {@linkcode Vec3Handle} | Point the camera looks at |
401
403
  */
402
404
  export declare const PluginCameraLookFromArgs: z.ZodObject<{
403
- eye: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
404
- target: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
405
+ eye: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>, z.ZodObject<{
406
+ x: z.ZodNumber;
407
+ y: z.ZodNumber;
408
+ z: z.ZodNumber;
409
+ }, z.core.$strip>]>;
410
+ target: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>, z.ZodObject<{
411
+ x: z.ZodNumber;
412
+ y: z.ZodNumber;
413
+ z: z.ZodNumber;
414
+ }, z.core.$strip>]>;
405
415
  }, z.core.$strip>;
406
416
  export type PluginCameraLookFromArgs = z.infer<typeof PluginCameraLookFromArgs>;
407
417
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/camera/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAkB,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,8BAAsB,eAAe;;IAGnC;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,QAAQ,CACtB,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,UAAU,GACjB,eAAe,CAAC,OAAO,CAAC;IAE3B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;aACa,eAAe,CAC7B,IAAI,EAAE,kBAAkB,GACvB,eAAe,CAAC,OAAO,CAAC;IAE3B;;;;;;;;;;;;;;OAcG;aACa,OAAO,IAAI,eAAe,CAAC,gBAAgB,CAAC;IAE5D;;;;;;;;;;;;;;;;;;;;;OAqBG;aACa,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,eAAe,CAAC,OAAO,CAAC;IAEzE;;;;;;;;;;;;;;;;OAgBG;aACa,aAAa,IAAI,eAAe,CAAC,sBAAsB,CAAC;IAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;aACa,aAAa,CAC3B,UAAU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EnD,CAAA;AACF,MAAM,MAAM,wCAAwC,GAAG,CAAC,CAAC,KAAK,CAC5D,OAAO,wCAAwC,CAChD,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../../types";
3
- import { Vec3Handle, ComponentHandle, Vec3Components } from "../../../handles";
3
+ import { Vec3Input, ComponentHandle, Vec3Components } from "../../../handles";
4
4
  /**
5
5
  * Comments — create, edit, resolve, tag, and list scene/project comments.
6
6
  *
@@ -35,7 +35,7 @@ export declare abstract class PluginCommentApi {
35
35
  * )
36
36
  * ```
37
37
  */
38
- abstract create(message: string, component?: ComponentHandle, position?: Vec3Handle, mentions?: string[]): PluginApiReturn<CommentHandle>;
38
+ abstract create(message: string, component?: ComponentHandle, position?: Vec3Input, mentions?: string[]): PluginApiReturn<CommentHandle>;
39
39
  /**
40
40
  * Edit a comment's message (and optional @mentions).
41
41
  *
@@ -226,7 +226,11 @@ export declare const CommentHandle: z.ZodPipe<z.ZodString, z.ZodTransform<Commen
226
226
  */
227
227
  export declare const PluginCommentCreateArgs: z.ZodObject<{
228
228
  component: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
229
- position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
229
+ position: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>, z.ZodObject<{
230
+ x: z.ZodNumber;
231
+ y: z.ZodNumber;
232
+ z: z.ZodNumber;
233
+ }, z.core.$strip>]>>;
230
234
  message: z.ZodString;
231
235
  mentions: z.ZodOptional<z.ZodArray<z.ZodString>>;
232
236
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/comment/index.ts"],"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