Skip to content

Step by step

This page builds one small house in seven steps. It starts with a single room and its exterior walls, then adds openings, a second room and furniture. Each step is a complete plan of its own. The documentation build validates and renders every step, so the build fails if any step stops checking.

The sources are in the repository at examples/step-by-step/. You can check any step yourself:

node modules/cli/dist/cli.js check examples/step-by-step/03-windows.plandl

1. One room

GRID LINES_X=[9m] LINES_Y=[6m]
ROOM NAME=Living X=[0,1] Y=[0,1]

A single rectangular room enclosed by four exterior walls

GRID lays down the grid lines. There is always a line at 0, so LINES_X=[9m] gives vertical lines at 0 and 9 m, and LINES_Y=[6m] gives horizontal lines at 0 and 6 m. The Y axis points north.

ROOM selects a rectangle by grid-line index, not by length: X=[0,1] Y=[0,1] is the whole 9 × 6 m grid. You don’t write the walls yourself. The compiler puts an exterior wall on each side that has no neighbouring room. A default exterior wall is 400 mm thick: 50 mm inside the grid line and 350 mm outside. That leaves an 8.9 × 5.9 m interior.

2. A front door

Changes from the previous step

+ DOOR WALL=Living_SOUTH OFFSET=1200mm WIDTH=900mm HINGE=LEFT OPENING=INWARD

The room with a hinged front door in the south wall

Full source after this step
GRID LINES_X=[9m] LINES_Y=[6m]
ROOM NAME=Living X=[0,1] Y=[0,1]
DOOR WALL=Living_SOUTH OFFSET=1200mm WIDTH=900mm HINGE=LEFT OPENING=INWARD

Openings and furniture name a wall as Room_SIDE. OFFSET runs along the inner face of that wall from its lowest X or Y coordinate, so on a south wall it counts from the west corner. HINGE is seen from inside the room, and OPENING=INWARD swings the door into it.

3. Windows

Changes from the previous step

+ WINDOW WALL=Living_NORTH OFFSET=2000mm WIDTH=1800mm
+ WINDOW WALL=Living_WEST OFFSET=2000mm WIDTH=1800mm
+ WINDOW WALL=Living_SOUTH OFFSET=3000mm WIDTH=1500mm

The room with windows on the north, west and south walls

Full source after this step
GRID LINES_X=[9m] LINES_Y=[6m]
ROOM NAME=Living X=[0,1] Y=[0,1]
DOOR WALL=Living_SOUTH OFFSET=1200mm WIDTH=900mm HINGE=LEFT OPENING=INWARD
WINDOW WALL=Living_NORTH OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_WEST OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_SOUTH OFFSET=3000mm WIDTH=1500mm

Windows use the same coordinates as doors. On the west wall the lowest coordinate is Y, so OFFSET=2000mm counts north from the south-west corner. Every opening must fit on its wall, which the validator checks.

4. A second room

Changes from the previous step

- GRID LINES_X=[9m] LINES_Y=[6m]
+ GRID LINES_X=[5.5m,9m] LINES_Y=[6m]
+ ROOM NAME=Bedroom X=[1,2] Y=[0,1]

An internal wall on a new grid line splits the house into Living and Bedroom

Full source after this step
GRID LINES_X=[5.5m,9m] LINES_Y=[6m]
ROOM NAME=Living X=[0,1] Y=[0,1]
ROOM NAME=Bedroom X=[1,2] Y=[0,1]
DOOR WALL=Living_SOUTH OFFSET=1200mm WIDTH=900mm HINGE=LEFT OPENING=INWARD
WINDOW WALL=Living_NORTH OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_WEST OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_SOUTH OFFSET=3000mm WIDTH=1500mm

LINES_X=[5.5m,9m] adds a vertical grid line at 5.5 m and keeps the outer line at 9 m. Writing [+5.5m,+3.5m] or [-3.5m,9m] would give the same lines. Living keeps X=[0,1], so every opening that refers to Living_… still fits and nothing else in the source changes. Bedroom takes X=[1,2].

The compiler puts a 100 mm internal wall on the shared grid line, centred on it.

5. Bedroom door and windows

Changes from the previous step

+ DOOR WALL=Bedroom_WEST OFFSET=4000mm WIDTH=800mm HINGE=LEFT OPENING=INWARD
+ WINDOW WALL=Bedroom_NORTH OFFSET=1000mm WIDTH=1500mm
+ WINDOW WALL=Bedroom_EAST OFFSET=2000mm WIDTH=1500mm

A door in the internal wall and two bedroom windows

Full source after this step
GRID LINES_X=[5.5m,9m] LINES_Y=[6m]
ROOM NAME=Living X=[0,1] Y=[0,1]
ROOM NAME=Bedroom X=[1,2] Y=[0,1]
DOOR WALL=Living_SOUTH OFFSET=1200mm WIDTH=900mm HINGE=LEFT OPENING=INWARD
WINDOW WALL=Living_NORTH OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_WEST OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_SOUTH OFFSET=3000mm WIDTH=1500mm
DOOR WALL=Bedroom_WEST OFFSET=4000mm WIDTH=800mm HINGE=LEFT OPENING=INWARD
WINDOW WALL=Bedroom_NORTH OFFSET=1000mm WIDTH=1500mm
WINDOW WALL=Bedroom_EAST OFFSET=2000mm WIDTH=1500mm

