@pascal-app/core 0.5.1 → 0.7.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.
Files changed (134) hide show
  1. package/dist/events/bus.d.ts +74 -4
  2. package/dist/events/bus.d.ts.map +1 -1
  3. package/dist/events/bus.js +1 -1
  4. package/dist/hooks/scene-registry/scene-registry.d.ts +2 -0
  5. package/dist/hooks/scene-registry/scene-registry.d.ts.map +1 -1
  6. package/dist/hooks/scene-registry/scene-registry.js +2 -0
  7. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
  8. package/dist/hooks/spatial-grid/spatial-grid-manager.js +164 -6
  9. package/dist/hooks/spatial-grid/spatial-grid.d.ts +2 -0
  10. package/dist/hooks/spatial-grid/spatial-grid.d.ts.map +1 -1
  11. package/dist/hooks/spatial-grid/spatial-grid.js +43 -20
  12. package/dist/index.d.ts +9 -13
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +7 -11
  15. package/dist/lib/door-operation.d.ts +7 -0
  16. package/dist/lib/door-operation.d.ts.map +1 -0
  17. package/dist/lib/door-operation.js +25 -0
  18. package/dist/lib/polygon-geometry.d.ts +3 -0
  19. package/dist/lib/polygon-geometry.d.ts.map +1 -0
  20. package/dist/lib/polygon-geometry.js +90 -0
  21. package/dist/lib/slab-polygon.d.ts +3 -0
  22. package/dist/lib/slab-polygon.d.ts.map +1 -0
  23. package/dist/lib/slab-polygon.js +58 -0
  24. package/dist/lib/space-detection.d.ts +10 -17
  25. package/dist/lib/space-detection.d.ts.map +1 -1
  26. package/dist/lib/space-detection.js +666 -453
  27. package/dist/material-library.d.ts +20 -0
  28. package/dist/material-library.d.ts.map +1 -0
  29. package/dist/material-library.js +580 -0
  30. package/dist/schema/asset-url.d.ts +34 -0
  31. package/dist/schema/asset-url.d.ts.map +1 -0
  32. package/dist/schema/asset-url.js +79 -0
  33. package/dist/schema/asset-url.test.d.ts +2 -0
  34. package/dist/schema/asset-url.test.d.ts.map +1 -0
  35. package/dist/schema/asset-url.test.js +138 -0
  36. package/dist/schema/index.d.ts +14 -7
  37. package/dist/schema/index.d.ts.map +1 -1
  38. package/dist/schema/index.js +10 -7
  39. package/dist/schema/material.d.ts +112 -2
  40. package/dist/schema/material.d.ts.map +1 -1
  41. package/dist/schema/material.js +55 -1
  42. package/dist/schema/nodes/ceiling.d.ts +11 -1
  43. package/dist/schema/nodes/ceiling.d.ts.map +1 -1
  44. package/dist/schema/nodes/ceiling.js +6 -0
  45. package/dist/schema/nodes/column.d.ts +520 -0
  46. package/dist/schema/nodes/column.d.ts.map +1 -0
  47. package/dist/schema/nodes/column.js +385 -0
  48. package/dist/schema/nodes/door.d.ts +74 -1
  49. package/dist/schema/nodes/door.d.ts.map +1 -1
  50. package/dist/schema/nodes/door.js +39 -2
  51. package/dist/schema/nodes/fence.d.ts +34 -0
  52. package/dist/schema/nodes/fence.d.ts.map +1 -1
  53. package/dist/schema/nodes/fence.js +5 -0
  54. package/dist/schema/nodes/guide.d.ts +17 -0
  55. package/dist/schema/nodes/guide.d.ts.map +1 -1
  56. package/dist/schema/nodes/guide.js +11 -1
  57. package/dist/schema/nodes/item.d.ts +10 -2
  58. package/dist/schema/nodes/item.d.ts.map +1 -1
  59. package/dist/schema/nodes/item.js +18 -1
  60. package/dist/schema/nodes/level.d.ts +1 -1
  61. package/dist/schema/nodes/level.d.ts.map +1 -1
  62. package/dist/schema/nodes/level.js +6 -0
  63. package/dist/schema/nodes/roof-segment.d.ts +3 -1
  64. package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
  65. package/dist/schema/nodes/roof-segment.js +1 -0
  66. package/dist/schema/nodes/roof.d.ts +108 -0
  67. package/dist/schema/nodes/roof.d.ts.map +1 -1
  68. package/dist/schema/nodes/roof.js +58 -2
  69. package/dist/schema/nodes/scan.d.ts.map +1 -1
  70. package/dist/schema/nodes/scan.js +2 -1
  71. package/dist/schema/nodes/site.d.ts +2 -1
  72. package/dist/schema/nodes/site.d.ts.map +1 -1
  73. package/dist/schema/nodes/slab.d.ts +11 -1
  74. package/dist/schema/nodes/slab.d.ts.map +1 -1
  75. package/dist/schema/nodes/slab.js +7 -0
  76. package/dist/schema/nodes/spawn.d.ts +24 -0
  77. package/dist/schema/nodes/spawn.d.ts.map +1 -0
  78. package/dist/schema/nodes/spawn.js +8 -0
  79. package/dist/schema/nodes/stair-segment.d.ts +3 -1
  80. package/dist/schema/nodes/stair-segment.d.ts.map +1 -1
  81. package/dist/schema/nodes/stair-segment.js +1 -0
  82. package/dist/schema/nodes/stair.d.ts +122 -2
  83. package/dist/schema/nodes/stair.d.ts.map +1 -1
  84. package/dist/schema/nodes/stair.js +72 -2
  85. package/dist/schema/nodes/surface-hole-metadata.d.ts +10 -0
  86. package/dist/schema/nodes/surface-hole-metadata.d.ts.map +1 -0
  87. package/dist/schema/nodes/surface-hole-metadata.js +5 -0
  88. package/dist/schema/nodes/wall.d.ts +87 -1
  89. package/dist/schema/nodes/wall.d.ts.map +1 -1
  90. package/dist/schema/nodes/wall.js +45 -4
  91. package/dist/schema/nodes/window.d.ts +57 -1
  92. package/dist/schema/nodes/window.d.ts.map +1 -1
  93. package/dist/schema/nodes/window.js +29 -0
  94. package/dist/schema/types.d.ts +653 -12
  95. package/dist/schema/types.d.ts.map +1 -1
  96. package/dist/schema/types.js +4 -0
  97. package/dist/store/actions/node-actions.d.ts +1 -1
  98. package/dist/store/actions/node-actions.d.ts.map +1 -1
  99. package/dist/store/actions/node-actions.js +181 -5
  100. package/dist/store/history-control.d.ts +14 -0
  101. package/dist/store/history-control.d.ts.map +1 -0
  102. package/dist/store/history-control.js +22 -0
  103. package/dist/store/use-interactive.d.ts +43 -0
  104. package/dist/store/use-interactive.d.ts.map +1 -1
  105. package/dist/store/use-interactive.js +66 -0
  106. package/dist/store/use-scene.d.ts.map +1 -1
  107. package/dist/store/use-scene.js +307 -3
  108. package/dist/systems/ceiling/ceiling-system.d.ts.map +1 -1
  109. package/dist/systems/ceiling/ceiling-system.js +7 -0
  110. package/dist/systems/fence/fence-system.d.ts.map +1 -1
  111. package/dist/systems/fence/fence-system.js +106 -39
  112. package/dist/systems/roof/roof-system.d.ts.map +1 -1
  113. package/dist/systems/roof/roof-system.js +31 -1
  114. package/dist/systems/slab/slab-system.d.ts.map +1 -1
  115. package/dist/systems/slab/slab-system.js +45 -8
  116. package/dist/systems/stair/stair-opening-sync.d.ts +6 -0
  117. package/dist/systems/stair/stair-opening-sync.d.ts.map +1 -0
  118. package/dist/systems/stair/stair-opening-sync.js +576 -0
  119. package/dist/systems/stair/stair-opening-sync.test.d.ts +2 -0
  120. package/dist/systems/stair/stair-opening-sync.test.d.ts.map +1 -0
  121. package/dist/systems/stair/stair-opening-sync.test.js +65 -0
  122. package/dist/systems/stair/stair-system.d.ts.map +1 -1
  123. package/dist/systems/stair/stair-system.js +119 -2
  124. package/dist/systems/wall/wall-curve.d.ts +43 -0
  125. package/dist/systems/wall/wall-curve.d.ts.map +1 -0
  126. package/dist/systems/wall/wall-curve.js +176 -0
  127. package/dist/systems/wall/wall-footprint.d.ts.map +1 -1
  128. package/dist/systems/wall/wall-footprint.js +16 -2
  129. package/dist/systems/wall/wall-mitering.d.ts +7 -0
  130. package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
  131. package/dist/systems/wall/wall-mitering.js +76 -3
  132. package/dist/systems/wall/wall-system.d.ts.map +1 -1
  133. package/dist/systems/wall/wall-system.js +202 -2
  134. package/package.json +33 -5
