ArchLang Playground

Themed (brick) — an ArchLang floor plan example

A two-room plan with a brick exterior and a blueprint render theme, showing how a theme restyles the drawing.

This plan compiles to 2 rooms, 24 m² of floor area and 2 windows.

Living 12.0 m² Bedroom 12.0 m² 6250 N 01 m SCALE1:100
"Themed Duplex" — a 2-room floor plan, 24 m² total: Living (12 m²), Bedroom (12 m²); 1 door, 2 windows.
Open in the editor

The source

This is the whole plan. The drawing above is what the compiler produced from it — nothing was drawn by hand.

# Theming + materials: a two-room plan with a brick exterior, a partition,
# and a dark "blueprint" theme. Try CompileOptions.theme to override at runtime.
#
# ONE DELIBERATE WARNING, left in on purpose:
#
#   W_NO_ENTRANCE x1 — this plan has exactly one door and it is on the PARTITION, so
#   the two rooms open onto each other and neither opens onto the outside. That is not
#   an oversight: the file is a two-room fragment whose subject is the `theme` block
#   and the `material brick` clause, and it is deliberately the corpus's one example of
#   a building with no way in, so the rule has a shipped positive case to fire on
#   (`test/lint.test.ts` pins `themed.arch` as the SOLE `W_NO_ENTRANCE` example across
#   all thirty examples — cutting a front door here would silence that pin as well as
#   the warning). `arch validate` is clean; `arch validate --strict` reports this one.
plan "Themed Duplex" {
  units mm
  grid 50
  scale 1:100
  north up

  theme {
    background: "#1e2127"
    wall: "#e8e8e8"
    wallFill: "#3a3f4b"
    wallHatch: "#5a6172"
    room: "#272b33"
    roomLabel: "#f0f0f0"
    areaLabel: "#9aa0aa"
    furniture: "#2f343d"
    dim: "#6cb6ff"
    annotation: "#cfd3da"
    font: "Georgia, serif"
    lineWeight: 1.3
  }

  let W = 6000
  let H = 4000

  wall exterior thickness 250 material brick { (0,0) (W,0) (W,H) (0,H) close }
  wall partition thickness 100 { (3000,0) (3000,H) }

  room id=a at (0,0)    size 3000x4000 label "Living"
  room id=b at (3000,0) size 3000x4000 label "Bedroom"

  furniture bed at (3300,300) size 1500x2000 label "Bed"
  furniture nightstand at (4850,700) size 300x350 in b
  furniture desk        at (300,300)  size 1200x600 in a
  furniture office_chair at (900,1000) size 450x450 in a

  door   at (3000,2000) width 900  wall partition hinge left swing in
  window at (1500,0)    width 1600 wall exterior
  window at (4500,0)    width 1200 wall exterior

  # `faces` measures outside-to-outside: 6000 of room grid + half the 250 shell at
  # each end = the 6250 the building actually is.
  dim faces (0,H)->(W,H) offset 600
}

Read more