house example as shipped in examples/house/ — 8 files, one project. Every file compiles in CI; a folder here navigates, never scopes.
L1-exterior.loft
# The outside of the house: the perimeter, the wing, and every door and
# window in them that opens to the outside.
# The perimeter, chained clockwise from the A/1 corner: each wall starts
# where the last one ended, and W4 closes on W1's start. Justify left: the
# drawn line is each wall's left face, the outside.
wall EXT-1 W1 from (grid.A, grid.1) to (grid.A, grid.3) justify left
wall EXT-1 W2 from wall.W1.end to (grid.D, grid.3) justify left
wall EXT-1 W3 from wall.W2.end to (grid.D, grid.1) justify left
wall EXT-1 W4 from wall.W3.end to wall.W1.start justify left
# The wing, clockwise again, outside faces on its grids. W9 and W11 die
# into the house's east wall; W9 meets the east end at 60°.
wall EXT-1 W9 from wall.W3 to grid.G along grid.F justify left
wall EXT-1 W10 from grid.F to grid.E along grid.G justify left
wall EXT-1 W11 from grid.G to wall.W3 along grid.E justify left
door 3070 D1 in wall.W4 at 6' swing left # the front door, into the living room
door 3070 D8 in wall.W11 at 0' past grid.I swing left # the patio door, on the section
window W-5040 WIN1 in wall.W4 at 30' sill 3'-0"
window W-5040 WIN2 in wall.W4 at 20' sill 3'-0"
window W-4040 WIN3 in wall.W2 at 6' sill 3'-0"
window W-4040 WIN4 in wall.W2 at 18' sill 3'-0"
window W-6040 WIN5 in wall.W2 at 30' sill 2'-6"
window W-5040 WIN6 in wall.W9 at 0' past grid.I sill 3'-0" # opposite the patio door
window W-6040 WIN7 in wall.W10 at 8' sill 2'-6"
window W-4040 WIN8 in wall.W11 at 8' sill 3'-0"
L1-interior.loft
# The inside of the house: the partitions and the doors between rooms. A
# door finds its host in any file: D6's wall, W3, is in L1-exterior.loft.
# The hall wall is carried 4' off grid 2, between grids A and C, and tops
# out with the perimeter.
wall STUD4 W5 from grid.A to grid.C along grid.2
wall STUD4 W6 from grid.A to grid.C at 4' left of grid.2 top wall.W1.top
wall STUD4 W7 from wall.W6 to wall.W2 along grid.B
wall STUD4 W8 from grid.1 to grid.3 along grid.C
# The study partition dies into both faces of the wing at 75°.
wall STUD4 W12 from wall.W9 to wall.W11 along grid.H
door 2870 D2 in wall.W8 at 6' # living to kitchen
door 2870 D3 in wall.W8 at 2' past grid.2 # living to the hall
door 2870 D4 in wall.W6 at 6' swing left reverse # bed 1, swinging into the room
door 2870 D5 in wall.W6 at 8' past door.D4.jamb swing right reverse # bed 2, 8' past bed 1's door
door 3070 D6 in wall.W3 at 2' short of grid.2 # living to the wing
door 2870 D7 in wall.W12 at 4' # family room to study
L1-rooms.loft
# The rooms: a number, a name and a point inside. Each room's boundary and
# area are worked out from the walls around its point.
room 101 name "LIVING" at (x 30', y 13')
room 102 name "KITCHEN" at (x 16', y 4')
room 103 name "HALL" at (x 6', y 12')
room 104 name "BED 1" at (x 6', y 21')
room 105 name "BED 2" at (x 18', y 21')
room 106 name "FAMILY" at (x 45', y 13')
room 107 name "STUDY" at (x 56', y 22')
datums.loft
# House: one floor. A main block on grids, and a wing set off on grids by
# bearing. Every file in the folder compiles as one model: the datums here,
# the types in types.loft, then the walls, doors and rooms by trade.
project "Maple St House"
units imperial
level L1 elev 0' height 9'-0"
# B and C are worked out from A and D: move D and they follow.
grid A vertical at 0'
grid D vertical at 36'-0"
grid B vertical at grid.A + (grid.D - grid.A) / 3 # thirds of the A-to-D span
grid C vertical at grid.B + (grid.D - grid.B) / 2 # midway from B to the east wall
grid 1 horizontal at 0'
grid 2 horizontal at 10'-0"
grid 3 horizontal at 26'-0"
# The wing's grids, by bearing: two faces 30° off east, an east end, the
# study's partition, and the section's plane, square to the wing.
grid E bearing 60deg at 15' # the wing's south face
grid F bearing 60deg at grid.E - 14'-0" # its north face, 14' from E
grid G vertical at grid.D + 26'-0" # its east end
grid H bearing 345deg at 54' # the study partition, 75° off E and F
grid I bearing 330deg at 47' # square to the wing, through its patio door
types.loft
# The house's types: the wall assemblies, then the door and window
# schedule. Every placement takes its size from here.
walltype EXT-1 layers [siding 1", sheathing 5/8", core: stud 6", gyp 5/8"]
walltype STUD4 width 4.5" note "3-5/8 stud + gyp ea side"
doortype 3070 width 3'-0" height 7'-0"
doortype 2870 width 2'-8" height 7'-0"
windowtype W-5040 width 5'-0" height 4'-0"
windowtype W-6040 width 6'-0" height 4'-0"
windowtype W-4040 width 4'-0" height 4'-0"
views/L1-kitchen.loft
# The enlarged plan, on its own page. The crop is the rectangle the view
# shows: grids end on it, what's outside clips; its corners follow the
# grids they reference when a bay moves.
view plan L1-kitchen of level.L1 from (grid.A - 4', grid.1 - 4') to (grid.C + 4', grid.2 + 6') scale 1/4" cut 4'-0" name "Level 1 Kitchen — Enlarged Plan"
views/L1-plan.loft
# A view owns its file: this page is the plan, a declared query over the
# model. Its facts are its own: scale and cut plane, written on the view.
view plan L1-plan of level.L1 scale 1/4" cut 4'-0" name "Level 1 Floor Plan"
views/S1.loft
# The section through the wing: it stands on grid I, square to the wing's
# faces and through its patio door, and looks up the wing 28' to its end.
view section S1 at grid.I to grid.I + 28' name "Section through the wing"