Attached (strip) — an ArchLang floor plan example
A one-bedroom flat with no hand-computed coordinates: a strip of rooms, openings pinned along walls, furniture placed in rooms.
This plan compiles to 2 rooms, 28 m² of floor area and 2 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 one-bedroom flat authored with the v1.13 placement sugar — no hand-computed
# coordinates for openings or furniture. It exercises, together:
# • `strip` — a row of rooms laid out end to end
# • openings attached to a wall by position (`door|window … on <wall> at <pos>`)
# • a door that opens toward a named room (`swing into`) hinged at a wall end
# • furniture placed relative to a room (`in <room> anchor …`)
# Compiles clean and passes `arch lint`.
plan "Attached 1BR" {
units mm
grid 100
north up
# Living + bedroom laid left-to-right by a strip, sharing a 4 m depth.
strip right at (0,0) gap 0 height 4000 {
room id=r_living size 4000 label "Living" uses living
room id=r_bed size 3000 label "Bedroom" uses bedroom
}
# Exterior shell as four straight walls (each a clean start→end to attach onto)
# plus the partition between the two rooms.
wall id=w_north exterior thickness 200 { (0,0) (7000,0) }
wall id=w_south exterior thickness 200 { (0,4000) (7000,4000) }
wall id=w_west exterior thickness 200 { (0,0) (0,4000) }
wall id=w_east exterior thickness 200 { (7000,0) (7000,4000) }
wall id=w_part partition thickness 100 { (4000,0) (4000,4000) }
# Entrance 2000 mm along the south wall, hinged at that wall's start end and
# opening into the living room. The bedroom door on the partition opens inward.
door id=d_main on w_south at 2000 width 1000 hinge near start swing into r_living
door id=d_bed on w_part at 2000 width 900 swing into r_bed
# A window centred on each room's exterior wall.
window on w_west at 50% width 1400
window on w_east at 50% width 1200
# Furniture placed by anchor inside each room (never off a coordinate).
furniture sofa in r_living anchor top-left inset 300 size 2000x900 label "Sofa"
furniture bed in r_bed anchor top-right inset 300 size 1500x2000 label "Bed"
}
More in Homes
- Two-bed flat: A two-bedroom apartment with every room off a central corridor, its walls derived from the rooms — the plainest complete dwelling in the set.
- 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.