Two Story

Living spaces below and bedrooms above, joined by one stair.

Open in the studio

// Living spaces below, bedrooms above, joined by one straight stair: the
// same house as `bim_model::fixtures::two_story_program`.
house "Two Story" {
  // Stories are listed lowest first.
  story main {
    room hall: hall {
      area >= 12sqft, door_to living
      // A stair joins a story to the one directly above it. Written in a
      // room, its foot is open to that room.
      stair stair1: main -> upper
    }

    // An open space: its rooms are open to one another, with no doors.
    open day {
      room living: living { area >= 150sqft }
      room family: living { area >= 140sqft }
      room kitchen: kitchen { area >= 140sqft }
      room dining: dining { area >= 150sqft, door_to hall }
    }
    room office: office { area >= 120sqft }
    // A relation can also stand on its own line.
    dining door_to office

    // The roof over the part of this story the upper one leaves open:
    // flatter than the main roof, so it stays low against the walls above.
    roof pitch 4/12
  }

  story upper {
    room landing: hall {
      area >= 80sqft
      open_to stair1             // the head of the stair
    }
    room bed2: bedroom { area >= 150sqft, door_to landing }
    room bed3: bedroom { area >= 120sqft, door_to landing }
    room bath: bathroom { area >= 60sqft, door_to landing }
    // A closet inside a room has a door into it.
    room bed1: bedroom {
      area >= 150sqft, door_to landing
      closet linen { area >= 12sqft }
    }
  }
}
Main story of Two Story, drawn by the engine
Main story
Upper story of Two Story, drawn by the engine
Upper story