Two-bed flat — an ArchLang floor plan example
A two-bedroom apartment with every room off a central corridor, its walls derived from the rooms — the plainest complete dwelling in the set.
This plan compiles to 5 rooms, 80 m² of floor area and 4 windows; every room is reachable from the entrance.
What this plan uses
The parts of the language this plan's source writes, each linked to its section of the language reference.
The source
This is the whole plan. The drawing above is what the compiler produced from it — nothing was drawn by hand.
# A two-bedroom apartment with a central corridor, written rooms first:
# 1. the rooms, the corridor among them (a corridor is a room);
# 2. `walls from rooms`, which derives the shell on their outline and a partition on
# every shared edge, so no wall can go missing;
# 3. the openings, each hosted by the rooms it joins (`door between`, `on <room>.<edge>`);
# 4. the furniture.
# Every room opens off the hall, so no room is reached through a bedroom or the bath.
plan "Two-Bedroom Flat" {
units mm
grid 100
scale 1:100
north right
room id=r_living at (0,0) size 4000x8000 label "Kitchen / Living" uses kitchen living
room id=r_bed1 at (4000,0) size 6000x3600 label "Master Bedroom"
room id=r_hall at (4000,3600) size 6000x1400 label "Hall"
room id=r_bath at (4000,5000) size 2400x3000 label "Bathroom"
room id=r_bed2 right-of r_bath align top size 3600x3000 label "Bedroom 2"
# The hall runs into the living space with no door leaf: an opening across the whole
# shared edge, stated rather than left as a gap.
walls from rooms exterior 300 partition 100 { open between r_hall and r_living }
# The front door at the hall's east end; every other room off the hall. A door says
# where it stands (`at 1000 from start`: its centre, from the run's west end).
door id=d_front on r_hall.right at center width 900 hinge near start swing into r_hall
door between r_hall and r_bed1 at 1000 from start width 900 swing into r_bed1
door between r_hall and r_bath at 1000 from start width 800 swing into r_bath
door between r_hall and r_bed2 at 1000 from start width 900 swing into r_bed2
window on r_living.top width 2000
window on r_living.left at 5500 from start width 1500
window on r_bed1.top at 2600 from end width 2400
window on r_bed2.bottom width 1400
# Beds with their heads on a wall; `flush` measures from the wall's inner face.
furniture bed in r_bed1 anchor top-left flush inset 300 size 1800x2100 label "Bed"
furniture wardrobe in r_bed1 anchor top-right flush size 1200x600
furniture bed in r_bed2 anchor top-right flush size 1400x2000 label "Bed"
furniture wardrobe in r_bed2 anchor bottom-left flush size 600x1200 rotate 270
# Kitchen run along the west wall (the ring's segment 3, which runs from (0,8000) up to
# (0,0)), clear of the window; the living half of the room takes a sofa and a table.
furniture fridge against wall exterior segment 3 offset 7500 size 600x700 in r_living
furniture stove against wall exterior segment 3 offset 5300 in r_living
furniture kitchen_sink against wall exterior segment 3 offset 6100 in r_living
furniture counter against wall exterior segment 3 offset 6800 in r_living
furniture sofa at (2850,5400) size 900x2000 label "Sofa" in r_living
furniture table at (800,5800) size 1200x800 label "Table" in r_living
furniture shower in r_bath anchor bottom-left flush size 900x900
furniture wc against r_bath.bottom offset 1600 size 400x700
furniture basin in r_bath anchor right flush size 500x600
# The eaves: the derived shell is the plan's one closed exterior ring.
roof overhang 500
# Overall extents, outside face to outside face: `faces` pushes each endpoint out
# onto the wall it runs into, so the printed span is the true 10300 × 8300 the
# building measures — the 10000 × 8000 room grid plus half the 300 shell at each end.
# Exactly the arithmetic a hand-written `text` gets wrong.
dim faces (0,8000)->(10000,8000) offset 700
dim faces (0,0)->(0,8000) offset 700
title {
project "Two-Bedroom Flat"
drawn_by "ArchCanvas"
date "2026-06-25"
}
}
More in Homes
- Attached (strip): A one-bedroom flat with no hand-computed coordinates: a strip of rooms, openings pinned along walls, furniture placed in rooms.
- Bungalow (site + doors): A single-storey bungalow whose whole layout follows one stated fact: the street is south and the garden north.
- Courtyard House: A 16.3 x 11.8 m house whose rooms ring an open courtyard — which is a hole in the building, not a room.
- Courtyard Family House: A family house round an open courtyard, furnished with pieces no other example draws: bunk beds and a crib, a hot tub and a fire pit.
- Townhouse (3 levels): A 5.5 x 11 m three-storey terrace house: one level block per storey, and one drawing per storey.
- Two-storey (2 levels): A compact two-storey house whose stair carries the same id on both floors, which is what declares one shaft.
- Turning Stair: A small house with a quarter-turn stair: one stair of flights and a landing, the same block on both floors.
- Furnished Flat: A two-bedroom flat furnished from the symbol catalogue: thirty-eight drawn fixture kinds across five domains.
- Issued Sheet (tags + notes): A small flat issued on A3 with a drawing number, general notes and a tag on every door and window, keyed to a schedule.
- Apartment Remodel: A flat drawn for its works: two demolished partitions dashed, one new wall, and rooms measured as they will be.
- Garden House (site plan): A family house on a 22 x 22 m lot drawn as a site plan: the lot line, nine ground materials, fences and a garden.