include<luniebox-helper.scad>

module luniebox_front() {
  difference() {
      union() {
          cube([length+depth,height+depth,depth]);
          // screws speaker middle
          translate([length/2-40.5,height/2-40.5,depth])
          screw(d=10);
          translate([length/2+40.5,height/2-40.5,depth])
          screw(d=10);
          translate([length/2-40.5,height/2+40.5,depth])
          screw(d=10);
          translate([length/2+40.5,height/2+40.5,depth])
          screw(d=10);
          // clips
          translate([clip_space,0,0])
          clip_screw();
          translate([clip_space,height-clip_h+depth,0])
          clip_screw();
          translate([clip_length_space,height-clip_h+depth,0])
          clip_screw();
          translate([clip_length_space,0,0])
          clip_screw();
          translate([clip_h,clip_space,0])
          rotate([0,0,90])
          clip_screw();
          translate([clip_h,clip_height_space,0])
          rotate([0,0,90])
          clip_screw();
          translate([length+depth,clip_space,0])
          rotate([0,0,90])
          clip_screw();
          translate([length+depth,clip_height_space,0])
          rotate([0,0,90])
          clip_screw();
      }
      // speaker hole middle
      translate([length/2,height/2,-depth / 2])
      cylinder(d=103,h=depth*2);
      // screw holes speaker middle
      translate([length/2-40.5,height/2-40.5,depth])
      screw_hole(depth,d=5);
      translate([length/2+40.5,height/2-40.5,depth])
      screw_hole(depth,d=5);
      translate([length/2-40.5,height/2+40.5,depth])
      screw_hole(depth,d=5);
      translate([length/2+40.5,height/2+40.5,depth])
      screw_hole(depth,d=5);

      // screws holes front panel
      translate([5,5+depth,depth])
      screw_hole(depth);
      translate([5,width-5+depth,depth])
      screw_hole(depth);
      translate([length-5,5+depth,depth])
      screw_hole(depth);
      translate([length-5,width-5+depth,depth])
      screw_hole(depth);
  }
}

luniebox_front();


