ArchLang Playground

First Room — an ArchLang floor plan example

Your first plan: one furnished bedroom whose walls are derived from the room, short enough to read top to bottom.

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

Bedroom 15.1 m² 3050 900 450 4200 4400 3600 3800 1200 1400 1200 3600 3800 200 N 01 m PROJECTFirst RoomDRAWN BYArchLangDRAWING NO.SR-12REVISIONA
"First Room" — a 1-room floor plan, 15.12 m² total: Bedroom (15.12 m²); 1 door, 1 window, entrance via door_1.
Open in the editor

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.

# Your first ArchLang plan: one furnished bedroom. Read it top to bottom.
plan "First Room" {
  units mm  # every number below is in millimetres
  north up  # the arrow points north
  dims auto  # measure the room for us

  # The floor: 4.2 m wide, 3.6 m deep, its top-left corner at (0,0).
  room id=bedroom at (0,0) size 4200x3600 label "Bedroom" uses bedroom

  # Wrap the room in 200 mm walls.
  walls from rooms exterior 200 partition 100

  # Openings sit on a side of the room: top, bottom, left or right.
  door on bedroom.bottom at 3400 from start width 900 swing inward
  window on bedroom.right width 1400

  # Furniture stands against a wall; offset is the distance along it.
  furniture double_bed against bedroom.top offset 1500 size 1600x2000
  furniture nightstand against bedroom.top offset 400
  furniture nightstand against bedroom.top offset 2600
  furniture wardrobe against bedroom.bottom offset 1200 size 1800x600
  furniture armchair in bedroom anchor right flush size 800x800 rotate 90

  title { project "First Room" drawn_by "ArchLang" number "SR-12" revision "A" }
}

More in Start here

Read more