The bedroom door sits in the internal wall, so you only write it once from the bedroom side. The compiler adds the matching door for Living_EAST, with the hinge and swing mirrored. It appears in describe output with inferred: true.

6. Living room furniture

Changes from the previous step

+ SOFA WALL=Living_WEST OFFSET=1800mm PADDING=100mm WIDTH=2200mm
+ OVEN WALL=Living_NORTH OFFSET=100mm WIDTH=600mm DEPTH=600mm
+ SINK WALL=Living_NORTH OFFSET=700mm WIDTH=600mm DEPTH=600mm
+ CABINET WALL=Living_NORTH OFFSET=1300mm WIDTH=600mm DEPTH=600mm
+ TABLE WALL=Living_NORTH OFFSET=3000mm PADDING=1200mm WIDTH=1600mm DEPTH=900mm

A sofa, a kitchen run and a dining table in the living room

Full source after this step
GRID LINES_X=[5.5m,9m] LINES_Y=[6m]
ROOM NAME=Living X=[0,1] Y=[0,1]
ROOM NAME=Bedroom X=[1,2] Y=[0,1]
DOOR WALL=Living_SOUTH OFFSET=1200mm WIDTH=900mm HINGE=LEFT OPENING=INWARD
WINDOW WALL=Living_NORTH OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_WEST OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_SOUTH OFFSET=3000mm WIDTH=1500mm
DOOR WALL=Bedroom_WEST OFFSET=4000mm WIDTH=800mm HINGE=LEFT OPENING=INWARD
WINDOW WALL=Bedroom_NORTH OFFSET=1000mm WIDTH=1500mm
WINDOW WALL=Bedroom_EAST OFFSET=2000mm WIDTH=1500mm
SOFA WALL=Living_WEST OFFSET=1800mm PADDING=100mm WIDTH=2200mm
OVEN WALL=Living_NORTH OFFSET=100mm WIDTH=600mm DEPTH=600mm
SINK WALL=Living_NORTH OFFSET=700mm WIDTH=600mm DEPTH=600mm
CABINET WALL=Living_NORTH OFFSET=1300mm WIDTH=600mm DEPTH=600mm
TABLE WALL=Living_NORTH OFFSET=3000mm PADDING=1200mm WIDTH=1600mm DEPTH=900mm

Each furniture line starts with its type. WIDTH runs along the wall, PADDING is the gap from the wall face, and DEPTH runs into the room. Without DEPTH, the type’s standard depth is used, as with the sofa. The dining table has PADDING=1200mm, so it stands in the room, away from the north wall. Furniture must fit on its wall and inside its room.

7. Bedroom furniture

Changes from the previous step

+ BED WALL=Bedroom_WEST OFFSET=1000mm PADDING=50mm WIDTH=1600mm
+ CABINET WALL=Bedroom_EAST OFFSET=4300mm WIDTH=1500mm DEPTH=600mm

A bed against the internal wall and a wardrobe on the east wall

Full source after this step
GRID LINES_X=[5.5m,9m] LINES_Y=[6m]
ROOM NAME=Living X=[0,1] Y=[0,1]
ROOM NAME=Bedroom X=[1,2] Y=[0,1]
DOOR WALL=Living_SOUTH OFFSET=1200mm WIDTH=900mm HINGE=LEFT OPENING=INWARD
WINDOW WALL=Living_NORTH OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_WEST OFFSET=2000mm WIDTH=1800mm
WINDOW WALL=Living_SOUTH OFFSET=3000mm WIDTH=1500mm
DOOR WALL=Bedroom_WEST OFFSET=4000mm WIDTH=800mm HINGE=LEFT OPENING=INWARD
WINDOW WALL=Bedroom_NORTH OFFSET=1000mm WIDTH=1500mm
WINDOW WALL=Bedroom_EAST OFFSET=2000mm WIDTH=1500mm
SOFA WALL=Living_WEST OFFSET=1800mm PADDING=100mm WIDTH=2200mm
OVEN WALL=Living_NORTH OFFSET=100mm WIDTH=600mm DEPTH=600mm
SINK WALL=Living_NORTH OFFSET=700mm WIDTH=600mm DEPTH=600mm
CABINET WALL=Living_NORTH OFFSET=1300mm WIDTH=600mm DEPTH=600mm
TABLE WALL=Living_NORTH OFFSET=3000mm PADDING=1200mm WIDTH=1600mm DEPTH=900mm
BED WALL=Bedroom_WEST OFFSET=1000mm PADDING=50mm WIDTH=1600mm
CABINET WALL=Bedroom_EAST OFFSET=4300mm WIDTH=1500mm DEPTH=600mm

A bed’s headboard sits on the padding line, so this bed stands against the internal wall. A CABINET 600 mm deep on the east wall works as a wardrobe. That completes the plan.