@snaptrude/plugin-core 0.0.0-dev-20260911064951 → 0.0.0-surfaces-20260921090636
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -25
- package/api-manifest.json +151 -12
- package/dist/api/core/geom/create/index.d.ts +918 -93
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +50 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +58 -35
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/edge.d.ts +2 -2
- package/dist/api/core/geom/query/face.d.ts +105 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +5 -5
- package/dist/api/core/geom/update/profile.d.ts +1 -1
- package/dist/api/core/io/import/index.d.ts +1 -3
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +22 -310
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +0 -4
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +13 -20
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +0 -5
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +27 -1
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +47 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -5
- package/dist/api/design/update/index.d.ts +87 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +2 -2
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +5 -4
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/api/presentation/annotate.d.ts +2 -2
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/api/program/site.d.ts +4 -4
- package/dist/api/program/spreadsheet.d.ts +4 -4
- package/dist/handles.d.ts +12 -22
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2773 -2445
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2726 -2422
- package/dist/index.js.map +1 -1
- package/dist/massParameters.d.ts +280 -0
- package/dist/massParameters.d.ts.map +1 -0
- package/dist/massParameters.ops.d.ts +135 -0
- package/dist/massParameters.ops.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/api/core/geom/create/index.ts +1011 -94
- package/src/api/core/geom/query/brep.ts +51 -0
- package/src/api/core/geom/query/curve.ts +25 -2
- package/src/api/core/geom/query/edge.ts +2 -2
- package/src/api/core/geom/query/face.ts +109 -4
- package/src/api/core/io/import/index.ts +3 -11
- package/src/api/design/create/index.ts +38 -335
- package/src/api/design/delete/index.ts +0 -4
- package/src/api/design/doors/index.ts +13 -20
- package/src/api/design/index.ts +0 -5
- package/src/api/design/query/geometry/index.ts +29 -0
- package/src/api/design/query/index.ts +50 -0
- package/src/api/design/update/index.ts +94 -0
- package/src/handles.ts +15 -27
- package/src/index.ts +2 -0
- package/src/massParameters.ops.ts +243 -0
- package/src/massParameters.ts +418 -0
- package/test/massParameters.test.mjs +936 -0
- package/dist/api/design/create/bulk-items.d.ts +0 -185
- package/dist/api/design/create/bulk-items.d.ts.map +0 -1
- package/dist/api/design/create/opening-fields.d.ts +0 -37
- package/dist/api/design/create/opening-fields.d.ts.map +0 -1
- package/dist/api/design/dimensions.d.ts +0 -427
- package/dist/api/design/dimensions.d.ts.map +0 -1
- package/src/api/design/create/bulk-items.ts +0 -186
- package/src/api/design/create/opening-fields.ts +0 -37
- package/src/api/design/dimensions.ts +0 -453
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* Maximum items per bulk `design.create.*` call. A bounded request keeps
|
|
4
|
-
* validation, command capture and rollback work finite; split a larger import
|
|
5
|
-
* into separate awaited batches, each with its own undo entry.
|
|
6
|
-
*/
|
|
7
|
-
export declare const PLUGIN_CREATE_BATCH_LIMIT = 1000;
|
|
8
|
-
/**
|
|
9
|
-
* One wall run to create via {@linkcode PluginDesignCreateApi.wallRuns} — the
|
|
10
|
-
* same inputs as {@linkcode PluginDesignCreateApi.walls}, one run per item.
|
|
11
|
-
*
|
|
12
|
-
* | Property | Type | Description |
|
|
13
|
-
* |---|---|---|
|
|
14
|
-
* | `profile` | {@linkcode ProfileHandle} | Ordered curve chain (wall centerlines) |
|
|
15
|
-
* | `height` | `number`? | Wall height (Snaptrude units, > 0; default engine default) |
|
|
16
|
-
* | `thickness` | `number`? | Wall thickness (Snaptrude units, > 0; default: `wallType`'s total layer thickness when given, else engine default) |
|
|
17
|
-
* | `wallType` | `string`? | Wall type name from `design.types.list("wall")` — layers/material/thickness defaults (default generic) |
|
|
18
|
-
* | `storey` | `number`? (int) | Target storey (must exist) — the run's walls are assigned + lifted to its base in the same undo entry (default: geometry-derived) |
|
|
19
|
-
*/
|
|
20
|
-
export declare const PluginCreateWallRunItem: z.ZodObject<{
|
|
21
|
-
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
22
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
thickness: z.ZodOptional<z.ZodNumber>;
|
|
24
|
-
wallType: z.ZodOptional<z.ZodString>;
|
|
25
|
-
storey: z.ZodOptional<z.ZodNumber>;
|
|
26
|
-
}, z.core.$strip>;
|
|
27
|
-
export type PluginCreateWallRunItem = z.infer<typeof PluginCreateWallRunItem>;
|
|
28
|
-
/** The `items` array of {@linkcode PluginDesignCreateApi.wallRuns} (1…1000). */
|
|
29
|
-
export declare const PluginCreateWallRunItems: z.ZodArray<z.ZodObject<{
|
|
30
|
-
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
31
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
32
|
-
thickness: z.ZodOptional<z.ZodNumber>;
|
|
33
|
-
wallType: z.ZodOptional<z.ZodString>;
|
|
34
|
-
storey: z.ZodOptional<z.ZodNumber>;
|
|
35
|
-
}, z.core.$strip>>;
|
|
36
|
-
export type PluginCreateWallRunItems = z.infer<typeof PluginCreateWallRunItems>;
|
|
37
|
-
/**
|
|
38
|
-
* One floor to create via {@linkcode PluginDesignCreateApi.floors} — the same
|
|
39
|
-
* footprint-extrude inputs as {@linkcode PluginDesignCreateApi.floor}.
|
|
40
|
-
*
|
|
41
|
-
* | Property | Type | Description |
|
|
42
|
-
* |---|---|---|
|
|
43
|
-
* | `contour` | {@linkcode ContourHandle} | Footprint (outer profile + holes) |
|
|
44
|
-
* | `thickness` | `number` | Floor thickness (Snaptrude units, > 0) |
|
|
45
|
-
* | `position` | {@linkcode Vec3Handle}? | Offset from origin (default origin) |
|
|
46
|
-
*/
|
|
47
|
-
export declare const PluginCreateFloorItem: z.ZodObject<{
|
|
48
|
-
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
|
|
49
|
-
thickness: z.ZodNumber;
|
|
50
|
-
position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
51
|
-
}, z.core.$strip>;
|
|
52
|
-
export type PluginCreateFloorItem = z.infer<typeof PluginCreateFloorItem>;
|
|
53
|
-
/** The `items` array of {@linkcode PluginDesignCreateApi.floors} (1…1000). */
|
|
54
|
-
export declare const PluginCreateFloorItems: z.ZodArray<z.ZodObject<{
|
|
55
|
-
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
|
|
56
|
-
thickness: z.ZodNumber;
|
|
57
|
-
position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
58
|
-
}, z.core.$strip>>;
|
|
59
|
-
export type PluginCreateFloorItems = z.infer<typeof PluginCreateFloorItems>;
|
|
60
|
-
/**
|
|
61
|
-
* One door to place via {@linkcode PluginDesignCreateApi.doors} — the same
|
|
62
|
-
* fields as a `"door"` {@linkcode PluginDesignCreateOpeningOptions}, so the
|
|
63
|
-
* size overrides singular {@linkcode PluginDesignCreateApi.door} lacks are
|
|
64
|
-
* available per item. `facing` and `hinge` are WORLD POINTS, not directions:
|
|
65
|
-
* `facing` on the side of the wall the door swings open to, `hinge` near the
|
|
66
|
-
* jamb it is hinged on. Rejects unknown fields.
|
|
67
|
-
*
|
|
68
|
-
* | Property | Type | Description |
|
|
69
|
-
* |---|---|---|
|
|
70
|
-
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
71
|
-
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the door |
|
|
72
|
-
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
73
|
-
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the door swings open to (default engine-chosen) |
|
|
74
|
-
* | `hinge` | {@linkcode Vec3Handle}? | World point near the jamb the door is hinged on (default the catalog item's authored side) |
|
|
75
|
-
* | `label` | `string`? | Instance name (optional) |
|
|
76
|
-
* | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
|
|
77
|
-
* | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
|
|
78
|
-
*/
|
|
79
|
-
export declare const PluginCreateDoorItem: z.ZodObject<{
|
|
80
|
-
catalogId: z.ZodString;
|
|
81
|
-
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
82
|
-
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
83
|
-
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
84
|
-
hinge: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
85
|
-
label: z.ZodOptional<z.ZodString>;
|
|
86
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
87
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
88
|
-
}, z.core.$strict>;
|
|
89
|
-
export type PluginCreateDoorItem = z.infer<typeof PluginCreateDoorItem>;
|
|
90
|
-
/** The `items` array of {@linkcode PluginDesignCreateApi.doors} (1…1000). */
|
|
91
|
-
export declare const PluginCreateDoorItems: z.ZodArray<z.ZodObject<{
|
|
92
|
-
catalogId: z.ZodString;
|
|
93
|
-
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
94
|
-
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
95
|
-
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
96
|
-
hinge: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
97
|
-
label: z.ZodOptional<z.ZodString>;
|
|
98
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
99
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
100
|
-
}, z.core.$strict>>;
|
|
101
|
-
export type PluginCreateDoorItems = z.infer<typeof PluginCreateDoorItems>;
|
|
102
|
-
/**
|
|
103
|
-
* One window to place via {@linkcode PluginDesignCreateApi.windows} — the same
|
|
104
|
-
* fields as a `"window"` {@linkcode PluginDesignCreateOpeningOptions}.
|
|
105
|
-
* `sillHeight` is a nonnegative Snaptrude-unit distance from the host wall's
|
|
106
|
-
* base to the BOTTOM of the window, not to its center. `facing` and `hinge`
|
|
107
|
-
* are WORLD POINTS, not directions: `facing` on the side of the wall the
|
|
108
|
-
* window opens to, `hinge` near the jamb it is hinged on. Rejects unknown
|
|
109
|
-
* fields.
|
|
110
|
-
*
|
|
111
|
-
* | Property | Type | Description |
|
|
112
|
-
* |---|---|---|
|
|
113
|
-
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
114
|
-
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the window |
|
|
115
|
-
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
116
|
-
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the window opens to (default engine-chosen) |
|
|
117
|
-
* | `hinge` | {@linkcode Vec3Handle}? | World point near the jamb the window is hinged on (default the catalog item's authored side) |
|
|
118
|
-
* | `label` | `string`? | Instance name (optional) |
|
|
119
|
-
* | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
|
|
120
|
-
* | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
|
|
121
|
-
* | `sillHeight` | `number`? | Wall base to window bottom (Snaptrude units, ≥ 0; default the catalog item's) |
|
|
122
|
-
*/
|
|
123
|
-
export declare const PluginCreateWindowItem: z.ZodObject<{
|
|
124
|
-
sillHeight: z.ZodOptional<z.ZodNumber>;
|
|
125
|
-
catalogId: z.ZodString;
|
|
126
|
-
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
127
|
-
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
128
|
-
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
129
|
-
hinge: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
130
|
-
label: z.ZodOptional<z.ZodString>;
|
|
131
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
132
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
133
|
-
}, z.core.$strict>;
|
|
134
|
-
export type PluginCreateWindowItem = z.infer<typeof PluginCreateWindowItem>;
|
|
135
|
-
/** The `items` array of {@linkcode PluginDesignCreateApi.windows} (1…1000). */
|
|
136
|
-
export declare const PluginCreateWindowItems: z.ZodArray<z.ZodObject<{
|
|
137
|
-
sillHeight: z.ZodOptional<z.ZodNumber>;
|
|
138
|
-
catalogId: z.ZodString;
|
|
139
|
-
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
140
|
-
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
141
|
-
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
142
|
-
hinge: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
143
|
-
label: z.ZodOptional<z.ZodString>;
|
|
144
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
145
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
146
|
-
}, z.core.$strict>>;
|
|
147
|
-
export type PluginCreateWindowItems = z.infer<typeof PluginCreateWindowItems>;
|
|
148
|
-
/**
|
|
149
|
-
* One furniture instance to place via
|
|
150
|
-
* {@linkcode PluginDesignCreateApi.furnitureItems} — the same inputs as
|
|
151
|
-
* {@linkcode PluginDesignCreateApi.furniture} minus `createNewSourceMesh`: in a
|
|
152
|
-
* batch the host owns source-mesh persistence (a source is recorded once per
|
|
153
|
-
* call, however many items reuse it).
|
|
154
|
-
*
|
|
155
|
-
* `position.y` is the REST elevation: the item is grounded so its bounding-box
|
|
156
|
-
* base sits exactly at `position.y` (the same surface-flush contract as
|
|
157
|
-
* interactive drag-drop) — pass the floor/storey elevation to stand furniture
|
|
158
|
-
* on it; never add half the item's height yourself.
|
|
159
|
-
*
|
|
160
|
-
* | Property | Type | Description |
|
|
161
|
-
* |---|---|---|
|
|
162
|
-
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
163
|
-
* | `position` | {@linkcode Vec3Handle} | Absolute world placement point (`y` = rest elevation) |
|
|
164
|
-
* | `label` | `string`? | Instance name and readable label (default auto `${name}Ins${n}`) |
|
|
165
|
-
* | `angleInDegrees` | `number`? | Rotation about the vertical axis, in degrees (default unrotated) |
|
|
166
|
-
*/
|
|
167
|
-
export declare const PluginCreateFurnitureItem: z.ZodObject<{
|
|
168
|
-
catalogId: z.ZodString;
|
|
169
|
-
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
170
|
-
label: z.ZodOptional<z.ZodString>;
|
|
171
|
-
angleInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
172
|
-
}, z.core.$strip>;
|
|
173
|
-
export type PluginCreateFurnitureItem = z.infer<typeof PluginCreateFurnitureItem>;
|
|
174
|
-
/**
|
|
175
|
-
* The `items` array of {@linkcode PluginDesignCreateApi.furnitureItems}
|
|
176
|
-
* (1…1000).
|
|
177
|
-
*/
|
|
178
|
-
export declare const PluginCreateFurnitureItems: z.ZodArray<z.ZodObject<{
|
|
179
|
-
catalogId: z.ZodString;
|
|
180
|
-
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
181
|
-
label: z.ZodOptional<z.ZodString>;
|
|
182
|
-
angleInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
183
|
-
}, z.core.$strip>>;
|
|
184
|
-
export type PluginCreateFurnitureItems = z.infer<typeof PluginCreateFurnitureItems>;
|
|
185
|
-
//# sourceMappingURL=bulk-items.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bulk-items.d.ts","sourceRoot":"","sources":["../../../../src/api/design/create/bulk-items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAA;AAM7C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;;;;;;iBAMlC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E,gFAAgF;AAChF,eAAO,MAAM,wBAAwB;;;;;;kBAGJ,CAAA;AACjC,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAM/E;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,8EAA8E;AAC9E,eAAO,MAAM,sBAAsB;;;;kBAGF,CAAA;AACjC,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAM3E;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;kBAEtB,CAAA;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB;;;;;;;;;mBAGD,CAAA;AACjC,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;kBAKxB,CAAA;AACX,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB;;;;;;;;;;mBAGH,CAAA;AACjC,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAM7E;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;kBAGN,CAAA;AACjC,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { ComponentHandle } from "../../../handles";
|
|
3
|
-
/**
|
|
4
|
-
* The shared field bag every hosted opening (door / window) carries — used by
|
|
5
|
-
* {@linkcode PluginDesignCreateOpeningOptions} and by the bulk item schemas in
|
|
6
|
-
* `bulk-items.ts`, so singular and plural openings validate identically.
|
|
7
|
-
*
|
|
8
|
-
* `facing` and `hinge` are WORLD POINTS, not directions: `facing` sits on the
|
|
9
|
-
* side of the wall the leaf swings open to (where the plan symbol draws the
|
|
10
|
-
* swing arc); `hinge` sits near the jamb the leaf is hinged on — the item is
|
|
11
|
-
* reflected along the wall so its hinged jamb is the one nearer that point.
|
|
12
|
-
* Either may be omitted (engine-chosen side / the catalog item's authored
|
|
13
|
-
* hinge side). Neither has a visible effect on symmetric items such as
|
|
14
|
-
* sliders or fixed windows.
|
|
15
|
-
*
|
|
16
|
-
* | Property | Type | Description |
|
|
17
|
-
* |---|---|---|
|
|
18
|
-
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
19
|
-
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the opening |
|
|
20
|
-
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
21
|
-
* | `facing` | {@linkcode Vec3Handle}? | World point on the side of the wall the opening swings open to (default engine-chosen) |
|
|
22
|
-
* | `hinge` | {@linkcode Vec3Handle}? | World point near the jamb the opening is hinged on (default the catalog item's authored side) |
|
|
23
|
-
* | `label` | `string`? | Instance name (optional) |
|
|
24
|
-
* | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
|
|
25
|
-
* | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
|
|
26
|
-
*/
|
|
27
|
-
export declare const PluginOpeningBaseOptions: {
|
|
28
|
-
catalogId: z.ZodString;
|
|
29
|
-
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
30
|
-
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
31
|
-
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
32
|
-
hinge: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
33
|
-
label: z.ZodOptional<z.ZodString>;
|
|
34
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
35
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=opening-fields.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opening-fields.d.ts","sourceRoot":"","sources":["../../../../src/api/design/create/opening-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAc,MAAM,kBAAkB,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;CASpC,CAAA"}
|
|
@@ -1,427 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { PluginApiReturn } from "../../types";
|
|
3
|
-
import { ComponentHandle, DimensionHandle, Vec3Handle } from "../../handles";
|
|
4
|
-
/**
|
|
5
|
-
* Dimension lines (Measuring Tape) — the measurement annotations the Measuring
|
|
6
|
-
* Tape tool leaves in the 3D scene, NOT an entity's width/height/depth
|
|
7
|
-
* properties (for those see `design.windows.getDimensions`,
|
|
8
|
-
* `design.create.staircase`'s `dimensions`, or `design.query.measure`).
|
|
9
|
-
*
|
|
10
|
-
* A dimension line is a scene object: two endpoints anchored to the geometry
|
|
11
|
-
* they were measured on, an offset that pushes the drawn line clear of the
|
|
12
|
-
* span, and a label showing the distance in the project's units. Because the
|
|
13
|
-
* endpoints are anchored, the line follows its host when the host is moved,
|
|
14
|
-
* edited, or resized, and it is removed with the host when the host is deleted.
|
|
15
|
-
* Dimension lines are storey-scoped, render in both plan and 3D, and are drawn
|
|
16
|
-
* into Present-mode sheets (style them with
|
|
17
|
-
* `presentation.placedViews.updateStyles(shapeId, "Dimension", …)`).
|
|
18
|
-
*
|
|
19
|
-
* **Units.** Every length here — `offset` and the record's `length` — is in
|
|
20
|
-
* **Babylon units** (BU), the engine's storage unit: 1 BU = 10 in = 0.254 m.
|
|
21
|
-
* Convert with `core.units.convert(value, from, await core.units.getBabylonType())`.
|
|
22
|
-
*
|
|
23
|
-
* **Offset convention.** `options.offset` is a **signed** distance in BU:
|
|
24
|
-
* positive pushes the drawn line to the **left** of the `from` → `to`
|
|
25
|
-
* direction in plan (`cross(up, direction)`), negative to the right. It
|
|
26
|
-
* defaults to `3.937` BU (1 m). The placement mode is always `"across"` (the
|
|
27
|
-
* tape tool's perpendicular mode), which re-perpendicularises when the host
|
|
28
|
-
* geometry is edited.
|
|
29
|
-
*
|
|
30
|
-
* Every mutator here (`create`, `delete`, `hide`, `show`) commits through the
|
|
31
|
-
* engine's command manager, so each call is a single undo entry, is autosaved,
|
|
32
|
-
* and replays to collaborators.
|
|
33
|
-
*
|
|
34
|
-
* Accessed via `snaptrude.design.dimensions`.
|
|
35
|
-
*/
|
|
36
|
-
export declare abstract class PluginDesignDimensionsApi {
|
|
37
|
-
constructor();
|
|
38
|
-
/**
|
|
39
|
-
* Draw one dimension line between two world points, anchored to a component.
|
|
40
|
-
*
|
|
41
|
-
* `anchor` is **required**: the endpoints are stored relative to the anchor's
|
|
42
|
-
* mesh, and only component-anchored dimension lines survive a reload. A
|
|
43
|
-
* free-point dimension anchors to a scene helper mesh whose id is not stable
|
|
44
|
-
* across reloads, so it is dropped or corrupted when the project is reopened
|
|
45
|
-
* — the host therefore rejects a non-component anchor rather than writing a
|
|
46
|
-
* record that silently disappears. Pass `options.anchorTo` to anchor the
|
|
47
|
-
* second endpoint to a different component (it defaults to `anchor`).
|
|
48
|
-
*
|
|
49
|
-
* The dimension is created flat (never plan-projected) so the same call
|
|
50
|
-
* produces the same record whatever the current camera; it still draws in
|
|
51
|
-
* plan.
|
|
52
|
-
*
|
|
53
|
-
* @param from - World-space first endpoint.
|
|
54
|
-
* @param to - World-space second endpoint.
|
|
55
|
-
* @param anchor - The component the first endpoint is anchored to (required).
|
|
56
|
-
* @param options - `anchorTo` (component for the second endpoint; defaults to
|
|
57
|
-
* `anchor`), `offset` (signed perpendicular offset in Babylon units,
|
|
58
|
-
* positive = left of the `from` → `to` direction in plan; default `3.937`
|
|
59
|
-
* BU = 1 m).
|
|
60
|
-
* @returns The new dimension line's {@linkcode DimensionHandle}.
|
|
61
|
-
* @throws `VALIDATION` for malformed arguments or a degenerate span (`from`
|
|
62
|
-
* and `to` closer than the engine's minimum); `HANDLE_INVALID` for an
|
|
63
|
-
* unknown `anchor` / `anchorTo`; `PRECONDITION_FAILED` when the anchor is
|
|
64
|
-
* outside the active proposal or the editor is not mounted;
|
|
65
|
-
* `METHOD_NOT_PERMITTED` when plugin writes are disabled.
|
|
66
|
-
*
|
|
67
|
-
* @examplePrompt Dimension every wall on level 2
|
|
68
|
-
* @examplePrompt Add a dimension line along this wall
|
|
69
|
-
* @examplePrompt Measure the width of this room and label it on the plan
|
|
70
|
-
*
|
|
71
|
-
* # Example
|
|
72
|
-
* ```ts
|
|
73
|
-
* const { design, core } = snaptrude
|
|
74
|
-
* const v = core.math.vec3
|
|
75
|
-
* const curve = core.geom.query.curve
|
|
76
|
-
* for (const wall of await design.query.listWalls({ storeys: [2] })) {
|
|
77
|
-
* const cl = await design.query.geometry.getCenterline(wall)
|
|
78
|
-
* if (!cl) continue
|
|
79
|
-
* const a = await curve.getStartPoint(cl)
|
|
80
|
-
* const b = await curve.getEndPoint(cl)
|
|
81
|
-
* await design.dimensions.create(
|
|
82
|
-
* await v.new(a.x, a.y, a.z),
|
|
83
|
-
* await v.new(b.x, b.y, b.z),
|
|
84
|
-
* wall,
|
|
85
|
-
* )
|
|
86
|
-
* }
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
abstract create(from: Vec3Handle, to: Vec3Handle, anchor: ComponentHandle, options?: {
|
|
90
|
-
anchorTo?: ComponentHandle;
|
|
91
|
-
offset?: number;
|
|
92
|
-
}): PluginApiReturn<DimensionHandle>;
|
|
93
|
-
/**
|
|
94
|
-
* List the dimension lines in the project as full records.
|
|
95
|
-
*
|
|
96
|
-
* Filters combine with AND. `storeys` keeps only the dimensions on those
|
|
97
|
-
* storey numbers, `anchors` only the ones anchored to those components
|
|
98
|
-
* (matching either endpoint, and matching an instanced anchor's source mesh
|
|
99
|
-
* too), `isHidden` only the ones whose user Hide flag equals the value given.
|
|
100
|
-
*
|
|
101
|
-
* Dimension lines drawn by the Measuring Tape onto a scene helper mesh rather
|
|
102
|
-
* than a component come back with `anchor: null` and are not proposal-scoped.
|
|
103
|
-
*
|
|
104
|
-
* @param options - `storeys`, `anchors`, `isHidden` filters (all optional,
|
|
105
|
-
* ANDed).
|
|
106
|
-
* @returns The matching {@linkcode PluginDimensionLine} records (`[]` when
|
|
107
|
-
* nothing matches).
|
|
108
|
-
* @throws `VALIDATION` for malformed filters; `HANDLE_INVALID` for an unknown
|
|
109
|
-
* handle in `anchors`.
|
|
110
|
-
*
|
|
111
|
-
* @examplePrompt List all the dimension lines in this model
|
|
112
|
-
* @examplePrompt Which dimensions are on level 3?
|
|
113
|
-
* @examplePrompt Flag any dimension line shorter than 600 mm
|
|
114
|
-
*
|
|
115
|
-
* @performance Array read — one host round-trip returns every record. Filter
|
|
116
|
-
* in one call rather than calling `get` per dimension.
|
|
117
|
-
*
|
|
118
|
-
* # Example
|
|
119
|
-
* ```ts
|
|
120
|
-
* const units = snaptrude.core.units
|
|
121
|
-
* const min = await units.convert(600, "millimeters", await units.getBabylonType())
|
|
122
|
-
* const short = (await snaptrude.design.dimensions.list()).filter(
|
|
123
|
-
* (d) => d.length < min,
|
|
124
|
-
* )
|
|
125
|
-
* console.log(short.map((d) => `${d.label} on storey ${d.storey}`))
|
|
126
|
-
* ```
|
|
127
|
-
*/
|
|
128
|
-
abstract list(options?: {
|
|
129
|
-
storeys?: number[];
|
|
130
|
-
anchors?: ComponentHandle[];
|
|
131
|
-
isHidden?: boolean;
|
|
132
|
-
}): PluginApiReturn<PluginDimensionLine[]>;
|
|
133
|
-
/**
|
|
134
|
-
* Read one dimension line by handle.
|
|
135
|
-
*
|
|
136
|
-
* Returns `null` — rather than throwing — when the dimension no longer
|
|
137
|
-
* exists, so a handle kept across a delete or an undo can be polled safely.
|
|
138
|
-
*
|
|
139
|
-
* @param dimension - The dimension line to read.
|
|
140
|
-
* @returns Its {@linkcode PluginDimensionLine} record, or `null` if it is
|
|
141
|
-
* gone.
|
|
142
|
-
* @throws `VALIDATION` if `dimension` is not a non-empty id string.
|
|
143
|
-
*
|
|
144
|
-
* @examplePrompt Read the dimension line I just created
|
|
145
|
-
* @examplePrompt How long is this dimension and what does its label say?
|
|
146
|
-
* @examplePrompt Check whether that dimension line still exists
|
|
147
|
-
*
|
|
148
|
-
* # Example
|
|
149
|
-
* ```ts
|
|
150
|
-
* const dim = await snaptrude.design.dimensions.get(handle)
|
|
151
|
-
* if (dim) console.log(dim.label, dim.length, dim.storey)
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
abstract get(dimension: DimensionHandle): PluginApiReturn<PluginDimensionLine | null>;
|
|
155
|
-
/**
|
|
156
|
-
* Delete dimension lines — the same hard removal as selecting them and
|
|
157
|
-
* pressing Delete. Undoable as a **single** entry for the whole batch.
|
|
158
|
-
*
|
|
159
|
-
* Deleted handles are stale afterwards: {@linkcode
|
|
160
|
-
* PluginDesignDimensionsApi.get} returns `null` for them and the other
|
|
161
|
-
* mutators throw `HANDLE_INVALID`.
|
|
162
|
-
*
|
|
163
|
-
* @param dimensions - The dimension lines to delete (at least one — an empty
|
|
164
|
-
* array is a caller error, not a no-op).
|
|
165
|
-
* @returns The dimensions that were deleted, as
|
|
166
|
-
* {@linkcode PluginDimensionsChangeResult}.
|
|
167
|
-
* @throws `VALIDATION` for an empty or malformed array; `HANDLE_INVALID` if
|
|
168
|
-
* any handle is unknown (the whole call rejects before anything is
|
|
169
|
-
* deleted); `PRECONDITION_FAILED` if any dimension's anchor is outside the
|
|
170
|
-
* active proposal; `METHOD_NOT_PERMITTED` when plugin writes are disabled.
|
|
171
|
-
*
|
|
172
|
-
* @examplePrompt Remove all dimension lines
|
|
173
|
-
* @examplePrompt Delete the dimensions on this wall
|
|
174
|
-
* @examplePrompt Clear the measurements I added to level 2
|
|
175
|
-
*
|
|
176
|
-
* @performance Array API — pass the whole set in one call (one host
|
|
177
|
-
* round-trip, one undo entry). Never loop this per dimension.
|
|
178
|
-
*
|
|
179
|
-
* # Example
|
|
180
|
-
* ```ts
|
|
181
|
-
* const dims = snaptrude.design.dimensions
|
|
182
|
-
* const onWall = await dims.list({ anchors: [wall] })
|
|
183
|
-
* if (onWall.length > 0) await dims.delete(onWall.map((d) => d.id))
|
|
184
|
-
* ```
|
|
185
|
-
*/
|
|
186
|
-
abstract delete(dimensions: DimensionHandle[]): PluginApiReturn<PluginDimensionsChangeResult>;
|
|
187
|
-
/**
|
|
188
|
-
* Hide dimension lines from the viewport — the same as the right-click "Hide"
|
|
189
|
-
* action (it sets the user Hide flag, `isHidden`). Undoable. Already-hidden
|
|
190
|
-
* dimensions are skipped and are not reported in `affected`.
|
|
191
|
-
*
|
|
192
|
-
* @param dimensions - The dimension lines to hide.
|
|
193
|
-
* @returns The dimensions actually hidden, as
|
|
194
|
-
* {@linkcode PluginDimensionsChangeResult} — already-hidden inputs are
|
|
195
|
-
* omitted, so `affected` can be shorter than the input.
|
|
196
|
-
* @throws `VALIDATION` for a malformed array; `HANDLE_INVALID` if any handle
|
|
197
|
-
* is unknown; `PRECONDITION_FAILED` if any dimension's anchor is outside
|
|
198
|
-
* the active proposal; `METHOD_NOT_PERMITTED` when plugin writes are
|
|
199
|
-
* disabled.
|
|
200
|
-
*
|
|
201
|
-
* @examplePrompt Hide the dimensions on this storey
|
|
202
|
-
* @examplePrompt Hide every dimension line while I present
|
|
203
|
-
* @examplePrompt Temporarily hide the measurements on level 3
|
|
204
|
-
*
|
|
205
|
-
* @performance Array API — one host round-trip and one undo entry for the
|
|
206
|
-
* whole set.
|
|
207
|
-
*
|
|
208
|
-
* # Example
|
|
209
|
-
* ```ts
|
|
210
|
-
* const dims = snaptrude.design.dimensions
|
|
211
|
-
* const onLevel3 = await dims.list({ storeys: [3] })
|
|
212
|
-
* const { affected } = await dims.hide(onLevel3.map((d) => d.id))
|
|
213
|
-
* ```
|
|
214
|
-
*/
|
|
215
|
-
abstract hide(dimensions: DimensionHandle[]): PluginApiReturn<PluginDimensionsChangeResult>;
|
|
216
|
-
/**
|
|
217
|
-
* Reveal hidden dimension lines — clear the user Hide flag, the inverse of
|
|
218
|
-
* {@linkcode PluginDesignDimensionsApi.hide}. Undoable. Already-visible
|
|
219
|
-
* dimensions are skipped and are not reported in `affected`.
|
|
220
|
-
*
|
|
221
|
-
* Clearing the flag does not guarantee the dimension is on screen: a
|
|
222
|
-
* dimension whose anchor component is itself hidden stays off screen with
|
|
223
|
-
* `isHidden: false` and `isVisible: false`.
|
|
224
|
-
*
|
|
225
|
-
* @param dimensions - The dimension lines to reveal.
|
|
226
|
-
* @returns The dimensions actually revealed, as
|
|
227
|
-
* {@linkcode PluginDimensionsChangeResult} — already-visible inputs are
|
|
228
|
-
* omitted, so `affected` can be shorter than the input.
|
|
229
|
-
* @throws `VALIDATION` for a malformed array; `HANDLE_INVALID` if any handle
|
|
230
|
-
* is unknown; `PRECONDITION_FAILED` if any dimension's anchor is outside
|
|
231
|
-
* the active proposal; `METHOD_NOT_PERMITTED` when plugin writes are
|
|
232
|
-
* disabled.
|
|
233
|
-
*
|
|
234
|
-
* @examplePrompt Show the dimension lines again
|
|
235
|
-
* @examplePrompt Unhide all the hidden dimensions
|
|
236
|
-
* @examplePrompt Bring back the measurements I hid on this storey
|
|
237
|
-
*
|
|
238
|
-
* @performance Array API — one host round-trip and one undo entry for the
|
|
239
|
-
* whole set.
|
|
240
|
-
*
|
|
241
|
-
* # Example
|
|
242
|
-
* ```ts
|
|
243
|
-
* const dims = snaptrude.design.dimensions
|
|
244
|
-
* const hidden = await dims.list({ isHidden: true })
|
|
245
|
-
* await dims.show(hidden.map((d) => d.id))
|
|
246
|
-
* ```
|
|
247
|
-
*/
|
|
248
|
-
abstract show(dimensions: DimensionHandle[]): PluginApiReturn<PluginDimensionsChangeResult>;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* How a dimension line's drawn offset is constrained.
|
|
252
|
-
*
|
|
253
|
-
* - `"across"` — perpendicular to the span (the tape tool's default, and what
|
|
254
|
-
* every plugin-created dimension uses); re-perpendicularises when the host
|
|
255
|
-
* geometry is edited.
|
|
256
|
-
* - `"x"` / `"y"` / `"z"` — the offset is locked to that world axis.
|
|
257
|
-
* - `"none"` — no placement mode recorded (a plain world-space offset).
|
|
258
|
-
*/
|
|
259
|
-
export declare const PluginDimensionPlacement: z.ZodEnum<{
|
|
260
|
-
x: "x";
|
|
261
|
-
y: "y";
|
|
262
|
-
z: "z";
|
|
263
|
-
across: "across";
|
|
264
|
-
none: "none";
|
|
265
|
-
}>;
|
|
266
|
-
export type PluginDimensionPlacement = z.infer<typeof PluginDimensionPlacement>;
|
|
267
|
-
/**
|
|
268
|
-
* One dimension line (Measuring Tape annotation). Lengths are in **Babylon
|
|
269
|
-
* units** (1 BU = 0.254 m — convert with `core.units.convert`).
|
|
270
|
-
*
|
|
271
|
-
* | Property | Type | Description |
|
|
272
|
-
* |---|---|---|
|
|
273
|
-
* | `id` | {@linkcode DimensionHandle} | The dimension line's handle |
|
|
274
|
-
* | `from` | {@linkcode Vec3Components} | Live world position of the first endpoint |
|
|
275
|
-
* | `to` | {@linkcode Vec3Components} | Live world position of the second endpoint |
|
|
276
|
-
* | `length` | `number` | Straight-line distance between `from` and `to`, in Babylon units |
|
|
277
|
-
* | `label` | `string` | The text drawn on the canvas, in the project's units (a bare number for metric/inch projects, `27' 7"` style for feet-inches). For a span whose x, y and z all differ the drawn line is the plan projection, so `label` reads the horizontal distance while `length` is the true 3D one |
|
|
278
|
-
* | `offset` | {@linkcode Vec3Components} | World vector from the measured span to the drawn line |
|
|
279
|
-
* | `placement` | {@linkcode PluginDimensionPlacement} | How that offset is constrained |
|
|
280
|
-
* | `anchor` | {@linkcode ComponentHandle}` \| null` | Component the first endpoint is anchored to; `null` for a free point or a non-component host mesh |
|
|
281
|
-
* | `anchorTo` | {@linkcode ComponentHandle}` \| null` | Component the second endpoint is anchored to; equals `anchor` when both endpoints share a host |
|
|
282
|
-
* | `storey` | `number` | Storey the dimension belongs to |
|
|
283
|
-
* | `buildingId` | `string \| null` | Building it belongs to, when it has one |
|
|
284
|
-
* | `isHidden` | `boolean` | The user Hide flag (what `hide` / `show` toggle) |
|
|
285
|
-
* | `isVisible` | `boolean` | Whether it is actually drawn — `false` when hidden, and also when an anchor component is hidden |
|
|
286
|
-
* | `isPlanProjected` | `boolean` | Whether it is drawn flattened onto the storey base (Measuring Tape dimensions drawn in 2D are; plugin-created ones never are) |
|
|
287
|
-
*/
|
|
288
|
-
export declare const PluginDimensionLine: z.ZodObject<{
|
|
289
|
-
id: z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>;
|
|
290
|
-
from: z.ZodObject<{
|
|
291
|
-
x: z.ZodNumber;
|
|
292
|
-
y: z.ZodNumber;
|
|
293
|
-
z: z.ZodNumber;
|
|
294
|
-
}, z.core.$strip>;
|
|
295
|
-
to: z.ZodObject<{
|
|
296
|
-
x: z.ZodNumber;
|
|
297
|
-
y: z.ZodNumber;
|
|
298
|
-
z: z.ZodNumber;
|
|
299
|
-
}, z.core.$strip>;
|
|
300
|
-
length: z.ZodNumber;
|
|
301
|
-
label: z.ZodString;
|
|
302
|
-
offset: z.ZodObject<{
|
|
303
|
-
x: z.ZodNumber;
|
|
304
|
-
y: z.ZodNumber;
|
|
305
|
-
z: z.ZodNumber;
|
|
306
|
-
}, z.core.$strip>;
|
|
307
|
-
placement: z.ZodEnum<{
|
|
308
|
-
x: "x";
|
|
309
|
-
y: "y";
|
|
310
|
-
z: "z";
|
|
311
|
-
across: "across";
|
|
312
|
-
none: "none";
|
|
313
|
-
}>;
|
|
314
|
-
anchor: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
315
|
-
anchorTo: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
316
|
-
storey: z.ZodNumber;
|
|
317
|
-
buildingId: z.ZodNullable<z.ZodString>;
|
|
318
|
-
isHidden: z.ZodBoolean;
|
|
319
|
-
isVisible: z.ZodBoolean;
|
|
320
|
-
isPlanProjected: z.ZodBoolean;
|
|
321
|
-
}, z.core.$strip>;
|
|
322
|
-
export type PluginDimensionLine = z.infer<typeof PluginDimensionLine>;
|
|
323
|
-
/**
|
|
324
|
-
* Result of every `design.dimensions` mutation that takes a batch
|
|
325
|
-
* ({@linkcode PluginDesignDimensionsApi.delete} /
|
|
326
|
-
* {@linkcode PluginDesignDimensionsApi.hide} /
|
|
327
|
-
* {@linkcode PluginDesignDimensionsApi.show}) — the dimensions actually
|
|
328
|
-
* affected. `hide` / `show` skip dimensions already in the target state, so
|
|
329
|
-
* `affected` can be shorter than the input; `delete` echoes the whole batch.
|
|
330
|
-
* Failures throw (the RPC rejects); there is no `Result<>` monad in the SDK.
|
|
331
|
-
*
|
|
332
|
-
* | Property | Type | Description |
|
|
333
|
-
* |---|---|---|
|
|
334
|
-
* | `affected` | {@linkcode DimensionHandle}`[]` | The dimension lines the call changed |
|
|
335
|
-
*/
|
|
336
|
-
export declare const PluginDimensionsChangeResult: z.ZodObject<{
|
|
337
|
-
affected: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>>;
|
|
338
|
-
}, z.core.$strip>;
|
|
339
|
-
export type PluginDimensionsChangeResult = z.infer<typeof PluginDimensionsChangeResult>;
|
|
340
|
-
/**
|
|
341
|
-
* Arguments for {@linkcode PluginDesignDimensionsApi.create} (options
|
|
342
|
-
* flattened).
|
|
343
|
-
*
|
|
344
|
-
* | Property | Type | Description |
|
|
345
|
-
* |---|---|---|
|
|
346
|
-
* | `from` | {@linkcode Vec3Handle} | World-space first endpoint |
|
|
347
|
-
* | `to` | {@linkcode Vec3Handle} | World-space second endpoint |
|
|
348
|
-
* | `anchor` | {@linkcode ComponentHandle} | Component the first endpoint anchors to (required — free-point dimensions do not survive a reload) |
|
|
349
|
-
* | `anchorTo` | {@linkcode ComponentHandle}? | Component for the second endpoint (default: `anchor`) |
|
|
350
|
-
* | `offset` | `number`? | Signed perpendicular offset in Babylon units, positive = left of the `from` → `to` direction in plan (default `3.937` BU = 1 m) |
|
|
351
|
-
*
|
|
352
|
-
* TRANSPORT: positional args — validated host-side as this object.
|
|
353
|
-
*/
|
|
354
|
-
export declare const PluginDesignDimensionsCreateArgs: z.ZodObject<{
|
|
355
|
-
from: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
|
|
356
|
-
to: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
|
|
357
|
-
anchor: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
358
|
-
anchorTo: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
|
|
359
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
360
|
-
}, z.core.$strip>;
|
|
361
|
-
export type PluginDesignDimensionsCreateArgs = z.infer<typeof PluginDesignDimensionsCreateArgs>;
|
|
362
|
-
/**
|
|
363
|
-
* Arguments for {@linkcode PluginDesignDimensionsApi.list} (options flattened).
|
|
364
|
-
* Filters combine with AND; omitting all of them lists every dimension line.
|
|
365
|
-
*
|
|
366
|
-
* | Property | Type | Description |
|
|
367
|
-
* |---|---|---|
|
|
368
|
-
* | `storeys` | `number[]`? | Only dimensions on these storey numbers |
|
|
369
|
-
* | `anchors` | {@linkcode ComponentHandle}`[]`? | Only dimensions anchored to these components (either endpoint) |
|
|
370
|
-
* | `isHidden` | `boolean`? | user-hidden flag === |
|
|
371
|
-
*/
|
|
372
|
-
export declare const PluginDesignDimensionsListArgs: z.ZodObject<{
|
|
373
|
-
storeys: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
374
|
-
anchors: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>>;
|
|
375
|
-
isHidden: z.ZodOptional<z.ZodBoolean>;
|
|
376
|
-
}, z.core.$strip>;
|
|
377
|
-
export type PluginDesignDimensionsListArgs = z.infer<typeof PluginDesignDimensionsListArgs>;
|
|
378
|
-
/**
|
|
379
|
-
* Arguments for {@linkcode PluginDesignDimensionsApi.get}.
|
|
380
|
-
*
|
|
381
|
-
* | Property | Type | Description |
|
|
382
|
-
* |---|---|---|
|
|
383
|
-
* | `dimension` | {@linkcode DimensionHandle} | The dimension line to read |
|
|
384
|
-
*/
|
|
385
|
-
export declare const PluginDesignDimensionsGetArgs: z.ZodObject<{
|
|
386
|
-
dimension: z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>;
|
|
387
|
-
}, z.core.$strip>;
|
|
388
|
-
export type PluginDesignDimensionsGetArgs = z.infer<typeof PluginDesignDimensionsGetArgs>;
|
|
389
|
-
/**
|
|
390
|
-
* Arguments for {@linkcode PluginDesignDimensionsApi.delete}.
|
|
391
|
-
*
|
|
392
|
-
* `.min(1)` mirrors {@linkcode PluginDesignDeleteEntitiesArgs}: an empty delete
|
|
393
|
-
* is a caller error, not a no-op.
|
|
394
|
-
*
|
|
395
|
-
* | Property | Type | Description |
|
|
396
|
-
* |---|---|---|
|
|
397
|
-
* | `dimensions` | {@linkcode DimensionHandle}`[]` | Dimension lines to delete. Unknown handles reject the whole call (fail-fast). |
|
|
398
|
-
*/
|
|
399
|
-
export declare const PluginDesignDimensionsDeleteArgs: z.ZodObject<{
|
|
400
|
-
dimensions: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>>;
|
|
401
|
-
}, z.core.$strip>;
|
|
402
|
-
export type PluginDesignDimensionsDeleteArgs = z.infer<typeof PluginDesignDimensionsDeleteArgs>;
|
|
403
|
-
/**
|
|
404
|
-
* Arguments for {@linkcode PluginDesignDimensionsApi.hide}. An empty array is
|
|
405
|
-
* allowed and is a no-op (mirroring {@linkcode PluginDesignVisibilityHideArgs}).
|
|
406
|
-
*
|
|
407
|
-
* | Property | Type | Description |
|
|
408
|
-
* |---|---|---|
|
|
409
|
-
* | `dimensions` | {@linkcode DimensionHandle}`[]` | Dimension lines to hide |
|
|
410
|
-
*/
|
|
411
|
-
export declare const PluginDesignDimensionsHideArgs: z.ZodObject<{
|
|
412
|
-
dimensions: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>>;
|
|
413
|
-
}, z.core.$strip>;
|
|
414
|
-
export type PluginDesignDimensionsHideArgs = z.infer<typeof PluginDesignDimensionsHideArgs>;
|
|
415
|
-
/**
|
|
416
|
-
* Arguments for {@linkcode PluginDesignDimensionsApi.show}. An empty array is
|
|
417
|
-
* allowed and is a no-op.
|
|
418
|
-
*
|
|
419
|
-
* | Property | Type | Description |
|
|
420
|
-
* |---|---|---|
|
|
421
|
-
* | `dimensions` | {@linkcode DimensionHandle}`[]` | Dimension lines to reveal |
|
|
422
|
-
*/
|
|
423
|
-
export declare const PluginDesignDimensionsShowArgs: z.ZodObject<{
|
|
424
|
-
dimensions: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>>;
|
|
425
|
-
}, z.core.$strip>;
|
|
426
|
-
export type PluginDesignDimensionsShowArgs = z.infer<typeof PluginDesignDimensionsShowArgs>;
|
|
427
|
-
//# sourceMappingURL=dimensions.d.ts.map
|