# Living space of a 100 m² house: the L-shaped main room of a single-storey house (5.16 x 3.38 m by
# the entrance, 7.33 x 5.29 m to the garden) re-planned to its owner's idea, in metres. The kitchen
# moves to the entrance side with the sink under a new window; a wardrobe set across makes an
# entrance hall; dining sits behind the low wall by the first sliding bay, the living room by the
# second, a sideboard between the bays. What stays is drawn as it is: the closet by the meters, the
# low wall, the wood stove. The garage, garden and bedroom-side walls are cut at 0.3 m to look in.
units("m")
W = "#f3f1ec"
CAB = "#e8e4dc"
TOP = "#c9a27a"
H = 2.4
# the big room is an L: x from the garage wall, y from the entrance wall (the garden, south, is at y = 8.67)
box(5.16, 3.38, 0.05, at=(0, 0, -0.05), name="floor, entrance part", color="#d9d2c4 tile")
box(7.33, 5.29, 0.05, at=(0, 3.38, -0.05), name="floor, garden part", color="#d9d2c4 tile")
# garage wall, cut low to see in; the future door to the garage is the gap
box(0.15, 2.95, 0.3, at=(-0.15, -0.15, 0), name="garage wall (cut)", color=W)
box(0.15, 4.97, 0.3, at=(-0.15, 3.70, 0), name="garage wall (cut) 2", color=W)
box(0.15, 0.90, 0.03, at=(-0.15, 2.80, 0), name="threshold, future garage door", color="#9aa0a6")
# entrance wall with the door and the new window
ew = box(5.31, 0.15, H, at=(0, -0.15, 0), name="entrance wall", color=W)
door(w=90, h=215, open=0, at=(1.03, -0.15, 0), turn=180, wall=ew)
window(w=100, h=105, panes=2, at=(3.40, -0.15, 1.10), turn=180, wall=ew)
# guest room walls
box(0.15, 3.38, H, at=(5.16, 0, 0), name="guest room wall", color=W)
box(2.17, 0.15, H, at=(5.31, 3.23, 0), name="guest room wall 2", color=W)
# right wall: the corridor to the bedrooms, then a plain wall (cut low)
box(0.15, 3.79, 0.3, at=(7.33, 4.88, 0), name="bedroom-side wall (cut)", color=W)
box(0.15, 1.50, 0.03, at=(7.33, 3.38, 0), name="corridor threshold", color="#9aa0a6")
# garden wall, cut low; the two bays
box(0.27, 0.15, 0.3, at=(-0.15, 8.67, 0), name="garden wall (cut)", color=W)
box(2.46, 0.15, 0.03, at=(0.12, 8.67, 0), name="sliding bay 1", color="#9ec3d6")
box(2.15, 0.15, 0.3, at=(2.58, 8.67, 0), name="garden wall (cut) 2", color=W)
box(2.46, 0.15, 0.03, at=(4.73, 8.67, 0), name="sliding bay 2", color="#9ec3d6")
box(0.29, 0.15, 0.3, at=(7.19, 8.67, 0), name="garden wall (cut) 3", color=W)

# what stays: the closet by the meters, the low wall, the stove
box(0.85, 0.70, 2.2, at=(0, 0, 0), name="existing closet (meters)", color=CAB)
box(2.10, 0.15, 1.11, at=(0, 4.55, 0), name="low wall (stays)", color=W)
box(0.15, 0.70, 1.11, at=(2.10, 4.55, 0), name="low wall, return", color=W)
cylinder(0.30, 1.15, at=(3.20, 4.65, 0), name="wood stove (stays)", color="#2b2b2e")
cylinder(0.075, 1.25, at=(3.20, 4.65, 1.15), name="stove flue", color="#2b2b2e")

# the entrance: a wardrobe across, its doors to the entrance
wardrobe(w=160, d=60, h=220, at=(2.20, 0, 0), turn=270)

# the kitchen: fridge, sink under the new window, corner; hob run on the guest room wall
fridge(w=60, d=65, h=185, at=(2.80, 0, 0), turn=180)
base_unit(w=100, d=60, h=91, kind="sink", at=(3.40, 0, 0), turn=180)
base_unit(w=16, d=60, h=91, kind="doors", at=(4.40, 0, 0), turn=180)
box(0.60, 0.60, 0.87, at=(4.56, 0, 0), name="corner unit", color=CAB)
box(0.60, 0.60, 0.04, at=(4.56, 0, 0.87), name="corner top", color=TOP)
base_unit(w=60, d=60, h=91, kind="dishwasher", at=(4.56, 0.60, 0), turn=270)
base_unit(w=80, d=60, h=91, kind="hob_drawers", at=(4.56, 1.20, 0), turn=270)
base_unit(w=60, d=60, h=91, kind="drawers", at=(4.56, 2.00, 0), turn=270)
tall_unit(w=60, d=60, h=215, kind="oven", at=(4.56, 2.60, 0), turn=270)
wall_units(w=200, d=35, h=70, lift=145, at=(4.81, 0.60, 1.45), turn=270)

# dining behind the low wall, by the first bay
dining_table(w=180, d=90, h=75, at=(0.90, 5.75, 0), turn=90)
for cy in [5.90, 6.43, 6.95]:
    chair(at=(0.38, cy, 0), turn=90)
    chair(at=(1.82, cy, 0), turn=270)

# living by the second bay: the TV on the bedroom-side wall, side-on to the bay
tv_unit(w=180, d=40, h=50, at=(6.93, 6.00, 0), turn=270)
box(0.05, 1.20, 0.70, at=(7.20, 6.30, 0.50), name="TV", color="#222222")
sofa(w=220, d=92, h=82, at=(4.20, 5.80, 0), turn=90)
coffee_table(w=100, d=50, h=42, at=(5.65, 6.40, 0), turn=90)
armchair(w=85, d=86, h=80, at=(5.55, 4.95, 0), turn=180)
# the sideboard with the wine cabinet between the two bays
sideboard(w=214, d=45, h=90, at=(2.59, 8.22, 0))

dim((2.80, 0.95, 0), (4.56, 0.95, 0), offset=0, text="1.76")
dim((1.35, 4.70, 0), (1.35, 5.75, 0), offset=0, text="1.05")
dim((2.32, 7.75, 0), (4.20, 7.75, 0), offset=0, text="1.88")
dim((5.12, 7.75, 0), (6.93, 7.75, 0), offset=0, text="1.81")
label("entrance 2.20 x 1.60", at=(1.0, 1.45, 0))
label("sink under the new window", at=(2.9, 3.0, 0), to=(3.9, 0.7, 0))
label("future door to the garage", at=(-1.5, 2.6, 0), to=(-0.1, 3.25, 0))
label("corridor to the bedrooms", at=(6.4, 4.1, 0))
label("sideboard + wine cabinet", at=(3.3, 9.25, 0))
label("sliding bay", at=(1.0, 9.2, 0))
label("sliding bay", at=(5.7, 9.2, 0))
label("low wall and stove: unchanged", at=(1.4, 3.6, 0), to=(2.2, 4.5, 0))
