include<luniebox-helper.scad>

module luniebox_top() {
  difference() {
      union() {
          cube([length+depth,width+depth,depth]);
          // clips
          translate([clip_h,clip_space,0])
          rotate([0,0,90])
          clip_screw();
          translate([clip_h,clip_width_space,0])
          rotate([0,0,90])
          clip_screw();
          translate([length+depth,clip_space,0])
          rotate([0,0,90])
          clip_screw();
          translate([length+depth,clip_width_space,0])
          rotate([0,0,90])
          clip_screw();
      }
      // clip holes
      translate([clip_space,depth+clip_d/2,0])
      clip_hole();
      translate([clip_length_space,depth+clip_d/2,0])
      clip_hole();
      translate([clip_space,width-clip_d/2,0])
      clip_hole();
      translate([clip_length_space,width-clip_d/2,0])
      clip_hole();
      // right btn hole
      translate([length/2-25+depth,(width+depth)/2,-depth/2])
      cylinder(d=30,h=depth*2);
      // left button hole
      translate([length/2+25+depth,(width+depth)/2,-depth/2])
      cylinder(d=30,h=depth*2);
      // led holes
      translate([length/2+depth,(width+depth)/2-16.666,-depth/2])
      cylinder(d=2,h=depth*2);
      translate([length/2+depth,(width+depth)/2,-depth/2])
      cylinder(d=2,h=depth*2);
      translate([length/2+depth,(width+depth)/2+16.666,-depth/2])
      cylinder(d=2,h=depth*2);
  }
}

luniebox_top();