ArchLang Playground

Accessible (accTitle) — an ArchLang floor plan example

A two-room plan carrying accTitle and accDescr, the keywords that supply the accessible SVG title and description.

This plan compiles to 2 rooms, 24 m² of floor area and 1 window; every room is reachable from the entrance.

Living 14.0 m² Bedroom 10.0 m² N 01 m
"Flat 2B" — a 2-room floor plan, 24 m² total: Living (14 m²), Bedroom (10 m²); 1 door, 1 window, entrance via d_main.
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.

# Accessible metadata demo — `accTitle` / `accDescr`.
#
# These two plan-level keywords supply the accessible SVG `<title>` and `<desc>`
# used by `arch compile --accessible` (and `compile(src, { accessible: true })`).
# They OVERRIDE the defaults: `accTitle` replaces the plan name in `<title>`, and
# `accDescr` replaces the auto-derived describe() caption in `<desc>`. Default
# (non-accessible) output is unaffected — this is metadata only.
plan "Flat 2B" {
  units mm
  grid 50
  north up
  accTitle "Two-room flat — accessible floor plan"
  accDescr "A small flat: a living room with the entrance, and a bedroom off it, joined by a single interior door."

  wall exterior  thickness 200 { (0,0) (6000,0) (6000,4000) (0,4000) close }
  wall partition thickness 100 { (3500,0) (3500,4000) }

  room id=r_living at (0,0)    size 3500x4000 label "Living" uses living
  room id=r_bed    at (3500,0) size 2500x4000 label "Bedroom" uses bedroom

  door    id=d_main at (1500,0)    width 1000 wall exterior  hinge left swing in
  opening id=o_int  at (3500,2000) width 900  wall partition

  window at (5000,4000) width 1200 wall exterior

  # ---- fit-out ----------------------------------------------------------------
  # Kept clear of the entrance door's swing quarter-disc (radius 1000, hinge left
  # at x=1000) and of the interior opening.
  furniture sofa         at (300,3100)  size 1600x700 in r_living
  furniture coffee_table at (400,2300)  size 600x400  in r_living
  furniture plant        at (2900,3200) size 500x500  in r_living

  # The bed sits clear of the interior opening (x 3550-4300 stays a 750 mm-wide
  # entry corridor into the room), so the accessible route through it keeps its
  # 700 mm minimum.
  furniture bed        at (4300,100)  size 1500x2000 in r_bed
  furniture nightstand at (4300,2150) size 450x400   in r_bed
  furniture table      at (4300,3100) size 900x700   label "Table" in r_bed
}

Read more