User:Dorkmo/Ideas/Battery/SCAD: Difference between revisions
< User:Dorkmo | Ideas | Battery
Jump to navigation
Jump to search
(→cage) |
(→cage) |
||
| Line 192: | Line 192: | ||
echo("cage cavity y",((tub_width-(spacing*3))/2)-(cage_wall*2)); | |||
echo("cage cavity x",(tub_length-(spacing*2))-(cage_endwall*2)); | |||
echo("cage cavity z",cage_height-cage_base); | |||
echo("powder volume per cage",((((tub_width-(spacing*3))/2)-(cage_wall*2)))/10*(((tub_length-(spacing*2))-(cage_endwall*2)))/10*(cage_height-cage_base-cage_lid_depthinto)/10,"cm3"); | |||
echo("grams nickle hydroxide per cage",(((((tub_width-(spacing*3))/2)-(cage_wall*2)))/10*(((tub_length-(spacing*2))-(cage_endwall*2)))/10*(cage_height-cage_base-cage_lid_depthinto)/10)*(4.10),"grams");//density is 4.10 | |||
echo("total grams nickle hydroxide",(((((tub_width-(spacing*3))/2)-(cage_wall*2)))/10*(((tub_length-(spacing*2))-(cage_endwall*2)))/10*(cage_height-cage_base-cage_lid_depthinto)/10)*(4.10)*(tubs_columns*tubs_rows),"grams"); | |||
Revision as of 20:22, 22 November 2014
User:Dorkmo/Ideas/Battery/SCAD/Sandbox
parts to be printed
make sure all the variables are the same for each part
cage
height = 80;
tub_width = 65;
tub_length = 70;
basethickness = 5;
tub_wall = 5;
tub_outsidewall = 4;
tubs_rows = 4;
tubs_columns = 2;
spacing = 5;
cage_height = 60;
cage_wall = 7.5;
cage_endwall = 2;
cage_base = 5;
mesh_opening = 1.5 ;
mesh_angle = 45;
mesh_spacing = 3.5;
wire_diameter = 2;
wire_holeoffc = 0;
cage_lid_depthinto = 7;
cage_divot_height = 5.5;
tub_lid_depthinto = 7;
tub_divot_height = 5.5;
//begin underlying cage module
module cage()
{
difference()
{
cube(size = [(tub_width-(spacing*3))/2,tub_length-(spacing*2),cage_height], center=false);
//cut hole for powder to sit in
translate([cage_wall, cage_endwall, cage_base])
cube(size = [((tub_width-(spacing*3))/2)-(cage_wall*2),(tub_length-(spacing*2))-(cage_endwall*2),cage_height-cage_base+1], center=false);
}
}
//end cage
//begin mesh hole grid module
module holes()
{
intersection()
{
translate([0,-(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening))),0])
cube([cage_wall+0.2,1+((((tub_length-(spacing*2))-(cage_endwall*2)))),cage_height], center=false);
//need to translate closer to the cube here with llarge holes
translate([0,0,-mesh_spacing])
{
rotate([0,-mesh_angle,0])
scale([1,1,(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/(((sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/sin(90-mesh_angle))*sin(90))])
{
//for - pair of rows to height
for (h = [1 : floor(((cage_height-cage_base-((((((sin(90)*(cage_wall/sin(90-mesh_angle))))-((sin(mesh_angle)*((sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/(sin(90))))))/sin(90))*sin(mesh_angle))))-(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening))))/mesh_spacing)])
{
translate(h*[0,0,mesh_spacing])
{
//for - second row
for (w = [1 : floor((((tub_length-(spacing*2))-(cage_endwall*2))-(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening))))/mesh_spacing)])
{
//translate second row
translate([0,-mesh_spacing/2,mesh_spacing/2])
{
//make second row copies
translate(w*[0,mesh_spacing,0])
{
rotate([45,0,0])
{
cube(size = [(cage_wall*2)+(cage_height/sin(90))*sin(mesh_angle),mesh_opening,mesh_opening], center=false);
}
}
}
}
//for - create first row
for (w = [0 : floor((((tub_length-(spacing*2))-(cage_endwall*2))-(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening))))/mesh_spacing)])
{
translate(w*[0,mesh_spacing,0])
{
rotate([45,0,0])
{
//need to tweak
cube(size = [(cage_wall*2)+(cage_height/sin(90))*sin(mesh_angle),mesh_opening,mesh_opening],center=false);
}
}
}
}
}
}
////end cube
}
}
}
////end mesh hole grid module
//////divot
module divot_sphere()
{
difference()
{
translate([(cage_divot_height/2)/sin(45)*sin(45),0,0])
{
sphere(r = (cage_divot_height/2)/sin(45));
}
translate([(cage_divot_height/2)/sin(45),0,0])
cube(size = [((cage_divot_height/2)/sin(45)*2),((cage_divot_height/2)/sin(45)*2),((cage_divot_height/2)/sin(45)*2)], center=true);
}
}
////end divot module
//begin final cage construction
difference()
{
cage();
//begin holes
translate([(((tub_width-(spacing*3))/2)-cage_wall)+0.0, cage_endwall+((sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/2)+(((((tub_length-(spacing*2))-(cage_endwall*2))-(((floor((((tub_length-(spacing*2))-(cage_endwall*2))-(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening))))/mesh_spacing))*mesh_spacing)+sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))))/2), cage_base])
{
holes();
}
translate([(cage_wall)-0.0,cage_endwall+((sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/2)+(((((tub_length-(spacing*2))-(cage_endwall*2))-(((floor((((tub_length-(spacing*2))-(cage_endwall*2))-(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening))))/mesh_spacing))*mesh_spacing)+sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))))/2), cage_base])
{
mirror([1,0,0])
{
#holes();
}
}
//end holes
//begin divots
//1
translate([cage_wall,(((tub_length-(spacing*2))-(cage_endwall*2))*1/4)+cage_endwall,cage_height-(((cage_lid_depthinto-cage_divot_height)/2)+(cage_divot_height/2))])
{
#divot_sphere();
}
//2
translate([cage_wall,(((tub_length-(spacing*2))-(cage_endwall*2))*3/4)+cage_endwall,cage_height-(((cage_lid_depthinto-cage_divot_height)/2)+(cage_divot_height/2))])
{
#divot_sphere();
}
//3
translate([cage_wall+(((tub_width-(spacing*3))/2)-(cage_wall*2)),(((tub_length-(spacing*2))-(cage_endwall*2))*1/4)+cage_endwall,cage_height-(((cage_lid_depthinto-cage_divot_height)/2)+(cage_divot_height/2))])
{
mirror([1,0,0])
{
#divot_sphere();
}
}
//4
translate([cage_wall+(((tub_width-(spacing*3))/2)-(cage_wall*2)),(((tub_length-(spacing*2))-(cage_endwall*2))*3/4)+cage_endwall,cage_height-(((cage_lid_depthinto-cage_divot_height)/2)+(cage_divot_height/2))])
{
mirror([1,0,0])
{
#divot_sphere();
}
}
//end divots
}
//end cage
//calculate mesh wall minimum thickness
echo(sin(45)*((mesh_spacing-((sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))))/sin(90)));
//calculate verticle height of mesh holes to take away from max height of holes
//works okay up to 45 then bugs out. might be because its before the scale down
echo((((((sin(90)*(cage_wall/sin(90-mesh_angle))))-((sin(mesh_angle)*((sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/(sin(90))))))/sin(90))*sin(mesh_angle)));
echo("cage cavity y",((tub_width-(spacing*3))/2)-(cage_wall*2));
echo("cage cavity x",(tub_length-(spacing*2))-(cage_endwall*2));
echo("cage cavity z",cage_height-cage_base);
echo("powder volume per cage",((((tub_width-(spacing*3))/2)-(cage_wall*2)))/10*(((tub_length-(spacing*2))-(cage_endwall*2)))/10*(cage_height-cage_base-cage_lid_depthinto)/10,"cm3");
echo("grams nickle hydroxide per cage",(((((tub_width-(spacing*3))/2)-(cage_wall*2)))/10*(((tub_length-(spacing*2))-(cage_endwall*2)))/10*(cage_height-cage_base-cage_lid_depthinto)/10)*(4.10),"grams");//density is 4.10
echo("total grams nickle hydroxide",(((((tub_width-(spacing*3))/2)-(cage_wall*2)))/10*(((tub_length-(spacing*2))-(cage_endwall*2)))/10*(cage_height-cage_base-cage_lid_depthinto)/10)*(4.10)*(tubs_columns*tubs_rows),"grams");
cage lid with divots and cleat
height = 80;
tub_width = 65;
tub_length = 70;
basethickness = 5;
tub_wall = 5;
tub_outsidewall = 4;
tubs_rows = 4;
tubs_columns = 2;
spacing = 5;
cage_height = 60;
cage_wall = 7.5;
cage_endwall = 2;
cage_base = 5;
mesh_opening = 1.5 ;
mesh_angle = 45;
mesh_spacing = 3.5;
wire_diameter = 2;
wire_holeoffc = 0;
cage_lid_depthinto = 7;
cage_divot_height = 5.5;
tub_lid_depthinto = 7;
tub_divot_height = 5.5;
union()
{
difference()
{
union()
{
cube(size = [((tub_width-(spacing*3))/2)-(cage_wall*2),(tub_length-(spacing*2))-(cage_endwall*2),cage_lid_depthinto], center=false);
translate([-1,-1,cage_lid_depthinto])
{
cube(size = [(((tub_width-(spacing*3))/2)-(cage_wall*2))+2,((tub_length-(spacing*2))-(cage_endwall*2))+2,2], center=false);
}
//spheres lock ins
//1
translate([0,((tub_length-(spacing*2))-(cage_endwall*2))*1/4,((cage_lid_depthinto-cage_divot_height)/2)+(cage_divot_height/2)])
{
divot_sphere();
}
//2
translate([0,((tub_length-(spacing*2))-(cage_endwall*2))*3/4,((cage_lid_depthinto-cage_divot_height)/2)+(cage_divot_height/2)])
{
divot_sphere();
}
//3
translate([((tub_width-(spacing*3))/2)-(cage_wall*2),((tub_length-(spacing*2))-(cage_endwall*2))*1/4,((cage_lid_depthinto-cage_divot_height)/2)+(cage_divot_height/2)])
{
mirror([1,0,0])
{
divot_sphere();
}
}
//4
translate([((tub_width-(spacing*3))/2)-(cage_wall*2),((tub_length-(spacing*2))-(cage_endwall*2))*3/4,((cage_lid_depthinto-cage_divot_height)/2)+(cage_divot_height/2)])
{
mirror([1,0,0])
{
divot_sphere();
}
}
//end spheres
}
//end union begin difference
translate([1,1,1])
{
cube(size = [((tub_width-(spacing*3))/2)-(cage_wall*2)-2,(tub_length-(spacing*2))-(cage_endwall*2)-2,cage_lid_depthinto+3], center=false);
}
//chamfer underside of lip
translate([-2,-1,cage_lid_depthinto-1])
{
rotate([45,0,0])
{
cube(size = [(((tub_width-(spacing*3))/2)-(cage_wall*2))+4,sqrt(2),sqrt(2)], center=false);
}
}
translate([-2,(tub_length-(spacing*2))-(cage_endwall*2)+1,cage_lid_depthinto-1])
{
rotate([45,0,0])
{
cube(size = [(((tub_width-(spacing*3))/2)-(cage_wall*2))+4,sqrt(2),sqrt(2)], center=false);
}
}
translate([-1,-2,cage_lid_depthinto-1])
{
rotate([45,0,90])
{
cube(size = [((tub_length-(spacing*2))-(cage_endwall*2))+4,sqrt(2),sqrt(2)], center=false);
}
}
translate([(((tub_width-(spacing*3))/2)-(cage_wall*2))+1,-2,cage_lid_depthinto-1])
{
rotate([45,0,90])
{
cube(size = [((tub_length-(spacing*2))-(cage_endwall*2))+4,sqrt(2),sqrt(2)], center=false);
}
}
//end chamfer
//begin wire hole
translate([((((tub_width-(spacing*3))/2)-(cage_wall*2)))/2,(((tub_length-(spacing*2))-(cage_endwall*2))*1/2),-1])
{
cylinder(r = wire_diameter/2, h = 3);
}
//end wire hole
//end difference
}
//begin union
//cleat
translate([((((tub_width-(spacing*3))/2)-(cage_wall*2)))/2,(((tub_length-(spacing*2))-(cage_endwall*2))*1/2)-(wire_diameter*1.5)-1+wire_holeoffc,0])
{
cleat(2,cage_lid_depthinto+2);
}
translate([((((tub_width-(spacing*3))/2)-(cage_wall*2)))/2,(((tub_length-(spacing*2))-(cage_endwall*2))*1/2)+(wire_diameter*1.5)+1+wire_holeoffc,0])
{
mirror([0,1,0])
{
cleat(2,cage_lid_depthinto+2);
}
}
//end cleat
}
//divot
module divot_sphere()
{
difference()
{
translate([(cage_divot_height/2)/sin(45)*sin(45),0,0])
{
sphere(r = (cage_divot_height/2)/sin(45));
}
translate([(cage_divot_height/2)/sin(45),0,0])
cube(size = [((cage_divot_height/2)/sin(45)*2),((cage_divot_height/2)/sin(45)*2),((cage_divot_height/2)/sin(45)*2)], center=true);
}
}
////cleat module
module cleat(size,height)
{
translate([0,0,-size])
{
difference()
{
rotate([45,0,0])
{
rotate([0,0,45])
{
cube(size = [size,size,height/sin(45)], center=false);
}
}
translate([-size*3/2,-size*3/2,0])
{
#cube(size = [size*3,size*3,size],center=false);
}
}
}
}
multi cell tub
- need to calculate total volume of all cages
- also compute weight of powders needed
height = 80;
tub_width = 65;
tub_length = 70;
basethickness = 5;
tub_wall = 2;
tub_outsidewall = 4;
tubs_rows = 4;
tubs_columns = 2;
spacing = 5;
cage_height = 60;
cage_wall = 7.5;
cage_endwall = 2;
cage_base = 5;
mesh_opening = 1.5 ;
mesh_angle = 45;
mesh_spacing = 3.5;
wire_diameter = 2;
wire_holeoffc = 0;
cage_lid_depthinto = 7;
cage_divot_height = 5.5;
tub_lid_depthinto = 7;
tub_divot_height = 5.5;
union()
{
//tubs
for (c = [0 : tubs_columns-1])
{
translate([0,c*(tub_length+tub_wall),0])
{
for (r = [0 : tubs_rows-1])
{
translate([r*(tub_width+tub_wall),0,0])
{
tub();
}
}
}
}
//end tubs
//outer walls
translate([-tub_outsidewall+tub_wall,-tub_outsidewall+tub_wall,0])
{
difference()
{
cube(size = [((tub_width+tub_wall)*tubs_rows)+(tub_outsidewall*2)-tub_wall,((tub_length+tub_wall)*tubs_columns)+(tub_outsidewall*2)-tub_wall,height]);
translate([tub_outsidewall,tub_outsidewall,0])
{
#cube(size = [(((tub_width+tub_wall)*tubs_rows)+tub_wall)-(tub_wall*2),(((tub_length+tub_wall)*tubs_columns)+tub_wall)-(tub_wall*2),height+1]);
}
}
}
//end outer walls
} //end union
//tub module
module tub()
{
union()
{
//walls
difference()
{
cube(size = [tub_width+(tub_wall*2), tub_length+(tub_wall*2), height], center=false);
translate([tub_wall,tub_wall,basethickness])
{
cube(size = [tub_width, tub_length, height-basethickness+1], center=false);
}
}
//end walls
//spheres lock ins
//1
translate([tub_wall,(tub_length*1/4)+tub_wall,height-(((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2))])
{
mirror([1,0,0])
{
#divot_sphere();
}
}
//2
translate([tub_wall,(tub_length*3/4)+tub_wall,height-(((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2))])
{
mirror([1,0,0])
{
divot_sphere();
}
}
//3
translate([tub_width+tub_wall,(tub_length*1/4)+tub_wall,height-(((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2))])
{
mirror([0,0,0])
{
divot_sphere();
}
}
//4
translate([tub_width+tub_wall,(tub_length*3/4)+tub_wall,height-(((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2))])
{
mirror([0,0,0])
{
divot_sphere();
}
}
//5
translate([(tub_width*1/2)+tub_wall,tub_wall,height-(((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2))])
{
mirror([0,1,0])
{
rotate([0,0,90])
{
#divot_sphere();
}
}
}
//6
translate([(tub_width*1/2)+tub_wall,tub_length+tub_wall,height-(((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2))])
{
mirror([0,0,0])
{
rotate([0,0,90])
{
#divot_sphere();
}
}
}
//end spheres
//begin spacers
//1
translate([((tub_width+(tub_wall*2))/2)-((spacing-1)/2),tub_wall,cage_height*4/5])
{
divider();
}
//2
translate([((tub_width+(tub_wall*2))/2)-((spacing-1)/2),tub_wall,height-((spacing+cage_endwall+2)*2)-(sin(45)*(sin(45)*(spacing-1)))-(height*5/8)])
{
divider();
}
//3
translate([((tub_width+(tub_wall*2))/2)-((spacing-1)/2),tub_length+tub_wall,cage_height*4/5])
{
mirror([0,1,0])
{
#divider();
}
}
//4
translate([((tub_width+(tub_wall*2))/2)-((spacing-1)/2),tub_length+tub_wall,height-((spacing+cage_endwall+2)*2)-(sin(45)*(sin(45)*(spacing-1)))-(height*5/8)])
{
mirror([0,1,0])
{
divider();
}
}
//the end_wall's side spacers
//s1
translate([(tub_width+(tub_wall*2))*1/4,tub_wall,(cage_height/2)+basethickness])
{
rotate([0,0,90])
{
tub_spacer(8);
}
}
//s2
translate([(tub_width+(tub_wall*2))*3/4,tub_wall,(cage_height/2)+basethickness])
{
rotate([0,0,90])
{
tub_spacer(8);
}
}
//s3
translate([(tub_width+(tub_wall*2))*1/4,tub_wall+tub_length,(cage_height/2)+basethickness])
{
rotate([0,0,270])
{
tub_spacer(8);
}
}
//s4
translate([(tub_width+(tub_wall*2))*3/4,tub_wall+tub_length,(cage_height/2)+basethickness])
{
rotate([0,0,270])
{
tub_spacer(8);
}
}
//walls spacers
//w1
translate([tub_wall,(tub_length+(tub_wall*2))/2,(cage_height/2)+basethickness])
{
rotate([0,0,0])
{
tub_spacer(8);
}
}
//w2
translate([(tub_width+tub_wall),(tub_length+(tub_wall*2))/2,(cage_height/2)+basethickness])
{
rotate([0,0,180])
{
tub_spacer(8);
}
}
//base spacers
//b1
translate([(tub_width+(tub_wall*2))/2,(tub_length+(tub_wall*2))*1/5,basethickness])
{
rotate([0,270,90])
{
tub_spacer(tub_width-(spacing*2));
}
}
//b2
translate([(tub_width+(tub_wall*2))/2,(tub_length+(tub_wall*2))*4/5,basethickness])
{
rotate([0,270,90])
{
tub_spacer(tub_width-(spacing*2));
}
}
////end spacers
}
////endall
}
//divider modules
module divider()
{
difference()
{
union()
{
cube(size=[spacing-1,spacing+cage_endwall+2,(spacing+cage_endwall+2)*2]);
translate([0,0,(spacing+cage_endwall+2)*2])
{
rotate([0,45,0])
{
cube(size=[(sin(45)*(spacing-1)),spacing+cage_endwall+2,(sin(45)*(spacing-1))]);
}
}
}
translate([0,spacing+cage_endwall+2,-(((spacing+cage_endwall+2)/sin(45))/sin(45))/2])
{
rotate([45,0,0])
{
cube(size=[spacing-1,((spacing+cage_endwall+2)/sin(45)),((spacing+cage_endwall+2)/sin(45))]);
}
}
}
}
//end divider module
//spacer module
module tub_spacer(length)
{
translate([-(spacing-1),-length/2,0])
{
difference()
{
rotate([0,45,0])
{
cube(size = [((spacing-1)/sin(45)),length,((spacing-1)/sin(45))]);
}
translate([-(spacing-1)-0.1,0,-(spacing-1)])
{
#cube(size = [((spacing-1)/sin(45))/sin(45),length,((spacing-1)/sin(45))/sin(45)]);
}
}
}
}
//end spacer
//divot
module divot_sphere()
{
difference()
{
translate([(tub_divot_height/2)/sin(45)*sin(45),0,0])
{
sphere(r = (tub_divot_height/2)/sin(45));
}
translate([(tub_divot_height/2)/sin(45),0,0])
cube(size = [((tub_divot_height/2)/sin(45)*2),((tub_divot_height/2)/sin(45)*2),((tub_divot_height/2)/sin(45)*2)], center=true);
}
}
//end divot
////calculations
echo("space above cage for extra fluid is", height-basethickness-spacing-cage_height-tub_lid_depthinto);
tub lid
height = 80;
tub_width = 65;
tub_length = 70;
basethickness = 5;
tub_wall = 5;
tub_outsidewall = 4;
tubs_rows = 4;
tubs_columns = 2;
spacing = 5;
cage_height = 60;
cage_wall = 7.5;
cage_endwall = 2;
cage_base = 5;
mesh_opening = 1.5 ;
mesh_angle = 45;
mesh_spacing = 3.5;
wire_diameter = 2;
wire_holeoffc = 0;
cage_lid_depthinto = 7;
cage_divot_height = 5.5;
tub_lid_depthinto = 7;
tub_divot_height = 5.5; //cage lid
union()
{
difference()
{
union()
{
cube(size = [tub_width,tub_length,tub_lid_depthinto], center=false);
translate([-1,-1,tub_lid_depthinto])
{
cube(size = [tub_width+2,tub_length+2,2], center=false);
}
}
//end union begin difference
//main cavity
translate([2,2,2])
{
cube(size = [tub_width-4,tub_length-4,tub_lid_depthinto+2], center=false);
}
//end cavity
//spheres lock ins
//1
translate([0,tub_length*1/4,((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2)])
{
mirror([1,0,0])
{
divot_sphere();
}
}
//2
translate([0,tub_length*3/4,((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2)])
{
mirror([1,0,0])
{
divot_sphere();
}
}
//3
translate([tub_width,tub_length*1/4,((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2)])
{
mirror([0,0,0])
{
divot_sphere();
}
}
//4
translate([tub_width,tub_length*3/4,((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2)])
{
mirror([0,0,0])
{
divot_sphere();
}
}
//5
translate([tub_width*1/2,0,((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2)])
{
mirror([0,1,0])
{
rotate([0,0,90])
{
#divot_sphere();
}
}
}
//6
translate([tub_width*1/2,tub_length,((tub_lid_depthinto-tub_divot_height)/2)+(tub_divot_height/2)])
{
mirror([0,0,0])
{
rotate([0,0,90])
{
#divot_sphere();
}
}
}
//end spheres
//chamfer underside of lip
translate([-2,-1,tub_lid_depthinto-1])
{
rotate([45,0,0])
{
cube(size = [tub_width+4,sqrt(2),sqrt(2)], center=false);
}
}
translate([-2,tub_length+1,tub_lid_depthinto-1])
{
rotate([45,0,0])
{
cube(size = [tub_width+4,sqrt(2),sqrt(2)], center=false);
}
}
translate([-1,-2,tub_lid_depthinto-1])
{
rotate([45,0,90])
{
cube(size = [tub_length+4,sqrt(2),sqrt(2)], center=false);
}
}
translate([tub_width+1,-2,tub_lid_depthinto-1])
{
rotate([45,0,90])
{
cube(size = [tub_length+4,sqrt(2),sqrt(2)], center=false);
}
}
//end chamfer
//begin wire holes
translate([(tub_width/2)-(spacing/2)-cage_wall-(((tub_width-(spacing*3))/2)-(cage_wall*2)),(tub_length/2)-wire_holeoffc,-1])
{
cylinder(r = wire_diameter/2, h = 4);
}
translate([(tub_width/2)+(spacing/2)+cage_wall+(((tub_width-(spacing*3))/2)-(cage_wall*2)),(tub_length/2)-wire_holeoffc,-1])
{
cylinder(r = wire_diameter/2, h = 4);
}
//end wire hole
//end difference
}
//begin union
//begin terminal
translate([tub_width/2,tub_length-30,2])
{
rotate([0,0,90])
{
terminal(3);
}
}
//end terminal
}
//divot
module divot_sphere()
{
difference()
{
translate([(tub_divot_height/2)/sin(45)*sin(45),0,0])
{
sphere(r = (tub_divot_height/2)/sin(45));
}
translate([(tub_divot_height/2)/sin(45),0,0])
cube(size = [((tub_divot_height/2)/sin(45)*2),((tub_divot_height/2)/sin(45)*2),((tub_divot_height/2)/sin(45)*2)], center=true);
}
}
///////////change to terminal block cleat module
module terminal(holed)
{
translate([0,-1.5,0])
{
difference()
{
union()
{
//1
translate([0,-10-holed,0])
{
cube(size=[20,3,6+holed], center=false);
}
//2
translate([0,0,0])
{
cube(size=[20,3,6+holed], center=false);
}
//3
translate([0,10+holed,0])
{
cube(size=[20,3,6+holed], center=false);
}
//cross
translate([9,-10-holed,0])
{
cube(size=[3,23+(holed*2),5+holed], center=false);
}
}
//begin difference
//holes
//1
translate([8,-3.5-(holed/2),3+(holed/2)])
{
rotate([0,90,0])
{
cylinder(r=holed/2, h =5);
}
}
//2
translate([8,6.5+(holed/2),3+(holed/2)])
{
rotate([0,90,0])
{
cylinder(r=holed/2, h =5);
}
}
//end holes
}
}
}
////