@snaptrude/plugin-core 0.2.9 → 0.5.0
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 +128 -50
- package/CHANGELOG.md +52 -6
- package/api-manifest.full.json +3999 -0
- package/api-manifest.json +3845 -0
- package/dist/api/core/buildings.d.ts +427 -0
- package/dist/api/core/buildings.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +230 -0
- package/dist/api/core/comment/index.d.ts.map +1 -0
- package/dist/api/core/geom/create/index.d.ts +247 -0
- package/dist/api/core/geom/create/index.d.ts.map +1 -0
- package/dist/api/core/geom/delete/index.d.ts +72 -0
- package/dist/api/core/geom/delete/index.d.ts.map +1 -0
- package/dist/api/core/geom/index.d.ts +24 -23
- package/dist/api/core/geom/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/arc.d.ts +169 -0
- package/dist/api/core/geom/query/arc.d.ts.map +1 -0
- package/dist/api/core/geom/query/brep.d.ts +402 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -0
- package/dist/api/core/geom/query/circle.d.ts +378 -0
- package/dist/api/core/geom/query/circle.d.ts.map +1 -0
- package/dist/api/core/geom/query/contour.d.ts +450 -0
- package/dist/api/core/geom/query/contour.d.ts.map +1 -0
- package/dist/api/core/geom/query/curve.d.ts +918 -0
- package/dist/api/core/geom/query/curve.d.ts.map +1 -0
- package/dist/api/core/geom/query/edge.d.ts +128 -0
- package/dist/api/core/geom/query/edge.d.ts.map +1 -0
- package/dist/api/core/geom/query/face.d.ts +363 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -0
- package/dist/api/core/geom/query/halfedge.d.ts +206 -0
- package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
- package/dist/api/core/geom/query/index.d.ts +61 -0
- package/dist/api/core/geom/query/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/profile.d.ts +410 -0
- package/dist/api/core/geom/query/profile.d.ts.map +1 -0
- package/dist/api/core/geom/query/vertex.d.ts +187 -0
- package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
- package/dist/api/core/geom/update/contour.d.ts +272 -0
- package/dist/api/core/geom/update/contour.d.ts.map +1 -0
- package/dist/api/core/geom/update/curve.d.ts +180 -0
- package/dist/api/core/geom/update/curve.d.ts.map +1 -0
- package/dist/api/core/geom/update/index.d.ts +27 -0
- package/dist/api/core/geom/update/index.d.ts.map +1 -0
- package/dist/api/core/geom/update/profile.d.ts +329 -0
- package/dist/api/core/geom/update/profile.d.ts.map +1 -0
- package/dist/api/core/groups.d.ts +485 -0
- package/dist/api/core/groups.d.ts.map +1 -0
- package/dist/api/core/history/index.d.ts +78 -0
- package/dist/api/core/history/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +46 -1
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +402 -0
- package/dist/api/core/layers.d.ts.map +1 -0
- package/dist/api/core/math/quat.d.ts +111 -128
- package/dist/api/core/math/quat.d.ts.map +1 -1
- package/dist/api/core/math/vec3.d.ts +120 -102
- package/dist/api/core/math/vec3.d.ts.map +1 -1
- package/dist/api/core/project/index.d.ts +399 -0
- package/dist/api/core/project/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +755 -0
- package/dist/api/core/tags.d.ts.map +1 -0
- package/dist/api/core/units/index.d.ts +175 -0
- package/dist/api/core/units/index.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +45 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +168 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +828 -0
- package/dist/api/design/create/index.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +63 -0
- package/dist/api/design/delete/index.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +268 -0
- package/dist/api/design/doors/index.d.ts.map +1 -0
- package/dist/api/design/edit/index.d.ts +49 -0
- package/dist/api/design/edit/index.d.ts.map +1 -0
- package/dist/api/design/erase/index.d.ts +160 -0
- package/dist/api/design/erase/index.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +123 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +153 -0
- package/dist/api/design/index.d.ts.map +1 -0
- package/dist/api/design/lock.d.ts +41 -0
- package/dist/api/design/lock.d.ts.map +1 -0
- package/dist/api/design/materials/index.d.ts +297 -0
- package/dist/api/design/materials/index.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +140 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +1011 -0
- package/dist/api/design/query/index.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +221 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -0
- package/dist/api/design/selection/index.d.ts +138 -0
- package/dist/api/design/selection/index.d.ts.map +1 -0
- package/dist/api/design/shared.d.ts +38 -0
- package/dist/api/design/shared.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +87 -0
- package/dist/api/design/transform/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +178 -0
- package/dist/api/design/update/index.d.ts.map +1 -0
- package/dist/api/design/windows/index.d.ts +189 -0
- package/dist/api/design/windows/index.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +51 -23
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/department.d.ts +0 -98
- package/dist/api/entity/department.d.ts.map +1 -1
- package/dist/api/entity/index.d.ts +4 -9
- package/dist/api/entity/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +49 -106
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +76 -828
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +47 -37
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +17 -17
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +440 -0
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +81 -0
- package/dist/api/presentation/diagrams.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +113 -0
- package/dist/api/presentation/import.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +46 -0
- package/dist/api/presentation/index.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +176 -0
- package/dist/api/presentation/sheets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +296 -0
- package/dist/api/presentation/views.d.ts.map +1 -0
- package/dist/api/program/adjacency.d.ts +155 -0
- package/dist/api/program/adjacency.d.ts.map +1 -0
- package/dist/api/program/areas.d.ts +360 -0
- package/dist/api/program/areas.d.ts.map +1 -0
- package/dist/api/program/classification.d.ts +135 -0
- package/dist/api/program/classification.d.ts.map +1 -0
- package/dist/api/program/cores.d.ts +174 -0
- package/dist/api/program/cores.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +431 -0
- package/dist/api/program/departments.d.ts.map +1 -0
- package/dist/api/program/index.d.ts +69 -0
- package/dist/api/program/index.d.ts.map +1 -0
- package/dist/api/program/layout.d.ts +63 -0
- package/dist/api/program/layout.d.ts.map +1 -0
- package/dist/api/program/metrics.d.ts +108 -0
- package/dist/api/program/metrics.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +367 -0
- package/dist/api/program/site.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +2041 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -0
- package/dist/handles.d.ts +138 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/host-utils.d.ts +7 -5
- package/dist/host-utils.d.ts.map +1 -1
- package/dist/index.cjs +3897 -1542
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3326 -1462
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/scripts/generate-manifest.mjs +193 -0
- package/scripts/generate-manifest.test.mjs +193 -0
- package/src/api/core/buildings.ts +485 -0
- package/src/api/core/comment/index.ts +258 -0
- package/src/api/core/geom/create/index.ts +293 -0
- package/src/api/core/geom/delete/index.ts +78 -0
- package/src/api/core/geom/index.ts +24 -23
- package/src/api/core/geom/query/arc.ts +169 -0
- package/src/api/core/geom/query/brep.ts +444 -0
- package/src/api/core/geom/query/circle.ts +404 -0
- package/src/api/core/geom/query/contour.ts +540 -0
- package/src/api/core/geom/query/curve.ts +1078 -0
- package/src/api/core/geom/query/edge.ts +130 -0
- package/src/api/core/geom/query/face.ts +403 -0
- package/src/api/core/geom/query/halfedge.ts +210 -0
- package/src/api/core/geom/query/index.ts +63 -0
- package/src/api/core/geom/query/profile.ts +473 -0
- package/src/api/core/geom/query/vertex.ts +205 -0
- package/src/api/core/geom/update/contour.ts +315 -0
- package/src/api/core/geom/update/curve.ts +209 -0
- package/src/api/core/geom/update/index.ts +29 -0
- package/src/api/core/geom/update/profile.ts +377 -0
- package/src/api/core/groups.ts +521 -0
- package/src/api/core/history/index.ts +84 -0
- package/src/api/core/index.ts +46 -1
- package/src/api/core/layers.ts +333 -0
- package/src/api/core/math/quat.ts +112 -235
- package/src/api/core/math/vec3.ts +124 -159
- package/src/api/core/project/index.ts +418 -0
- package/src/api/core/tags.ts +808 -0
- package/src/api/core/units/index.ts +164 -0
- package/src/api/core/zoom/index.ts +47 -0
- package/src/api/design/boolean/index.ts +179 -0
- package/src/api/design/create/index.ts +886 -0
- package/src/api/design/delete/index.ts +67 -0
- package/src/api/design/doors/index.ts +285 -0
- package/src/api/design/edit/index.ts +54 -0
- package/src/api/design/erase/index.ts +151 -0
- package/src/api/design/furniture/index.ts +130 -0
- package/src/api/design/index.ts +162 -0
- package/src/api/design/lock.ts +42 -0
- package/src/api/design/materials/index.ts +301 -0
- package/src/api/design/query/geometry/index.ts +166 -0
- package/src/api/design/query/index.ts +937 -0
- package/src/api/design/query/spaces.ts +132 -0
- package/src/api/design/selection/index.ts +144 -0
- package/src/api/design/shared.ts +40 -0
- package/src/api/design/transform/index.ts +93 -0
- package/src/api/design/update/index.ts +117 -0
- package/src/api/design/windows/index.ts +207 -0
- package/src/api/entity/buildableEnvelope.ts +64 -23
- package/src/api/entity/department.ts +0 -113
- package/src/api/entity/index.ts +4 -9
- package/src/api/entity/referenceLine.ts +50 -38
- package/src/api/entity/space.ts +84 -440
- package/src/api/entity/story.ts +53 -42
- package/src/api/index.ts +17 -17
- package/src/api/presentation/aiInspiration.ts +362 -0
- package/src/api/presentation/diagrams.ts +84 -0
- package/src/api/presentation/import.ts +112 -0
- package/src/api/presentation/index.ts +48 -0
- package/src/api/presentation/sheets.ts +198 -0
- package/src/api/presentation/views.ts +303 -0
- package/src/api/program/adjacency.ts +164 -0
- package/src/api/program/areas.ts +335 -0
- package/src/api/program/classification.ts +138 -0
- package/src/api/program/cores.ts +171 -0
- package/src/api/program/departments.ts +465 -0
- package/src/api/program/index.ts +71 -0
- package/src/api/program/layout.ts +68 -0
- package/src/api/program/metrics.ts +120 -0
- package/src/api/program/site.ts +326 -0
- package/src/api/program/spreadsheet.ts +2075 -0
- package/src/handles.ts +148 -0
- package/src/host-utils.ts +10 -6
- package/src/index.ts +1 -0
- package/dist/api/core/geom/arc.d.ts +0 -81
- package/dist/api/core/geom/arc.d.ts.map +0 -1
- package/dist/api/core/geom/curve.d.ts +0 -70
- package/dist/api/core/geom/curve.d.ts.map +0 -1
- package/dist/api/core/geom/line.d.ts +0 -56
- package/dist/api/core/geom/line.d.ts.map +0 -1
- package/dist/api/core/geom/profile.d.ts +0 -121
- package/dist/api/core/geom/profile.d.ts.map +0 -1
- package/dist/api/documentation/aiInspiration.d.ts +0 -2155
- package/dist/api/documentation/aiInspiration.d.ts.map +0 -1
- package/dist/api/documentation/index.d.ts +0 -13
- package/dist/api/documentation/index.d.ts.map +0 -1
- package/dist/api/tools/copy.d.ts +0 -59
- package/dist/api/tools/copy.d.ts.map +0 -1
- package/dist/api/tools/index.d.ts +0 -29
- package/dist/api/tools/index.d.ts.map +0 -1
- package/dist/api/tools/offset.d.ts +0 -43
- package/dist/api/tools/offset.d.ts.map +0 -1
- package/dist/api/tools/selection.d.ts +0 -48
- package/dist/api/tools/selection.d.ts.map +0 -1
- package/dist/api/tools/transform.d.ts +0 -114
- package/dist/api/tools/transform.d.ts.map +0 -1
- package/dist/api/units/index.d.ts +0 -163
- package/dist/api/units/index.d.ts.map +0 -1
- package/src/api/core/geom/arc.ts +0 -70
- package/src/api/core/geom/curve.ts +0 -41
- package/src/api/core/geom/line.ts +0 -53
- package/src/api/core/geom/profile.ts +0 -94
- package/src/api/documentation/aiInspiration.ts +0 -871
- package/src/api/documentation/index.ts +0 -15
- package/src/api/tools/copy.ts +0 -55
- package/src/api/tools/index.ts +0 -35
- package/src/api/tools/offset.ts +0 -43
- package/src/api/tools/selection.ts +0 -51
- package/src/api/tools/transform.ts +0 -117
- package/src/api/units/index.ts +0 -163
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../types";
|
|
3
|
+
import { ComponentHandle } from "../../../handles";
|
|
4
|
+
import { PluginSpaceUpdateResult } from "../../entity/space";
|
|
5
|
+
/**
|
|
6
|
+
* Sparse property updates for a space. Only provided fields change.
|
|
7
|
+
*
|
|
8
|
+
* | Property | Type | Description |
|
|
9
|
+
* |---|---|---|
|
|
10
|
+
* | `room_type` | `string`? | Room label |
|
|
11
|
+
* | `massType` | `PluginMassType`? | Mass type |
|
|
12
|
+
* | `spaceType` | `PluginSpaceType`? | Space type |
|
|
13
|
+
* | `areaClass` | `PluginAreaClass`? | Area class (NET/GROSS/EXCLUDED) |
|
|
14
|
+
* | `departmentId` | `PluginDepartmentId`? | Department |
|
|
15
|
+
*/
|
|
16
|
+
export declare const PluginSpacePropertyUpdates: z.ZodObject<{
|
|
17
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
18
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
Room: "Room";
|
|
20
|
+
Plinth: "Plinth";
|
|
21
|
+
Void: "Void";
|
|
22
|
+
Pergola: "Pergola";
|
|
23
|
+
Furniture: "Furniture";
|
|
24
|
+
"Facade element": "Facade element";
|
|
25
|
+
"Generic mass": "Generic mass";
|
|
26
|
+
Department: "Department";
|
|
27
|
+
Building: "Building";
|
|
28
|
+
"Revit Import": "Revit Import";
|
|
29
|
+
Mass: "Mass";
|
|
30
|
+
Site: "Site";
|
|
31
|
+
}>>;
|
|
32
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
Room: "Room";
|
|
34
|
+
"Program Block": "Program Block";
|
|
35
|
+
Balcony: "Balcony";
|
|
36
|
+
Road: "Road";
|
|
37
|
+
Garden: "Garden";
|
|
38
|
+
Deck: "Deck";
|
|
39
|
+
Pool: "Pool";
|
|
40
|
+
Walkway: "Walkway";
|
|
41
|
+
Envelope: "Envelope";
|
|
42
|
+
Parking: "Parking";
|
|
43
|
+
}>>;
|
|
44
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
NET: "NET";
|
|
46
|
+
GROSS: "GROSS";
|
|
47
|
+
EXCLUDED: "EXCLUDED";
|
|
48
|
+
}>>;
|
|
49
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
50
|
+
DEFAULT: "DEFAULT";
|
|
51
|
+
SITE: "SITE";
|
|
52
|
+
ENVELOPE: "ENVELOPE";
|
|
53
|
+
CORE: "CORE";
|
|
54
|
+
}>, z.ZodUUID]>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export type PluginSpacePropertyUpdates = z.infer<typeof PluginSpacePropertyUpdates>;
|
|
57
|
+
/** Geometry replacement for a space — re-extrude a profile. */
|
|
58
|
+
export declare const PluginSpaceGeometryUpdate: z.ZodObject<{
|
|
59
|
+
profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
60
|
+
extrudeHeight: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type PluginSpaceGeometryUpdate = z.infer<typeof PluginSpaceGeometryUpdate>;
|
|
63
|
+
/** One space to update via {@linkcode PluginDesignUpdateApi.spaces}. */
|
|
64
|
+
export declare const PluginUpdateSpaceItem: z.ZodObject<{
|
|
65
|
+
space: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
66
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
68
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
Room: "Room";
|
|
70
|
+
Plinth: "Plinth";
|
|
71
|
+
Void: "Void";
|
|
72
|
+
Pergola: "Pergola";
|
|
73
|
+
Furniture: "Furniture";
|
|
74
|
+
"Facade element": "Facade element";
|
|
75
|
+
"Generic mass": "Generic mass";
|
|
76
|
+
Department: "Department";
|
|
77
|
+
Building: "Building";
|
|
78
|
+
"Revit Import": "Revit Import";
|
|
79
|
+
Mass: "Mass";
|
|
80
|
+
Site: "Site";
|
|
81
|
+
}>>;
|
|
82
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
Room: "Room";
|
|
84
|
+
"Program Block": "Program Block";
|
|
85
|
+
Balcony: "Balcony";
|
|
86
|
+
Road: "Road";
|
|
87
|
+
Garden: "Garden";
|
|
88
|
+
Deck: "Deck";
|
|
89
|
+
Pool: "Pool";
|
|
90
|
+
Walkway: "Walkway";
|
|
91
|
+
Envelope: "Envelope";
|
|
92
|
+
Parking: "Parking";
|
|
93
|
+
}>>;
|
|
94
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
95
|
+
NET: "NET";
|
|
96
|
+
GROSS: "GROSS";
|
|
97
|
+
EXCLUDED: "EXCLUDED";
|
|
98
|
+
}>>;
|
|
99
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
100
|
+
DEFAULT: "DEFAULT";
|
|
101
|
+
SITE: "SITE";
|
|
102
|
+
ENVELOPE: "ENVELOPE";
|
|
103
|
+
CORE: "CORE";
|
|
104
|
+
}>, z.ZodUUID]>>;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
108
|
+
extrudeHeight: z.ZodNumber;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
export type PluginUpdateSpaceItem = z.infer<typeof PluginUpdateSpaceItem>;
|
|
112
|
+
/**
|
|
113
|
+
* `snaptrude.design.update` — edit existing scene entities (properties + geometry).
|
|
114
|
+
*
|
|
115
|
+
* Migrated from the removed `entity.space.{update, updateGeometryFromProfile, bulkUpdate}`.
|
|
116
|
+
* Only provided fields change; each call is undoable. Failures throw (RPC rejects).
|
|
117
|
+
*/
|
|
118
|
+
export declare abstract class PluginDesignUpdateApi {
|
|
119
|
+
constructor();
|
|
120
|
+
/**
|
|
121
|
+
* Update a single space (room) — change its properties (room label, space
|
|
122
|
+
* type, mass type, area class, department) and/or replace its geometry by
|
|
123
|
+
* re-extruding a profile to a new height. Sparse and undoable: only the
|
|
124
|
+
* fields you provide change.
|
|
125
|
+
*
|
|
126
|
+
* @param space - The space to update
|
|
127
|
+
* @param options - `properties` (sparse) and/or `geometry` ({ profile, extrudeHeight })
|
|
128
|
+
* @returns the updated space's echoed {@linkcode PluginSpaceUpdateResult}
|
|
129
|
+
*
|
|
130
|
+
* @examplePrompt Rename this room to Office
|
|
131
|
+
* @examplePrompt Change this space's room type to Meeting Room
|
|
132
|
+
* @examplePrompt Set the height of this room to 3 metres
|
|
133
|
+
* @examplePrompt Move this space into the Circulation department
|
|
134
|
+
* @examplePrompt Exclude this room from the area calculations
|
|
135
|
+
*
|
|
136
|
+
* # Example
|
|
137
|
+
* ```ts
|
|
138
|
+
* await snaptrude.design.update.space("space-id", { properties: { room_type: "Office" } })
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
abstract space(space: ComponentHandle, options: {
|
|
142
|
+
properties?: PluginSpacePropertyUpdates;
|
|
143
|
+
geometry?: PluginSpaceGeometryUpdate;
|
|
144
|
+
}): PluginApiReturn<PluginSpaceUpdateResult>;
|
|
145
|
+
/**
|
|
146
|
+
* Update many spaces (rooms) in one undoable operation — the bulk form of
|
|
147
|
+
* {@linkcode space}. Each item pairs a space with the sparse property
|
|
148
|
+
* changes and/or geometry re-extrude to apply; every item is validated up
|
|
149
|
+
* front, then all changes are applied as a single command.
|
|
150
|
+
*
|
|
151
|
+
* Migrated from `entity.space.bulkUpdate`.
|
|
152
|
+
*
|
|
153
|
+
* @param items - One {@linkcode PluginUpdateSpaceItem} per space
|
|
154
|
+
* @returns one {@linkcode PluginSpaceUpdateResult} per item, in input order
|
|
155
|
+
*
|
|
156
|
+
* @examplePrompt Label all the selected rooms as Bedrooms
|
|
157
|
+
* @examplePrompt Change the room type of these five spaces at once
|
|
158
|
+
* @examplePrompt Set every room on this floor to a 3m height in one go
|
|
159
|
+
* @examplePrompt Bulk-assign these spaces to the Service department
|
|
160
|
+
* @examplePrompt Mark all of these rooms as excluded from area in one update
|
|
161
|
+
*
|
|
162
|
+
* # Example
|
|
163
|
+
* ```ts
|
|
164
|
+
* // Re-label every selected room and mark it NET area — one undoable bulk update
|
|
165
|
+
* const rooms = await snaptrude.design.query.listSpaces({ isSelected: true })
|
|
166
|
+
* const results = await snaptrude.design.update.spaces(
|
|
167
|
+
* rooms.map((space) => ({
|
|
168
|
+
* space,
|
|
169
|
+
* properties: { room_type: "Bedroom", areaClass: "NET" },
|
|
170
|
+
* })),
|
|
171
|
+
* )
|
|
172
|
+
* // One result per item, in input order
|
|
173
|
+
* console.log(results.map((r) => r.spaceId))
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
abstract spaces(items: PluginUpdateSpaceItem[]): PluginApiReturn<PluginSpaceUpdateResult[]>;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/update/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAiB,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAKL,uBAAuB,EACxB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMrC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF,+DAA+D;AAC/D,eAAO,MAAM,yBAAyB;;;iBAGpC,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF,wEAAwE;AACxE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;GAKG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,KAAK,CACnB,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE;QACP,UAAU,CAAC,EAAE,0BAA0B,CAAA;QACvC,QAAQ,CAAC,EAAE,yBAAyB,CAAA;KACrC,GACA,eAAe,CAAC,uBAAuB,CAAC;IAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;aACa,MAAM,CAAC,KAAK,EAAE,qBAAqB,EAAE,GAAG,eAAe,CAAC,uBAAuB,EAAE,CAAC;CACnG"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../types";
|
|
3
|
+
import { ComponentHandle } from "../../../handles";
|
|
4
|
+
import { PluginDesignChangeResult } from "../lock";
|
|
5
|
+
/**
|
|
6
|
+
* `snaptrude.design.windows` — window-specific reads. Creation lives at
|
|
7
|
+
* `design.create.window`; generic reads (`listWindows`/`getHost`/`getProperties`) live
|
|
8
|
+
* at `design.query.*`. Window targets are {@linkcode ComponentHandle}s.
|
|
9
|
+
*
|
|
10
|
+
* `listTypes` (UI-const catalog), `getSillHeight` (bounds-derived), and the
|
|
11
|
+
* command-wired `mirror` land in a later pass.
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class PluginDesignWindowsApi {
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* Get the type name of a window — the label that identifies which kind of
|
|
17
|
+
* window the instance is, as shown in its properties.
|
|
18
|
+
*
|
|
19
|
+
* @param window The window to query
|
|
20
|
+
* @returns The type as a `string`, or `null`
|
|
21
|
+
*
|
|
22
|
+
* @examplePrompt What type of window is this?
|
|
23
|
+
* @examplePrompt Is the selected window a casement or a slider?
|
|
24
|
+
* @examplePrompt Tell me the window type used on this wall
|
|
25
|
+
* @examplePrompt Check what kind of window the living room has
|
|
26
|
+
*
|
|
27
|
+
* # Example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const [win] = await snaptrude.design.query.listWindows({ isSelected: true })
|
|
30
|
+
* const type = await snaptrude.design.windows.getType(win)
|
|
31
|
+
* if (type) console.log("window type:", type)
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
abstract getType(window: ComponentHandle): PluginApiReturn<string | null>;
|
|
35
|
+
/**
|
|
36
|
+
* Get the width of a window — how wide its opening is along the host wall.
|
|
37
|
+
*
|
|
38
|
+
* @param window The window to query
|
|
39
|
+
* @returns The width as a `number`, or `null`
|
|
40
|
+
*
|
|
41
|
+
* @examplePrompt How wide is this window?
|
|
42
|
+
* @examplePrompt What's the width of the selected window?
|
|
43
|
+
* @examplePrompt Measure the width of the kitchen window
|
|
44
|
+
* @examplePrompt Check whether this window is 1200mm wide
|
|
45
|
+
*
|
|
46
|
+
* # Example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const [win] = await snaptrude.design.query.listWindows()
|
|
49
|
+
* const width = await snaptrude.design.windows.getWidth(win)
|
|
50
|
+
* if (width !== null) console.log("window width:", width)
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
abstract getWidth(window: ComponentHandle): PluginApiReturn<number | null>;
|
|
54
|
+
/**
|
|
55
|
+
* Get the height of a window — how tall its opening is on the host wall.
|
|
56
|
+
*
|
|
57
|
+
* @param window The window to query
|
|
58
|
+
* @returns The height as a `number`, or `null`
|
|
59
|
+
*
|
|
60
|
+
* @examplePrompt How tall is this window?
|
|
61
|
+
* @examplePrompt What's the height of the selected window?
|
|
62
|
+
* @examplePrompt Check the window height on this wall
|
|
63
|
+
* @examplePrompt Is the bedroom window 1.5m high?
|
|
64
|
+
*
|
|
65
|
+
* # Example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const [win] = await snaptrude.design.query.listWindows()
|
|
68
|
+
* const height = await snaptrude.design.windows.getHeight(win)
|
|
69
|
+
* if (height !== null) console.log("window height:", height)
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
abstract getHeight(window: ComponentHandle): PluginApiReturn<number | null>;
|
|
73
|
+
/**
|
|
74
|
+
* Get a window's full dimensions in one call — width along the wall, vertical
|
|
75
|
+
* height, and thickness through the wall — measured in the window's local
|
|
76
|
+
* oriented space.
|
|
77
|
+
*
|
|
78
|
+
* @param window The window to query
|
|
79
|
+
* @returns The dimensions, or `null`
|
|
80
|
+
*
|
|
81
|
+
* @examplePrompt What are the dimensions of this window?
|
|
82
|
+
* @examplePrompt How big is the selected window?
|
|
83
|
+
* @examplePrompt Give me the width, height and depth of this window
|
|
84
|
+
* @examplePrompt Measure the living room window
|
|
85
|
+
* @examplePrompt Get the window size including its thickness through the wall
|
|
86
|
+
*
|
|
87
|
+
* # Example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const [win] = await snaptrude.design.query.listWindows({ isSelected: true })
|
|
90
|
+
* const dims = await snaptrude.design.windows.getDimensions(win)
|
|
91
|
+
* if (dims) console.log(dims.width, dims.height, dims.thickness)
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
abstract getDimensions(window: ComponentHandle): PluginApiReturn<PluginWindowDimensions | null>;
|
|
95
|
+
/**
|
|
96
|
+
* Set the width of a window, resizing its opening and re-cutting the host
|
|
97
|
+
* wall. Width is in engine units; the change is undoable.
|
|
98
|
+
*
|
|
99
|
+
* @param window The window to resize
|
|
100
|
+
* @param width New width (engine units)
|
|
101
|
+
* @returns The affected window
|
|
102
|
+
*
|
|
103
|
+
* @examplePrompt Make this window 1200mm wide
|
|
104
|
+
* @examplePrompt Widen the selected window to 4 feet
|
|
105
|
+
* @examplePrompt Change the window width to 1.5m
|
|
106
|
+
* @examplePrompt Resize the kitchen window to 900 wide
|
|
107
|
+
*
|
|
108
|
+
* # Example
|
|
109
|
+
* ```ts
|
|
110
|
+
* // Takes a single window (unlike design.doors.setWidth, which takes an array)
|
|
111
|
+
* const [win] = await snaptrude.design.query.listWindows({ isSelected: true })
|
|
112
|
+
* const { affected } = await snaptrude.design.windows.setWidth(win, 1200)
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
abstract setWidth(window: ComponentHandle, width: number): PluginApiReturn<PluginDesignChangeResult>;
|
|
116
|
+
/**
|
|
117
|
+
* Set the height of a window, resizing its opening and re-cutting the host
|
|
118
|
+
* wall. Height is in engine units; the change is undoable.
|
|
119
|
+
*
|
|
120
|
+
* @param window The window to resize
|
|
121
|
+
* @param height New height (engine units)
|
|
122
|
+
* @returns The affected window
|
|
123
|
+
*
|
|
124
|
+
* @examplePrompt Make this window 1.5m tall
|
|
125
|
+
* @examplePrompt Change the window height to 4 feet
|
|
126
|
+
* @examplePrompt Shorten the selected window to 900mm high
|
|
127
|
+
* @examplePrompt Set the bedroom window height to 1200
|
|
128
|
+
*
|
|
129
|
+
* # Example
|
|
130
|
+
* ```ts
|
|
131
|
+
* const [win] = await snaptrude.design.query.listWindows({ isSelected: true })
|
|
132
|
+
* await snaptrude.design.windows.setHeight(win, 1500)
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
abstract setHeight(window: ComponentHandle, height: number): PluginApiReturn<PluginDesignChangeResult>;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Arguments for the single-window read methods.
|
|
139
|
+
*
|
|
140
|
+
* | Property | Type | Description |
|
|
141
|
+
* |---|---|---|
|
|
142
|
+
* | `window` | {@linkcode ComponentHandle} | The window to query |
|
|
143
|
+
*/
|
|
144
|
+
export declare const PluginDesignWindowArgs: z.ZodObject<{
|
|
145
|
+
window: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export type PluginDesignWindowArgs = z.infer<typeof PluginDesignWindowArgs>;
|
|
148
|
+
/**
|
|
149
|
+
* A window's dimensions.
|
|
150
|
+
*
|
|
151
|
+
* | Property | Type | Description |
|
|
152
|
+
* |---|---|---|
|
|
153
|
+
* | `width` | `number` | Along the wall |
|
|
154
|
+
* | `height` | `number` | Vertical |
|
|
155
|
+
* | `thickness` | `number` | Through the wall (engine `length` axis) |
|
|
156
|
+
*/
|
|
157
|
+
export declare const PluginWindowDimensions: z.ZodObject<{
|
|
158
|
+
width: z.ZodNumber;
|
|
159
|
+
height: z.ZodNumber;
|
|
160
|
+
thickness: z.ZodNumber;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
export type PluginWindowDimensions = z.infer<typeof PluginWindowDimensions>;
|
|
163
|
+
/**
|
|
164
|
+
* Arguments for {@linkcode PluginDesignWindowsApi.setWidth}.
|
|
165
|
+
*
|
|
166
|
+
* | Property | Type | Description |
|
|
167
|
+
* |---|---|---|
|
|
168
|
+
* | `window` | {@linkcode ComponentHandle} | The window to resize |
|
|
169
|
+
* | `width` | `number` | New width (engine units) |
|
|
170
|
+
*/
|
|
171
|
+
export declare const PluginDesignWindowSetWidthArgs: z.ZodObject<{
|
|
172
|
+
window: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
173
|
+
width: z.ZodNumber;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
export type PluginDesignWindowSetWidthArgs = z.infer<typeof PluginDesignWindowSetWidthArgs>;
|
|
176
|
+
/**
|
|
177
|
+
* Arguments for {@linkcode PluginDesignWindowsApi.setHeight}.
|
|
178
|
+
*
|
|
179
|
+
* | Property | Type | Description |
|
|
180
|
+
* |---|---|---|
|
|
181
|
+
* | `window` | {@linkcode ComponentHandle} | The window to resize |
|
|
182
|
+
* | `height` | `number` | New height (engine units) |
|
|
183
|
+
*/
|
|
184
|
+
export declare const PluginDesignWindowSetHeightArgs: z.ZodObject<{
|
|
185
|
+
window: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
186
|
+
height: z.ZodNumber;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
export type PluginDesignWindowSetHeightArgs = z.infer<typeof PluginDesignWindowSetHeightArgs>;
|
|
189
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/windows/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;;GAOG;AACH,8BAAsB,sBAAsB;;IAG1C;;;;;;;;;;;;;;;;;;OAkBG;aACa,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC;IAEhF;;;;;;;;;;;;;;;;;OAiBG;aACa,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC;IAEjF;;;;;;;;;;;;;;;;;OAiBG;aACa,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC;IAElF;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,aAAa,CAC3B,MAAM,EAAE,eAAe,GACtB,eAAe,CAAC,sBAAsB,GAAG,IAAI,CAAC;IAEjD;;;;;;;;;;;;;;;;;;;OAmBG;aACa,QAAQ,CACtB,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,MAAM,GACZ,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;OAkBG;aACa,SAAS,CACvB,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,MAAM,GACb,eAAe,CAAC,wBAAwB,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;;;;iBAIjC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B;;;iBAGzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAE3F;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B;;;iBAG1C,CAAA;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
|
|
@@ -13,62 +13,90 @@ import { PluginApiReturn } from "../../types";
|
|
|
13
13
|
export declare abstract class PluginBuildableEnvelopeApi {
|
|
14
14
|
constructor();
|
|
15
15
|
/**
|
|
16
|
-
* Create a new parametric buildable envelope
|
|
16
|
+
* Create a new parametric buildable envelope — the zoning-regulated volume a
|
|
17
|
+
* building may occupy — generated from a site polygon, tiered setbacks, a
|
|
18
|
+
* height or floor-count cap, and optional FAR and lot-coverage limits.
|
|
17
19
|
*
|
|
18
|
-
* @param
|
|
20
|
+
* @param sitePolygon - Site polygon vertices in `lengthUnit`; minimum 3 vertices.
|
|
21
|
+
* @param lengthUnit - Unit used by all length fields (`"ft" | "m"`).
|
|
22
|
+
* @param setbacks - Setback profile, ground tier first; minimum 1 tier.
|
|
23
|
+
* @param verticalCap - Maximum height or floor count.
|
|
24
|
+
* @param floorToFloor - Required floor-to-floor height in `lengthUnit`.
|
|
25
|
+
* @param farRatio - Optional FAR value, positive when provided.
|
|
26
|
+
* @param lotCoverageMaxPct - Optional lot coverage cap, `0..100`.
|
|
19
27
|
* @returns A {@linkcode PluginBuildableEnvelopeCreateResult} with the
|
|
20
28
|
* `buildableEnvelopeId` of the created envelope.
|
|
21
29
|
* @throws If validation fails or generation produces no renderable geometry.
|
|
22
30
|
*
|
|
31
|
+
* @examplePrompt Create a buildable envelope for my site
|
|
32
|
+
* @examplePrompt Generate the zoning envelope with 10ft front setbacks
|
|
33
|
+
* @examplePrompt Show the maximum buildable volume with a 150ft height limit
|
|
34
|
+
* @examplePrompt Model the allowable massing from the setback rules
|
|
35
|
+
* @examplePrompt Create a zoning envelope capped at 12 floors with FAR 3
|
|
36
|
+
*
|
|
23
37
|
* # Example
|
|
24
38
|
* ```ts
|
|
25
|
-
* const { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.create(
|
|
26
|
-
*
|
|
39
|
+
* const { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.create(
|
|
40
|
+
* [
|
|
27
41
|
* { x: 0, z: 0 },
|
|
28
42
|
* { x: 100, z: 0 },
|
|
29
43
|
* { x: 100, z: 80 },
|
|
30
44
|
* { x: 0, z: 80 },
|
|
31
45
|
* ],
|
|
32
|
-
*
|
|
33
|
-
*
|
|
46
|
+
* "ft",
|
|
47
|
+
* [
|
|
34
48
|
* { aboveHeight: 0, front: 10, side: 5, rear: 10 },
|
|
35
49
|
* { aboveHeight: 100, front: 20, side: 10, rear: 20 },
|
|
36
50
|
* ],
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
51
|
+
* { kind: "max_height", maxHeight: 150 },
|
|
52
|
+
* 12,
|
|
53
|
+
* )
|
|
40
54
|
* ```
|
|
41
55
|
*/
|
|
42
|
-
abstract create(
|
|
56
|
+
abstract create(sitePolygon: PluginBuildableEnvelopePolygonVertex[], lengthUnit: "ft" | "m", setbacks: PluginBuildableEnvelopeSetbackTier[], verticalCap: PluginBuildableEnvelopeVerticalCap, floorToFloor: number, farRatio?: number, lotCoverageMaxPct?: number): PluginApiReturn<PluginBuildableEnvelopeCreateResult>;
|
|
43
57
|
/**
|
|
44
|
-
* Update an existing parametric buildable envelope
|
|
58
|
+
* Update an existing parametric buildable envelope — regenerate the zoning
|
|
59
|
+
* volume from a revised site polygon, setbacks, vertical cap, or FAR and
|
|
60
|
+
* lot-coverage limits, keeping the same envelope id.
|
|
45
61
|
*
|
|
46
|
-
* @param
|
|
47
|
-
*
|
|
48
|
-
*
|
|
62
|
+
* @param buildableEnvelopeId - Existing envelope ID to update; non-empty and
|
|
63
|
+
* must match an existing envelope on the canvas.
|
|
64
|
+
* @param sitePolygon - Site polygon vertices in `lengthUnit`; minimum 3 vertices.
|
|
65
|
+
* @param lengthUnit - Unit used by all length fields (`"ft" | "m"`).
|
|
66
|
+
* @param setbacks - Setback profile, ground tier first; minimum 1 tier.
|
|
67
|
+
* @param verticalCap - Maximum height or floor count.
|
|
68
|
+
* @param floorToFloor - Required floor-to-floor height in `lengthUnit`.
|
|
69
|
+
* @param farRatio - Optional FAR value, positive when provided.
|
|
70
|
+
* @param lotCoverageMaxPct - Optional lot coverage cap, `0..100`.
|
|
49
71
|
* @returns A {@linkcode PluginBuildableEnvelopeUpdateResult} with the
|
|
50
72
|
* `buildableEnvelopeId` of the updated envelope.
|
|
51
73
|
* @throws If validation fails, the envelope does not exist, or generation
|
|
52
74
|
* produces no renderable geometry.
|
|
53
75
|
*
|
|
76
|
+
* @examplePrompt Change the envelope's height limit to 175 feet
|
|
77
|
+
* @examplePrompt Update the setbacks on the buildable envelope
|
|
78
|
+
* @examplePrompt Regenerate the zoning envelope with a new site boundary
|
|
79
|
+
* @examplePrompt Increase the FAR on the buildable volume
|
|
80
|
+
* @examplePrompt Modify the envelope to allow 15 storeys instead
|
|
81
|
+
*
|
|
54
82
|
* # Example
|
|
55
83
|
* ```ts
|
|
56
|
-
* const { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.update(
|
|
57
|
-
*
|
|
58
|
-
*
|
|
84
|
+
* const { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.update(
|
|
85
|
+
* existingId,
|
|
86
|
+
* [
|
|
59
87
|
* { x: 0, z: 0 },
|
|
60
88
|
* { x: 100, z: 0 },
|
|
61
89
|
* { x: 100, z: 80 },
|
|
62
90
|
* { x: 0, z: 80 },
|
|
63
91
|
* ],
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
92
|
+
* "ft",
|
|
93
|
+
* [{ aboveHeight: 0, front: 10, side: 5, rear: 10 }],
|
|
94
|
+
* { kind: "max_height", maxHeight: 175 },
|
|
95
|
+
* 12,
|
|
96
|
+
* )
|
|
69
97
|
* ```
|
|
70
98
|
*/
|
|
71
|
-
abstract update(
|
|
99
|
+
abstract update(buildableEnvelopeId: string, sitePolygon: PluginBuildableEnvelopePolygonVertex[], lengthUnit: "ft" | "m", setbacks: PluginBuildableEnvelopeSetbackTier[], verticalCap: PluginBuildableEnvelopeVerticalCap, floorToFloor: number, farRatio?: number, lotCoverageMaxPct?: number): PluginApiReturn<PluginBuildableEnvelopeUpdateResult>;
|
|
72
100
|
}
|
|
73
101
|
/**
|
|
74
102
|
* Site polygon vertex in the request `lengthUnit`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildableEnvelope.d.ts","sourceRoot":"","sources":["../../../src/api/entity/buildableEnvelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;GASG;AACH,8BAAsB,0BAA0B;;IAG9C
|
|
1
|
+
{"version":3,"file":"buildableEnvelope.d.ts","sourceRoot":"","sources":["../../../src/api/entity/buildableEnvelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;GASG;AACH,8BAAsB,0BAA0B;;IAG9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;aACa,MAAM,CACpB,WAAW,EAAE,oCAAoC,EAAE,EACnD,UAAU,EAAE,IAAI,GAAG,GAAG,EACtB,QAAQ,EAAE,kCAAkC,EAAE,EAC9C,WAAW,EAAE,kCAAkC,EAC/C,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,iBAAiB,CAAC,EAAE,MAAM,GACzB,eAAe,CAAC,mCAAmC,CAAC;IAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;aACa,MAAM,CACpB,mBAAmB,EAAE,MAAM,EAC3B,WAAW,EAAE,oCAAoC,EAAE,EACnD,UAAU,EAAE,IAAI,GAAG,GAAG,EACtB,QAAQ,EAAE,kCAAkC,EAAE,EAC9C,WAAW,EAAE,kCAAkC,EAC/C,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,iBAAiB,CAAC,EAAE,MAAM,GACzB,eAAe,CAAC,mCAAmC,CAAC;CACxD;AAED;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC;;;kEAG/C,CAAA;AAEF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,oCAAoC,CAC5C,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC;;;;;;4BAS7C,CAAA;AAEF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,kCAAkC,CAC1C,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,kCAAkC;;;;;kBAKpC,CAAA;AAEX,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,kCAAkC,CAC1C,CAAA;AA+BD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;kBAWZ,CAAA;AAElC,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC;;kBAErC,CAAA;AAEX,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;kBAYZ,CAAA;AAElC,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC;;kBAErC,CAAA;AAEX,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA"}
|
|
@@ -1,99 +1 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { PluginApiReturn } from "../../types";
|
|
3
|
-
/**
|
|
4
|
-
* Department management — create and query departments.
|
|
5
|
-
*
|
|
6
|
-
* A **department** is a named, colored grouping applied to spaces.
|
|
7
|
-
* Departments are used to categorize spaces by function (e.g. "FOH",
|
|
8
|
-
* "Emergency", "Residential") and control their visual appearance.
|
|
9
|
-
*
|
|
10
|
-
* Accessed via `snaptrude.entity.department`.
|
|
11
|
-
*/
|
|
12
|
-
export declare abstract class PluginDepartmentApi {
|
|
13
|
-
constructor();
|
|
14
|
-
/**
|
|
15
|
-
* Create a new department.
|
|
16
|
-
*
|
|
17
|
-
* @param args - An object containing:
|
|
18
|
-
* - {@linkcode PluginDepartmentCreateArgs.name args.name} — Display name
|
|
19
|
-
* - {@linkcode PluginDepartmentCreateArgs.color args.color} — CSS hex color string (e.g. `"#b5e1dc"`)
|
|
20
|
-
* @returns A {@linkcode PluginDepartmentCreateResult} with the `departmentId`
|
|
21
|
-
* of the created department
|
|
22
|
-
* @throws If department creation fails
|
|
23
|
-
*
|
|
24
|
-
* # Example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const { departmentId } = await snaptrude.entity.department.create({
|
|
27
|
-
* name: "Emergency",
|
|
28
|
-
* color: "#f5e68b",
|
|
29
|
-
* })
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
abstract create(args: PluginDepartmentCreateArgs): PluginApiReturn<PluginDepartmentCreateResult>;
|
|
33
|
-
/**
|
|
34
|
-
* Get all departments in the current project.
|
|
35
|
-
*
|
|
36
|
-
* Returns every department including well-known ones (Default, Site, etc.)
|
|
37
|
-
* and user-created departments.
|
|
38
|
-
*
|
|
39
|
-
* @returns A {@linkcode PluginDepartmentGetAllResult} with a `departments` array
|
|
40
|
-
*
|
|
41
|
-
* # Example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const { departments } = await snaptrude.entity.department.getAll()
|
|
44
|
-
* for (const dept of departments) {
|
|
45
|
-
* console.log(dept.id, dept.name, dept.color)
|
|
46
|
-
* }
|
|
47
|
-
* ```
|
|
48
|
-
*/
|
|
49
|
-
abstract getAll(): PluginApiReturn<PluginDepartmentGetAllResult>;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Arguments for {@linkcode PluginDepartmentApi.create}.
|
|
53
|
-
*
|
|
54
|
-
* | Property | Type | Description |
|
|
55
|
-
* |---|---|---|
|
|
56
|
-
* | `name` | `string` | Display name of the department |
|
|
57
|
-
* | `color` | `string` | CSS hex color string (e.g. `"#b5e1dc"`) |
|
|
58
|
-
*/
|
|
59
|
-
export declare const PluginDepartmentCreateArgs: z.ZodObject<{
|
|
60
|
-
name: z.ZodString;
|
|
61
|
-
color: z.ZodString;
|
|
62
|
-
}, z.core.$strip>;
|
|
63
|
-
export type PluginDepartmentCreateArgs = z.infer<typeof PluginDepartmentCreateArgs>;
|
|
64
|
-
/**
|
|
65
|
-
* Result of {@linkcode PluginDepartmentApi.create}.
|
|
66
|
-
*
|
|
67
|
-
* | Property | Type | Description |
|
|
68
|
-
* |---|---|---|
|
|
69
|
-
* | `departmentId` | `string` | Unique ID of the created department |
|
|
70
|
-
*/
|
|
71
|
-
export declare const PluginDepartmentCreateResult: z.ZodObject<{
|
|
72
|
-
departmentId: z.ZodString;
|
|
73
|
-
}, z.core.$strip>;
|
|
74
|
-
export type PluginDepartmentCreateResult = z.infer<typeof PluginDepartmentCreateResult>;
|
|
75
|
-
/**
|
|
76
|
-
* A single department entry returned by {@linkcode PluginDepartmentApi.getAll}.
|
|
77
|
-
*/
|
|
78
|
-
export declare const PluginDepartmentEntry: z.ZodObject<{
|
|
79
|
-
id: z.ZodString;
|
|
80
|
-
name: z.ZodString;
|
|
81
|
-
color: z.ZodString;
|
|
82
|
-
}, z.core.$strip>;
|
|
83
|
-
export type PluginDepartmentEntry = z.infer<typeof PluginDepartmentEntry>;
|
|
84
|
-
/**
|
|
85
|
-
* Result of {@linkcode PluginDepartmentApi.getAll}.
|
|
86
|
-
*
|
|
87
|
-
* | Property | Type | Description |
|
|
88
|
-
* |---|---|---|
|
|
89
|
-
* | `departments` | {@linkcode PluginDepartmentEntry}`[]` | All departments in the project |
|
|
90
|
-
*/
|
|
91
|
-
export declare const PluginDepartmentGetAllResult: z.ZodObject<{
|
|
92
|
-
departments: z.ZodArray<z.ZodObject<{
|
|
93
|
-
id: z.ZodString;
|
|
94
|
-
name: z.ZodString;
|
|
95
|
-
color: z.ZodString;
|
|
96
|
-
}, z.core.$strip>>;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
export type PluginDepartmentGetAllResult = z.infer<typeof PluginDepartmentGetAllResult>;
|
|
99
1
|
//# sourceMappingURL=department.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"department.d.ts","sourceRoot":"","sources":["../../../src/api/entity/department.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"department.d.ts","sourceRoot":"","sources":["../../../src/api/entity/department.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
import { PluginBuildableEnvelopeApi } from "./buildableEnvelope";
|
|
2
|
-
import { PluginDepartmentApi } from "./department";
|
|
3
2
|
import { PluginReferenceLineApi } from "./referenceLine";
|
|
4
|
-
import { PluginSpaceApi } from "./space";
|
|
5
3
|
import { PluginStoryApi } from "./story";
|
|
6
4
|
/**
|
|
7
5
|
* CRUD operations on Snaptrude building entities.
|
|
8
6
|
*
|
|
9
|
-
* - {@linkcode PluginEntityApi.space} — Create, query, and delete spaces (rooms/masses)
|
|
10
7
|
* - {@linkcode PluginEntityApi.story} — Create, query, and update stories (floors)
|
|
11
8
|
* - {@linkcode PluginEntityApi.referenceLine} — Create, query, and delete reference lines
|
|
12
|
-
* - {@linkcode PluginEntityApi.department} — Create and query departments
|
|
13
9
|
* - {@linkcode PluginEntityApi.buildableEnvelope} — Create or update parametric buildable envelopes
|
|
10
|
+
*
|
|
11
|
+
* Space operations moved to `design.create.spaces` / `design.update.*` /
|
|
12
|
+
* `design.query.*` / `design.delete.entities` (the `entity.space` API was removed);
|
|
13
|
+
* `./space` still exports the shared space value types.
|
|
14
14
|
*/
|
|
15
15
|
export declare abstract class PluginEntityApi {
|
|
16
|
-
/** Space (room/mass) operations. See {@linkcode PluginSpaceApi}. */
|
|
17
|
-
abstract space: PluginSpaceApi;
|
|
18
16
|
/** Story (floor/storey) operations. See {@linkcode PluginStoryApi}. */
|
|
19
17
|
abstract story: PluginStoryApi;
|
|
20
18
|
/** Reference line operations. See {@linkcode PluginReferenceLineApi}. */
|
|
21
19
|
abstract referenceLine: PluginReferenceLineApi;
|
|
22
|
-
/** Department operations. See {@linkcode PluginDepartmentApi}. */
|
|
23
|
-
abstract department: PluginDepartmentApi;
|
|
24
20
|
/** Buildable Envelope operations. See {@linkcode PluginBuildableEnvelopeApi}. */
|
|
25
21
|
abstract buildableEnvelope: PluginBuildableEnvelopeApi;
|
|
26
22
|
constructor();
|
|
27
23
|
}
|
|
28
24
|
export * from "./buildableEnvelope";
|
|
29
|
-
export * from "./department";
|
|
30
25
|
export * from "./referenceLine";
|
|
31
26
|
export * from "./space";
|
|
32
27
|
export * from "./story";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/entity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/entity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;;;GAUG;AACH,8BAAsB,eAAe;IACnC,uEAAuE;IACvE,SAAgB,KAAK,EAAE,cAAc,CAAA;IACrC,yEAAyE;IACzE,SAAgB,aAAa,EAAE,sBAAsB,CAAA;IACrD,iFAAiF;IACjF,SAAgB,iBAAiB,EAAE,0BAA0B,CAAA;;CAG9D;AAED,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|