@@ -0,0 +1,385 @@
1
+ import dedent from 'dedent';
2
+ import { z } from 'zod';
3
+ import { BaseNode, nodeType, objectId } from '../base';
4
+ import { MaterialSchema } from '../material';
5
+ export const ColumnStyle = z.enum([
6
+ 'plain',
7
+ 'faceted',
8
+ 'fluted',
9
+ 'lathe-turned',
10
+ 'dravidian-carved',
11
+ 'cluster',
12
+ ]);
13
+ export const ColumnCrossSection = z.enum([
14
+ 'round',
15
+ 'square',
16
+ 'rectangular',
17
+ 'octagonal',
18
+ 'sixteen-sided',
19
+ ]);
20
+ export const ColumnShaftProfile = z.enum(['straight', 'tapered', 'bulged', 'baluster', 'hourglass']);
21
+ export const ColumnShaftDetail = z.enum(['none', 'fluted', 'spiral', 'panelled', 'lathe-turned']);
22
+ export const ColumnPanelShape = z.enum(['rectangle', 'arched', 'diamond']);
23
+ export const ColumnBaseStyle = z.enum([
24
+ 'none',
25
+ 'simple-square',
26
+ 'round-rings',
27
+ 'square-plinth',
28
+ 'stepped-square',
29
+ 'lotus',
30
+ 'ribbed-lotus',
31
+ 'panelled-pedestal',
32
+ ]);
33
+ export const ColumnCapitalStyle = z.enum([
34
+ 'none',
35
+ 'simple',
36
+ 'simple-slab',
37
+ 'rounded',
38
+ 'stepped',
39
+ 'doric',
40
+ 'volute',
41
+ 'ionic-volute',
42
+ 'leaf-carved',
43
+ 'corinthian-leaf',
44
+ 'south-indian-bracket',
45
+ 'wood-bracket',
46
+ ]);
47
+ export const ColumnRingPlacement = z.enum(['ends', 'even', 'top', 'bottom']);
48
+ export const ColumnCarvingPlacement = z.enum(['shaft', 'base', 'capital', 'all']);
49
+ export const ColumnNode = BaseNode.extend({
50
+ id: objectId('column'),
51
+ type: nodeType('column'),
52
+ position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
53
+ rotation: z.number().default(0),
54
+ style: ColumnStyle.default('plain'),
55
+ crossSection: ColumnCrossSection.default('round'),
56
+ height: z.number().positive().default(2.8),
57
+ radius: z.number().positive().default(0.22),
58
+ width: z.number().positive().default(0.44),
59
+ depth: z.number().positive().default(0.44),
60
+ edgeSoftness: z.number().min(0).max(0.12).default(0.025),
61
+ baseHeight: z.number().min(0).default(0.18),
62
+ capitalHeight: z.number().min(0).default(0.18),
63
+ shaftProfile: ColumnShaftProfile.default('straight'),
64
+ shaftTaper: z.number().min(0).max(0.85).default(0),
65
+ shaftBulge: z.number().min(-0.5).max(0.8).default(0),
66
+ shaftStartScale: z.number().min(0.2).max(2).default(0.72),
67
+ shaftEndScale: z.number().min(0.2).max(2).default(0.72),
68
+ shaftSegmentCount: z.number().int().min(1).max(64).default(24),
69
+ shaftTwistStep: z.number().min(-90).max(90).default(0),
70
+ shaftCornerRadius: z.number().min(0).max(0.3).default(0.035),
71
+ shaftDetail: ColumnShaftDetail.default('none'),
72
+ baseStyle: ColumnBaseStyle.default('round-rings'),
73
+ baseWidthScale: z.number().min(0.4).max(3).default(1.24),
74
+ baseDepthScale: z.number().min(0.4).max(3).default(1.24),
75
+ baseTierCount: z.number().int().min(1).max(8).default(3),
76
+ baseStepSpread: z.number().min(0).max(1).default(0.42),
77
+ basePlinthHeightRatio: z.number().min(0.2).max(0.7).default(0.44),
78
+ baseRoundBandScale: z.number().min(0.5).max(1.2).default(0.92),
79
+ baseNeckScale: z.number().min(0.35).max(1).default(0.72),
80
+ baseRoundBandCount: z.number().int().min(0).max(16).default(3),
81
+ baseRibCount: z.number().int().min(0).max(48).default(0),
82
+ baseCarvingLevel: z.number().int().min(0).max(4).default(0),
83
+ basePanelInset: z.number().min(0).max(0.1).default(0.02),
84
+ capitalStyle: ColumnCapitalStyle.default('simple'),
85
+ capitalWidthScale: z.number().min(0.4).max(3).default(1.46),
86
+ capitalDepthScale: z.number().min(0.4).max(3).default(1.46),
87
+ capitalTierCount: z.number().int().min(1).max(8).default(3),
88
+ capitalStepSpread: z.number().min(0).max(1).default(0.42),
89
+ capitalBandCount: z.number().int().min(0).max(16).default(2),
90
+ voluteSize: z.number().min(0.02).max(0.3).default(0.08),
91
+ voluteCount: z.number().int().min(0).max(8).default(4),
92
+ leafCount: z.number().int().min(0).max(48).default(18),
93
+ leafRows: z.number().int().min(0).max(4).default(2),
94
+ bracketDepth: z.number().min(0).max(1.5).default(0.35),
95
+ bracketTierCount: z.number().int().min(0).max(8).default(3),
96
+ pendantCount: z.number().int().min(0).max(16).default(0),
97
+ capitalCarvingLevel: z.number().int().min(0).max(4).default(0),
98
+ ringCount: z.number().int().min(0).max(16).default(0),
99
+ ringPlacement: ColumnRingPlacement.default('ends'),
100
+ ringThickness: z.number().min(0.01).max(0.14).default(0.055),
101
+ ringSpread: z.number().min(0.04).max(0.45).default(0.16),
102
+ fluteCount: z.number().int().min(0).max(32).default(0),
103
+ fluteDepth: z.number().min(0.005).max(0.08).default(0.02),
104
+ fluteWidth: z.number().min(0.005).max(0.1).default(0.02),
105
+ spiralTwist: z.number().min(-3).max(3).default(0),
106
+ spiralRibCount: z.number().int().min(0).max(32).default(0),
107
+ panelCount: z.number().int().min(0).max(24).default(0),
108
+ panelInsetDepth: z.number().min(0).max(0.1).default(0.02),
109
+ panelShape: ColumnPanelShape.default('rectangle'),
110
+ latheRingCount: z.number().int().min(0).max(32).default(0),
111
+ latheRingSpacing: ColumnRingPlacement.default('ends'),
112
+ carvingLevel: z.number().int().min(0).max(4).default(0),
113
+ carvingPlacement: ColumnCarvingPlacement.default('capital'),
114
+ lowerBandEnabled: z.boolean().default(false),
115
+ lowerBandHeight: z.number().min(0).max(1).default(0.24),
116
+ lowerBandCarvingLevel: z.number().int().min(0).max(4).default(0),
117
+ dentilCount: z.number().int().min(0).max(48).default(0),
118
+ beadCount: z.number().int().min(0).max(64).default(0),
119
+ material: MaterialSchema.optional(),
120
+ materialPreset: z.string().optional(),
121
+ }).describe(dedent `
122
+ Column node - used to represent structural or decorative pillars/columns.
123
+ - style: visual approach such as plain, lathe-turned, carved, or cluster
124
+ - crossSection: plan shape used by the procedural renderer
125
+ - height/radius/width/depth: primary dimensions in meters
126
+ - edgeSoftness: bevel radius for square/plinth/block edges
127
+ - shaftProfile/shaftDetail: profile and surface treatment of the shaft
128
+ - shaftTwistStep: per-segment shaft rotation in degrees
129
+ - shaftCornerRadius: rounded-corner radius for square/rectangular shaft cross-sections
130
+ - baseStyle/capitalStyle: procedural base and top treatment with tier/detail controls
131
+ - baseHeight/capitalHeight: bottom and top block proportions
132
+ - ring/flute/spiral/panel/lathe/carving fields: procedural detail controls
133
+ `);
134
+ export const COLUMN_PRESETS = {
135
+ basicPillar: {
136
+ label: 'Straight Round',
137
+ style: 'plain',
138
+ crossSection: 'round',
139
+ height: 2.9,
140
+ radius: 0.22,
141
+ width: 0.44,
142
+ depth: 0.44,
143
+ edgeSoftness: 0.025,
144
+ baseHeight: 0.22,
145
+ capitalHeight: 0.2,
146
+ shaftProfile: 'straight',
147
+ shaftTaper: 0,
148
+ shaftBulge: 0,
149
+ shaftStartScale: 0.72,
150
+ shaftEndScale: 0.72,
151
+ shaftSegmentCount: 1,
152
+ shaftTwistStep: 0,
153
+ shaftCornerRadius: 0.035,
154
+ shaftDetail: 'none',
155
+ baseStyle: 'square-plinth',
156
+ baseWidthScale: 1.26,
157
+ baseDepthScale: 1.26,
158
+ baseTierCount: 1,
159
+ baseStepSpread: 0.34,
160
+ basePlinthHeightRatio: 0.44,
161
+ baseRoundBandScale: 0.92,
162
+ baseNeckScale: 0.72,
163
+ baseRoundBandCount: 0,
164
+ baseRibCount: 0,
165
+ baseCarvingLevel: 0,
166
+ capitalStyle: 'simple-slab',
167
+ capitalWidthScale: 1.22,
168
+ capitalDepthScale: 1.22,
169
+ capitalTierCount: 1,
170
+ capitalStepSpread: 0.34,
171
+ capitalBandCount: 0,
172
+ capitalCarvingLevel: 0,
173
+ ringCount: 0,
174
+ ringSpread: 0.16,
175
+ fluteCount: 0,
176
+ spiralTwist: 0,
177
+ spiralRibCount: 0,
178
+ panelCount: 0,
179
+ latheRingCount: 0,
180
+ carvingLevel: 0,
181
+ lowerBandEnabled: false,
182
+ dentilCount: 0,
183
+ beadCount: 0,
184
+ },
185
+ squarePillar: {
186
+ label: 'Square Block',
187
+ style: 'faceted',
188
+ crossSection: 'square',
189
+ height: 2.9,
190
+ radius: 0.24,
191
+ width: 0.48,
192
+ depth: 0.48,
193
+ edgeSoftness: 0.035,
194
+ baseHeight: 0.22,
195
+ capitalHeight: 0.2,
196
+ shaftProfile: 'straight',
197
+ shaftTaper: 0,
198
+ shaftBulge: 0,
199
+ shaftStartScale: 0.72,
200
+ shaftEndScale: 0.72,
201
+ shaftSegmentCount: 1,
202
+ shaftTwistStep: 0,
203
+ shaftCornerRadius: 0.045,
204
+ shaftDetail: 'none',
205
+ baseStyle: 'simple-square',
206
+ baseWidthScale: 1.18,
207
+ baseDepthScale: 1.18,
208
+ baseTierCount: 1,
209
+ baseStepSpread: 0.34,
210
+ basePlinthHeightRatio: 0.44,
211
+ baseRoundBandScale: 0.92,
212
+ baseNeckScale: 0.72,
213
+ baseRoundBandCount: 0,
214
+ baseRibCount: 0,
215
+ baseCarvingLevel: 0,
216
+ capitalStyle: 'simple-slab',
217
+ capitalWidthScale: 1.18,
218
+ capitalDepthScale: 1.18,
219
+ capitalTierCount: 1,
220
+ capitalStepSpread: 0.34,
221
+ capitalBandCount: 0,
222
+ capitalCarvingLevel: 0,
223
+ ringCount: 0,
224
+ ringSpread: 0.16,
225
+ fluteCount: 0,
226
+ spiralTwist: 0,
227
+ spiralRibCount: 0,
228
+ panelCount: 0,
229
+ latheRingCount: 0,
230
+ carvingLevel: 0,
231
+ lowerBandEnabled: false,
232
+ dentilCount: 0,
233
+ beadCount: 0,
234
+ },
235
+ taperedPillar: {
236
+ label: 'Tapered Round',
237
+ style: 'plain',
238
+ crossSection: 'round',
239
+ height: 3,
240
+ radius: 0.23,
241
+ width: 0.46,
242
+ depth: 0.46,
243
+ edgeSoftness: 0.025,
244
+ baseHeight: 0.23,
245
+ capitalHeight: 0.2,
246
+ shaftProfile: 'tapered',
247
+ shaftTaper: 0.14,
248
+ shaftBulge: 0,
249
+ shaftStartScale: 0.82,
250
+ shaftEndScale: 0.72,
251
+ shaftSegmentCount: 32,
252
+ shaftTwistStep: 0,
253
+ shaftCornerRadius: 0.035,
254
+ shaftDetail: 'none',
255
+ baseStyle: 'square-plinth',
256
+ baseWidthScale: 1.26,
257
+ baseDepthScale: 1.26,
258
+ baseTierCount: 1,
259
+ baseStepSpread: 0.34,
260
+ basePlinthHeightRatio: 0.44,
261
+ baseRoundBandScale: 0.92,
262
+ baseNeckScale: 0.72,
263
+ baseRoundBandCount: 0,
264
+ baseRibCount: 0,
265
+ baseCarvingLevel: 0,
266
+ capitalStyle: 'simple-slab',
267
+ capitalWidthScale: 1.22,
268
+ capitalDepthScale: 1.22,
269
+ capitalTierCount: 1,
270
+ capitalStepSpread: 0.34,
271
+ capitalBandCount: 0,
272
+ capitalCarvingLevel: 0,
273
+ ringCount: 0,
274
+ ringSpread: 0.16,
275
+ fluteCount: 0,
276
+ spiralTwist: 0,
277
+ spiralRibCount: 0,
278
+ panelCount: 0,
279
+ latheRingCount: 0,
280
+ carvingLevel: 0,
281
+ lowerBandEnabled: false,
282
+ dentilCount: 0,
283
+ beadCount: 0,
284
+ },
285
+ bulgedPillar: {
286
+ label: 'Soft Bulged',
287
+ style: 'plain',
288
+ crossSection: 'round',
289
+ height: 2.9,
290
+ radius: 0.22,
291
+ width: 0.44,
292
+ depth: 0.44,
293
+ edgeSoftness: 0.025,
294
+ baseHeight: 0.22,
295
+ capitalHeight: 0.2,
296
+ shaftProfile: 'bulged',
297
+ shaftTaper: 0,
298
+ shaftBulge: 0.12,
299
+ shaftStartScale: 0.68,
300
+ shaftEndScale: 0.68,
301
+ shaftSegmentCount: 32,
302
+ shaftTwistStep: 0,
303
+ shaftCornerRadius: 0.035,
304
+ shaftDetail: 'none',
305
+ baseStyle: 'square-plinth',
306
+ baseWidthScale: 1.24,
307
+ baseDepthScale: 1.24,
308
+ baseTierCount: 1,
309
+ baseStepSpread: 0.34,
310
+ basePlinthHeightRatio: 0.44,
311
+ baseRoundBandScale: 0.92,
312
+ baseNeckScale: 0.72,
313
+ baseRoundBandCount: 0,
314
+ baseRibCount: 0,
315
+ baseCarvingLevel: 0,
316
+ capitalStyle: 'simple-slab',
317
+ capitalWidthScale: 1.2,
318
+ capitalDepthScale: 1.2,
319
+ capitalTierCount: 1,
320
+ capitalStepSpread: 0.34,
321
+ capitalBandCount: 0,
322
+ capitalCarvingLevel: 0,
323
+ ringCount: 0,
324
+ ringSpread: 0.16,
325
+ fluteCount: 0,
326
+ spiralTwist: 0,
327
+ spiralRibCount: 0,
328
+ panelCount: 0,
329
+ latheRingCount: 0,
330
+ carvingLevel: 0,
331
+ lowerBandEnabled: false,
332
+ dentilCount: 0,
333
+ beadCount: 0,
334
+ },
335
+ hourglassPillar: {
336
+ label: 'Hourglass',
337
+ style: 'plain',
338
+ crossSection: 'round',
339
+ height: 2.9,
340
+ radius: 0.22,
341
+ width: 0.44,
342
+ depth: 0.44,
343
+ edgeSoftness: 0.025,
344
+ baseHeight: 0.22,
345
+ capitalHeight: 0.2,
346
+ shaftProfile: 'hourglass',
347
+ shaftTaper: 0,
348
+ shaftBulge: 0.12,
349
+ shaftStartScale: 0.84,
350
+ shaftEndScale: 0.84,
351
+ shaftSegmentCount: 32,
352
+ shaftTwistStep: 0,
353
+ shaftCornerRadius: 0.035,
354
+ shaftDetail: 'none',
355
+ baseStyle: 'square-plinth',
356
+ baseWidthScale: 1.24,
357
+ baseDepthScale: 1.24,
358
+ baseTierCount: 1,
359
+ baseStepSpread: 0.34,
360
+ basePlinthHeightRatio: 0.44,
361
+ baseRoundBandScale: 0.92,
362
+ baseNeckScale: 0.72,
363
+ baseRoundBandCount: 0,
364
+ baseRibCount: 0,
365
+ baseCarvingLevel: 0,
366
+ capitalStyle: 'simple-slab',
367
+ capitalWidthScale: 1.2,
368
+ capitalDepthScale: 1.2,
369
+ capitalTierCount: 1,
370
+ capitalStepSpread: 0.34,
371
+ capitalBandCount: 0,
372
+ capitalCarvingLevel: 0,
373
+ ringCount: 0,
374
+ ringSpread: 0.16,
375
+ fluteCount: 0,
376
+ spiralTwist: 0,
377
+ spiralRibCount: 0,
378
+ panelCount: 0,
379
+ latheRingCount: 0,
380
+ carvingLevel: 0,
381
+ lowerBandEnabled: false,
382
+ dentilCount: 0,
383
+ beadCount: 0,
384
+ },
385
+ };
@@ -12,6 +12,31 @@ export declare const DoorSegment: z.ZodObject<{
12
12
  panelInset: z.ZodDefault<z.ZodNumber>;
13
13
  }, z.core.$strip>;
