include <PopufareHousingCommon.scad>

include <PopufareHousingBottom.scad>
include <PopufareHousingFrontAngle.scad>
include <PopufareHousingFrontBottom.scad>
include <PopufareHousingSideLeft.scad>
include <PopufareHousingSideRight.scad>
include <PopufareHousingTop.scad>
include <PopufareHousingBack.scad>

include <PopufareHousingInnerBack.scad>
include <PopufareHousingInnerTop.scad>

spacing = 30;

dw = POPUFARE_HOUSING_WIDTH;
dh = POPUFARE_HOUSING_HEIGHT;
dz = POPUFARE_HOUSING_DEPTH;;

iw = POPUFARE_INNER_PLATE_HOLE_WIDTH;
ih = POPUFARE_INNER_PLATE_HOLE_HEIGHT;

hh = POPUFARE_FRONT_HEIGHT;
hz = dz-hh;


PopufareHousingBottomPlate();

translate( [ -(dw/2 + spacing), 0, dh/2 + spacing ] ) rotate(90, [0,1,0]) rotate(90, [0,0,1])
  PopufareHousingSideLeftPlate();
translate( [  (dw/2+spacing), 0, dh/2 + spacing ] ) rotate(-90, [0,1,0]) rotate(-90, [0,0,1])
  PopufareHousingSideRightPlate();

translate( [ 0, -(dh/2 + spacing), hh/2 + spacing]) rotate(90, [1,0,0])
  PopufareHousingFrontBottomPlate();

translate( [ 0, -dz/2, hh + sqrt(2)*(dh-hh)/2 + spacing] ) rotate(45, [1,0,0])
  PopufareHousingFrontAnglePlate();

translate( [ 0, dz/2 + spacing, dh/2 + spacing ] ) rotate(90, [1,0,0])
  PopufareHousingBackPlate();
translate( [ 0, dw/2 - 50, dz + spacing] ) PopufareHousingTopPlate();

//---

translate([  0, -2*dh, 30])
  rotate(45, [1,0,0])
  PopufareHousingInnerBackPlate();

translate([  0, -2*dh, 100])
  rotate(45, [1,0,0])
  PopufareHousingInnerTopPlate();

