@bitbybit-dev/create-app 1.4.1 → 1.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/README.md +1 -0
- package/dist/index.js +20 -13
- package/dist/index.js.map +1 -1
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +16 -8
- package/dist/scaffold.js.map +1 -1
- package/package.json +1 -1
- package/src/index.test.ts +47 -11
- package/src/index.ts +28 -14
- package/src/scaffold.ts +23 -8
- package/templates/apps/drone-assembly/package.json +3 -3
- package/templates/apps/drone-assembly/scripts/smoke.ts +3 -3
- package/templates/apps/drone-assembly/src/parts.ts +3 -3
- package/templates/apps/ifc-house/AGENTS.section.md +19 -0
- package/templates/apps/ifc-house/README.md +36 -0
- package/templates/apps/ifc-house/eslint.config.js +47 -0
- package/templates/apps/ifc-house/index.html +22 -0
- package/templates/apps/ifc-house/package.json +36 -0
- package/templates/apps/ifc-house/public/favicon.ico +0 -0
- package/templates/apps/ifc-house/public/logo.png +0 -0
- package/templates/apps/ifc-house/scripts/smoke.ts +118 -0
- package/templates/apps/ifc-house/src/export/step-export.ts +29 -0
- package/templates/apps/ifc-house/src/house/build-house.ts +194 -0
- package/templates/apps/ifc-house/src/house/details.ts +393 -0
- package/templates/apps/ifc-house/src/house/house-plan.ts +400 -0
- package/templates/apps/ifc-house/src/house/house-types.ts +192 -0
- package/templates/apps/ifc-house/src/main.ts +138 -0
- package/templates/apps/ifc-house/src/scene/draw-house.ts +92 -0
- package/templates/apps/ifc-house/src/scene/scene-types.ts +30 -0
- package/templates/apps/ifc-house/src/scene/stage.ts +64 -0
- package/templates/apps/ifc-house/src/style.css +347 -0
- package/templates/apps/ifc-house/src/ui/panel.ts +144 -0
- package/templates/apps/ifc-house/src/ui/room-labels.ts +75 -0
- package/templates/apps/ifc-house/src/ui/ui-types.ts +14 -0
- package/templates/apps/ifc-house/src/vite-env.d.ts +1 -0
- package/templates/apps/ifc-house/src/workers/ifc.worker.ts +7 -0
- package/templates/apps/ifc-house/src/workers/manifold.worker.ts +16 -0
- package/templates/apps/ifc-house/src/workers/occt.worker.ts +17 -0
- package/templates/apps/ifc-house/tsconfig.json +29 -0
- package/templates/apps/laser-cut-box/package.json +2 -2
- package/templates/apps/laser-cut-box/scripts/smoke.ts +2 -1
- package/templates/apps/laser-cut-box/src/panels.ts +2 -0
- package/templates/apps/product-configurator/package.json +2 -2
- package/templates/apps/product-configurator/scripts/smoke.ts +4 -3
- package/templates/apps/sheet-metal-unfold/backend/package.json +1 -1
- package/templates/apps/sheet-metal-unfold/frontend/package.json +2 -2
- package/templates/apps/sheet-metal-unfold/frontend/scripts/smoke.ts +4 -3
- package/templates/apps/step-to-gltf-cli/package.json +2 -2
- package/templates/apps/step-to-gltf-cli/src/convert.ts +7 -2
- package/templates/cloud/backends/hono-rest/package.json +1 -1
- package/templates/cloud/backends/hono-sdk/package.json +2 -2
- package/templates/cloud/backends/nodejs-rest/package.json +1 -1
- package/templates/cloud/backends/nodejs-sdk/package.json +2 -2
- package/templates/cloud/frontend/package.json +1 -1
- package/templates/vite/babylonjs/typescript/AGENTS.section.md +1 -1
- package/templates/vite/babylonjs/typescript/package.json +2 -2
- package/templates/vite/babylonjs/typescript/scripts/smoke.ts +4 -3
- package/templates/vite/playcanvas/typescript/AGENTS.section.md +1 -1
- package/templates/vite/playcanvas/typescript/package.json +2 -2
- package/templates/vite/playcanvas/typescript/scripts/smoke.ts +4 -3
- package/templates/vite/threejs/typescript/AGENTS.section.md +1 -1
- package/templates/vite/threejs/typescript/package.json +2 -2
- package/templates/vite/threejs/typescript/scripts/smoke.ts +4 -3
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { IFC } from "@bitbybit-dev/ifc/lib/api/inputs";
|
|
2
|
+
import type { DoorTypeSpec, FillingSpec, LayerSetSpec, MaterialSpec, PassageSpec, Point, PropertySetSpec, RailRun, RailSpec, RoomSpec, SlabSpec, TreeSpec, WallRun, WindowTypeSpec } from "./house-types";
|
|
3
|
+
|
|
4
|
+
const { wallAlignmentEnum, doorOperationEnum, doorHandleEnum, slabPredefinedTypeEnum } = IFC;
|
|
5
|
+
|
|
6
|
+
export const FIRST_FLOOR_ELEVATION = 3.2;
|
|
7
|
+
export const SLAB_DEPTH = 0.3;
|
|
8
|
+
export const FIRST_FLOOR_WALL_TOP = 3.0;
|
|
9
|
+
export const FACADE_DEPTH = 0.48;
|
|
10
|
+
export const TIMBER_WALL = 0.415;
|
|
11
|
+
export const CAVITY = 0.04;
|
|
12
|
+
export const BOARD = { width: 0.12, gap: 0.02, thickness: 0.025 };
|
|
13
|
+
export const ROOF_DEPTH = 0.56;
|
|
14
|
+
export const PARAPET = { thickness: 0.2, height: 0.91 };
|
|
15
|
+
export const PARAPET_TOP = FIRST_FLOOR_WALL_TOP + PARAPET.height;
|
|
16
|
+
export const COPING = { thickness: 0.03, drip: 0.03 };
|
|
17
|
+
export const DECK_TOP = 0.04;
|
|
18
|
+
const GLASS_DOOR_WIDTH = 0.9;
|
|
19
|
+
export const SOFFIT_DEPTH = 0.2;
|
|
20
|
+
export const CANTILEVER_DRIP = -SLAB_DEPTH - SOFFIT_DEPTH - 0.02;
|
|
21
|
+
|
|
22
|
+
export function rect(x0: number, y0: number, x1: number, y1: number): Point[] {
|
|
23
|
+
return [[x0, y0], [x1, y0], [x1, y1], [x0, y1]];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const GROUND_INTERIOR = { x0: 0, y0: 0, x1: 14.2, y1: 8.4 };
|
|
27
|
+
export const FIRST_INTERIOR = { x0: 0, y0: -2.2, x1: 10.6, y1: 8.4 };
|
|
28
|
+
export const FIRST_OUTLINE = rect(FIRST_INTERIOR.x0, FIRST_INTERIOR.y0, FIRST_INTERIOR.x1, FIRST_INTERIOR.y1);
|
|
29
|
+
export const FIRST_FLOOR_EAST_FACE = FIRST_INTERIOR.x1 + TIMBER_WALL;
|
|
30
|
+
const VOID = { x0: 5.48, y0: 5.06, x1: 9.45, y1: 6.17 };
|
|
31
|
+
export const STAIR_VOID = rect(VOID.x0, VOID.y0, VOID.x1, VOID.y1);
|
|
32
|
+
export const PARAPET_INSET = TIMBER_WALL - PARAPET.thickness;
|
|
33
|
+
const UNDER_SLAB = FIRST_FLOOR_ELEVATION - SLAB_DEPTH;
|
|
34
|
+
const { x1: GX, y1: GY } = GROUND_INTERIOR;
|
|
35
|
+
|
|
36
|
+
export const MATERIALS: MaterialSpec[] = [
|
|
37
|
+
{ name: "Silicate render", category: "plaster", color: "#f1efea" },
|
|
38
|
+
{ name: "EPS insulation", category: "insulation" },
|
|
39
|
+
{ name: "Aerated concrete", category: "block" },
|
|
40
|
+
{ name: "Gypsum plaster", category: "plaster", color: "#ece9e3" },
|
|
41
|
+
{ name: "Facade membrane", category: "membrane", color: "#161514" },
|
|
42
|
+
{ name: "Wood fibre board", category: "insulation" },
|
|
43
|
+
{ name: "Timber frame with mineral wool", category: "wood" },
|
|
44
|
+
{ name: "Mineral wool", category: "insulation" },
|
|
45
|
+
{ name: "OSB", category: "wood" },
|
|
46
|
+
{ name: "Service void insulation", category: "insulation" },
|
|
47
|
+
{ name: "Gypsum board", category: "plaster", color: "#ece9e3" },
|
|
48
|
+
{ name: "Timber studs", category: "wood" },
|
|
49
|
+
{ name: "Charred larch", category: "wood", color: "#3b342e" },
|
|
50
|
+
{ name: "Polished concrete", category: "concrete", color: "#c9c5bc" },
|
|
51
|
+
{ name: "Reinforced concrete", category: "concrete", color: "#a9a59d" },
|
|
52
|
+
{ name: "XPS insulation", category: "insulation" },
|
|
53
|
+
{ name: "Oak", category: "wood", color: "#b2865a" },
|
|
54
|
+
{ name: "Screed", category: "concrete" },
|
|
55
|
+
{ name: "Impact insulation", category: "insulation" },
|
|
56
|
+
{ name: "Pale gravel", category: "stone", color: "#d3cfc6" },
|
|
57
|
+
{ name: "Roofing membrane", category: "membrane" },
|
|
58
|
+
{ name: "PIR insulation", category: "insulation" },
|
|
59
|
+
{ name: "Vapour control layer", category: "membrane" },
|
|
60
|
+
{ name: "Cross-laminated timber", category: "wood" },
|
|
61
|
+
{ name: "Thermo ash decking", category: "wood", color: "#8b6b52" },
|
|
62
|
+
{ name: "Limestone paving", category: "stone", color: "#dcd7cc" },
|
|
63
|
+
{ name: "Concrete pavers", category: "concrete", color: "#bdb8ae" },
|
|
64
|
+
{ name: "Fibre cement", category: "cement", color: "#e7e5e0" },
|
|
65
|
+
{ name: "Anthracite aluminium", category: "aluminium", color: "#2b2f33" },
|
|
66
|
+
{ name: "Clear glass", category: "glass", color: "#b8d0d8", transparency: 0.72 },
|
|
67
|
+
{ name: "White lacquer", category: "wood", color: "#f4f2ed" },
|
|
68
|
+
{ name: "Smoked oak", category: "wood", color: "#5c4433" },
|
|
69
|
+
{ name: "Brushed stainless steel", category: "steel", color: "#b4b8bc" },
|
|
70
|
+
{ name: "Blackened steel", category: "steel", color: "#2f3236" },
|
|
71
|
+
{ name: "Solar module", category: "glass", color: "#1c2530" },
|
|
72
|
+
{ name: "Sedum", category: "vegetation", color: "#8d9a5c" },
|
|
73
|
+
{ name: "Plywood", category: "wood" },
|
|
74
|
+
{ name: "Glulam spruce", category: "wood", color: "#c9a272" },
|
|
75
|
+
{ name: "Lawn", category: "soil", color: "#9fb184" },
|
|
76
|
+
{ name: "Birch foliage", category: "vegetation", color: "#9db277" },
|
|
77
|
+
{ name: "Maple foliage", category: "vegetation", color: "#6f8f58" },
|
|
78
|
+
{ name: "Pine needles", category: "vegetation", color: "#50684b" },
|
|
79
|
+
{ name: "Birch bark", category: "wood", color: "#ddd8cc" },
|
|
80
|
+
{ name: "Bark", category: "wood", color: "#5b4a3c" },
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
export const LAYER_SETS: LayerSetSpec[] = [
|
|
84
|
+
{ name: "Rendered masonry wall", layers: [{ material: "Silicate render", thickness: 0.015 }, { material: "EPS insulation", thickness: 0.2 }, { material: "Aerated concrete", thickness: 0.25 }, { material: "Gypsum plaster", thickness: 0.015 }] },
|
|
85
|
+
{
|
|
86
|
+
name: "Timber frame wall",
|
|
87
|
+
layers: [
|
|
88
|
+
{ material: "Facade membrane", thickness: 0.002 }, { material: "Wood fibre board", thickness: 0.08 }, { material: "Timber frame with mineral wool", thickness: 0.24 },
|
|
89
|
+
{ material: "OSB", thickness: 0.018 }, { material: "Service void insulation", thickness: 0.05 }, { material: "Gypsum board", thickness: 0.025 },
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
{ name: "Parapet", layers: [{ material: "Facade membrane", thickness: 0.002 }, { material: "Timber frame with mineral wool", thickness: 0.198 }] },
|
|
93
|
+
{ name: "Partition", layers: [{ material: "Gypsum board", thickness: 0.0125 }, { material: "Timber studs", thickness: 0.095 }, { material: "Gypsum board", thickness: 0.0125 }] },
|
|
94
|
+
{ name: "Glass partition", layers: [{ material: "Clear glass", thickness: 0.03 }] },
|
|
95
|
+
{ name: "Glass balustrade", layers: [{ material: "Clear glass", thickness: 0.02 }] },
|
|
96
|
+
{ name: "Insulated ground slab", layers: [{ material: "Polished concrete", thickness: 0.06 }, { material: "Reinforced concrete", thickness: 0.2 }, { material: "XPS insulation", thickness: 0.25 }] },
|
|
97
|
+
{ name: "Upper floor slab", layers: [{ material: "Oak", thickness: 0.02 }, { material: "Screed", thickness: 0.06 }, { material: "Impact insulation", thickness: 0.03 }, { material: "Reinforced concrete", thickness: 0.19 }] },
|
|
98
|
+
{ name: "Terrace roof slab", layers: [{ material: "Roofing membrane", thickness: 0.005 }, { material: "PIR insulation", thickness: 0.18 }, { material: "Reinforced concrete", thickness: 0.115 }] },
|
|
99
|
+
{ name: "Warm flat roof", layers: [{ material: "Pale gravel", thickness: 0.05 }, { material: "Roofing membrane", thickness: 0.005 }, { material: "PIR insulation", thickness: 0.3 }, { material: "Vapour control layer", thickness: 0.005 }, { material: "Cross-laminated timber", thickness: 0.2 }] },
|
|
100
|
+
{ name: "Insulated soffit", layers: [{ material: "Mineral wool", thickness: 0.18 }, { material: "Charred larch", thickness: 0.02 }] },
|
|
101
|
+
{ name: "Carport roof", layers: [{ material: "Sedum", thickness: 0.06 }, { material: "Roofing membrane", thickness: 0.005 }, { material: "Plywood", thickness: 0.025 }] },
|
|
102
|
+
{ name: "Decking", layers: [{ material: "Thermo ash decking", thickness: 0.04 }] },
|
|
103
|
+
{ name: "Garden paving", layers: [{ material: "Limestone paving", thickness: 0.05 }, { material: "Reinforced concrete", thickness: 0.1 }] },
|
|
104
|
+
{ name: "Driveway", layers: [{ material: "Concrete pavers", thickness: 0.08 }, { material: "Reinforced concrete", thickness: 0.1 }] },
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
export const WINDOW_TYPES: WindowTypeSpec[] = [
|
|
108
|
+
{ id: "w-glazing-3000", name: "Fixed glazing 3000 x 2700", width: 3.0, height: 2.7 },
|
|
109
|
+
{ id: "w-glazing-2400", name: "Fixed glazing 2400 x 2700", width: 2.4, height: 2.7 },
|
|
110
|
+
{ id: "w-ribbon-3000", name: "Ribbon window 3000 x 900", width: 3.0, height: 0.9 },
|
|
111
|
+
{ id: "w-1600", name: "Casement 1600 x 1500", width: 1.6, height: 1.5 },
|
|
112
|
+
{ id: "w-1500", name: "Casement 1500 x 1000", width: 1.5, height: 1.0 },
|
|
113
|
+
{ id: "w-1200", name: "Casement 1200 x 1000", width: 1.2, height: 1.0 },
|
|
114
|
+
{ id: "w-800", name: "Hopper 800 x 600", width: 0.8, height: 0.6 },
|
|
115
|
+
{ id: "w-slot-ground", name: "Slot window 600 x 2700", width: 0.6, height: 2.7 },
|
|
116
|
+
{ id: "w-glazing-2300", name: "Fixed glazing 2300 x 2600", width: 2.3, height: 2.6 },
|
|
117
|
+
{ id: "w-slot-first", name: "Slot window 600 x 2600", width: 0.6, height: 2.6 },
|
|
118
|
+
{ id: "w-ribbon-4000", name: "Ribbon window 4000 x 1200", width: 4.0, height: 1.2 },
|
|
119
|
+
{ id: "w-1600-high", name: "High window 1600 x 700", width: 1.6, height: 0.7 },
|
|
120
|
+
{ id: "w-1000", name: "Casement 1000 x 900", width: 1.0, height: 0.9 },
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
export const DOOR_TYPES: DoorTypeSpec[] = [
|
|
124
|
+
{ id: "d-entrance", name: "Smoked oak entrance door 1300 x 2700", width: 1.3, height: 2.7, lining: "Anthracite aluminium", panel: "Smoked oak", operation: doorOperationEnum.singleSwingRight, handle: doorHandleEnum.pullBar, handleMaterial: "Brushed stainless steel" },
|
|
125
|
+
{ id: "d-slider-left", name: "Sliding glass door 1800 x 2700", width: 1.8, height: 2.7, lining: "Anthracite aluminium", panel: "Clear glass", operation: doorOperationEnum.slidingToLeft, handle: doorHandleEnum.pullBar, handleMaterial: "Anthracite aluminium" },
|
|
126
|
+
{ id: "d-slider-right", name: "Sliding glass door 1800 x 2700", width: 1.8, height: 2.7, lining: "Anthracite aluminium", panel: "Clear glass", operation: doorOperationEnum.slidingToRight, handle: doorHandleEnum.pullBar, handleMaterial: "Anthracite aluminium" },
|
|
127
|
+
{ id: "d-slider-2000", name: "Sliding glass door 2000 x 2600", width: 2.0, height: 2.6, lining: "Anthracite aluminium", panel: "Clear glass", operation: doorOperationEnum.slidingToRight, handle: doorHandleEnum.pullBar, handleMaterial: "Anthracite aluminium" },
|
|
128
|
+
{ id: "d-interior", name: "Interior door 900 x 2200", width: 0.9, height: 2.2, lining: "White lacquer", panel: "White lacquer", operation: doorOperationEnum.singleSwingLeft, handle: doorHandleEnum.lever, handleMaterial: "Brushed stainless steel" },
|
|
129
|
+
{ id: "d-glass", name: "Glass door 900 x 2200", width: GLASS_DOOR_WIDTH, height: 2.2, lining: "Anthracite aluminium", panel: "Clear glass", operation: doorOperationEnum.singleSwingRight, handle: doorHandleEnum.lever, handleMaterial: "Brushed stainless steel" },
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
function closedRun(prefix: string, outline: Point[], names: string[], name?: string): WallRun["walls"] {
|
|
133
|
+
return outline.map((start, index) => {
|
|
134
|
+
const side = names[index] ?? String(index);
|
|
135
|
+
return {
|
|
136
|
+
id: `${prefix}-${side}`,
|
|
137
|
+
name: name ?? `${side.charAt(0).toUpperCase()}${side.slice(1)} wall`,
|
|
138
|
+
start,
|
|
139
|
+
end: outline[(index + 1) % outline.length] ?? start,
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function loopJoins(walls: WallRun["walls"]): [string, string][] {
|
|
145
|
+
return walls.map((wall, index) => [wall.id, (walls[(index + 1) % walls.length] ?? wall).id]);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const SIDES = ["south", "east", "north", "west"];
|
|
149
|
+
const FIRST_FLOOR_WALLS = closedRun("ff", FIRST_OUTLINE, SIDES);
|
|
150
|
+
const PARAPET_WALLS = closedRun("parapet", rect(FIRST_INTERIOR.x0 - PARAPET_INSET, FIRST_INTERIOR.y0 - PARAPET_INSET, FIRST_INTERIOR.x1 + PARAPET_INSET, FIRST_INTERIOR.y1 + PARAPET_INSET), SIDES, "Parapet");
|
|
151
|
+
const TERRACE_EDGE = GX + FACADE_DEPTH;
|
|
152
|
+
|
|
153
|
+
export const GLASS_RAIL = { shoe: { width: 0.06, depth: 0.12 }, glass: 0.94, cap: { width: 0.05, depth: 0.04 } };
|
|
154
|
+
const TERRACE = { house: FIRST_INTERIOR.x1 + FACADE_DEPTH, south: -FACADE_DEPTH + 0.05, east: TERRACE_EDGE - 0.05, north: GY + FACADE_DEPTH - 0.05 };
|
|
155
|
+
const VOID_RAIL = { south: VOID.y0 - GLASS_RAIL.shoe.width / 2, east: VOID.x1 + GLASS_RAIL.shoe.width / 2 };
|
|
156
|
+
|
|
157
|
+
export const RAILS: RailSpec[] = [
|
|
158
|
+
{
|
|
159
|
+
id: "terrace", name: "Terrace balustrade", base: DECK_TOP, external: true,
|
|
160
|
+
runs: [
|
|
161
|
+
{ id: "south", along: "x", at: TERRACE.south, from: TERRACE.house, to: TERRACE.east, fromEnd: "flush", toEnd: "butt" },
|
|
162
|
+
{ id: "east", along: "y", at: TERRACE.east, from: TERRACE.south, to: TERRACE.north, fromEnd: "lap", toEnd: "lap" },
|
|
163
|
+
{ id: "north", along: "x", at: TERRACE.north, from: TERRACE.east, to: TERRACE.house, fromEnd: "butt", toEnd: "flush" },
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "ff-void", name: "Stair balustrade", base: 0, external: false,
|
|
168
|
+
runs: [
|
|
169
|
+
{ id: "south", along: "x", at: VOID_RAIL.south, from: VOID.x0, to: VOID_RAIL.east, fromEnd: "flush", toEnd: "lap" },
|
|
170
|
+
{ id: "east", along: "y", at: VOID_RAIL.east, from: VOID_RAIL.south, to: VOID.y1, fromEnd: "butt", toEnd: "flush" },
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
];
|
|
174
|
+
|
|
175
|
+
const END_SHIFT = { flush: 0, butt: -1, lap: 1 };
|
|
176
|
+
|
|
177
|
+
export function railLine(run: RailRun, width: number): [Point, Point] {
|
|
178
|
+
const direction = Math.sign(run.to - run.from);
|
|
179
|
+
const from = run.from - direction * END_SHIFT[run.fromEnd] * width / 2;
|
|
180
|
+
const to = run.to + direction * END_SHIFT[run.toEnd] * width / 2;
|
|
181
|
+
return run.along === "x" ? [[from, run.at], [to, run.at]] : [[run.at, from], [run.at, to]];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export const STUDY_GLAZING = { wall: "ff-study-glass", line: 6.23, x0: 5.46, x1: 10.6, panes: 4, frame: { width: 0.05, depth: 0.02 } };
|
|
185
|
+
const STUDY_FRAME_FACE = STUDY_GLAZING.line + thicknessOf("Glass partition") / 2 + STUDY_GLAZING.frame.depth;
|
|
186
|
+
|
|
187
|
+
export const WALL_RUNS: WallRun[] = [
|
|
188
|
+
{
|
|
189
|
+
storey: "ground", layerSet: "Rendered masonry wall", height: UNDER_SLAB, baseOffset: 0, alignment: wallAlignmentEnum.right, external: true,
|
|
190
|
+
walls: [
|
|
191
|
+
{ id: "gf-south", name: "South wall", start: [0, 0], end: [FIRST_FLOOR_EAST_FACE, 0] },
|
|
192
|
+
{ id: "gf-south-terrace", name: "South wall", start: [FIRST_FLOOR_EAST_FACE, 0], end: [GX, 0], height: FIRST_FLOOR_ELEVATION },
|
|
193
|
+
{ id: "gf-east", name: "East wall", start: [GX, 0], end: [GX, GY], height: FIRST_FLOOR_ELEVATION },
|
|
194
|
+
{ id: "gf-north-terrace", name: "North wall", start: [GX, GY], end: [FIRST_FLOOR_EAST_FACE, GY], height: FIRST_FLOOR_ELEVATION },
|
|
195
|
+
{ id: "gf-north", name: "North wall", start: [FIRST_FLOOR_EAST_FACE, GY], end: [0, GY] },
|
|
196
|
+
{ id: "gf-west", name: "West wall", start: [0, GY], end: [0, 0] },
|
|
197
|
+
],
|
|
198
|
+
joins: [["gf-south-terrace", "gf-east"], ["gf-east", "gf-north-terrace"], ["gf-north", "gf-west"], ["gf-west", "gf-south"]],
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
storey: "first", layerSet: "Timber frame wall", height: SLAB_DEPTH + FIRST_FLOOR_WALL_TOP, baseOffset: -SLAB_DEPTH, alignment: wallAlignmentEnum.right, external: true,
|
|
202
|
+
walls: FIRST_FLOOR_WALLS,
|
|
203
|
+
joins: loopJoins(FIRST_FLOOR_WALLS),
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
storey: "first", layerSet: "Parapet", height: PARAPET.height, baseOffset: FIRST_FLOOR_WALL_TOP, alignment: wallAlignmentEnum.right, external: true,
|
|
207
|
+
walls: PARAPET_WALLS,
|
|
208
|
+
joins: loopJoins(PARAPET_WALLS),
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
storey: "ground", layerSet: "Partition", height: UNDER_SLAB, baseOffset: 0, alignment: wallAlignmentEnum.center, external: false, joins: [],
|
|
212
|
+
walls: [
|
|
213
|
+
{ id: "gf-spine", name: "Spine wall", start: [0, 5.0], end: [GX, 5.0] },
|
|
214
|
+
{ id: "gf-study-wc", name: "Study partition", start: [3.66, 5.06], end: [3.66, GY] },
|
|
215
|
+
{ id: "gf-wc-hall", name: "WC partition", start: [5.36, 5.06], end: [5.36, GY] },
|
|
216
|
+
{ id: "gf-hall-utility", name: "Utility partition", start: [10.6, 5.06], end: [10.6, GY] },
|
|
217
|
+
],
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
storey: "first", layerSet: "Partition", height: FIRST_FLOOR_WALL_TOP, baseOffset: 0, alignment: wallAlignmentEnum.center, external: false, joins: [],
|
|
221
|
+
walls: [
|
|
222
|
+
{ id: "ff-corridor", name: "Corridor wall", start: [0, 3.6], end: [10.6, 3.6] },
|
|
223
|
+
{ id: "ff-bed-1-2", name: "Bedroom partition", start: [3.46, -2.2], end: [3.46, 3.54] },
|
|
224
|
+
{ id: "ff-bed-2-3", name: "Bedroom partition", start: [6.96, -2.2], end: [6.96, 3.54] },
|
|
225
|
+
{ id: "ff-bath", name: "Bathroom wall", start: [0, 5.0], end: [3.46, 5.0] },
|
|
226
|
+
{ id: "ff-bath-wardrobe", name: "Wardrobe partition", start: [3.46, 5.06], end: [3.46, 8.4] },
|
|
227
|
+
{ id: "ff-wardrobe", name: "Wardrobe front", start: [3.52, 6.2], end: [5.46, 6.2] },
|
|
228
|
+
{ id: "ff-wardrobe-study", name: "Study partition", start: [5.46, STUDY_FRAME_FACE], end: [5.46, 8.4] },
|
|
229
|
+
],
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
storey: "first", layerSet: "Glass partition", height: FIRST_FLOOR_WALL_TOP, baseOffset: 0, alignment: wallAlignmentEnum.center, external: false, joins: [],
|
|
233
|
+
walls: [{ id: STUDY_GLAZING.wall, name: "Study glass wall", start: [STUDY_GLAZING.x0, STUDY_GLAZING.line], end: [STUDY_GLAZING.x1, STUDY_GLAZING.line] }],
|
|
234
|
+
},
|
|
235
|
+
...RAILS.map((rail): WallRun => ({
|
|
236
|
+
storey: "first", layerSet: "Glass balustrade", height: GLASS_RAIL.glass, baseOffset: rail.base + GLASS_RAIL.shoe.depth, alignment: wallAlignmentEnum.center, external: rail.external, joins: [],
|
|
237
|
+
walls: rail.runs.map((run) => {
|
|
238
|
+
const [start, end] = railLine(run, GLASS_RAIL.shoe.width);
|
|
239
|
+
return { id: `${rail.id}-rail-${run.id}`, name: rail.name, start, end };
|
|
240
|
+
}),
|
|
241
|
+
})),
|
|
242
|
+
];
|
|
243
|
+
|
|
244
|
+
export const WINDOWS: FillingSpec[] = [
|
|
245
|
+
{ id: "gf-living-south", name: "Living room glazing", wall: "gf-south", type: "w-glazing-3000", offset: 0.5, sill: 0 },
|
|
246
|
+
{ id: "gf-dining-south", name: "Dining glazing", wall: "gf-south", type: "w-glazing-2400", offset: 7.9, sill: 0 },
|
|
247
|
+
{ id: "gf-kitchen-ribbon", name: "Kitchen ribbon window", wall: "gf-south-terrace", type: "w-ribbon-3000", offset: 0.1, sill: 1.05 },
|
|
248
|
+
{ id: "gf-kitchen-east", name: "Kitchen glazing", wall: "gf-east", type: "w-glazing-2400", offset: 0.6, sill: 0 },
|
|
249
|
+
{ id: "gf-utility-east", name: "Utility window", wall: "gf-east", type: "w-1200", offset: 6.2, sill: 1.2 },
|
|
250
|
+
{ id: "gf-utility-north", name: "Utility window", wall: "gf-north-terrace", type: "w-1500", offset: 1.1, sill: 1.2 },
|
|
251
|
+
{ id: "gf-hall-slot", name: "Hall sidelight", wall: "gf-north", type: "w-slot-ground", offset: 2.8, sill: 0 },
|
|
252
|
+
{ id: "gf-wc", name: "WC window", wall: "gf-north", type: "w-800", offset: 6.1, sill: 1.6 },
|
|
253
|
+
{ id: "gf-study", name: "Study window", wall: "gf-north", type: "w-1600", offset: 8.4, sill: 0.9 },
|
|
254
|
+
{ id: "gf-living-west", name: "Living room glazing", wall: "gf-west", type: "w-glazing-3000", offset: 5.0, sill: 0 },
|
|
255
|
+
{ id: "ff-bedroom-1", name: "Bedroom glazing", wall: "ff-south", type: "w-glazing-2300", offset: 0.6, sill: SLAB_DEPTH },
|
|
256
|
+
{ id: "ff-bedroom-2", name: "Bedroom glazing", wall: "ff-south", type: "w-glazing-2300", offset: 4.15, sill: SLAB_DEPTH },
|
|
257
|
+
{ id: "ff-main-bedroom", name: "Main bedroom glazing", wall: "ff-south", type: "w-glazing-2300", offset: 7.6, sill: SLAB_DEPTH },
|
|
258
|
+
{ id: "ff-landing-slot", name: "Landing slot window", wall: "ff-east", type: "w-slot-first", offset: 7.5, sill: SLAB_DEPTH },
|
|
259
|
+
{ id: "ff-study", name: "Study ribbon window", wall: "ff-north", type: "w-ribbon-4000", offset: 0.7, sill: SLAB_DEPTH + 0.9 },
|
|
260
|
+
{ id: "ff-bathroom-north", name: "Bathroom window", wall: "ff-north", type: "w-1600-high", offset: 8.1, sill: SLAB_DEPTH + 1.4 },
|
|
261
|
+
{ id: "ff-bathroom-west", name: "Bathroom window", wall: "ff-west", type: "w-1000", offset: 1.0, sill: SLAB_DEPTH + 1.2 },
|
|
262
|
+
{ id: "ff-bedroom-1-west", name: "Bedroom slot window", wall: "ff-west", type: "w-slot-first", offset: 6.8, sill: SLAB_DEPTH },
|
|
263
|
+
];
|
|
264
|
+
|
|
265
|
+
export const DOORS: FillingSpec[] = [
|
|
266
|
+
{ id: "gf-entrance", name: "Front door", wall: "gf-north", type: "d-entrance", offset: 3.7, sill: 0 },
|
|
267
|
+
{ id: "gf-garden-slider-west", name: "Garden sliding door", wall: "gf-south", type: "d-slider-left", offset: 3.9, sill: 0 },
|
|
268
|
+
{ id: "gf-garden-slider-east", name: "Garden sliding door", wall: "gf-south", type: "d-slider-right", offset: 5.7, sill: 0 },
|
|
269
|
+
{ id: "gf-study-door", name: "Study door", wall: "gf-spine", type: "d-interior", offset: 2.5, sill: 0 },
|
|
270
|
+
{ id: "gf-utility-door", name: "Utility door", wall: "gf-spine", type: "d-interior", offset: 11.6, sill: 0 },
|
|
271
|
+
{ id: "gf-wc-door", name: "WC door", wall: "gf-wc-hall", type: "d-interior", offset: 1.3, sill: 0 },
|
|
272
|
+
{ id: "ff-terrace-slider", name: "Terrace sliding door", wall: "ff-east", type: "d-slider-2000", offset: 2.8, sill: SLAB_DEPTH },
|
|
273
|
+
{ id: "ff-bedroom-1-door", name: "Bedroom door", wall: "ff-corridor", type: "d-interior", offset: 2.2, sill: 0 },
|
|
274
|
+
{ id: "ff-bedroom-2-door", name: "Bedroom door", wall: "ff-corridor", type: "d-interior", offset: 5.6, sill: 0 },
|
|
275
|
+
{ id: "ff-main-bedroom-door", name: "Main bedroom door", wall: "ff-corridor", type: "d-interior", offset: 7.4, sill: 0 },
|
|
276
|
+
{ id: "ff-bathroom-door", name: "Bathroom door", wall: "ff-bath", type: "d-interior", offset: 2.3, sill: 0 },
|
|
277
|
+
{ id: "ff-wardrobe-door", name: "Wardrobe door", wall: "ff-wardrobe", type: "d-interior", offset: 0.5, sill: 0 },
|
|
278
|
+
{ id: "ff-study-door", name: "Study door", wall: STUDY_GLAZING.wall, type: "d-glass", offset: STUDY_GLAZING.x1 - STUDY_GLAZING.frame.width - GLASS_DOOR_WIDTH - STUDY_GLAZING.x0, sill: 0 },
|
|
279
|
+
];
|
|
280
|
+
|
|
281
|
+
export const PASSAGES: PassageSpec[] = [
|
|
282
|
+
{ id: "gf-hall-passage", name: "Hall passage", wall: "gf-spine", offset: 9.5, width: 1.0, height: 2.4 },
|
|
283
|
+
];
|
|
284
|
+
|
|
285
|
+
export const SURROUNDED_WINDOWS = ["ff-bedroom-1", "ff-bedroom-2", "ff-main-bedroom"];
|
|
286
|
+
export const SILLED_WINDOWS = ["gf-kitchen-ribbon", "gf-utility-east", "gf-utility-north", "gf-wc", "gf-study", "ff-study", "ff-bathroom-north", "ff-bathroom-west"];
|
|
287
|
+
|
|
288
|
+
const GARDEN_TERRACE = rect(-FACADE_DEPTH, -5.2, FIRST_INTERIOR.x1 + FACADE_DEPTH, -FACADE_DEPTH);
|
|
289
|
+
const ENTRANCE_PATH = rect(5.95, GY + FACADE_DEPTH, 7.35, 16);
|
|
290
|
+
const DRIVEWAY = rect(-4.4, 3.6, -FACADE_DEPTH, 16);
|
|
291
|
+
|
|
292
|
+
export const SLABS: SlabSpec[] = [
|
|
293
|
+
{ id: "gf-slab", name: "Ground floor slab", storey: "ground", outline: rect(-FACADE_DEPTH, -FACADE_DEPTH, TERRACE_EDGE, GY + FACADE_DEPTH), layerSet: "Insulated ground slab", topOffset: 0, kind: slabPredefinedTypeEnum.baseSlab, layer: "ground" },
|
|
294
|
+
{ id: "ff-slab", name: "First floor slab", storey: "first", outline: FIRST_OUTLINE, holes: [STAIR_VOID], layerSet: "Upper floor slab", topOffset: 0, kind: slabPredefinedTypeEnum.floor, layer: "first" },
|
|
295
|
+
{
|
|
296
|
+
id: "cantilever-soffit", name: "Insulated soffit", storey: "first", layerSet: "Insulated soffit", topOffset: -SLAB_DEPTH, kind: slabPredefinedTypeEnum.notDefined, layer: "first",
|
|
297
|
+
outline: rect(-TIMBER_WALL - CAVITY, FIRST_INTERIOR.y0 - TIMBER_WALL - CAVITY, FIRST_INTERIOR.x1 + TIMBER_WALL + CAVITY, -FACADE_DEPTH),
|
|
298
|
+
},
|
|
299
|
+
{ id: "terrace-slab", name: "Roof terrace slab", storey: "first", outline: rect(FIRST_FLOOR_EAST_FACE, 0, GX, GY), layerSet: "Terrace roof slab", topOffset: 0, kind: slabPredefinedTypeEnum.roof, layer: "first" },
|
|
300
|
+
{ id: "terrace-deck", name: "Roof terrace decking", storey: "first", outline: rect(FIRST_FLOOR_EAST_FACE, -FACADE_DEPTH, TERRACE_EDGE, GY + FACADE_DEPTH), layerSet: "Decking", topOffset: DECK_TOP, kind: slabPredefinedTypeEnum.floor, layer: "first" },
|
|
301
|
+
{ id: "garden-terrace", name: "Garden terrace", storey: "ground", outline: GARDEN_TERRACE, layerSet: "Garden paving", topOffset: 0, kind: slabPredefinedTypeEnum.floor, layer: "garden" },
|
|
302
|
+
{ id: "entrance-path", name: "Entrance path", storey: "ground", outline: ENTRANCE_PATH, layerSet: "Garden paving", topOffset: 0, kind: slabPredefinedTypeEnum.floor, layer: "garden" },
|
|
303
|
+
{ id: "driveway", name: "Driveway", storey: "ground", outline: DRIVEWAY, layerSet: "Driveway", topOffset: 0, kind: slabPredefinedTypeEnum.floor, layer: "garden" },
|
|
304
|
+
];
|
|
305
|
+
|
|
306
|
+
export const ROOF = {
|
|
307
|
+
id: "roof", name: "Warm flat roof", layerSet: "Warm flat roof", baseOffset: FIRST_FLOOR_WALL_TOP,
|
|
308
|
+
outline: rect(FIRST_INTERIOR.x0 - PARAPET_INSET, FIRST_INTERIOR.y0 - PARAPET_INSET, FIRST_INTERIOR.x1 + PARAPET_INSET, FIRST_INTERIOR.y1 + PARAPET_INSET),
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export const CARPORT = {
|
|
312
|
+
x0: -4.4,
|
|
313
|
+
x1: -FACADE_DEPTH,
|
|
314
|
+
y0: 3.6,
|
|
315
|
+
y1: GY + FACADE_DEPTH,
|
|
316
|
+
clearance: 2.6,
|
|
317
|
+
upstand: 0.02,
|
|
318
|
+
beam: { width: 0.08, depth: 0.3 },
|
|
319
|
+
joist: { width: 0.07, depth: 0.18, count: 9 },
|
|
320
|
+
ledger: 0.06,
|
|
321
|
+
post: 0.1,
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
export function thicknessOf(layerSet: string): number {
|
|
325
|
+
return LAYER_SETS.find((candidate) => candidate.name === layerSet)?.layers.reduce((sum, layer) => sum + layer.thickness, 0) ?? 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export const CARPORT_DECK_BOTTOM = CARPORT.clearance + CARPORT.beam.depth - CARPORT.upstand - thicknessOf("Carport roof");
|
|
329
|
+
|
|
330
|
+
export const TERRAIN_OUTLINE = rect(-60, -60, 75, 65);
|
|
331
|
+
export const HARD_SURFACES: Point[] = [
|
|
332
|
+
[-FACADE_DEPTH, -5.2], [FIRST_INTERIOR.x1 + FACADE_DEPTH, -5.2], [FIRST_INTERIOR.x1 + FACADE_DEPTH, -FACADE_DEPTH], [TERRACE_EDGE, -FACADE_DEPTH],
|
|
333
|
+
[TERRACE_EDGE, GY + FACADE_DEPTH], [7.35, GY + FACADE_DEPTH], [7.35, 16], [5.95, 16], [5.95, GY + FACADE_DEPTH], [-FACADE_DEPTH, GY + FACADE_DEPTH],
|
|
334
|
+
[-FACADE_DEPTH, 16], [-4.4, 16], [-4.4, 3.6], [-FACADE_DEPTH, 3.6],
|
|
335
|
+
];
|
|
336
|
+
|
|
337
|
+
export const TREES: TreeSpec[] = [
|
|
338
|
+
{ id: "tree-birch-1", species: "Silver birch", position: [-11, -10], height: 11, crown: 2.4, trunk: 0.16, foliage: "Birch foliage", bark: "Birch bark" },
|
|
339
|
+
{ id: "tree-birch-2", species: "Silver birch", position: [-7.5, -15], height: 9, crown: 2.0, trunk: 0.13, foliage: "Birch foliage", bark: "Birch bark" },
|
|
340
|
+
{ id: "tree-maple-1", species: "Norway maple", position: [25, 2], height: 10, crown: 3.4, trunk: 0.24, foliage: "Maple foliage", bark: "Bark" },
|
|
341
|
+
{ id: "tree-maple-2", species: "Norway maple", position: [20, 18], height: 8.5, crown: 3.0, trunk: 0.2, foliage: "Maple foliage", bark: "Bark" },
|
|
342
|
+
{ id: "tree-pine-1", species: "Scots pine", position: [-14, 13], height: 13, crown: 2.3, trunk: 0.22, foliage: "Pine needles", bark: "Bark" },
|
|
343
|
+
{ id: "tree-pine-2", species: "Scots pine", position: [3, 25], height: 12, crown: 2.1, trunk: 0.2, foliage: "Pine needles", bark: "Bark" },
|
|
344
|
+
{ id: "tree-maple-3", species: "Norway maple", position: [-17, -1], height: 7.5, crown: 2.8, trunk: 0.18, foliage: "Maple foliage", bark: "Bark" },
|
|
345
|
+
];
|
|
346
|
+
|
|
347
|
+
export const STAIR = {
|
|
348
|
+
risers: 16,
|
|
349
|
+
riser: FIRST_FLOOR_ELEVATION / 16,
|
|
350
|
+
going: 0.26,
|
|
351
|
+
bottomEdge: 9.4,
|
|
352
|
+
sides: [5.11, 6.11] as const,
|
|
353
|
+
treadDepth: 0.3,
|
|
354
|
+
treadThickness: 0.06,
|
|
355
|
+
voidEdge: 5.48,
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
export const ROOMS: RoomSpec[] = [
|
|
359
|
+
{ id: "room-living", number: "0.01", name: "Living, dining and kitchen", storey: "ground", outline: rect(0, 0, 14.2, 4.94), height: 2.9 },
|
|
360
|
+
{ id: "room-study", number: "0.02", name: "Study", storey: "ground", outline: rect(0, 5.06, 3.6, 8.4), height: 2.9 },
|
|
361
|
+
{ id: "room-wc", number: "0.03", name: "Shower room", storey: "ground", outline: rect(3.72, 5.06, 5.3, 8.4), height: 2.9 },
|
|
362
|
+
{ id: "room-hall", number: "0.04", name: "Entrance hall", storey: "ground", outline: rect(5.42, 5.06, 10.54, 8.4), height: 2.9 },
|
|
363
|
+
{ id: "room-utility", number: "0.05", name: "Utility and pantry", storey: "ground", outline: rect(10.66, 5.06, 14.2, 8.4), height: 2.9 },
|
|
364
|
+
{ id: "room-bedroom-1", number: "1.01", name: "Bedroom", storey: "first", outline: rect(0, -2.2, 3.4, 3.54), height: 3.0 },
|
|
365
|
+
{ id: "room-bedroom-2", number: "1.02", name: "Bedroom", storey: "first", outline: rect(3.52, -2.2, 6.9, 3.54), height: 3.0 },
|
|
366
|
+
{ id: "room-main-bedroom", number: "1.03", name: "Main bedroom", storey: "first", outline: rect(7.02, -2.2, 10.6, 3.54), height: 3.0 },
|
|
367
|
+
{ id: "room-corridor", number: "1.04", name: "Corridor", storey: "first", outline: rect(0, 3.66, 10.6, 4.94), height: 3.0 },
|
|
368
|
+
{ id: "room-landing", number: "1.05", name: "Landing", storey: "first", outline: rect(3.52, 5.06, 5.48, 6.14), height: 3.0 },
|
|
369
|
+
{ id: "room-bathroom", number: "1.06", name: "Bathroom", storey: "first", outline: rect(0, 5.06, 3.4, 8.4), height: 3.0 },
|
|
370
|
+
{ id: "room-wardrobe", number: "1.07", name: "Wardrobe", storey: "first", outline: rect(3.52, 6.26, 5.4, 8.4), height: 3.0 },
|
|
371
|
+
{ id: "room-office", number: "1.08", name: "Home office", storey: "first", outline: rect(5.52, 6.26, 10.6, 8.4), height: 3.0 },
|
|
372
|
+
];
|
|
373
|
+
|
|
374
|
+
const BOOLEAN = "IfcBoolean";
|
|
375
|
+
const U_VALUE = "IfcThermalTransmittanceMeasure";
|
|
376
|
+
const EXTERNAL = { name: "IsExternal", value: true, type: BOOLEAN };
|
|
377
|
+
const INTERNAL = { name: "IsExternal", value: false, type: BOOLEAN };
|
|
378
|
+
const NOT_LOAD_BEARING = { name: "LoadBearing", value: false, type: BOOLEAN };
|
|
379
|
+
const LOAD_BEARING = { name: "LoadBearing", value: true, type: BOOLEAN };
|
|
380
|
+
|
|
381
|
+
function wallsOf(layerSet: string, external: boolean): string[] {
|
|
382
|
+
return WALL_RUNS.filter((run) => run.layerSet === layerSet && run.external === external).flatMap((run) => run.walls.map((wall) => wall.id));
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
function uValue(value: number): PropertySetSpec["properties"][number] {
|
|
386
|
+
return { name: "ThermalTransmittance", value, type: U_VALUE };
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export const PROPERTY_SETS: PropertySetSpec[] = [
|
|
390
|
+
{ name: "Pset_WallCommon", elements: wallsOf("Rendered masonry wall", true), properties: [EXTERNAL, LOAD_BEARING, uValue(0.12)] },
|
|
391
|
+
{ name: "Pset_WallCommon", elements: wallsOf("Timber frame wall", true), properties: [EXTERNAL, LOAD_BEARING, uValue(0.11)] },
|
|
392
|
+
{ name: "Pset_WallCommon", elements: wallsOf("Parapet", true), properties: [EXTERNAL, NOT_LOAD_BEARING] },
|
|
393
|
+
{ name: "Pset_WallCommon", elements: wallsOf("Partition", false), properties: [INTERNAL, NOT_LOAD_BEARING, { name: "AcousticRating", value: "Rw 45 dB", type: "IfcLabel" }] },
|
|
394
|
+
{ name: "Pset_WallCommon", elements: [...wallsOf("Glass partition", false), ...wallsOf("Glass balustrade", false)], properties: [INTERNAL, NOT_LOAD_BEARING] },
|
|
395
|
+
{ name: "Pset_SlabCommon", elements: ["gf-slab", "terrace-slab"], properties: [EXTERNAL, LOAD_BEARING, uValue(0.13)] },
|
|
396
|
+
{ name: "Pset_SlabCommon", elements: ["cantilever-soffit"], properties: [EXTERNAL, NOT_LOAD_BEARING, uValue(0.19)] },
|
|
397
|
+
{ name: "Pset_RoofCommon", elements: [ROOF.id], properties: [EXTERNAL, uValue(0.07)] },
|
|
398
|
+
{ name: "Pset_WindowCommon", elements: WINDOWS.map((window) => window.id), properties: [EXTERNAL, uValue(0.75), { name: "GlazingAreaFraction", value: 0.88, type: "IfcPositiveRatioMeasure" }] },
|
|
399
|
+
{ name: "Pset_DoorCommon", elements: ["gf-entrance", "gf-garden-slider-west", "gf-garden-slider-east", "ff-terrace-slider"], properties: [EXTERNAL, uValue(0.8)] },
|
|
400
|
+
];
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { Base, IFC } from "@bitbybit-dev/ifc/lib/api/inputs";
|
|
2
|
+
import type { BitByBitBase } from "@bitbybit-dev/threejs";
|
|
3
|
+
|
|
4
|
+
export type Point = Base.Point2;
|
|
5
|
+
|
|
6
|
+
export type StoreyKey = "ground" | "first";
|
|
7
|
+
|
|
8
|
+
export type Layer = "ground" | "first" | "roof" | "garden";
|
|
9
|
+
|
|
10
|
+
export interface MaterialSpec {
|
|
11
|
+
name: string;
|
|
12
|
+
category: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
transparency?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface LayerSetSpec {
|
|
18
|
+
name: string;
|
|
19
|
+
layers: { material: string; thickness: number }[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface WallSpec {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
start: Point;
|
|
26
|
+
end: Point;
|
|
27
|
+
height?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface WallRun {
|
|
31
|
+
storey: StoreyKey;
|
|
32
|
+
layerSet: string;
|
|
33
|
+
height: number;
|
|
34
|
+
baseOffset: number;
|
|
35
|
+
alignment: IFC.wallAlignmentEnum;
|
|
36
|
+
walls: WallSpec[];
|
|
37
|
+
joins: [string, string][];
|
|
38
|
+
external: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface WindowTypeSpec {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface DoorTypeSpec {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
lining: string;
|
|
54
|
+
panel: string;
|
|
55
|
+
operation: IFC.doorOperationEnum;
|
|
56
|
+
handle: IFC.doorHandleEnum;
|
|
57
|
+
handleMaterial: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface FillingSpec {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
wall: string;
|
|
64
|
+
type: string;
|
|
65
|
+
offset: number;
|
|
66
|
+
sill: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface PassageSpec {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
wall: string;
|
|
73
|
+
offset: number;
|
|
74
|
+
width: number;
|
|
75
|
+
height: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface SlabSpec {
|
|
79
|
+
id: string;
|
|
80
|
+
name: string;
|
|
81
|
+
storey: StoreyKey;
|
|
82
|
+
outline: Point[];
|
|
83
|
+
holes?: Point[][];
|
|
84
|
+
layerSet: string;
|
|
85
|
+
topOffset: number;
|
|
86
|
+
kind: IFC.slabPredefinedTypeEnum;
|
|
87
|
+
layer: Layer;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface TreeSpec {
|
|
91
|
+
id: string;
|
|
92
|
+
species: string;
|
|
93
|
+
position: Point;
|
|
94
|
+
height: number;
|
|
95
|
+
crown: number;
|
|
96
|
+
trunk: number;
|
|
97
|
+
foliage: string;
|
|
98
|
+
bark: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface DetailSpec {
|
|
102
|
+
id: string;
|
|
103
|
+
name: string;
|
|
104
|
+
storey: StoreyKey;
|
|
105
|
+
start: Base.Point3;
|
|
106
|
+
end: Base.Point3;
|
|
107
|
+
material: string;
|
|
108
|
+
layer: Layer;
|
|
109
|
+
width?: number;
|
|
110
|
+
depth?: number;
|
|
111
|
+
radius?: number;
|
|
112
|
+
rotation?: number;
|
|
113
|
+
kind?: IFC.memberPredefinedTypeEnum;
|
|
114
|
+
beam?: boolean;
|
|
115
|
+
assembly?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface AssemblySpec {
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
objectType: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface FacadeLine {
|
|
125
|
+
wall: string;
|
|
126
|
+
along: "x" | "y";
|
|
127
|
+
line: number;
|
|
128
|
+
outward: 1 | -1;
|
|
129
|
+
start: number;
|
|
130
|
+
direction: 1 | -1;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface FacadeSide extends FacadeLine {
|
|
134
|
+
from: number;
|
|
135
|
+
to: number;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface WallSide extends FacadeLine {
|
|
139
|
+
thickness: number;
|
|
140
|
+
baseOffset: number;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface FacadeOpening {
|
|
144
|
+
id: string;
|
|
145
|
+
from: number;
|
|
146
|
+
to: number;
|
|
147
|
+
bottom: number;
|
|
148
|
+
top: number;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface PropertySetSpec {
|
|
152
|
+
name: string;
|
|
153
|
+
elements: string[];
|
|
154
|
+
properties: IFC.PropertyDto[];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export type RailEnd = "flush" | "butt" | "lap";
|
|
158
|
+
|
|
159
|
+
export interface RailRun {
|
|
160
|
+
id: string;
|
|
161
|
+
along: "x" | "y";
|
|
162
|
+
at: number;
|
|
163
|
+
from: number;
|
|
164
|
+
to: number;
|
|
165
|
+
fromEnd: RailEnd;
|
|
166
|
+
toEnd: RailEnd;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface RailSpec {
|
|
170
|
+
id: string;
|
|
171
|
+
name: string;
|
|
172
|
+
base: number;
|
|
173
|
+
external: boolean;
|
|
174
|
+
runs: RailRun[];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface RoomSpec {
|
|
178
|
+
id: string;
|
|
179
|
+
number: string;
|
|
180
|
+
name: string;
|
|
181
|
+
storey: StoreyKey;
|
|
182
|
+
outline: Point[];
|
|
183
|
+
height: number;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface HouseModel {
|
|
187
|
+
model: IFC.IfcModelPointer;
|
|
188
|
+
layers: Map<string, Layer>;
|
|
189
|
+
rooms: RoomSpec[];
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export type HouseIfc = BitByBitBase["ifc"];
|