Gallery L (polygons) — an ArchLang floor plan example
A floor whose spaces are not rectangles: an L-shaped gallery whose area is its exact ring area, not its box.
This plan compiles to 2 rooms, 153 m² of floor area and 1 window; every room is reachable from the entrance.
The source
This is the whole plan. The drawing above is what the compiler produced from it — nothing was drawn by hand.
# Polygonal rooms (v1.23): a floor whose spaces are not rectangles.
#
# `room polygon (x,y) …` gives a room an explicit, implicitly-closed ring instead of
# `at` + `size`. Two shapes a rectangle cannot express are drawn here:
#
# · gallery — an L, wrapping the entrance hall on two sides. Its area (132 m²) is the
# exact shoelace area of the ring, not its 12 × 14 m bounding box.
# · lobby — a trapezoid, so the building has an angled south-west facade. The joint
# where that facade meets the south wall is 40°, which is what the wall outline's
# mitre cap is there for.
#
# Everything else is ordinary: the walls, the doors and `dims auto` neither know nor
# care that a room is polygonal.
plan "Gallery L" {
units mm
grid 100
paper A3 landscape
north up
theme presentation
dims auto all
title { project "Polygon rooms" drawn_by "ArchLang" }
wall exterior thickness 300 {
(0,0) (12000,0) (12000,9000) (6000,14000) (0,14000) close
}
wall id=spine partition thickness 150 { (6000,8000) (6000,14000) }
wall id=north_face partition thickness 150 { (6000,8000) (12000,8000) }
room id=gallery polygon (0,0) (12000,0) (12000,8000) (6000,8000) (6000,14000) (0,14000)
label "Gallery"
room id=lobby polygon (6000,8000) (12000,8000) (12000,9000) (6000,14000)
label "Lobby" at (8200,10200) uses entry
# The entrance sits on the ANGLED south-west facade, so it opens into the trapezoid
# lobby — a door on a wall that is not axis-aligned, hosted the ordinary way.
door id=entry on exterior at 51% width 1500 swing in
door id=inner on spine at 50% width 1200 hinge left swing in
window id=north_light on exterior at 20% width 3000
# ---- fit-out ----------------------------------------------------------------
# Polygon rooms refuse the anchor forms (E_PLACE_POLY — a nine-point anchor
# needs a rectangle), so every piece here is an absolute `at`, kept clear of the
# L's missing quadrant (x 6000-12000, y 8000-14000 is the lobby's, not the
# gallery's) and of the two doors' swing quarter-discs.
furniture bench at (2000,2000) size 1800x500 in gallery
furniture bench at (8000,2000) size 1800x500 in gallery
furniture plant at (10500,6500) size 700x700 in gallery
furniture plant at (1000,12800) size 700x700 in gallery
furniture desk at (2000,11000) size 1800x800 label "Reception desk" in gallery
furniture chair at (4200,11500) size 500x500 in gallery
}