@kensnzk/koyu 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/.github/workflows/ci.yml +16 -0
- package/.zenodo.json +20 -0
- package/CITATION.cff +26 -0
- package/LICENSE +73 -0
- package/NOTICE +2 -0
- package/README.ja.md +71 -0
- package/README.md +72 -0
- package/docs/decisions/0001-notation-v0.md +29 -0
- package/docs/decisions/0002-height-and-offsets.md +27 -0
- package/docs/decisions/0003-uncounted-divisions.md +36 -0
- package/docs/decisions/0004-typical-floors.md +21 -0
- package/docs/decisions/0005-zones-and-unions.md +23 -0
- package/docs/decisions/0006-voids-and-light.md +31 -0
- package/docs/decisions/0007-semi-outdoor-air.md +27 -0
- package/docs/decisions/0008-vocabulary-and-level-attr.md +23 -0
- package/docs/decisions/0009-site-and-exterior.md +29 -0
- package/docs/ifc-coverage.md +82 -0
- package/docs/ifcx-notes.md +25 -0
- package/docs/img/house-L1.svg +80 -0
- package/docs/img/house-L2.svg +53 -0
- package/docs/img/mansion-L1.svg +113 -0
- package/docs/img/mansion-L10.svg +111 -0
- package/docs/img/mansion-L5.svg +160 -0
- package/docs/img/office-L1.svg +116 -0
- package/docs/img/office-L2.svg +109 -0
- package/docs/img/two-rooms.svg +39 -0
- package/docs/log/2026-07-22.md +13 -0
- package/docs/log/2026-07-23.md +51 -0
- package/docs/roadmap.md +55 -0
- package/docs/writing-architecture.md +119 -0
- package/examples/comparison/README.md +38 -0
- package/examples/comparison/gen-ifc4.ts +133 -0
- package/examples/comparison/gen-ifcx.ts +134 -0
- package/examples/comparison/two-rooms.ifc +152 -0
- package/examples/comparison/two-rooms.ifcx +1030 -0
- package/examples/comparison/validate-ifc.ts +33 -0
- package/examples/house.muro +89 -0
- package/examples/mansion.muro +187 -0
- package/examples/office.muro +110 -0
- package/examples/two-rooms.canonical.json +111 -0
- package/examples/two-rooms.muro +22 -0
- package/package.json +33 -0
- package/spec/notation-v0.md +164 -0
- package/spec/vocabulary.md +62 -0
- package/src/check.ts +302 -0
- package/src/cli.ts +281 -0
- package/src/graph.ts +306 -0
- package/src/index.ts +8 -0
- package/src/light.ts +66 -0
- package/src/model.ts +367 -0
- package/src/parse.ts +512 -0
- package/src/plan.ts +334 -0
- package/src/site.ts +82 -0
- package/test/core.test.ts +171 -0
- package/test/design2.test.ts +97 -0
- package/test/house.test.ts +74 -0
- package/test/mansion.test.ts +99 -0
- package/test/office.test.ts +71 -0
- package/test/uncounted.test.ts +120 -0
- package/test/vertical.test.ts +75 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// 生成した two-rooms.ifc を ThatOpen の web-ifc でパースし、
|
|
2
|
+
// エンティティ数とジオメトリが実際に組み上がることを確かめる。
|
|
3
|
+
// 実行: npx tsx examples/comparison/validate-ifc.ts examples/comparison/two-rooms.ifc
|
|
4
|
+
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
6
|
+
import * as WebIFC from "web-ifc";
|
|
7
|
+
|
|
8
|
+
const file = process.argv[2];
|
|
9
|
+
if (!file) {
|
|
10
|
+
console.error("使い方: validate-ifc.ts <file.ifc>");
|
|
11
|
+
process.exit(2);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const api = new WebIFC.IfcAPI();
|
|
15
|
+
await api.Init();
|
|
16
|
+
const modelID = api.OpenModel(new Uint8Array(readFileSync(file)));
|
|
17
|
+
|
|
18
|
+
const types: Array<[string, number]> = [
|
|
19
|
+
["IfcWall", WebIFC.IFCWALL],
|
|
20
|
+
["IfcSpace", WebIFC.IFCSPACE],
|
|
21
|
+
["IfcDoor", WebIFC.IFCDOOR],
|
|
22
|
+
["IfcOpeningElement", WebIFC.IFCOPENINGELEMENT],
|
|
23
|
+
["IfcRelSpaceBoundary", WebIFC.IFCRELSPACEBOUNDARY],
|
|
24
|
+
["IfcRelVoidsElement", WebIFC.IFCRELVOIDSELEMENT],
|
|
25
|
+
];
|
|
26
|
+
for (const [name, t] of types) {
|
|
27
|
+
console.log(`${name}: ${api.GetLineIDsWithType(modelID, t).size()}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let meshes = 0;
|
|
31
|
+
api.StreamAllMeshes(modelID, () => meshes++);
|
|
32
|
+
console.log(`組み上がったメッシュ: ${meshes}`);
|
|
33
|
+
api.CloseModel(modelID);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# 小さな戸建住宅 — メゾネットの原型 + 敷地 (MUN-149/150)
|
|
2
|
+
# パスの第一義は集計の階層。レベルは既定でパス先頭から読むが、この家は /home の下に
|
|
3
|
+
# 全室を束ね、level: 属性で階を明示する (ADR-0008)。LDK上部は部分吹抜け (被覆1/3)。
|
|
4
|
+
#
|
|
5
|
+
# 敷地: /out は方角・性格ごとの複数のexterior空間に割れる (道路は road:幅員 — ADR-0009)。
|
|
6
|
+
# 地上の外部空間 (庭) はL1上の実在の空間として建物の周りをタイルし、
|
|
7
|
+
# 敷地 = zone site:1 (宣言面積と導出面積を site コマンドが突き合わせる)。
|
|
8
|
+
# L1の平面図はそのまま配置図兼用になる。
|
|
9
|
+
|
|
10
|
+
koyu 0.1
|
|
11
|
+
name 小さな戸建住宅
|
|
12
|
+
unit mm
|
|
13
|
+
|
|
14
|
+
grid X 0 3640 7280
|
|
15
|
+
grid Y 0 3640 7280
|
|
16
|
+
|
|
17
|
+
level L1 0 h:2400
|
|
18
|
+
level L2 2900 h:2400 slab:500
|
|
19
|
+
level R 5800 slab:500
|
|
20
|
+
|
|
21
|
+
# ---- 外部 (敷地の外) — 方角・性格ごとに割る ----
|
|
22
|
+
space /out/road exterior name:南側道路 road:6000
|
|
23
|
+
space /out/n exterior name:北側隣地
|
|
24
|
+
space /out/e exterior name:東側隣地
|
|
25
|
+
space /out/w exterior name:西側隣地
|
|
26
|
+
|
|
27
|
+
# ---- 敷地 — 地上の外部空間が建物の周りをタイルする ----
|
|
28
|
+
zone /site name:敷地 site:1 area:126.24
|
|
29
|
+
space /site/garden garden X1-1500..X3+1500 Y1-4000..Y1 level:L1 name:南庭
|
|
30
|
+
space /site/west yard X1-1500..X1 Y1..Y3+1000 level:L1 name:西側通路
|
|
31
|
+
space /site/east yard X3..X3+1500 Y1..Y3+1000 level:L1 name:東側通路
|
|
32
|
+
space /site/north yard X1..X3 Y3..Y3+1000 level:L1 name:北側通路
|
|
33
|
+
|
|
34
|
+
zone /home name:住戸 use:exclusive
|
|
35
|
+
|
|
36
|
+
space /home/ldk ldk X1..X2 Y1..Y3 + X2..X3 Y1..Y2 level:L1 name:LDK floor:オーク
|
|
37
|
+
space /home/hall1 hall X2..X3 Y2..Y3 level:L1 name:玄関・階段
|
|
38
|
+
space /home/bed1 bedroom X1..X2 Y1..Y3 level:L2 name:主寝室
|
|
39
|
+
space /home/void void X2..X3 Y1..Y2 level:L2 name:リビング上部
|
|
40
|
+
space /home/hall2 hall X2..X3 Y2..Y3 level:L2 name:2階ホール
|
|
41
|
+
|
|
42
|
+
# ---- 1階: 室と庭の境界 (実在の矩形同士 — 線分は正確に導出される) ----
|
|
43
|
+
boundary /home/ldk /home/hall1 t:120 spec:LGS
|
|
44
|
+
door w:800 edge:E hinge:S swing:b
|
|
45
|
+
boundary /home/ldk /site/garden t:150 spec:EW
|
|
46
|
+
window w:2600 h:2200 sill:0 name:掃き出し窓 # 庭は上が開いている → 採光1.0
|
|
47
|
+
boundary /home/ldk /site/west t:150 spec:EW
|
|
48
|
+
window w:1650 h:1100 sill:900
|
|
49
|
+
boundary /home/ldk /site/east t:150 spec:EW
|
|
50
|
+
boundary /home/ldk /site/north t:150 spec:EW
|
|
51
|
+
boundary /home/hall1 /site/east t:150 spec:EW
|
|
52
|
+
door w:900 name:玄関
|
|
53
|
+
boundary /home/hall1 /site/north t:150 spec:EW
|
|
54
|
+
|
|
55
|
+
# ---- 庭同士は連続 ----
|
|
56
|
+
boundary /site/garden /site/west type:open
|
|
57
|
+
boundary /site/garden /site/east type:open
|
|
58
|
+
boundary /site/west /site/north type:open
|
|
59
|
+
boundary /site/east /site/north type:open
|
|
60
|
+
|
|
61
|
+
# ---- 敷地境界: 塀は境界のspec語彙 (外気は遮らない air:1)。門扉は扉 ----
|
|
62
|
+
boundary /site/garden /out/road edge:S t:120 spec:ブロック塀+フェンス air:1 h:1200
|
|
63
|
+
door w:900 name:門扉
|
|
64
|
+
boundary /site/garden /out/w edge:W t:120 spec:ブロック塀 air:1 h:1200
|
|
65
|
+
boundary /site/garden /out/e edge:E t:120 spec:ブロック塀 air:1 h:1200
|
|
66
|
+
boundary /site/west /out/w edge:W t:120 spec:ブロック塀 air:1 h:1200
|
|
67
|
+
boundary /site/west /out/n edge:N t:120 spec:ブロック塀 air:1 h:1200
|
|
68
|
+
boundary /site/east /out/e edge:E t:120 spec:ブロック塀 air:1 h:1200
|
|
69
|
+
boundary /site/east /out/n edge:N t:120 spec:ブロック塀 air:1 h:1200
|
|
70
|
+
boundary /site/north /out/n edge:N t:120 spec:ブロック塀 air:1 h:1200
|
|
71
|
+
|
|
72
|
+
# ---- 2階: 上階の外壁は方角別のexteriorに面する ----
|
|
73
|
+
boundary /home/bed1 /out/road edge:S t:150 spec:EW
|
|
74
|
+
window w:2600 h:2200 sill:800
|
|
75
|
+
boundary /home/bed1 /out/w edge:W t:150 spec:EW
|
|
76
|
+
boundary /home/bed1 /out/n edge:N t:150 spec:EW
|
|
77
|
+
boundary /home/bed1 /home/void t:120 spec:LGS
|
|
78
|
+
boundary /home/bed1 /home/hall2 t:120 spec:LGS
|
|
79
|
+
door w:800
|
|
80
|
+
boundary /home/void /home/hall2 t:120 spec:手すり air:1 h:1100
|
|
81
|
+
boundary /home/void /out/road edge:S t:150 spec:EW
|
|
82
|
+
window w:2600 h:1100 sill:1100 name:吹抜けの高窓
|
|
83
|
+
boundary /home/void /out/e edge:E t:150 spec:EW
|
|
84
|
+
boundary /home/hall2 /out/e edge:E t:150 spec:EW
|
|
85
|
+
boundary /home/hall2 /out/n edge:N t:150 spec:EW
|
|
86
|
+
|
|
87
|
+
# ---- 垂直: 内部階段と部分吹抜け ----
|
|
88
|
+
boundary /home/hall1 /home/hall2 type:stair
|
|
89
|
+
boundary /home/ldk /home/void type:void # 部分吹抜け — LDKの天井高は階高内のまま
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# 内廊下型集合住宅 — 10階建て・43戸
|
|
2
|
+
# 1Fは共用部と機械室、2〜9Fが基準階 (5戸: 34.8㎡×4 + 54㎡×1)、10Fはペントハウス (3戸+ルーフテラス)。
|
|
3
|
+
# EV1基 (シャフト=通行不可)、西側に屋外階段とAタイプのバルコニー (半屋外 —
|
|
4
|
+
# 外部に対し open または air:1 (手すり等、遮蔽しない物) の境界を持つ空間として導出される)。
|
|
5
|
+
# 基準階は一度だけ書く — /L2..L9/ のスパンが8フロアに展開される。
|
|
6
|
+
|
|
7
|
+
koyu 0.1
|
|
8
|
+
name 内廊下型集合住宅
|
|
9
|
+
unit mm
|
|
10
|
+
|
|
11
|
+
grid X 0 5800 11600 17400
|
|
12
|
+
grid Y 0 6000 7800 13800
|
|
13
|
+
|
|
14
|
+
level L1 0 h:2800
|
|
15
|
+
level L2 3800 h:2400 slab:1000 # 1Fは階高3800 (共用部の設備懐)
|
|
16
|
+
level L3..L9 6700 pitch:2900 h:2400 slab:500
|
|
17
|
+
level L10 27000 h:2600 slab:500 # ペントハウスは天井高2600
|
|
18
|
+
level R 30200 slab:600 # 屋上 (陸屋根)。L10の上限を与える
|
|
19
|
+
|
|
20
|
+
space /out exterior name:外部
|
|
21
|
+
|
|
22
|
+
# ============ 1階 — 共用部・機械室 ============
|
|
23
|
+
space /L1/hall hall X1..X2 Y1..Y3 name:エントランスホール use:common floor:タイル
|
|
24
|
+
space /L1/machine machine X2..X3 Y1..Y2 name:機械室・電気室 use:common
|
|
25
|
+
space /L1/bike bicycle X3..X4 Y1..Y2 name:駐輪場 use:common
|
|
26
|
+
space /L1/corridor corridor X2..X4 Y2..Y3 name:共用廊下 use:common
|
|
27
|
+
space /L1/garbage waste X1..X2 Y3..Y4 name:ごみ置場 use:common
|
|
28
|
+
space /L1/ev ev X2..X2+2600 Y3..Y3+2600 name:EV use:common
|
|
29
|
+
space /L1/trunk trunk X2..X2+2600 Y3+2600..Y4 name:トランクルーム use:common
|
|
30
|
+
space /L1/common meeting X2+2600..X4 Y3..Y4 name:管理室・集会室 use:common
|
|
31
|
+
space /L1/stair stair X1-2600..X1 Y2-600..Y3 name:屋外階段 use:common
|
|
32
|
+
|
|
33
|
+
boundary /L1/hall /L1/machine t:180 spec:RC
|
|
34
|
+
boundary /L1/hall /L1/corridor type:open
|
|
35
|
+
boundary /L1/hall /L1/garbage t:180 spec:RC
|
|
36
|
+
boundary /L1/hall /L1/stair t:180 spec:RC fire:60
|
|
37
|
+
door w:900 name:階段出入口
|
|
38
|
+
boundary /L1/machine /L1/bike t:180 spec:RC
|
|
39
|
+
boundary /L1/machine /L1/corridor t:180 spec:RC
|
|
40
|
+
door w:900
|
|
41
|
+
boundary /L1/bike /L1/corridor t:120 spec:LGS
|
|
42
|
+
door w:1800 name:駐輪場入口
|
|
43
|
+
boundary /L1/corridor /L1/ev t:200 spec:RC
|
|
44
|
+
door w:900 name:EV扉
|
|
45
|
+
boundary /L1/corridor /L1/common t:120 spec:LGS
|
|
46
|
+
door w:900
|
|
47
|
+
boundary /L1/garbage /L1/ev t:200 spec:RC
|
|
48
|
+
boundary /L1/garbage /L1/trunk t:180 spec:RC
|
|
49
|
+
boundary /L1/ev /L1/trunk t:200 spec:RC
|
|
50
|
+
boundary /L1/ev /L1/common t:200 spec:RC
|
|
51
|
+
boundary /L1/trunk /L1/common t:120 spec:LGS
|
|
52
|
+
|
|
53
|
+
boundary /L1/hall /out t:200 spec:EW fire:60
|
|
54
|
+
door w:1800 edge:S name:エントランス
|
|
55
|
+
window w:2400 edge:W sill:500
|
|
56
|
+
boundary /L1/machine /out t:200 spec:EW
|
|
57
|
+
boundary /L1/bike /out t:200 spec:EW
|
|
58
|
+
door w:1800 edge:S name:駐輪場外部口
|
|
59
|
+
boundary /L1/corridor /out t:200 spec:EW
|
|
60
|
+
boundary /L1/garbage /out t:200 spec:EW
|
|
61
|
+
door w:1200 edge:W name:ごみ搬出口
|
|
62
|
+
boundary /L1/trunk /out t:200 spec:EW
|
|
63
|
+
boundary /L1/common /out t:200 spec:EW fire:60
|
|
64
|
+
window w:2600 edge:N sill:800
|
|
65
|
+
boundary /L1/stair /out type:open # 地上階の屋外階段は外部へ直接開放
|
|
66
|
+
|
|
67
|
+
# ============ 基準階 (2〜9F) — 一度だけ書く ============
|
|
68
|
+
# Aタイプだけ間取りまで書く — 粒度は混在してよい。zone=数える集約 (ADR-0005)。
|
|
69
|
+
# 住戸の専有面積はゾーンの集計として出る。LDKはL字 (領域は「+」で合併)
|
|
70
|
+
zone /L2..L9/A name:Aタイプ use:exclusive
|
|
71
|
+
space /L2..L9/A/ldk ldk X1+2600..X2 Y1..Y2-1800 + X1..X1+2600 Y1..Y1+1400 name:LDK
|
|
72
|
+
space /L2..L9/A/bedroom bedroom X1..X1+2600 Y1+1400..Y2-1800 name:洋室
|
|
73
|
+
space /L2..L9/A/wet water X1..X1+3600 Y2-1800..Y2 name:水回り
|
|
74
|
+
space /L2..L9/A/hall hall X1+3600..X2 Y2-1800..Y2 name:玄関廊下
|
|
75
|
+
space /L2..L9/A/balcony balcony X1..X2 Y1-1400..Y1 name:バルコニー # 半屋外 — 専有面積に数えない
|
|
76
|
+
space /L2..L9/B unit X2..X3 Y1..Y2 name:Bタイプ use:exclusive
|
|
77
|
+
space /L2..L9/C unit X3..X4 Y1..Y2 name:Cタイプ use:exclusive
|
|
78
|
+
space /L2..L9/corridor corridor X1..X4 Y2..Y3 name:内廊下 use:common
|
|
79
|
+
space /L2..L9/D unit X1..X2 Y3..Y4 name:Dタイプ use:exclusive
|
|
80
|
+
space /L2..L9/E unit X2+2600..X4 Y3..Y4 name:Eタイプ use:exclusive
|
|
81
|
+
space /L2..L9/ev ev X2..X2+2600 Y3..Y3+2600 name:EV use:common
|
|
82
|
+
space /L2..L9/ps ps X2..X2+2600 Y3+2600..Y4 name:PS・MB use:common
|
|
83
|
+
space /L2..L9/stair stair X1-2600..X1 Y2-600..Y3 name:屋外階段 use:common
|
|
84
|
+
|
|
85
|
+
# --- Aタイプの間取り ---
|
|
86
|
+
boundary /L2..L9/A/ldk /L2..L9/A/bedroom t:100 spec:LGS
|
|
87
|
+
door w:800 edge:W
|
|
88
|
+
boundary /L2..L9/A/ldk /L2..L9/A/hall t:100 spec:LGS
|
|
89
|
+
door w:800
|
|
90
|
+
boundary /L2..L9/A/ldk /L2..L9/A/wet t:100 spec:LGS
|
|
91
|
+
boundary /L2..L9/A/bedroom /L2..L9/A/wet t:100 spec:LGS
|
|
92
|
+
boundary /L2..L9/A/hall /L2..L9/A/wet t:100 spec:LGS
|
|
93
|
+
door w:750
|
|
94
|
+
boundary /L2..L9/A/hall /L2..L9/corridor t:180 spec:RC fire:60
|
|
95
|
+
door w:900 name:玄関 hinge:E # 開き勝手: 吊元は東、開く側は既定 (a=住戸側)
|
|
96
|
+
boundary /L2..L9/A/wet /L2..L9/corridor t:180 spec:RC fire:60
|
|
97
|
+
boundary /L2..L9/A/ldk /L2..L9/B t:180 spec:RC fire:60 sound:D-50 # 界壁
|
|
98
|
+
boundary /L2..L9/A/hall /L2..L9/B t:180 spec:RC fire:60 sound:D-50
|
|
99
|
+
# --- 他住戸 (住戸単位のまま) ---
|
|
100
|
+
boundary /L2..L9/B /L2..L9/C t:180 spec:RC fire:60 sound:D-50
|
|
101
|
+
boundary /L2..L9/B /L2..L9/corridor t:180 spec:RC fire:60
|
|
102
|
+
door w:900 name:玄関
|
|
103
|
+
boundary /L2..L9/C /L2..L9/corridor t:180 spec:RC fire:60
|
|
104
|
+
door w:900 name:玄関
|
|
105
|
+
boundary /L2..L9/D /L2..L9/corridor t:180 spec:RC fire:60
|
|
106
|
+
door w:900 name:玄関
|
|
107
|
+
boundary /L2..L9/E /L2..L9/corridor t:180 spec:RC fire:60
|
|
108
|
+
door w:900 name:玄関
|
|
109
|
+
boundary /L2..L9/corridor /L2..L9/ev t:200 spec:RC
|
|
110
|
+
door w:900 name:EV扉
|
|
111
|
+
boundary /L2..L9/corridor /L2..L9/stair t:180 spec:RC fire:60
|
|
112
|
+
door w:900 name:階段防火戸
|
|
113
|
+
boundary /L2..L9/A/wet /L2..L9/stair t:180 spec:RC fire:60
|
|
114
|
+
boundary /L2..L9/D /L2..L9/ev t:200 spec:RC
|
|
115
|
+
boundary /L2..L9/D /L2..L9/ps t:120 spec:LGS
|
|
116
|
+
boundary /L2..L9/E /L2..L9/ev t:200 spec:RC
|
|
117
|
+
boundary /L2..L9/E /L2..L9/ps t:120 spec:LGS
|
|
118
|
+
boundary /L2..L9/ev /L2..L9/ps t:200 spec:RC
|
|
119
|
+
|
|
120
|
+
boundary /L2..L9/A/ldk /L2..L9/A/balcony t:180 spec:EW fire:60
|
|
121
|
+
window w:2600 h:2200 sill:0 name:掃き出し窓 # バルコニー越しの採光は0.7掛け
|
|
122
|
+
boundary /L2..L9/A/balcony /out t:120 spec:手すり air:1 h:1100
|
|
123
|
+
boundary /L2..L9/A/ldk /out t:180 spec:EW fire:60
|
|
124
|
+
boundary /L2..L9/A/bedroom /out t:180 spec:EW fire:60
|
|
125
|
+
window w:1650 h:1100 edge:W sill:900
|
|
126
|
+
boundary /L2..L9/A/wet /out t:180 spec:EW
|
|
127
|
+
boundary /L2..L9/B /out t:180 spec:EW fire:60
|
|
128
|
+
window w:2600 h:2200 edge:S sill:0
|
|
129
|
+
boundary /L2..L9/C /out t:180 spec:EW fire:60
|
|
130
|
+
window w:2600 h:2200 edge:S sill:0
|
|
131
|
+
boundary /L2..L9/D /out t:180 spec:EW fire:60
|
|
132
|
+
window w:2600 h:2200 edge:N sill:0
|
|
133
|
+
boundary /L2..L9/E /out t:180 spec:EW fire:60
|
|
134
|
+
window w:2600 h:2200 edge:N sill:0
|
|
135
|
+
window w:1650 h:2200 edge:E sill:0 # 54㎡は1面の窓では1/7に足りない — lightの指摘
|
|
136
|
+
boundary /L2..L9/corridor /out t:180 spec:EW
|
|
137
|
+
window w:1200 edge:E sill:800 name:突き当り窓
|
|
138
|
+
boundary /L2..L9/ps /out t:180 spec:EW
|
|
139
|
+
boundary /L2..L9/stair /out t:120 spec:手すり air:1 h:1100 # 物はあるが遮蔽しない → 半屋外
|
|
140
|
+
|
|
141
|
+
# ============ 10階 — ペントハウス ============
|
|
142
|
+
space /L10/1001 unit X1..X3 Y1..Y2 name:PH-A use:exclusive
|
|
143
|
+
space /L10/1002 unit X3..X4 Y1..Y2 name:PH-B use:exclusive
|
|
144
|
+
space /L10/corridor corridor X1..X4 Y2..Y3 name:内廊下 use:common
|
|
145
|
+
space /L10/terrace terrace X1..X2 Y3..Y4 name:ルーフテラス use:common
|
|
146
|
+
space /L10/1003 unit X2+2600..X4 Y3..Y4 name:PH-C use:exclusive
|
|
147
|
+
space /L10/ev ev X2..X2+2600 Y3..Y3+2600 name:EV use:common
|
|
148
|
+
space /L10/ps ps X2..X2+2600 Y3+2600..Y4 name:PS・MB use:common
|
|
149
|
+
space /L10/stair stair X1-2600..X1 Y2-600..Y3 name:屋外階段 use:common
|
|
150
|
+
|
|
151
|
+
boundary /L10/1001 /L10/1002 t:180 spec:RC fire:60 sound:D-50
|
|
152
|
+
boundary /L10/1001 /L10/corridor t:180 spec:RC fire:60
|
|
153
|
+
door w:900 name:玄関
|
|
154
|
+
boundary /L10/1002 /L10/corridor t:180 spec:RC fire:60
|
|
155
|
+
door w:900 name:玄関
|
|
156
|
+
boundary /L10/1003 /L10/corridor t:180 spec:RC fire:60
|
|
157
|
+
door w:900 name:玄関
|
|
158
|
+
boundary /L10/corridor /L10/terrace t:180 spec:EW
|
|
159
|
+
door w:900 name:テラス出入口
|
|
160
|
+
boundary /L10/corridor /L10/ev t:200 spec:RC
|
|
161
|
+
door w:900 name:EV扉
|
|
162
|
+
boundary /L10/corridor /L10/stair t:180 spec:RC fire:60
|
|
163
|
+
door w:900 name:階段防火戸
|
|
164
|
+
boundary /L10/1001 /L10/stair t:180 spec:RC fire:60
|
|
165
|
+
boundary /L10/terrace /L10/ev t:200 spec:RC
|
|
166
|
+
boundary /L10/terrace /L10/ps t:180 spec:RC
|
|
167
|
+
boundary /L10/1003 /L10/ev t:200 spec:RC
|
|
168
|
+
boundary /L10/1003 /L10/ps t:120 spec:LGS
|
|
169
|
+
boundary /L10/ev /L10/ps t:200 spec:RC
|
|
170
|
+
|
|
171
|
+
boundary /L10/1001 /out t:180 spec:EW fire:60
|
|
172
|
+
window w:2600 h:2200 edge:S sill:0 at:0.25
|
|
173
|
+
window w:2600 h:2200 edge:S sill:0 at:0.75 # 69.6㎡には2枚要る
|
|
174
|
+
boundary /L10/1002 /out t:180 spec:EW fire:60
|
|
175
|
+
window w:2600 h:2200 edge:S sill:0
|
|
176
|
+
boundary /L10/1003 /out t:180 spec:EW fire:60
|
|
177
|
+
window w:2600 h:2200 edge:N sill:0
|
|
178
|
+
window w:1650 h:2200 edge:E sill:0
|
|
179
|
+
boundary /L10/terrace /out t:120 spec:手すり air:1 h:1100
|
|
180
|
+
boundary /L10/corridor /out t:180 spec:EW
|
|
181
|
+
window w:1200 edge:E sill:800
|
|
182
|
+
boundary /L10/ps /out t:180 spec:EW
|
|
183
|
+
boundary /L10/stair /out t:120 spec:手すり air:1 h:1100
|
|
184
|
+
|
|
185
|
+
# ============ 垂直 — 積層するものだけ書く。床は既定 (levelのslab) ============
|
|
186
|
+
stack ev L1..L10 type:shaft # EVシャフト: 連続するが人は通れない
|
|
187
|
+
stack stair L1..L10 type:stair # 屋外階段: 扉0枚で階をまたぐ
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# 小さなオフィス — 2フロア + 屋上レベル
|
|
2
|
+
# 基本計画の解像度で書く。垂れ壁や建具詳細は表現しない — 省略ではなく抽象度の選択。
|
|
3
|
+
# 高さの一貫性は level の宣言 (z / h / slab) と check の不変量が担保する。
|
|
4
|
+
|
|
5
|
+
koyu 0.1
|
|
6
|
+
name 小さなオフィス
|
|
7
|
+
unit mm
|
|
8
|
+
|
|
9
|
+
grid X 0 6400 12800 19200
|
|
10
|
+
grid Y 0 6400 8000 12000
|
|
11
|
+
|
|
12
|
+
level L1 0 h:2700
|
|
13
|
+
level L2 4000 h:2700 slab:1300
|
|
14
|
+
level R 8000 slab:1300 # 屋根面。L2の空間の上限を与える
|
|
15
|
+
|
|
16
|
+
space /out exterior name:外部
|
|
17
|
+
|
|
18
|
+
# ---- 1階: エントランス+事務室、北側にコア ----
|
|
19
|
+
space /L1/hall hall X1..X2 Y1..Y2 name:エントランスホール use:common floor:フローリング h:6700 # 吹抜けで2層分
|
|
20
|
+
area X1..X1+1800 Y1..Y2 name:土間 floor:モルタル # 数えない分節: 室は割れない。面積はホールのまま
|
|
21
|
+
space /L1/office office X2..X4 Y1..Y2 name:事務室 use:rentable
|
|
22
|
+
space /L1/corridor corridor X1..X4 Y2..Y3 name:廊下 use:common
|
|
23
|
+
space /L1/stair stair X1..X1+3200 Y3..Y4 name:階段室 use:common
|
|
24
|
+
space /L1/ev ev X1+3200..X2 Y3..Y4 name:EV use:common
|
|
25
|
+
space /L1/wc-m wc X2..X2+3000 Y3..Y4 name:男子WC use:common
|
|
26
|
+
space /L1/wc-w wc X2+3000..X3 Y3..Y4 name:女子WC use:common
|
|
27
|
+
space /L1/machine machine X3..X4 Y3..Y4 name:機械室 use:common
|
|
28
|
+
|
|
29
|
+
boundary /L1/hall /L1/office t:120 spec:LGS
|
|
30
|
+
door w:1000 at:0.8
|
|
31
|
+
boundary /L1/hall /L1/corridor type:open
|
|
32
|
+
boundary /L1/office /L1/corridor t:120 spec:LGS
|
|
33
|
+
door w:900
|
|
34
|
+
seg at:0.75 w:3600 spec:ガラスパーティション # 数えない分節: 同じ境界のまま壁材だけ変わる
|
|
35
|
+
boundary /L1/corridor /L1/stair t:180 spec:RC fire:60
|
|
36
|
+
door w:900 name:ST1
|
|
37
|
+
boundary /L1/corridor /L1/ev t:180 spec:RC
|
|
38
|
+
door w:900 name:EV1
|
|
39
|
+
boundary /L1/corridor /L1/wc-m t:120 spec:LGS
|
|
40
|
+
door w:800
|
|
41
|
+
boundary /L1/corridor /L1/wc-w t:120 spec:LGS
|
|
42
|
+
door w:800
|
|
43
|
+
boundary /L1/corridor /L1/machine t:120 spec:LGS
|
|
44
|
+
door w:800
|
|
45
|
+
boundary /L1/stair /L1/ev t:180 spec:RC fire:60
|
|
46
|
+
boundary /L1/ev /L1/wc-m t:180 spec:RC
|
|
47
|
+
boundary /L1/wc-m /L1/wc-w t:80 spec:LGS
|
|
48
|
+
boundary /L1/wc-w /L1/machine t:120 spec:LGS
|
|
49
|
+
|
|
50
|
+
boundary /L1/hall /out t:180 spec:EW1 fire:60
|
|
51
|
+
door w:1800 edge:S name:エントランス
|
|
52
|
+
window w:2400 edge:W sill:800
|
|
53
|
+
boundary /L1/office /out t:180 spec:EW1 fire:60
|
|
54
|
+
window w:3600 edge:S at:0.25 sill:800
|
|
55
|
+
window w:3600 edge:S at:0.72 sill:800
|
|
56
|
+
window w:2400 edge:E sill:800
|
|
57
|
+
boundary /L1/corridor /out t:180 spec:EW1 fire:60
|
|
58
|
+
boundary /L1/stair /out t:180 spec:EW1 fire:60
|
|
59
|
+
boundary /L1/ev /out t:180 spec:EW1
|
|
60
|
+
boundary /L1/wc-m /out t:180 spec:EW1
|
|
61
|
+
boundary /L1/wc-w /out t:180 spec:EW1
|
|
62
|
+
boundary /L1/machine /out t:180 spec:EW1
|
|
63
|
+
|
|
64
|
+
# ---- 2階: 会議室+執務室 (南の廊下芯Y2を跨いで広がる)、コアは1階と同位置 ----
|
|
65
|
+
space /L2/void void X1..X2 Y1..Y2 name:エントランス吹抜け
|
|
66
|
+
space /L2/office office X2..X4 Y1..Y3 name:執務室 use:rentable floor:タイルカーペット
|
|
67
|
+
area X3+3200..X4 Y1..Y1+3200 name:リフレッシュコーナー floor:フローリング
|
|
68
|
+
space /L2/corridor corridor X1..X2 Y2..Y3 name:廊下 use:common
|
|
69
|
+
space /L2/stair stair X1..X1+3200 Y3..Y4 name:階段室 use:common
|
|
70
|
+
space /L2/ev ev X1+3200..X2 Y3..Y4 name:EV use:common
|
|
71
|
+
space /L2/wc-m wc X2..X2+3000 Y3..Y4 name:男子WC use:common
|
|
72
|
+
space /L2/wc-w wc X2+3000..X3 Y3..Y4 name:女子WC use:common
|
|
73
|
+
space /L2/machine machine X3..X4 Y3..Y4 name:倉庫 use:common
|
|
74
|
+
|
|
75
|
+
boundary /L2/void /L2/office t:120 spec:LGS
|
|
76
|
+
boundary /L2/void /L2/corridor t:120 spec:腰壁+手すり air:1 # 吹抜けに面する — 遮蔽しない
|
|
77
|
+
boundary /L2/office /L2/corridor t:120 spec:LGS
|
|
78
|
+
door w:900
|
|
79
|
+
boundary /L2/corridor /L2/stair t:180 spec:RC fire:60
|
|
80
|
+
door w:900 name:ST2
|
|
81
|
+
boundary /L2/corridor /L2/ev t:180 spec:RC
|
|
82
|
+
door w:900 name:EV2
|
|
83
|
+
boundary /L2/office /L2/wc-m t:120 spec:LGS
|
|
84
|
+
door w:800
|
|
85
|
+
boundary /L2/office /L2/wc-w t:120 spec:LGS
|
|
86
|
+
door w:800
|
|
87
|
+
boundary /L2/office /L2/machine t:120 spec:LGS
|
|
88
|
+
door w:800
|
|
89
|
+
boundary /L2/stair /L2/ev t:180 spec:RC fire:60
|
|
90
|
+
boundary /L2/ev /L2/wc-m t:180 spec:RC
|
|
91
|
+
boundary /L2/wc-m /L2/wc-w t:80 spec:LGS
|
|
92
|
+
boundary /L2/wc-w /L2/machine t:120 spec:LGS
|
|
93
|
+
|
|
94
|
+
boundary /L2/void /out t:180 spec:EW1 fire:60
|
|
95
|
+
window w:3600 edge:S sill:800 # 吹抜けの大開口
|
|
96
|
+
boundary /L2/office /out t:180 spec:EW1 fire:60
|
|
97
|
+
window w:3600 edge:S at:0.3 sill:800
|
|
98
|
+
window w:3600 edge:S at:0.75 sill:800
|
|
99
|
+
window w:2400 edge:E sill:800
|
|
100
|
+
boundary /L2/corridor /out t:180 spec:EW1
|
|
101
|
+
boundary /L2/stair /out t:180 spec:EW1 fire:60
|
|
102
|
+
boundary /L2/ev /out t:180 spec:EW1
|
|
103
|
+
boundary /L2/wc-m /out t:180 spec:EW1
|
|
104
|
+
boundary /L2/wc-w /out t:180 spec:EW1
|
|
105
|
+
boundary /L2/machine /out t:180 spec:EW1
|
|
106
|
+
|
|
107
|
+
# ---- 垂直: 床は書かない (levelのslabが既定)。例外 — 繋がる場所と抜ける場所 — だけ書く ----
|
|
108
|
+
boundary /L1/stair /L2/stair type:stair
|
|
109
|
+
boundary /L1/ev /L2/ev type:shaft
|
|
110
|
+
boundary /L1/hall /L2/void type:void # エントランスは2層吹抜け — 床の不在も境界で書く
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"koyu": "0.1",
|
|
3
|
+
"name": "二室一扉",
|
|
4
|
+
"unit": "mm",
|
|
5
|
+
"grid": {
|
|
6
|
+
"X": [
|
|
7
|
+
0,
|
|
8
|
+
3600,
|
|
9
|
+
7200
|
|
10
|
+
],
|
|
11
|
+
"Y": [
|
|
12
|
+
0,
|
|
13
|
+
4500
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"levels": {
|
|
17
|
+
"L1": {
|
|
18
|
+
"z": 0,
|
|
19
|
+
"h": 2400
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"spaces": {
|
|
23
|
+
"/L1/a": {
|
|
24
|
+
"type": "room",
|
|
25
|
+
"at": [
|
|
26
|
+
"X1",
|
|
27
|
+
"Y1",
|
|
28
|
+
"X2",
|
|
29
|
+
"Y2"
|
|
30
|
+
],
|
|
31
|
+
"attrs": {
|
|
32
|
+
"name": "居室A"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"/L1/b": {
|
|
36
|
+
"type": "room",
|
|
37
|
+
"at": [
|
|
38
|
+
"X2",
|
|
39
|
+
"Y1",
|
|
40
|
+
"X3",
|
|
41
|
+
"Y2"
|
|
42
|
+
],
|
|
43
|
+
"attrs": {
|
|
44
|
+
"name": "居室B"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"/out": {
|
|
48
|
+
"type": "exterior",
|
|
49
|
+
"attrs": {
|
|
50
|
+
"name": "外部"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"boundaries": [
|
|
55
|
+
{
|
|
56
|
+
"between": [
|
|
57
|
+
"/L1/a",
|
|
58
|
+
"/L1/b"
|
|
59
|
+
],
|
|
60
|
+
"kind": "wall",
|
|
61
|
+
"t": 120,
|
|
62
|
+
"attrs": {
|
|
63
|
+
"spec": "PW1"
|
|
64
|
+
},
|
|
65
|
+
"openings": [
|
|
66
|
+
{
|
|
67
|
+
"kind": "door",
|
|
68
|
+
"w": 780,
|
|
69
|
+
"h": 2000,
|
|
70
|
+
"at": 0.5
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"between": [
|
|
76
|
+
"/L1/a",
|
|
77
|
+
"/out"
|
|
78
|
+
],
|
|
79
|
+
"kind": "wall",
|
|
80
|
+
"t": 150,
|
|
81
|
+
"attrs": {
|
|
82
|
+
"fire": 60,
|
|
83
|
+
"spec": "EW1"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"between": [
|
|
88
|
+
"/L1/b",
|
|
89
|
+
"/out"
|
|
90
|
+
],
|
|
91
|
+
"kind": "wall",
|
|
92
|
+
"t": 150,
|
|
93
|
+
"attrs": {
|
|
94
|
+
"fire": 60,
|
|
95
|
+
"spec": "EW1"
|
|
96
|
+
},
|
|
97
|
+
"openings": [
|
|
98
|
+
{
|
|
99
|
+
"kind": "door",
|
|
100
|
+
"w": 900,
|
|
101
|
+
"h": 2100,
|
|
102
|
+
"at": 0.5,
|
|
103
|
+
"edge": "S",
|
|
104
|
+
"attrs": {
|
|
105
|
+
"name": "玄関"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# 二室一扉 — 最初の一手
|
|
2
|
+
# 建物ですらない。それでも空間の同一性・境界の帰属・接続・パスの切り方が
|
|
3
|
+
# この数十行で全部決まる。(docs/writing-architecture.md)
|
|
4
|
+
|
|
5
|
+
koyu 0.1
|
|
6
|
+
name 二室一扉
|
|
7
|
+
unit mm
|
|
8
|
+
|
|
9
|
+
grid X 0 3600 7200
|
|
10
|
+
grid Y 0 4500
|
|
11
|
+
level L1 0 h:2400
|
|
12
|
+
|
|
13
|
+
space /L1/a room X1..X2 Y1..Y2 name:居室A
|
|
14
|
+
space /L1/b room X2..X3 Y1..Y2 name:居室B
|
|
15
|
+
space /out exterior name:外部
|
|
16
|
+
|
|
17
|
+
boundary /L1/a /L1/b t:120 spec:PW1
|
|
18
|
+
door w:780 h:2000
|
|
19
|
+
|
|
20
|
+
boundary /L1/a /out t:150 spec:EW1 fire:60
|
|
21
|
+
boundary /L1/b /out t:150 spec:EW1 fire:60
|
|
22
|
+
door w:900 h:2100 edge:S name:玄関
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kensnzk/koyu",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "空間を一次要素とするテキストネイティブ建築記述の探求 — writing architecture, not buildings",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"koyu": "tsx src/cli.ts",
|
|
8
|
+
"test": "node --import tsx --test test/*.test.ts",
|
|
9
|
+
"typecheck": "tsc --noEmit",
|
|
10
|
+
"check:examples": "tsx src/cli.ts check examples/two-rooms.muro",
|
|
11
|
+
"plan:examples": "tsx src/cli.ts plan examples/two-rooms.muro -o out/two-rooms.svg"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/node": "^22.0.0",
|
|
15
|
+
"tsx": "^4.19.0",
|
|
16
|
+
"typescript": "^5.6.0",
|
|
17
|
+
"web-ifc": "^0.0.77"
|
|
18
|
+
},
|
|
19
|
+
"license": "Apache-2.0",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"architecture",
|
|
22
|
+
"BIM",
|
|
23
|
+
"space",
|
|
24
|
+
"spatial",
|
|
25
|
+
"DSL",
|
|
26
|
+
"text-native"
|
|
27
|
+
],
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/kensnzk/koyu.git"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/kensnzk/koyu#readme"
|
|
33
|
+
}
|