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 = 10;

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+spacing), 0 ] ) rotate(90, [0,0,1]) PopufareHousingSideLeftPlate();
translate( [  (dw+spacing), 0 ] ) rotate(-90, [0,0,1]) PopufareHousingSideRightPlate();

translate( [ 0, -(dz/2 + hh/2 + spacing)] ) PopufareHousingFrontBottomPlate();

translate( [ 0, -(dz + hh + 2*spacing)] ) PopufareHousingFrontAnglePlate();

translate( [ 0, dz + spacing  ] ) PopufareHousingBackPlate();
translate( [ 0, dz + hz + 2*spacing] ) PopufareHousingTopPlate();

//---

translate([  (dw/2 + iw/2+2*spacing),  -(dz + hh + 2*spacing )]) PopufareHousingInnerBackPlate();
//translate([  (dw/2 + 3*iw/2 + 4*spacing), -(dz + hh + 2*spacing)]) PopufareHousingInnerTopPlate();

translate([  (0), -(dz + hh + + 3*ih/2+ 2*spacing )]) PopufareHousingInnerTopPlate();

