@snaptrude/plugin-core 1.0.2-plainpoint-20261102.2 → 1.0.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.
- package/AGENTS.md +17 -0
- package/CHANGELOG.md +6 -0
- package/api-manifest.json +35 -31
- package/dist/api/core/camera/index.d.ts +6 -16
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/comment/index.d.ts +3 -7
- package/dist/api/core/comment/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +21 -69
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/circle.d.ts +11 -31
- package/dist/api/core/geom/query/circle.d.ts.map +1 -1
- package/dist/api/core/geom/query/contour.d.ts +7 -19
- package/dist/api/core/geom/query/contour.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +24 -72
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/profile.d.ts +7 -19
- package/dist/api/core/geom/query/profile.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +12 -36
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +5 -13
- package/dist/api/core/geom/update/curve.d.ts.map +1 -1
- package/dist/api/core/geom/update/profile.d.ts +12 -36
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +3 -7
- 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 +0 -5
- package/dist/api/core/storeys/index.d.ts.map +1 -1
- package/dist/api/design/boolean/index.d.ts +4 -20
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +20 -85
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +71 -134
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +6 -18
- package/dist/api/design/create/opening-fields.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +7 -14
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +4 -12
- package/dist/api/design/dimensions.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +37 -0
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/edit/index.d.ts +3 -7
- package/dist/api/design/edit/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +1 -5
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +1 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/lock.d.ts +0 -3
- package/dist/api/design/lock.d.ts.map +1 -1
- package/dist/api/design/opening-placement.d.ts +123 -0
- package/dist/api/design/opening-placement.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +8 -28
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +23 -0
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +6 -30
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +0 -4
- 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 +1 -5
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/handles.d.ts +0 -8
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2496 -2441
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2493 -2440
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/api/core/camera/index.ts +7 -9
- 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 +6 -7
- package/src/api/core/geom/query/curve.ts +25 -25
- package/src/api/core/geom/query/profile.ts +6 -7
- package/src/api/core/geom/update/contour.ts +11 -12
- package/src/api/core/geom/update/curve.ts +5 -5
- package/src/api/core/geom/update/profile.ts +11 -12
- package/src/api/core/io/import/index.ts +2 -3
- 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 +0 -5
- package/src/api/design/boolean/index.ts +2 -2
- package/src/api/design/create/bulk-items.ts +6 -8
- package/src/api/design/create/index.ts +58 -34
- package/src/api/design/create/opening-fields.ts +7 -7
- package/src/api/design/delete/index.ts +7 -14
- package/src/api/design/dimensions.ts +4 -5
- package/src/api/design/doors/index.ts +43 -0
- package/src/api/design/edit/index.ts +3 -3
- package/src/api/design/family.ts +1 -2
- package/src/api/design/index.ts +1 -0
- package/src/api/design/lock.ts +0 -6
- package/src/api/design/opening-placement.ts +79 -0
- package/src/api/design/transform/index.ts +7 -15
- package/src/api/design/windows/index.ts +29 -0
- package/src/api/entity/space.ts +4 -5
- package/src/api/entity/story.ts +0 -4
- package/src/api/presentation/views.ts +2 -7
- package/src/handles.ts +0 -11
- package/test/handles.test.mjs +0 -36
package/AGENTS.md
CHANGED
|
@@ -214,6 +214,23 @@ check **all** consumers of `@snaptrude/plugin-client` or `@snaptrude/plugin-core
|
|
|
214
214
|
|
|
215
215
|
Search these directories for usage of the changed API and update accordingly.
|
|
216
216
|
|
|
217
|
+
### 8. snapagents (every API change, breaking or not)
|
|
218
|
+
|
|
219
|
+
The Snap agent (`snapagents` repo) does not install this package. It keeps a synced copy of the
|
|
220
|
+
built `dist/**/*.d.ts` under `plugin-types/plugin-core/` and compiles every script the
|
|
221
|
+
agent writes against them before it runs, so a stale copy means the agent is held
|
|
222
|
+
to an old API. After a plugin-core release, in the snapagents checkout run:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
npm run sync:plugin-core -- <path to packages/plugin-core>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
It copies new and changed declaration files, keeps snapagents' agent-only files,
|
|
229
|
+
refuses to overwrite its hand-merged files (and prints what to merge), and stamps
|
|
230
|
+
`plugin-types/plugin-core/.synced.json` with the version. Where the editor validates a
|
|
231
|
+
parameter against a fixed list, declare it as that literal union here, not as
|
|
232
|
+
`string`: the agent's type-check can only reject what the type names.
|
|
233
|
+
|
|
217
234
|
## Adding a new API namespace (end-to-end)
|
|
218
235
|
|
|
219
236
|
When adding an entirely new namespace (e.g. `snaptrude.materials`):
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @snaptrude/plugin-core
|
|
2
2
|
|
|
3
|
+
## 1.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 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.
|
|
8
|
+
|
|
3
9
|
## 1.0.2
|
|
4
10
|
|
|
5
11
|
### 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": "
|
|
543
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
800
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
1077
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
1115
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
1136
|
+
"argsType": "Vec3Handle[]",
|
|
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": "
|
|
1148
|
+
"argsType": "Vec3Handle[]",
|
|
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": "
|
|
1169
|
+
"argsType": "Vec3Handle[]",
|
|
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": "
|
|
1181
|
+
"argsType": "Vec3Handle[]",
|
|
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": "
|
|
3489
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3569
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3577
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3585
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3596
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3604
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3612
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3620
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3628
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3636
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3644
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3652
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3668
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3676
|
+
"argsType": "Vec3Handle",
|
|
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": "
|
|
3684
|
+
"argsType": "Vec3Handle",
|
|
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?:
|
|
4692
|
+
"argsType": "| [section: ContourHandle, length: number, direction?: Vec3Handle]\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:
|
|
4742
|
+
"argsType": "| [\n position: Vec3Handle,\n crossSection: ContourHandle,\n height: number,\n directionUp?: Vec3Handle,\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?:
|
|
4812
|
+
"argsType": "| [contour: ContourHandle, thickness: number, position?: Vec3Handle]\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,17 +5068,18 @@
|
|
|
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.
|
|
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.",
|
|
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"
|
|
5077
|
+
"Turn these polylines into 200mm brick walls together",
|
|
5078
|
+
"Import these raked walls with their top profiles in one go"
|
|
5078
5079
|
],
|
|
5079
5080
|
"argsType": "PluginCreateWallRunItem[]",
|
|
5080
5081
|
"resultType": "ComponentHandle[][]",
|
|
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\") ```"
|
|
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\") ```"
|
|
5082
5083
|
},
|
|
5083
5084
|
{
|
|
5084
5085
|
"path": "design.create.walls",
|
|
@@ -5091,7 +5092,10 @@
|
|
|
5091
5092
|
"Turn this polyline sketch into walls",
|
|
5092
5093
|
"Add walls with mitred corners along the path",
|
|
5093
5094
|
"Draw brick walls with plaster along this outline",
|
|
5094
|
-
"Build the perimeter in exposed concrete walls
|
|
5095
|
+
"Build the perimeter in exposed concrete walls",
|
|
5096
|
+
"Create a raked wall that slopes from 3m to 5m",
|
|
5097
|
+
"Build a gable end wall with the ridge in the middle",
|
|
5098
|
+
"Draw a wall with a sloped top edge\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst centerlines = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(8, 0, 0),\nawait v.new(8, 0, 6),\n])\nconst walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)\n// …built as a specific wall type (layers/material/thickness from the type):\nconst [brick] = await snaptrude.design.types.list(\"wall\")\nconst brickWalls = await snaptrude.design.create.walls(\ncenterlines, 3, undefined, brick.label,\n)\n// …a raked wall (3m at the start, 5m at the end) on a single centerline:\nconst run = await snaptrude.core.geom.create.profileFromCurves([\nawait snaptrude.core.geom.create.line(await v.new(0, 0, 10), await v.new(8, 0, 10)),\n])\nconst [raked] = await snaptrude.design.create.walls(run, undefined, 0.2, undefined, undefined, [\n[{ along: 0, height: 3 }, { along: 1, height: 5 }],\n])\n```"
|
|
5095
5099
|
],
|
|
5096
5100
|
"argsType": "ProfileHandle",
|
|
5097
5101
|
"resultType": "ComponentHandle[]",
|
|
@@ -5153,7 +5157,7 @@
|
|
|
5153
5157
|
"Add a dimension line along this wall",
|
|
5154
5158
|
"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```"
|
|
5155
5159
|
],
|
|
5156
|
-
"argsType": "
|
|
5160
|
+
"argsType": "Vec3Handle",
|
|
5157
5161
|
"resultType": "DimensionHandle"
|
|
5158
5162
|
},
|
|
5159
5163
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../types";
|
|
3
|
-
import {
|
|
3
|
+
import { Vec3Handle } from "../../../handles";
|
|
4
4
|
/**
|
|
5
5
|
* Camera controls.
|
|
6
6
|
*
|
|
@@ -28,14 +28,12 @@ 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.
|
|
33
31
|
* While Present is open this sets the Design frame a view saved in Present
|
|
34
32
|
* is taken from; it never moves the Present sheet canvas; use
|
|
35
33
|
* `presentation.camera` for that.
|
|
36
34
|
*
|
|
37
|
-
* @param eye - Camera position
|
|
38
|
-
* @param target - Point the camera looks at
|
|
35
|
+
* @param eye - Camera position as a {@linkcode Vec3Handle}
|
|
36
|
+
* @param target - Point the camera looks at as a {@linkcode Vec3Handle}
|
|
39
37
|
* @returns `true` once the camera has been positioned.
|
|
40
38
|
*
|
|
41
39
|
* @examplePrompt Look at the model from above the north-east corner
|
|
@@ -49,7 +47,7 @@ export declare abstract class PluginCameraApi {
|
|
|
49
47
|
* await snaptrude.core.camera.lookFrom(vec3.new(50, 30, 50), vec3.new(0, 0, 0))
|
|
50
48
|
* ```
|
|
51
49
|
*/
|
|
52
|
-
abstract lookFrom(eye:
|
|
50
|
+
abstract lookFrom(eye: Vec3Handle, target: Vec3Handle): PluginApiReturn<boolean>;
|
|
53
51
|
/**
|
|
54
52
|
* Snap the camera to a standard view — the five orthographic elevations
|
|
55
53
|
* (`top` / `front` / `back` / `left` / `right`) or the 3D `iso` (isometric
|
|
@@ -402,16 +400,8 @@ export type PluginCameraProjection = z.infer<typeof PluginCameraProjection>;
|
|
|
402
400
|
* | `target` | {@linkcode Vec3Handle} | Point the camera looks at |
|
|
403
401
|
*/
|
|
404
402
|
export declare const PluginCameraLookFromArgs: z.ZodObject<{
|
|
405
|
-
eye: z.
|
|
406
|
-
|
|
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>]>;
|
|
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>>;
|
|
415
405
|
}, z.core.$strip>;
|
|
416
406
|
export type PluginCameraLookFromArgs = z.infer<typeof PluginCameraLookFromArgs>;
|
|
417
407
|
/**
|
|
@@ -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,
|
|
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;;;;;;;;;;;;;;;;;;;;;;;O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AAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;EAAqC,CAAA;AACvE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;iBAKzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;kBAOrC,CAAA;AACX,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,wCAAwC;;;;;;;;;;;iBAEnD,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 {
|
|
3
|
+
import { Vec3Handle, 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?:
|
|
38
|
+
abstract create(message: string, component?: ComponentHandle, position?: Vec3Handle, mentions?: string[]): PluginApiReturn<CommentHandle>;
|
|
39
39
|
/**
|
|
40
40
|
* Edit a comment's message (and optional @mentions).
|
|
41
41
|
*
|
|
@@ -226,11 +226,7 @@ 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.
|
|
230
|
-
x: z.ZodNumber;
|
|
231
|
-
y: z.ZodNumber;
|
|
232
|
-
z: z.ZodNumber;
|
|
233
|
-
}, z.core.$strip>]>>;
|
|
229
|
+
position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
234
230
|
message: z.ZodString;
|
|
235
231
|
mentions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
236
232
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/comment/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/comment/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAE9E;;;;;;GAMG;AACH,8BAAsB,gBAAgB;;IAGpC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,MAAM,CACpB,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,eAAe,EAC3B,QAAQ,CAAC,EAAE,UAAU,EACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,eAAe,CAAC,aAAa,CAAC;IAEjC;;;;;;;;;;;;;;;;;OAiBG;aACa,MAAM,C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,0EAA0E;IAC1E,SAAS,EAAE,eAAe,GAAG,IAAI,CAAA;IACjC,oDAAoD;IACpD,UAAU,EAAE,OAAO,CAAA;IACnB,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,MAAM,EAAE,kBAAkB,EAAE,CAAA;CAC7B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { PluginApiReturn } from "../../../../types";
|
|
3
3
|
import type { SweepAlongCurveRecordOptions } from "../../../../massParameters";
|
|
4
|
-
import {
|
|
4
|
+
import { Vec3Handle, LineHandle, ArcHandle, SplineHandle, CircleHandle, CurveHandle, ProfileHandle, ContourHandle, BrepHandle, FaceHandle, EdgeHandle, Vec3Components } from "../../../../handles";
|
|
5
5
|
/** Maximum boundary items one patch may span. */
|
|
6
6
|
export declare const MAX_PATCH_BOUNDARY_CURVES = 16;
|
|
7
7
|
/** Maximum interior points one patch may be pulled through. */
|
|
@@ -57,7 +57,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
57
57
|
* const line = snaptrude.core.geom.create.line(startPoint, endPoint)
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
abstract line(startPoint:
|
|
60
|
+
abstract line(startPoint: Vec3Handle, endPoint: Vec3Handle): PluginApiReturn<LineHandle>;
|
|
61
61
|
/**
|
|
62
62
|
* Create a circular arc from its start, end, centre, and axis point handles.
|
|
63
63
|
* Host API call — returns a handle.
|
|
@@ -76,7 +76,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
76
76
|
* const arc = snaptrude.core.geom.create.arc(startPoint, endPoint, centrePoint, axis)
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
abstract arc(startPoint:
|
|
79
|
+
abstract arc(startPoint: Vec3Handle, endPoint: Vec3Handle, centrePoint: Vec3Handle, axis: Vec3Handle): PluginApiReturn<ArcHandle>;
|
|
80
80
|
/**
|
|
81
81
|
* Create a circle from a centre point, an axis (plane normal), and a radius.
|
|
82
82
|
* Host API call — returns a handle. A circle is a closed curve; read it back via
|
|
@@ -95,7 +95,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
95
95
|
* const circle = snaptrude.core.geom.create.circle(centrePoint, axis, 2)
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
|
-
abstract circle(centrePoint:
|
|
98
|
+
abstract circle(centrePoint: Vec3Handle, axis: Vec3Handle, radius: number): PluginApiReturn<CircleHandle>;
|
|
99
99
|
/**
|
|
100
100
|
* Create an open NURBS curve passing exactly THROUGH each point, in order
|
|
101
101
|
* (centripetal Catmull-Rom fit → clamped cubic B-spline; C1-smooth, no cusps
|
|
@@ -126,7 +126,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
126
126
|
* const profile = await snaptrude.core.geom.create.profileFromCurves([spline, base])
|
|
127
127
|
* ```
|
|
128
128
|
*/
|
|
129
|
-
abstract splineFromPoints(points:
|
|
129
|
+
abstract splineFromPoints(points: Vec3Handle[]): PluginApiReturn<SplineHandle>;
|
|
130
130
|
/**
|
|
131
131
|
* Create an open NURBS curve DEFINED BY control points — the curve is pulled
|
|
132
132
|
* TOWARD the interior points, not through them; it starts at the first point
|
|
@@ -159,7 +159,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
159
159
|
* )
|
|
160
160
|
* ```
|
|
161
161
|
*/
|
|
162
|
-
abstract splineFromControlPoints(controlPoints:
|
|
162
|
+
abstract splineFromControlPoints(controlPoints: Vec3Handle[], options?: {
|
|
163
163
|
degree?: number;
|
|
164
164
|
}): PluginApiReturn<SplineHandle>;
|
|
165
165
|
/**
|
|
@@ -194,7 +194,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
194
194
|
* const profile = snaptrude.core.geom.create.profileFromLinePoints(points)
|
|
195
195
|
* ```
|
|
196
196
|
*/
|
|
197
|
-
abstract profileFromLinePoints(points:
|
|
197
|
+
abstract profileFromLinePoints(points: Vec3Handle[]): PluginApiReturn<ProfileHandle>;
|
|
198
198
|
/**
|
|
199
199
|
* Create a profile from an ordered list of curve handles forming a closed loop.
|
|
200
200
|
* Host API call — returns a handle.
|
|
@@ -241,7 +241,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
241
241
|
* const podium = await snaptrude.design.create.massFromBrep(brep, "Podium")
|
|
242
242
|
* ```
|
|
243
243
|
*/
|
|
244
|
-
abstract profileFromSplinePoints(points:
|
|
244
|
+
abstract profileFromSplinePoints(points: Vec3Handle[]): PluginApiReturn<ProfileHandle>;
|
|
245
245
|
/**
|
|
246
246
|
* Create an axis-aligned **rectangle** profile in the XZ plane,
|
|
247
247
|
* `width` × `depth`, centred at `center` (defaults to the origin). Host API
|
|
@@ -266,7 +266,7 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
266
266
|
* const space = snaptrude.design.create.space(contour, 3)
|
|
267
267
|
* ```
|
|
268
268
|
*/
|
|
269
|
-
abstract profileRect(width: number, depth: number, center?:
|
|
269
|
+
abstract profileRect(width: number, depth: number, center?: Vec3Handle): PluginApiReturn<ProfileHandle>;
|
|
270
270
|
/**
|
|
271
271
|
* Create a contour (an outer profile loop, no holes). Host API call — returns a handle.
|
|
272
272
|
*
|
|
@@ -1364,16 +1364,8 @@ export declare abstract class PluginGeomCreateApi {
|
|
|
1364
1364
|
* | `endPoint` | {@linkcode Vec3Handle} | End point of the line segment |
|
|
1365
1365
|
*/
|
|
1366
1366
|
export declare const PluginGeomCreateLineArgs: z.ZodObject<{
|
|
1367
|
-
startPoint: z.
|
|
1368
|
-
|
|
1369
|
-
y: z.ZodNumber;
|
|
1370
|
-
z: z.ZodNumber;
|
|
1371
|
-
}, z.core.$strip>]>;
|
|
1372
|
-
endPoint: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>, z.ZodObject<{
|
|
1373
|
-
x: z.ZodNumber;
|
|
1374
|
-
y: z.ZodNumber;
|
|
1375
|
-
z: z.ZodNumber;
|
|
1376
|
-
}, z.core.$strip>]>;
|
|
1367
|
+
startPoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
1368
|
+
endPoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
1377
1369
|
}, z.core.$strip>;
|
|
1378
1370
|
export type PluginGeomCreateLineArgs = z.infer<typeof PluginGeomCreateLineArgs>;
|
|
1379
1371
|
/**
|
|
@@ -1387,26 +1379,10 @@ export type PluginGeomCreateLineArgs = z.infer<typeof PluginGeomCreateLineArgs>;
|
|
|
1387
1379
|
* | `axis` | {@linkcode Vec3Handle} | Axis direction of the arc |
|
|
1388
1380
|
*/
|
|
1389
1381
|
export declare const PluginGeomCreateArcArgs: z.ZodObject<{
|
|
1390
|
-
startPoint: z.
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
}, z.core.$strip>]>;
|
|
1395
|
-
endPoint: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>, z.ZodObject<{
|
|
1396
|
-
x: z.ZodNumber;
|
|
1397
|
-
y: z.ZodNumber;
|
|
1398
|
-
z: z.ZodNumber;
|
|
1399
|
-
}, z.core.$strip>]>;
|
|
1400
|
-
centrePoint: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>, z.ZodObject<{
|
|
1401
|
-
x: z.ZodNumber;
|
|
1402
|
-
y: z.ZodNumber;
|
|
1403
|
-
z: z.ZodNumber;
|
|
1404
|
-
}, z.core.$strip>]>;
|
|
1405
|
-
axis: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>, z.ZodObject<{
|
|
1406
|
-
x: z.ZodNumber;
|
|
1407
|
-
y: z.ZodNumber;
|
|
1408
|
-
z: z.ZodNumber;
|
|
1409
|
-
}, z.core.$strip>]>;
|
|
1382
|
+
startPoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
1383
|
+
endPoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
1384
|
+
centrePoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
1385
|
+
axis: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
1410
1386
|
}, z.core.$strip>;
|
|
1411
1387
|
export type PluginGeomCreateArcArgs = z.infer<typeof PluginGeomCreateArcArgs>;
|
|
1412
1388
|
/**
|
|
@@ -1419,16 +1395,8 @@ export type PluginGeomCreateArcArgs = z.infer<typeof PluginGeomCreateArcArgs>;
|
|
|
1419
1395
|
* | `radius` | `number` | Radius of the circle |
|
|
1420
1396
|
*/
|
|
1421
1397
|
export declare const PluginGeomCreateCircleArgs: z.ZodObject<{
|
|
1422
|
-
centrePoint: z.
|
|
1423
|
-
|
|
1424
|
-
y: z.ZodNumber;
|
|
1425
|
-
z: z.ZodNumber;
|
|
1426
|
-
}, z.core.$strip>]>;
|
|
1427
|
-
axis: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>, z.ZodObject<{
|
|
1428
|
-
x: z.ZodNumber;
|
|
1429
|
-
y: z.ZodNumber;
|
|
1430
|
-
z: z.ZodNumber;
|
|
1431
|
-
}, z.core.$strip>]>;
|
|
1398
|
+
centrePoint: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
1399
|
+
axis: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>;
|
|
1432
1400
|
radius: z.ZodNumber;
|
|
1433
1401
|
}, z.core.$strip>;
|
|
1434
1402
|
export type PluginGeomCreateCircleArgs = z.infer<typeof PluginGeomCreateCircleArgs>;
|
|
@@ -1440,11 +1408,7 @@ export type PluginGeomCreateCircleArgs = z.infer<typeof PluginGeomCreateCircleAr
|
|
|
1440
1408
|
* | `points` | {@linkcode Vec3Handle}`[]` | 3..256 ordered through-points of the curve |
|
|
1441
1409
|
*/
|
|
1442
1410
|
export declare const PluginGeomCreateSplineFromPointsArgs: z.ZodObject<{
|
|
1443
|
-
points: z.ZodArray<z.
|
|
1444
|
-
x: z.ZodNumber;
|
|
1445
|
-
y: z.ZodNumber;
|
|
1446
|
-
z: z.ZodNumber;
|
|
1447
|
-
}, z.core.$strip>]>>;
|
|
1411
|
+
points: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
|
|
1448
1412
|
}, z.core.$strip>;
|
|
1449
1413
|
export type PluginGeomCreateSplineFromPointsArgs = z.infer<typeof PluginGeomCreateSplineFromPointsArgs>;
|
|
1450
1414
|
/**
|
|
@@ -1456,11 +1420,7 @@ export type PluginGeomCreateSplineFromPointsArgs = z.infer<typeof PluginGeomCrea
|
|
|
1456
1420
|
* | `options` | `object`? | `degree`: 2 or 3 (default `min(3, controlPoints.length - 1)`) |
|
|
1457
1421
|
*/
|
|
1458
1422
|
export declare const PluginGeomCreateSplineFromControlPointsArgs: z.ZodObject<{
|
|
1459
|
-
controlPoints: z.ZodArray<z.
|
|
1460
|
-
x: z.ZodNumber;
|
|
1461
|
-
y: z.ZodNumber;
|
|
1462
|
-
z: z.ZodNumber;
|
|
1463
|
-
}, z.core.$strip>]>>;
|
|
1423
|
+
controlPoints: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
|
|
1464
1424
|
options: z.ZodOptional<z.ZodObject<{
|
|
1465
1425
|
degree: z.ZodOptional<z.ZodNumber>;
|
|
1466
1426
|
}, z.core.$strip>>;
|
|
@@ -1474,11 +1434,7 @@ export type PluginGeomCreateSplineFromControlPointsArgs = z.infer<typeof PluginG
|
|
|
1474
1434
|
* | `points` | {@linkcode Vec3Handle}`[]` | Ordered vertex handles of the profile |
|
|
1475
1435
|
*/
|
|
1476
1436
|
export declare const PluginGeomCreateProfileFromLinePointsArgs: z.ZodObject<{
|
|
1477
|
-
points: z.ZodArray<z.
|
|
1478
|
-
x: z.ZodNumber;
|
|
1479
|
-
y: z.ZodNumber;
|
|
1480
|
-
z: z.ZodNumber;
|
|
1481
|
-
}, z.core.$strip>]>>;
|
|
1437
|
+
points: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
|
|
1482
1438
|
}, z.core.$strip>;
|
|
1483
1439
|
export type PluginGeomCreateProfileFromLinePointsArgs = z.infer<typeof PluginGeomCreateProfileFromLinePointsArgs>;
|
|
1484
1440
|
/**
|
|
@@ -1500,11 +1456,7 @@ export type PluginGeomCreateProfileFromCurvesArgs = z.infer<typeof PluginGeomCre
|
|
|
1500
1456
|
* | `points` | {@linkcode Vec3Handle}`[]` | 3..256 ordered through-points of the closed loop (first point NOT repeated) |
|
|
1501
1457
|
*/
|
|
1502
1458
|
export declare const PluginGeomCreateProfileFromSplinePointsArgs: z.ZodObject<{
|
|
1503
|
-
points: z.ZodArray<z.
|
|
1504
|
-
x: z.ZodNumber;
|
|
1505
|
-
y: z.ZodNumber;
|
|
1506
|
-
z: z.ZodNumber;
|
|
1507
|
-
}, z.core.$strip>]>>;
|
|
1459
|
+
points: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"vec3">, string>>>;
|
|
1508
1460
|
}, z.core.$strip>;
|
|
1509
1461
|
export type PluginGeomCreateProfileFromSplinePointsArgs = z.infer<typeof PluginGeomCreateProfileFromSplinePointsArgs>;
|
|
1510
1462
|
/**
|