//****************************************************************
//*  Name    : Power cell Cover                                  *
//*  Author  : Robert Joseph Korn                                *
//*  Notice  : Copyright (c) 2016 Open Valley Consulting Corp    *
//*          : All Rights Reserved                               *
//*  Date    : 4/16/16                                           *
//*  Version : 1.0                                               *
//*  Notes   :                                                   *
//****************************************************************

$fn=50;

    union(){
        
        difference(){
            union(){
                cube([66,62,3]);
                translate([2,2,0]) cylinder(h=3,d=6); // Screw posts
                translate([64,60,0]) cylinder(h=3,d=6);
                translate([2,60,0]) cylinder(h=3,d=6);
                translate([64,2,0]) cylinder(h=3,d=6);
            }    	
            union(){
                translate([2,2,0]) cylinder(h=3,d=4); // Screw holes
                translate([64,60,0]) cylinder(h=3,d=4);
                translate([2,60,0]) cylinder(h=3,d=4);
                translate([64,2,0]) cylinder(h=3,d=4);
                translate([16,5,0]) cylinder(h=11,d=4); // Wire holes
                translate([16,57,0]) cylinder(h=11,d=4);
            }
        }

    }
        translate([10,1,3])
         difference(){
        union(){
            difference(){
                cube([46,60,16]);
                translate([2,2,0]) cube([42,56,16]);
            }
            union(){
                translate([2,2,0]) cylinder(h=16,d=6); // Screw posts
                translate([44,58,0]) cylinder(h=16,d=6);
                translate([2,58,0]) cylinder(h=16,d=6);
                translate([44,2,0]) cylinder(h=16,d=6);
            }
        }    	
        union(){
            translate([2,2,3]) cylinder(h=16,d=3); // Screw holes
            translate([44,58,3]) cylinder(h=16,d=3);
            translate([2,58,3]) cylinder(h=16,d=3);
            translate([44,2,3]) cylinder(h=16,d=3);
            translate([0,30,8]) rotate([0,90,0]) cylinder(d=12.5,h=33); // Fuse Holder
            translate([0,12,10]) rotate([0,90,0]) cylinder(d=5,h=33); // LED
            translate([0,46,10]) rotate([0,90,0]) cylinder(d=6,h=33); // Switch
            translate([40,6,10]) rotate([0,90,0]) cube([7.5,15,35]); // USB Port 1
            translate([40,39,10]) rotate([0,90,0]) cube([7.5,15,35]); // USB Port 2      
            translate([40,26,15]) rotate([0,90,0]) cube([6.2,8,35]); // Charging Port top     
            translate([40,26.3,8.8]) rotate([0,90,0]) cube([7.2,7.4,35]); // Charging Port bottom     
       }
    }
  
