planscript 1.0.0 → 1.4.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/LANGUAGE_REFERENCE.md +754 -0
- package/README.md +98 -107
- package/dist/ast/types.d.ts +11 -1
- package/dist/ast/types.d.ts.map +1 -1
- package/dist/exporters/svg.d.ts.map +1 -1
- package/dist/exporters/svg.js +126 -1
- package/dist/exporters/svg.js.map +1 -1
- package/dist/geometry/index.d.ts.map +1 -1
- package/dist/geometry/index.js +70 -16
- package/dist/geometry/index.js.map +1 -1
- package/dist/parser/grammar.d.ts +11 -4
- package/dist/parser/grammar.d.ts.map +1 -1
- package/dist/parser/grammar.js +578 -170
- package/dist/parser/grammar.js.map +1 -1
- package/examples/casa_moderna.psc +375 -0
- package/examples/casa_moderna_v2.psc +406 -0
- package/examples/casa_moderna_v3.psc +375 -0
- package/examples/casa_moderna_v5.psc +397 -0
- package/examples/house2.psc +156 -0
- package/examples/house2.svg +103 -0
- package/examples/house3.svg +139 -0
- package/package.json +2 -1
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
# Casa Moderna - Terreno 20m x 60m
|
|
2
|
+
# v3: Suite master corregida
|
|
3
|
+
# Orientación: Norte arriba (Y+), Sur abajo (calle)
|
|
4
|
+
|
|
5
|
+
units m
|
|
6
|
+
|
|
7
|
+
defaults {
|
|
8
|
+
door_width 0.9
|
|
9
|
+
window_width 1.5
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
plan "Casa Moderna" {
|
|
13
|
+
footprint rect (1, 1) (19, 29)
|
|
14
|
+
|
|
15
|
+
# ============================================
|
|
16
|
+
# ZONA DE ACCESO - Frente Sur (Y = 1 a 7)
|
|
17
|
+
# ============================================
|
|
18
|
+
|
|
19
|
+
# Cochera para 2 vehículos (6m x 6m)
|
|
20
|
+
room garage {
|
|
21
|
+
rect (1, 1) (7, 7)
|
|
22
|
+
label "Cochera"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
# Hall de entrada principal
|
|
26
|
+
room foyer {
|
|
27
|
+
rect (7, 1) (12, 7)
|
|
28
|
+
label "Hall de Entrada"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
# Toilette de visitas
|
|
32
|
+
room toilette {
|
|
33
|
+
rect (12, 1) (15, 4)
|
|
34
|
+
label "Toilette"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
# Lavadero con acceso exterior
|
|
38
|
+
room laundry {
|
|
39
|
+
rect (15, 1) (19, 4)
|
|
40
|
+
label "Lavadero"
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
# Oficina - accesible desde el foyer
|
|
44
|
+
room office {
|
|
45
|
+
rect (12, 4) (19, 9)
|
|
46
|
+
label "Oficina"
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
# ============================================
|
|
50
|
+
# CIRCULACIÓN CENTRAL
|
|
51
|
+
# ============================================
|
|
52
|
+
|
|
53
|
+
# Pasillo principal que conecta todo
|
|
54
|
+
room hallway {
|
|
55
|
+
rect (7, 7) (12, 22)
|
|
56
|
+
label "Pasillo"
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# ============================================
|
|
60
|
+
# ZONA SOCIAL - Lado Oeste
|
|
61
|
+
# ============================================
|
|
62
|
+
|
|
63
|
+
# Living amplio
|
|
64
|
+
room living {
|
|
65
|
+
rect (1, 7) (7, 14)
|
|
66
|
+
label "Living"
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
# Comedor
|
|
70
|
+
room dining {
|
|
71
|
+
rect (1, 14) (7, 19)
|
|
72
|
+
label "Comedor"
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
# Cocina
|
|
76
|
+
room kitchen {
|
|
77
|
+
rect (1, 19) (7, 25)
|
|
78
|
+
label "Cocina"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# Despensa
|
|
82
|
+
room pantry {
|
|
83
|
+
rect (1, 25) (4, 29)
|
|
84
|
+
label "Despensa"
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
# Patio de servicio
|
|
88
|
+
room service_yard {
|
|
89
|
+
rect (4, 25) (7, 29)
|
|
90
|
+
label "Patio Servicio"
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# ============================================
|
|
94
|
+
# ZONA PRIVADA - Lado Este
|
|
95
|
+
# ============================================
|
|
96
|
+
|
|
97
|
+
# Dormitorio 2
|
|
98
|
+
room bedroom2 {
|
|
99
|
+
rect (12, 9) (19, 15)
|
|
100
|
+
label "Dormitorio 2"
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
# Baño compartido
|
|
104
|
+
room bath_shared {
|
|
105
|
+
rect (12, 15) (16, 19)
|
|
106
|
+
label "Baño"
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
# Dormitorio 3
|
|
110
|
+
room bedroom3 {
|
|
111
|
+
rect (16, 15) (19, 22)
|
|
112
|
+
label "Dormitorio 3"
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
# ============================================
|
|
116
|
+
# SUITE PRINCIPAL - Fondo Norte
|
|
117
|
+
# Ahora con espacios NO superpuestos
|
|
118
|
+
# ============================================
|
|
119
|
+
|
|
120
|
+
# Master Bedroom (área de dormir solamente)
|
|
121
|
+
room master {
|
|
122
|
+
rect (12, 22) (19, 26)
|
|
123
|
+
label "Suite Principal"
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
# Vestidor (al norte del master, lado oeste)
|
|
127
|
+
room walkin {
|
|
128
|
+
rect (12, 26) (15, 29)
|
|
129
|
+
label "Vestidor"
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
# Baño en suite (al norte del master, lado este)
|
|
133
|
+
room bath_master {
|
|
134
|
+
rect (15, 26) (19, 29)
|
|
135
|
+
label "Baño Suite"
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
# ============================================
|
|
139
|
+
# PUERTAS - CIRCULACIÓN PRINCIPAL
|
|
140
|
+
# ============================================
|
|
141
|
+
|
|
142
|
+
opening door d_entrada {
|
|
143
|
+
on foyer.edge south
|
|
144
|
+
at 50%
|
|
145
|
+
width 1.2
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
opening door d_garage {
|
|
149
|
+
between garage and foyer
|
|
150
|
+
on shared_edge
|
|
151
|
+
at 50%
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
opening door d_toilette {
|
|
155
|
+
between foyer and toilette
|
|
156
|
+
on shared_edge
|
|
157
|
+
at 50%
|
|
158
|
+
width 0.8
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
opening door d_office {
|
|
162
|
+
between foyer and office
|
|
163
|
+
on shared_edge
|
|
164
|
+
at 50%
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
opening door d_foyer_hall {
|
|
168
|
+
between foyer and hallway
|
|
169
|
+
on shared_edge
|
|
170
|
+
at 50%
|
|
171
|
+
width 1.2
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
# ============================================
|
|
175
|
+
# PUERTAS - ZONA SOCIAL
|
|
176
|
+
# ============================================
|
|
177
|
+
|
|
178
|
+
opening door d_living {
|
|
179
|
+
between hallway and living
|
|
180
|
+
on shared_edge
|
|
181
|
+
at 30%
|
|
182
|
+
width 1.5
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
opening door d_dining {
|
|
186
|
+
between hallway and dining
|
|
187
|
+
on shared_edge
|
|
188
|
+
at 50%
|
|
189
|
+
width 1.2
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
opening door d_kitchen {
|
|
193
|
+
between hallway and kitchen
|
|
194
|
+
on shared_edge
|
|
195
|
+
at 50%
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
opening door d_living_dining {
|
|
199
|
+
between living and dining
|
|
200
|
+
on shared_edge
|
|
201
|
+
at 50%
|
|
202
|
+
width 2.0
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
opening door d_dining_kitchen {
|
|
206
|
+
between dining and kitchen
|
|
207
|
+
on shared_edge
|
|
208
|
+
at 50%
|
|
209
|
+
width 1.2
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
opening door d_pantry {
|
|
213
|
+
between kitchen and pantry
|
|
214
|
+
on shared_edge
|
|
215
|
+
at 50%
|
|
216
|
+
width 0.8
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
opening door d_service {
|
|
220
|
+
between kitchen and service_yard
|
|
221
|
+
on shared_edge
|
|
222
|
+
at 50%
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
# ============================================
|
|
226
|
+
# PUERTAS - ZONA PRIVADA
|
|
227
|
+
# ============================================
|
|
228
|
+
|
|
229
|
+
opening door d_bed2 {
|
|
230
|
+
between hallway and bedroom2
|
|
231
|
+
on shared_edge
|
|
232
|
+
at 50%
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
opening door d_bath {
|
|
236
|
+
between hallway and bath_shared
|
|
237
|
+
on shared_edge
|
|
238
|
+
at 50%
|
|
239
|
+
width 0.8
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
opening door d_bed3 {
|
|
243
|
+
between hallway and bedroom3
|
|
244
|
+
on shared_edge
|
|
245
|
+
at 50%
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
opening door d_master {
|
|
249
|
+
between hallway and master
|
|
250
|
+
on shared_edge
|
|
251
|
+
at 50%
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
# ============================================
|
|
255
|
+
# PUERTAS - SUITE MASTER
|
|
256
|
+
# ============================================
|
|
257
|
+
|
|
258
|
+
opening door d_walkin {
|
|
259
|
+
between master and walkin
|
|
260
|
+
on shared_edge
|
|
261
|
+
at 50%
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
opening door d_bath_master {
|
|
265
|
+
between master and bath_master
|
|
266
|
+
on shared_edge
|
|
267
|
+
at 50%
|
|
268
|
+
width 0.8
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
# ============================================
|
|
272
|
+
# PUERTAS EXTERIORES
|
|
273
|
+
# ============================================
|
|
274
|
+
|
|
275
|
+
opening door d_garage_ext {
|
|
276
|
+
on garage.edge south
|
|
277
|
+
at 50%
|
|
278
|
+
width 5.0
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
opening door d_laundry_ext {
|
|
282
|
+
on laundry.edge east
|
|
283
|
+
at 50%
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
# ============================================
|
|
287
|
+
# VENTANAS
|
|
288
|
+
# ============================================
|
|
289
|
+
|
|
290
|
+
opening window w_living_w {
|
|
291
|
+
on living.edge west
|
|
292
|
+
at 3.5
|
|
293
|
+
width 3.0
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
opening window w_dining {
|
|
297
|
+
on dining.edge west
|
|
298
|
+
at 2.5
|
|
299
|
+
width 2.5
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
opening window w_kitchen {
|
|
303
|
+
on kitchen.edge west
|
|
304
|
+
at 3.0
|
|
305
|
+
width 2.0
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
opening window w_office_e {
|
|
309
|
+
on office.edge east
|
|
310
|
+
at 2.5
|
|
311
|
+
width 2.0
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
opening window w_office_s {
|
|
315
|
+
on office.edge south
|
|
316
|
+
at 1.5
|
|
317
|
+
width 1.5
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
opening window w_bed2 {
|
|
321
|
+
on bedroom2.edge east
|
|
322
|
+
at 3.0
|
|
323
|
+
width 2.0
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
opening window w_bed3 {
|
|
327
|
+
on bedroom3.edge east
|
|
328
|
+
at 3.5
|
|
329
|
+
width 1.8
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
opening window w_bath {
|
|
333
|
+
on bath_shared.edge east
|
|
334
|
+
at 2.0
|
|
335
|
+
width 1.0
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
opening window w_master_e {
|
|
339
|
+
on master.edge east
|
|
340
|
+
at 3.5
|
|
341
|
+
width 2.5
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
opening window w_bath_master {
|
|
345
|
+
on bath_master.edge east
|
|
346
|
+
at 2.0
|
|
347
|
+
width 1.0
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
opening window w_walkin {
|
|
351
|
+
on walkin.edge north
|
|
352
|
+
at 1.5
|
|
353
|
+
width 1.0
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
opening window w_pantry {
|
|
357
|
+
on pantry.edge north
|
|
358
|
+
at 1.5
|
|
359
|
+
width 1.0
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
# ============================================
|
|
363
|
+
# VALIDACIONES
|
|
364
|
+
# ============================================
|
|
365
|
+
|
|
366
|
+
assert no_overlap rooms
|
|
367
|
+
assert inside footprint all_rooms
|
|
368
|
+
assert min_room_area master >= 20
|
|
369
|
+
assert min_room_area living >= 20
|
|
370
|
+
assert min_room_area bedroom2 >= 12
|
|
371
|
+
assert min_room_area bedroom3 >= 12
|
|
372
|
+
assert min_room_area office >= 15
|
|
373
|
+
assert min_room_area garage >= 30
|
|
374
|
+
assert min_room_area kitchen >= 20
|
|
375
|
+
}
|