User:Dorkmo/Ideas/Battery/SCAD: Difference between revisions
< User:Dorkmo | Ideas | Battery
Jump to navigation
Jump to search
| Line 368: | Line 368: | ||
basethickness = 5; | basethickness = 5; | ||
tub_wall = 2; | tub_wall = 2; | ||
tub_outsidewall = | tub_outsidewall = 4; | ||
tubs_rows = | tubs_rows = 4; | ||
tubs_columns = 2; | tubs_columns = 2; | ||
| Line 387: | Line 387: | ||
wire_holeoffc = 0; | wire_holeoffc = 0; | ||
lid_depthinto = 7; | lid_depthinto = 7; | ||
tub_lid_depthinto = 7; | |||
divot_height = 5.5; | divot_height = 5.5; | ||
| Line 395: | Line 396: | ||
for (c = [0 : tubs_columns-1]) | for (c = [0 : tubs_columns-1]) | ||
{ | { | ||
translate([0,c*(tub_length | translate([0,c*(tub_length+tub_wall),0]) | ||
{ | { | ||
for (r = [0 : tubs_rows-1]) | for (r = [0 : tubs_rows-1]) | ||
{ | { | ||
translate([r*(tub_width | translate([r*(tub_width+tub_wall),0,0]) | ||
{ | { | ||
tub(); | tub(); | ||
| Line 409: | Line 410: | ||
//outer walls | //outer walls | ||
translate([-tub_outsidewall+tub_wall,-tub_outsidewall+tub_wall,0]) | |||
translate([-tub_outsidewall+tub_wall,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]); | ||
cube(size = [ | 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]); | |||
} | |||
} | |||
} | |||
translate([ | |||
{ | |||
cube(size = [ | |||
} | |||
} | |||
} | |||
//end outer walls | //end outer walls | ||
| Line 459: | Line 434: | ||
difference() | difference() | ||
{ | { | ||
cube(size = [tub_width, tub_length, height], center=false); | cube(size = [tub_width+(tub_wall*2), tub_length+(tub_wall*2), height], center=false); | ||
translate([tub_wall,tub_wall,basethickness]) | translate([tub_wall,tub_wall,basethickness]) | ||
{ | { | ||
cube(size = [tub_width | cube(size = [tub_width, tub_length, height-basethickness+1], center=false); | ||
} | } | ||
} | } | ||
//end walls | //end walls | ||
//spheres lock ins | |||
//1 | |||
translate([tub_wall,(tub_length+(tub_wall*2))*1/4,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))]) | |||
{ | |||
mirror([1,0,0]) | |||
{ | |||
#divot_sphere(); | |||
} | |||
} | |||
//2 | |||
translate([tub_wall,(tub_length+(tub_wall*2))*3/4,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))]) | |||
{ | |||
mirror([1,0,0]) | |||
{ | |||
divot_sphere(); | |||
} | |||
} | |||
//3 | |||
translate([tub_width+tub_wall,(tub_length+(tub_wall*2))*1/4,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))]) | |||
{ | |||
mirror([0,0,0]) | |||
{ | |||
divot_sphere(); | |||
} | |||
} | |||
//4 | |||
translate([tub_width+tub_wall,(tub_length+(tub_wall*2))*3/4,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))]) | |||
{ | |||
mirror([0,0,0]) | |||
{ | |||
divot_sphere(); | |||
} | |||
} | |||
//5 | |||
translate([(tub_width+(tub_wall*2))*1/2,tub_wall,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))]) | |||
{ | |||
mirror([0,1,0]) | |||
{ | |||
rotate([0,0,90]) | |||
{ | |||
#divot_sphere(); | |||
} | |||
} | |||
} | |||
//6 | |||
translate([(tub_width+(tub_wall*2))*1/2,tub_length+tub_wall,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))]) | |||
{ | |||
mirror([0,0,0]) | |||
{ | |||
rotate([0,0,90]) | |||
{ | |||
#divot_sphere(); | |||
} | |||
} | |||
} | |||
//end spheres | |||
//begin spacers | //begin spacers | ||
//1 | //1 | ||
translate([(tub_width/2)-((spacing-1)/2),tub_wall,cage_height*4/5]) | translate([((tub_width+(tub_wall*2))/2)-((spacing-1)/2),tub_wall,cage_height*4/5]) | ||
{ | { | ||
divider(); | divider(); | ||
} | } | ||
//2 | //2 | ||
translate([(tub_width/2)-((spacing-1)/2),tub_wall,height-((spacing+cage_endwall+2)*2)-(sin(45)*(sin(45)*(spacing-1)))-(height*5/8)]) | 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(); | divider(); | ||
} | } | ||
//3 | //3 | ||
translate([(tub_width/2)-((spacing-1)/2), | translate([((tub_width+(tub_wall*2))/2)-((spacing-1)/2),tub_length+tub_wall,cage_height*4/5]) | ||
{ | { | ||
mirror([0,1,0]) | mirror([0,1,0]) | ||
{ | { | ||
divider(); | #divider(); | ||
} | } | ||
} | } | ||
//4 | //4 | ||
translate([(tub_width/2)-((spacing-1)/2), | 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]) | mirror([0,1,0]) | ||
| Line 494: | Line 526: | ||
} | } | ||
} | } | ||
//end_wall side spacers | //the end_wall's side spacers | ||
//s1 | //s1 | ||
translate([(tub_width)*1/4,tub_wall,(cage_height/2)+basethickness]) | translate([(tub_width+(tub_wall*2))*1/4,tub_wall,(cage_height/2)+basethickness]) | ||
{ | { | ||
rotate([0,0,90]) | rotate([0,0,90]) | ||
| Line 504: | Line 536: | ||
} | } | ||
//s2 | //s2 | ||
translate([(tub_width)*3/4,tub_wall,(cage_height/2)+basethickness]) | translate([(tub_width+(tub_wall*2))*3/4,tub_wall,(cage_height/2)+basethickness]) | ||
{ | { | ||
rotate([0,0,90]) | rotate([0,0,90]) | ||
| Line 512: | Line 544: | ||
} | } | ||
//s3 | //s3 | ||
translate([(tub_width)*1/4,tub_wall+tub_length | translate([(tub_width+(tub_wall*2))*1/4,tub_wall+tub_length,(cage_height/2)+basethickness]) | ||
{ | { | ||
rotate([0,0,270]) | rotate([0,0,270]) | ||
| Line 520: | Line 552: | ||
} | } | ||
//s4 | //s4 | ||
translate([(tub_width)*3/4,tub_wall+tub_length | translate([(tub_width+(tub_wall*2))*3/4,tub_wall+tub_length,(cage_height/2)+basethickness]) | ||
{ | { | ||
rotate([0,0,270]) | rotate([0,0,270]) | ||
| Line 530: | Line 562: | ||
//walls spacers | //walls spacers | ||
//w1 | //w1 | ||
translate([tub_wall,tub_length/2,(cage_height/2)+basethickness]) | translate([tub_wall,(tub_length+(tub_wall*2))/2,(cage_height/2)+basethickness]) | ||
{ | { | ||
rotate([0,0,0]) | rotate([0,0,0]) | ||
| Line 538: | Line 570: | ||
} | } | ||
//w2 | //w2 | ||
translate([tub_wall+ | translate([(tub_width+tub_wall),(tub_length+(tub_wall*2))/2,(cage_height/2)+basethickness]) | ||
{ | { | ||
rotate([0,0,180]) | rotate([0,0,180]) | ||
| Line 547: | Line 579: | ||
//base spacers | //base spacers | ||
//b1 | //b1 | ||
translate([tub_width/2,tub_length*1/5,basethickness]) | translate([(tub_width+(tub_wall*2))/2,(tub_length+(tub_wall*2))*1/5,basethickness]) | ||
{ | { | ||
rotate([0,270,90]) | rotate([0,270,90]) | ||
{ | { | ||
tub_spacer(tub_width | tub_spacer(tub_width-(spacing*2)); | ||
} | } | ||
} | } | ||
//b2 | //b2 | ||
translate([tub_width/2,tub_length*4/5,basethickness]) | translate([(tub_width+(tub_wall*2))/2,(tub_length+(tub_wall*2))*4/5,basethickness]) | ||
{ | { | ||
rotate([0,270,90]) | rotate([0,270,90]) | ||
{ | { | ||
tub_spacer(tub_width | tub_spacer(tub_width-(spacing*2)); | ||
} | } | ||
} | } | ||
| Line 614: | Line 646: | ||
} | } | ||
//end spacer | //end spacer | ||
//divot | |||
module divot_sphere() | |||
{ | |||
difference() | |||
{ | |||
translate([(divot_height/2)/sin(45)*sin(45),0,0]) | |||
{ | |||
sphere(r = (divot_height/2)/sin(45)); | |||
} | |||
translate([(divot_height/2)/sin(45),0,0]) | |||
cube(size = [((divot_height/2)/sin(45)*2),((divot_height/2)/sin(45)*2),((divot_height/2)/sin(45)*2)], center=true); | |||
} | |||
} | |||
//end divot | |||
//need to add tub lid to this | //need to add tub lid to this | ||
echo("space above cage for extra fluid is", height-basethickness-spacing-cage_height); | echo("space above cage for extra fluid is", height-basethickness-spacing-cage_height); | ||
</nowiki> | </nowiki> | ||
Revision as of 04:48, 18 November 2014
User:Dorkmo/Ideas/Battery/SCAD/Sandbox
parts to be printed
cage
height = 80;
tub_width = 65;
tub_length = 70;
outsidewall = 5;
basethickness = 5;
tub_wall = 5;
spacing = 5;
cage_height = 60;
cage_wall = 7.5;
cage_endwall = 2;
cage_base = 5;
wedge_hieght = 10;
mesh_opening = 1.5 ;
mesh_angle = 45;
mesh_spacing = 3.5;
wire_diameter = 2;
wire_holeoffc = 0;
lid_depthinto = 7;
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([(divot_height/2)/sin(45)*sin(45),0,0])
{
sphere(r = (divot_height/2)/sin(45));
}
translate([(divot_height/2)/sin(45),0,0])
cube(size = [((divot_height/2)/sin(45)*2),((divot_height/2)/sin(45)*2),((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-(((lid_depthinto-divot_height)/2)+(divot_height/2))])
{
#divot_sphere();
}
//2
translate([cage_wall,(((tub_length-(spacing*2))-(cage_endwall*2))*3/4)+cage_endwall,cage_height-(((lid_depthinto-divot_height)/2)+(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-(((lid_depthinto-divot_height)/2)+(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-(((lid_depthinto-divot_height)/2)+(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)));
cage lid with divots and cleat
height = 80;
tub_width = 65;
tub_length = 70;
outsidewall = 5;
basethickness = 5;
tub_wall = 5;
spacing = 5;
cage_height = 60;
cage_wall = 7.5;
cage_endwall = 2;
cage_base = 5;
wedge_hieght = 10;
mesh_opening = 1 ;
mesh_angle = 45;
mesh_spacing = 2.5;
wire_diameter = 2;
wire_holeoffc = 0;
lid_depthinto = 7;
divot_height = 5.5;
union()
{
difference()
{
union()
{
cube(size = [((tub_width-(spacing*3))/2)-(cage_wall*2),(tub_length-(spacing*2))-(cage_endwall*2),lid_depthinto], center=false);
translate([-1,-1,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,((lid_depthinto-divot_height)/2)+(divot_height/2)])
{
divot_sphere();
}
//2
translate([0,((tub_length-(spacing*2))-(cage_endwall*2))*3/4,((lid_depthinto-divot_height)/2)+(divot_height/2)])
{
divot_sphere();
}
//3
translate([((tub_width-(spacing*3))/2)-(cage_wall*2),((tub_length-(spacing*2))-(cage_endwall*2))*1/4,((lid_depthinto-divot_height)/2)+(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,((lid_depthinto-divot_height)/2)+(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,lid_depthinto+3], center=false);
}
//chamfer underside of lip
translate([-2,-1,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,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,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,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,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,lid_depthinto+2);
}
}
//end cleat
}
//divot
module divot_sphere()
{
difference()
{
translate([(divot_height/2)/sin(45)*sin(45),0,0])
{
sphere(r = (divot_height/2)/sin(45));
}
translate([(divot_height/2)/sin(45),0,0])
cube(size = [((divot_height/2)/sin(45)*2),((divot_height/2)/sin(45)*2),((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 = 55;
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;
wedge_hieght = 10;
mesh_opening = 1.5 ;
mesh_angle = 45;
mesh_spacing = 3.5;
wire_diameter = 2;
wire_holeoffc = 0;
lid_depthinto = 7;
tub_lid_depthinto = 7;
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+(tub_wall*2))*1/4,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))])
{
mirror([1,0,0])
{
#divot_sphere();
}
}
//2
translate([tub_wall,(tub_length+(tub_wall*2))*3/4,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))])
{
mirror([1,0,0])
{
divot_sphere();
}
}
//3
translate([tub_width+tub_wall,(tub_length+(tub_wall*2))*1/4,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))])
{
mirror([0,0,0])
{
divot_sphere();
}
}
//4
translate([tub_width+tub_wall,(tub_length+(tub_wall*2))*3/4,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))])
{
mirror([0,0,0])
{
divot_sphere();
}
}
//5
translate([(tub_width+(tub_wall*2))*1/2,tub_wall,height-(((lid_depthinto-divot_height)/2)+(divot_height/2))])
{
mirror([0,1,0])
{
rotate([0,0,90])
{
#divot_sphere();
}
}
}
//6
translate([(tub_width+(tub_wall*2))*1/2,tub_length+tub_wall,height-(((lid_depthinto-divot_height)/2)+(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([(divot_height/2)/sin(45)*sin(45),0,0])
{
sphere(r = (divot_height/2)/sin(45));
}
translate([(divot_height/2)/sin(45),0,0])
cube(size = [((divot_height/2)/sin(45)*2),((divot_height/2)/sin(45)*2),((divot_height/2)/sin(45)*2)], center=true);
}
}
//end divot
//need to add tub lid to this
echo("space above cage for extra fluid is", height-basethickness-spacing-cage_height);
tub lid
height = 80;
tub_width = 65;
tub_length = 70;
outsidewall = 5;
basethickness = 5;
tub_wall = 5;
spacing = 5;
cage_height = 60;
cage_wall = 7.5;
cage_endwall = 2;
cage_base = 5;
wedge_hieght = 10;
mesh_opening = 1 ;
mesh_angle = 45;
mesh_spacing = 2.5;
wire_diameter = 2;
wire_holeoffc = 0;
lid_depthinto = 7;
divot_height = 5.5; //cage lid
union()
{
difference()
{
union()
{
cube(size = [tub_width,tub_length,lid_depthinto], center=false);
translate([-1,-1,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,lid_depthinto+2], center=false);
}
//end cavity
//spheres lock ins
//1
translate([0,tub_length*1/4,((lid_depthinto-divot_height)/2)+(divot_height/2)])
{
mirror([1,0,0])
{
divot_sphere();
}
}
//2
translate([0,tub_length*3/4,((lid_depthinto-divot_height)/2)+(divot_height/2)])
{
mirror([1,0,0])
{
divot_sphere();
}
}
//3
translate([tub_width,tub_length*1/4,((lid_depthinto-divot_height)/2)+(divot_height/2)])
{
mirror([0,0,0])
{
divot_sphere();
}
}
//4
translate([tub_width,tub_length*3/4,((lid_depthinto-divot_height)/2)+(divot_height/2)])
{
mirror([0,0,0])
{
divot_sphere();
}
}
//5
translate([tub_width*1/2,0,((lid_depthinto-divot_height)/2)+(divot_height/2)])
{
mirror([0,1,0])
{
rotate([0,0,90])
{
#divot_sphere();
}
}
}
//6
translate([tub_width*1/2,tub_length,((lid_depthinto-divot_height)/2)+(divot_height/2)])
{
mirror([0,0,0])
{
rotate([0,0,90])
{
#divot_sphere();
}
}
}
//end spheres
//chamfer underside of lip
translate([-2,-1,lid_depthinto-1])
{
rotate([45,0,0])
{
cube(size = [tub_width+4,sqrt(2),sqrt(2)], center=false);
}
}
translate([-2,tub_length+1,lid_depthinto-1])
{
rotate([45,0,0])
{
cube(size = [tub_width+4,sqrt(2),sqrt(2)], center=false);
}
}
translate([-1,-2,lid_depthinto-1])
{
rotate([45,0,90])
{
cube(size = [tub_length+4,sqrt(2),sqrt(2)], center=false);
}
}
translate([tub_width+1,-2,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([(divot_height/2)/sin(45)*sin(45),0,0])
{
sphere(r = (divot_height/2)/sin(45));
}
translate([(divot_height/2)/sin(45),0,0])
cube(size = [((divot_height/2)/sin(45)*2),((divot_height/2)/sin(45)*2),((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
}
}
}
////