14
14
  export type DoorSegment = z.infer<typeof DoorSegment>;
15
+ export declare const DoorCategory: z.ZodEnum<{
16
+ interior: "interior";
17
+ garage: "garage";
18
+ }>;
19
+ export declare const DoorType: z.ZodEnum<{
20
+ double: "double";
21
+ hinged: "hinged";
22
+ french: "french";
23
+ folding: "folding";
24
+ pocket: "pocket";
25
+ barn: "barn";
26
+ sliding: "sliding";
27
+ "garage-sectional": "garage-sectional";
28
+ "garage-rollup": "garage-rollup";
29
+ "garage-tiltup": "garage-tiltup";
30
+ }>;
31
+ export declare const DoorTrackStyle: z.ZodEnum<{
32
+ visible: "visible";
33
+ none: "none";
34
+ pocket: "pocket";
35
+ overhead: "overhead";
36
+ }>;
37
+ export type DoorCategory = z.infer<typeof DoorCategory>;
38
+ export type DoorType = z.infer<typeof DoorType>;
39
+ export type DoorTrackStyle = z.infer<typeof DoorTrackStyle>;
15
40
  export declare const DoorNode: z.ZodObject<{
16
41
  object: z.ZodDefault<z.ZodLiteral<"node">>;
17
42
  name: z.ZodOptional<z.ZodString>;
@@ -31,8 +56,8 @@ export declare const DoorNode: z.ZodObject<{
31
56
  id: z.ZodDefault<z.ZodTemplateLiteral<`door_${string}`>>;
32
57
  type: z.ZodDefault<z.ZodLiteral<"door">>;
33
58
  material: z.ZodOptional<z.ZodObject<{
59
+ id: z.ZodOptional<z.ZodString>;
34
60
  preset: z.ZodOptional<z.ZodEnum<{
35
- custom: "custom";
36
61
  white: "white";
37
62
  brick: "brick";
38
63
  concrete: "concrete";
@@ -42,6 +67,7 @@ export declare const DoorNode: z.ZodObject<{
42
67
  plaster: "plaster";
43
68
  tile: "tile";
44
69
  marble: "marble";
70
+ custom: "custom";
45
71
  }>>;
46
72
  properties: z.ZodOptional<z.ZodObject<{
47
73
  color: z.ZodDefault<z.ZodString>;
@@ -70,6 +96,52 @@ export declare const DoorNode: z.ZodObject<{
70
96
  wallId: z.ZodOptional<z.ZodString>;
71
97
  width: z.ZodDefault<z.ZodNumber>;
72
98
  height: z.ZodDefault<z.ZodNumber>;
99
+ doorCategory: z.ZodDefault<z.ZodEnum<{
100
+ interior: "interior";
101
+ garage: "garage";
102
+ }>>;
103
+ doorType: z.ZodDefault<z.ZodEnum<{
104
+ double: "double";
105
+ hinged: "hinged";
106
+ french: "french";
107
+ folding: "folding";
108
+ pocket: "pocket";
109
+ barn: "barn";
110
+ sliding: "sliding";
111
+ "garage-sectional": "garage-sectional";
112
+ "garage-rollup": "garage-rollup";
113
+ "garage-tiltup": "garage-tiltup";
114
+ }>>;
115
+ leafCount: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
116
+ operationState: z.ZodDefault<z.ZodNumber>;
117
+ slideDirection: z.ZodDefault<z.ZodEnum<{
118
+ left: "left";
119
+ right: "right";
120
+ }>>;
121
+ trackStyle: z.ZodDefault<z.ZodEnum<{
122
+ visible: "visible";
123
+ none: "none";
124
+ pocket: "pocket";
125
+ overhead: "overhead";
126
+ }>>;
127
+ garagePanelCount: z.ZodDefault<z.ZodNumber>;
128
+ openingKind: z.ZodDefault<z.ZodEnum<{
129
+ door: "door";
130
+ opening: "opening";
131
+ }>>;
132
+ openingShape: z.ZodDefault<z.ZodEnum<{
133
+ rectangle: "rectangle";
134
+ rounded: "rounded";
135
+ arch: "arch";
136
+ }>>;
137
+ openingRadiusMode: z.ZodDefault<z.ZodEnum<{
138
+ all: "all";
139
+ individual: "individual";
140
+ }>>;
141
+ openingTopRadii: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
142
+ cornerRadius: z.ZodDefault<z.ZodNumber>;
143
+ archHeight: z.ZodDefault<z.ZodNumber>;
144
+ openingRevealRadius: z.ZodDefault<z.ZodNumber>;
73
145
  frameThickness: z.ZodDefault<z.ZodNumber>;
74
146
  frameDepth: z.ZodDefault<z.ZodNumber>;
75
147
  threshold: z.ZodDefault<z.ZodBoolean>;
@@ -82,6 +154,7 @@ export declare const DoorNode: z.ZodObject<{
82
154
  inward: "inward";
83
155
  outward: "outward";
84
156
  }>>;
157
+ swingAngle: z.ZodDefault<z.ZodNumber>;
85
158
  segments: z.ZodDefault<z.ZodArray<z.ZodObject<{
86
159
  type: z.ZodEnum<{
87
160
  glass: "glass";
@@ -1 +1 @@
1
- {"version":3,"file":"door.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/door.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,WAAW;;;;;;;;;;;iBAWtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8DnB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA"}
1
+ {"version":3,"file":"door.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/door.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,WAAW;;;;;;;;;;;iBAWtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,eAAO,MAAM,YAAY;;;EAAiC,CAAA;AAC1D,eAAO,MAAM,QAAQ;;;;;;;;;;;EAWnB,CAAA;AACF,eAAO,MAAM,cAAc;;;;;EAAoD,CAAA;AAE/E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACvD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA;AAC/C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuFnB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA"}
@@ -12,6 +12,20 @@ export const DoorSegment = z.object({
12
12
  panelDepth: z.number().default(0.01), // + raised, - recessed
13
13
  panelInset: z.number().default(0.04),
14
14
  });
15
+ export const DoorCategory = z.enum(['interior', 'garage']);
16
+ export const DoorType = z.enum([
17
+ 'hinged',
18
+ 'double',
19
+ 'french',
20
+ 'folding',
21
+ 'pocket',
22
+ 'barn',
23
+ 'sliding',
24
+ 'garage-sectional',
25
+ 'garage-rollup',
26
+ 'garage-tiltup',
27
+ ]);
28
+ export const DoorTrackStyle = z.enum(['none', 'visible', 'pocket', 'overhead']);
15
29
  export const DoorNode = BaseNode.extend({
16
30
  id: objectId('door'),
17
31
  type: nodeType('door'),
@@ -23,6 +37,22 @@ export const DoorNode = BaseNode.extend({
23
37
  // Overall dimensions
24
38
  width: z.number().default(0.9),
25
39
  height: z.number().default(2.1),
40
+ // Door family
41
+ doorCategory: DoorCategory.default('interior'),
42
+ doorType: DoorType.default('hinged'),
43
+ leafCount: z.union([z.literal(1), z.literal(2), z.literal(3), z.literal(4)]).default(1),
44
+ operationState: z.number().min(0).max(1).default(0),
45
+ slideDirection: z.enum(['left', 'right']).default('left'),
46
+ trackStyle: DoorTrackStyle.default('none'),
47
+ garagePanelCount: z.number().int().min(1).max(12).default(4),
48
+ // Opening mode
49
+ openingKind: z.enum(['door', 'opening']).default('door'),
50
+ openingShape: z.enum(['rectangle', 'rounded', 'arch']).default('rectangle'),
51
+ openingRadiusMode: z.enum(['all', 'individual']).default('all'),
52
+ openingTopRadii: z.tuple([z.number(), z.number()]).default([0.15, 0.15]),
53
+ cornerRadius: z.number().min(0).default(0.15),
54
+ archHeight: z.number().min(0).default(0.45),
55
+ openingRevealRadius: z.number().min(0).default(0.025),
26
56
  // Frame
27
57
  frameThickness: z.number().default(0.05),
28
58
  frameDepth: z.number().default(0.07),
@@ -31,6 +61,11 @@ export const DoorNode = BaseNode.extend({
31
61
  // Swing
32
62
  hingesSide: z.enum(['left', 'right']).default('left'),
33
63
  swingDirection: z.enum(['inward', 'outward']).default('inward'),
64
+ swingAngle: z
65
+ .number()
66
+ .min(0)
67
+ .max(Math.PI / 2)
68
+ .default(0),
34
69
  // Leaf segments — stacked top to bottom, each with its own column split
35
70
  segments: z.array(DoorSegment).default([
36
71
  {
@@ -62,8 +97,10 @@ export const DoorNode = BaseNode.extend({
62
97
  panicBarHeight: z.number().default(1.0),
63
98
  }).describe(dedent `Door node - a parametric door placed on a wall
64
99
  - position: center of the door in wall-local coordinate system (Y = height/2, always at floor)
100
+ - doorCategory/doorType: explicit operation family, defaulting old doors to interior hinged
101
+ - openingKind/openingShape: hinged door or frameless wall opening shape
65
102
  - segments: rows stacked top to bottom, each defining its own columnRatios
66
- - type 'empty' = flush flat fill, 'panel' = raised/recessed panel, 'glass' = glazed
67
- - hingesSide/swingDirection: which way the door opens
103
+ - type 'empty' = no leaf fill for that segment, 'panel' = raised/recessed panel, 'glass' = glazed
104
+ - hingesSide/swingDirection/swingAngle: which way the door opens and how far it is currently open
68
105
  - doorCloser/panicBar: commercial and emergency hardware options
69
106
  `);
@@ -26,8 +26,42 @@ export declare const FenceNode: z.ZodObject<{
26
26
  metadata: z.ZodDefault<z.ZodOptional<z.ZodJSONSchema>>;
27
27
  id: z.ZodDefault<z.ZodTemplateLiteral<`fence_${string}`>>;
28
28
  type: z.ZodDefault<z.ZodLiteral<"fence">>;
29
+ material: z.ZodOptional<z.ZodObject<{
30
+ id: z.ZodOptional<z.ZodString>;
31
+ preset: z.ZodOptional<z.ZodEnum<{
32
+ white: "white";
33
+ brick: "brick";
34
+ concrete: "concrete";
35
+ wood: "wood";
36
+ glass: "glass";
37
+ metal: "metal";
38
+ plaster: "plaster";
39
+ tile: "tile";
40
+ marble: "marble";
41
+ custom: "custom";
42
+ }>>;
43
+ properties: z.ZodOptional<z.ZodObject<{
44
+ color: z.ZodDefault<z.ZodString>;
45
+ roughness: z.ZodDefault<z.ZodNumber>;
46
+ metalness: z.ZodDefault<z.ZodNumber>;
47
+ opacity: z.ZodDefault<z.ZodNumber>;
48
+ transparent: z.ZodDefault<z.ZodBoolean>;
49
+ side: z.ZodDefault<z.ZodEnum<{
50
+ front: "front";
51
+ back: "back";
52
+ double: "double";
53
+ }>>;
54
+ }, z.core.$strip>>;
55
+ texture: z.ZodOptional<z.ZodObject<{
56
+ url: z.ZodString;
57
+ repeat: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
58
+ scale: z.ZodOptional<z.ZodNumber>;
59
+ }, z.core.$strip>>;
60
+ }, z.core.$strip>>;
61
+ materialPreset: z.ZodOptional<z.ZodString>;
29
62
  start: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
30
63
  end: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
64
+ curveOffset: z.ZodOptional<z.ZodNumber>;
31
65
  height: z.ZodDefault<z.ZodNumber>;
32
66
  thickness: z.ZodDefault<z.ZodNumber>;
33
67
  baseHeight: z.ZodDefault<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"fence.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/fence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,UAAU;;;;EAAsC,CAAA;AAC7D,eAAO,MAAM,cAAc;;;EAAmC,CAAA;AAE9D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBrB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
1
+ {"version":3,"file":"fence.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/fence.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,UAAU;;;;EAAsC,CAAA;AAC7D,eAAO,MAAM,cAAc;;;EAAmC,CAAA;AAE9D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BrB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
@@ -1,13 +1,17 @@
1
1
  import dedent from 'dedent';
2
2
  import { z } from 'zod';
3
3
  import { BaseNode, nodeType, objectId } from '../base';
4
+ import { MaterialSchema } from '../material';
4
5
  export const FenceStyle = z.enum(['slat', 'rail', 'privacy']);
5
6
  export const FenceBaseStyle = z.enum(['floating', 'grounded']);
6
7
  export const FenceNode = BaseNode.extend({
7
8
  id: objectId('fence'),
8
9
  type: nodeType('fence'),
10
+ material: MaterialSchema.optional(),
11
+ materialPreset: z.string().optional(),
9
12
  start: z.tuple([z.number(), z.number()]),
10
13
  end: z.tuple([z.number(), z.number()]),
14
+ curveOffset: z.number().optional(),
11
15
  height: z.number().default(1.8),
12
16
  thickness: z.number().default(0.08),
13
17
  baseHeight: z.number().default(0.22),
@@ -22,6 +26,7 @@ export const FenceNode = BaseNode.extend({
22
26
  }).describe(dedent `
23
27
  Fence node - used to represent a fence segment in the building/site level coordinate system
24
28
  - start/end: fence endpoints in level coordinate system
29
+ - curveOffset: midpoint sagitta offset used to bend the fence into an arc
25
30
  - height/thickness: overall fence dimensions in meters
26
31
  - baseHeight/postSpacing/postSize/topRailHeight: exact geometric controls from the plan3D fence model
27
32
  - groundClearance/edgeInset/baseStyle: fence support and inset configuration
@@ -1,4 +1,12 @@
1
1
  import { z } from 'zod';
2
+ export declare const GuideScaleReference: z.ZodObject<{
3
+ start: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
4
+ end: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
5
+ realLengthMeters: z.ZodNumber;
6
+ measuredLengthUnits: z.ZodNumber;
7
+ metersPerUnit: z.ZodNumber;
8
+ label: z.ZodString;
9
+ }, z.core.$strip>;
2
10
  export declare const GuideNode: z.ZodObject<{
3
11
  object: z.ZodDefault<z.ZodLiteral<"node">>;
4
12
  name: z.ZodOptional<z.ZodString>;
@@ -22,6 +30,15 @@ export declare const GuideNode: z.ZodObject<{
22
30
  rotation: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
23
31
  scale: z.ZodDefault<z.ZodNumber>;
24
32
  opacity: z.ZodDefault<z.ZodNumber>;
33
+ scaleReference: z.ZodDefault<z.ZodNullable<z.ZodObject<{
34
+ start: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
35
+ end: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
36
+ realLengthMeters: z.ZodNumber;
37
+ measuredLengthUnits: z.ZodNumber;
38
+ metersPerUnit: z.ZodNumber;
39
+ label: z.ZodString;
40
+ }, z.core.$strip>>>;
25
41
  }, z.core.$strip>;
42
+ export type GuideScaleReference = z.infer<typeof GuideScaleReference>;
26
43
  export type GuideNode = z.infer<typeof GuideNode>;
27
44
  //# sourceMappingURL=guide.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"guide.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;iBAQpB,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
1
+ {"version":3,"file":"guide.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,mBAAmB;;;;;;;iBAO9B,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASpB,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACrE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}