#declare house_style1_open = 
union
{
  // lona for bottom window
  difference
  {
      cylinder { < 0.5, 0, 0>, <-0.5, 0, 0>, 0.25 16 }
      cylinder { < 0.48, 0, 0>, <-0.48, 0, 0>, 0.22 16 }
      box { <1, -0.5, 0>, <-1, 0.5, 1> }
      box { <-1, 0, -1>, <1, 0.5, 1> }
      scale <1.15, 1.4, 1>
      rotate <270, 270, 0>
      translate <-1, 0.15, 0.8>
  }

  // lona for top right window (looking at it..)
  difference
  {
      cylinder { < 0.5, 0, 0>, <-0.5, 0, 0>, 0.25 16 }
      cylinder { < 0.48, 0, 0>, <-0.48, 0, 0>, 0.22 16 }
      box { <1, -0.5, 0>, <-1, 0.5, 1> }
      box { <-1, 0, -1>, <1, 0.5, 1> }
      scale <1, 1.4, 1>
      rotate <270, 270, 0>
      translate <-1, 1.55, 0.7>
  }

  // lona for top left window (looking at it..)
  difference
  {
      cylinder { < 0.5, 0, 0>, <-0.5, 0, 0>, 0.25 16 }
      cylinder { < 0.48, 0, 0>, <-0.48, 0, 0>, 0.22 16 }
      box { <1, -0.5, 0>, <-1, 0.5, 1> }
      box { <-1, 0, -1>, <1, 0.5, 1> }
      scale <1, 1.4, 1>
      rotate <270, 270, 0>
      translate <-1, 1.55, -0.7>
  }

  // floor 0
  difference
  {
    union
    {
      box { <-1,    -0.7,  -1.8>,  <4,     0.7,   1.8> }
      box { <-1.3,   0.65, -1.8>,  < 4.1,   0.75,  1.8> }
      box { <-1.03, -0.71, -1.8>,  <-0.83, -0.11,  1.8> } // handrail ridge..
      box { <-1.03,  0.40, -0.25>, <-0.83, -0.75, -0.95> } // door frame ridge..
      box { <-1.03,  0.40,  0.25>,  <-0.83, -0.25, 1.35> } // window frame ridge..
    }
    box { <-1.1,   0.3, -0.3>,  <-0.9, -0.8, -0.9> } // door cutout
    box { <-1.1,   0.3,  0.3>,  <-0.9, -0.2, 1.3> } // window cutout
// this is a difference between open and solid    
    box { <-0.91,  -0.61, -1.71>,  < 3.91,  0.61, 1.71> } // cut out inside..
  }
  // floor 1
  difference
  {
    union
    {
      box { <-1,    -0.7,  -1.8>,  <4,     0.7,   1.8> }
      box { <-1.3,   0.65, -1.8>,  < 4.1,   0.75,  1.8> }
      box { <-1.03,  0.40,  0.25>,  <-0.83, -0.25, 1.15> } // window 1 frame ridge..
      box { <-1.03,  0.40, -0.25>,  <-0.83, -0.25,-1.15> } // window 2 frame ridge..
    }
    box { <-1.1,   0.3,  0.3>,  <-0.9, -0.2, 1.1> } // window 1 cutout
    box { <-1.1,   0.3,  -0.3>,  <-0.9, -0.2, -1.1> } // window 2 cutout
    
// this is a difference between open and solid
    box { <-0.91,  -0.61, -1.71>,  < 3.91,  0.61, 1.71> } // cut out inside..

    translate <0, 1.4, 0>
  }
}

#declare house_style2_solid =
union
{
  // lona for bottom window
  difference
  {
      cylinder { < 0.5, 0, 0>, <-0.5, 0, 0>, 0.25 16 }
      cylinder { < 0.48, 0, 0>, <-0.48, 0, 0>, 0.22 16 }
      box { <1, -0.5, 0>, <-1, 0.5, 1> }
      box { <-1, 0, -1>, <1, 0.5, 1> }
      scale <1.15, 1.4, 1>
      rotate <270, 270, 0>
      translate <-1, 0.15, 0.8>
  }
/*
  // lona for top right window (looking at it..)
  difference
  {
      cylinder { < 0.5, 0, 0>, <-0.5, 0, 0>, 0.25 16 }
      cylinder { < 0.48, 0, 0>, <-0.48, 0, 0>, 0.22 16 }
      box { <1, -0.5, 0>, <-1, 0.5, 1> }
      box { <-1, 0, -1>, <1, 0.5, 1> }
      scale <1, 1.4, 1>
      rotate <270, 270, 0>
      translate <-1, 1.55, 0.7>
  }

  // lona for top left window (looking at it..)
  difference
  {
      cylinder { < 0.5, 0, 0>, <-0.5, 0, 0>, 0.25 16 }
      cylinder { < 0.48, 0, 0>, <-0.48, 0, 0>, 0.22 16 }
      box { <1, -0.5, 0>, <-1, 0.5, 1> }
      box { <-1, 0, -1>, <1, 0.5, 1> }
      scale <1, 1.4, 1>
      rotate <270, 270, 0>
      translate <-1, 1.55, -0.7>
  }
*/
  // floor 0
  difference
  {
    union
    {
      box { <-1,    -0.7,  -1.8>,  <5,     0.7,   1.8> }
      box { <-1.3,   0.65, -1.8>,  < 5.1,   0.75,  1.8> }
      box { <-1.03, -0.71, -1.8>,  <-0.83, -0.11,  1.8> } // handrail ridge..
      box { <-1.03,  0.40, -0.25>, <-0.83, -0.75, -0.95> } // door frame ridge..
      box { <-1.03,  0.40,  0.25>,  <-0.83, -0.25, 1.35> } // window frame ridge..
    }
    box { <-1.1,   0.3,  -0.3>,  <-0.9, -0.8, -0.9> } // door cutout
    box { <-1.1,   0.3,  0.3>,  <-0.9, -0.2, 1.3> } // window cutout
  }
  // floor 1
  difference
  {
    union
    {
      box { <-1,    -0.9,  -1.8>,  <3,     0.7,   1.8> }
      box { <-1.3,   0.65, -1.8>,  < 3,   0.75,  1.8> }
      box { <-1.03,  0.40,  0.25>,  <-0.83, -0.25, 1.15> } // window 1 frame ridge..
      box { <-1.03,  0.40, -0.25>,  <-0.83, -0.25,-1.15> } // window 2 frame ridge..
    }
    box { <-1.1,   0.3,  0.3>,  <-0.9, -0.2, 1.1> } // window 1 cutout
    box { <-1.1,   0.3,  -0.3>,  <-0.9, -0.2, -1.1> } // window 2 cutout

    translate <-0.1, 1.6, 0>
  }
}

#declare corner_store_style1_open =
union
{
  // floor 0
  difference
  {
    union
    {
      box { <-1,    -0.7,  -1.8>,  <4,     1,      1.8> }
      box { <-1.3,   0.95, -2  >,  < 4.1,   1.05,  1.8> }
      box { <-1.03, -0.71, -1.8>,  <-0.83, -0.11,  1.8> } // handrail ridge..
      box { <-1.03,  0.40,  0.25>,  <-0.83, -0.25, 1.35> } // window frame ridge..
    }
    box { <-1.1,   0.3, 1.3>,  <-0.9, -0.8, -1.3> } // door cutout (front)
    box { <-0.5,   0.3, -1.9>,  <1.6, -0.8, -1.7> } // door cutout (side)   
// this is a difference between open and solid    
    box { <-0.91,  -0.61, -1.71>,  < 3.91,  0.61, 1.71> } // cut out inside..
  }
  
  // lona for bottom window
  difference
  {
      cylinder { <-0.5, 0, 0>, <1.875, 0, 0>, 0.25 16 }
      cylinder { <-0.48, 0, 0>, <1.855, 0, 0>, 0.22 16 }
      box { <2.5, -0.5, 0>, <-2.5, 0.5, 1> }
      box { <2.5, 0, -1>, <-2.5, 0.5, 1> }
      scale <1.15, 1.4, 1>
      rotate <270, 270, 0>
      translate <-1, 0.15, 0.8>
  }
}

// facade 2

#declare facadebase =
union
{
  cylinder { <0, 1, -0.25>, <0, 1, 0.25>, 1 16 }
  box      { <-1.5, -1, -0.25>, <1.5, 1, 0.25> }
  cylinder { < 1.5, 0.5, -0.25>, < 1.5, 0.5, 0.25>, 0.5 16 }
  cylinder { <-1.5, 0.5, -0.25>, <-1.5, 0.5, 0.25>, 0.5 16 }
  box      { <-3, -1, -0.25>, <3, 0.5, 0.25> }  
  box      { <-4, -1, -0.25>, <-2.95, 1.5, 0.25> }
  box      { <4, -1, -0.25>, <2.95, 1.5, 0.25> }
}

#declare facadesubtract =
union
{
  cylinder { <0, 1, -0.4>, <0, 1, 0.4>, 0.75 16 }
  box      { <-1.25, -0.75, -0.4>, <1.25, 0.75, 0.4> }
  cylinder { < 1.25, 0.5, -0.4>, < 1.25, 0.5, 0.4>, 0.25 16 }
  cylinder { <-1.25, 0.5, -0.4>, <-1.25, 0.5, 0.4>, 0.25 16 }
  box      { <-3.5, -0.75, -0.4>, <3.5, 0.25, 0.4> }
  box      { <-3.75, -0.75, -0.4>, <-3.25, 1.25, 0.4> }
  box      { <3.75, -0.75, -0.4>, <3.25, 1.25, 0.4> }
}


#declare ornatefacade =
union
{
  difference
  {
    object   { facadebase }
    object   { facadesubtract }
    translate <0, 0, 0.15>
  }
  object { facadebase }
  box    { <-0.35, -0.35, -0.3>, <0.35, 0.35, 0.4> rotate <0, 0, 45> } // diamond decoration
}

// barrio
union
{
  object { house_style1_open translate <0, 0, 0> }
  object { house_style2_solid translate <0.15, 0, 3.6> }
  object { corner_store_style1_open translate <0.15, 0, -3.6> }
  box { <7, -0.9, 8>, <-3, -0.7, -8> } // sidewalk/foundation

  object { ornatefacade rotate <0, 180, 0> scale <0.45, 0.45, 0.45> translate < 0.8, 1.5, -5.4> }  
  object { ornatefacade rotate <0,  90, 0> scale <0.45, 0.45, 0.45> translate <-0.95, 1.5, -3.6> }
  
  // corner ornament & gap filler
  box { <-1.125, 1, -5.575>, <-0.925, 2.35, -5.375> }
  pyramid { <-1.125, 2.35, -5.575>, <-0.925, 2.5, -5.375> }
  
  // facade filler to end of building
  box { <4.25, 1, -5.575>, <2.5, 2.35, -5.375> }
  // filler ornaments
  pyramid { <4.25, 2.35, -5.575>, <4.05, 2.5, -5.375> }
  pyramid { <2.7, 2.35, -5.575>, <2.5, 2.5, -5.375> }  
  
  // streetlamp
  box { <-2.75, -1, -7>, <-2.8, 2, -7.05> }
}