User:Dorkmo/Ideas/Battery/SCAD: Difference between revisions
< User:Dorkmo | Ideas | Battery
Jump to navigation
Jump to search
No edit summary |
|||
| Line 19: | Line 19: | ||
wedge_hieght = 10; | wedge_hieght = 10; | ||
mesh_opening = | mesh_opening = 1 ; | ||
mesh_angle = | mesh_angle = 35; | ||
mesh_spacing = | mesh_spacing = 2; | ||
mesh_width = 17; | mesh_width = 17; | ||
mesh_height = 10; | mesh_height = 10; | ||
| Line 32: | Line 32: | ||
translate([((tub_width-(spacing*3))/2)-cage_wall-((sin(mesh_angle)*sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/2), cage_endwall-(mesh_spacing/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]) | translate([((tub_width-(spacing*3))/2)-cage_wall-((sin(mesh_angle)*sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/2), cage_endwall-(mesh_spacing/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]) | ||
{ | { | ||
for (h = [1 : | 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]) | translate(h*[0,0,mesh_spacing]) | ||
| Line 47: | Line 47: | ||
{ | { | ||
//could put a scale command here to make opening a perfect square | //could put a scale command here to make opening a perfect square | ||
cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*( | cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*(cage_wall/sin(90-mesh_angle)))], center=false); | ||
} | } | ||
} | } | ||
| Line 61: | Line 61: | ||
{ | { | ||
//could put a scale command here to make opening a perfect square | //could put a scale command here to make opening a perfect square | ||
cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*( | cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*(cage_wall/sin(90-mesh_angle)))], center=false); | ||
} | } | ||
} | } | ||
| Line 73: | Line 73: | ||
} | } | ||
} | } | ||
//calculate verticle height of mesh holes to take away from max height of holes | |||
//works okay up to 45 then bugs out | |||
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))); | |||
height = 60; | |||
tub_width = 95; | |||
tub_length = 70; | |||
outsidewall = 5; | |||
basethickness = 5; | |||
tub_wall = 5; | |||
spacing = 5; | |||
cage_height = 40; | |||
cage_wall = 10; | |||
cage_endwall = 5; | |||
cage_base = 5; | |||
wedge_hieght = 10; | |||
mesh_opening = 1 ; | |||
mesh_angle = 35; | |||
mesh_spacing = 2; | |||
mesh_width = 17; | |||
mesh_height = 10; | |||
difference() | |||
{ | |||
cube(size = [(tub_width-(spacing*3))/2,tub_length-(spacing*2),cage_height], center=false); | |||
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); | |||
translate([((tub_width-(spacing*3))/2)-cage_wall-((sin(mesh_angle)*sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/2), cage_endwall-(mesh_spacing/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]) | |||
{ | |||
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]) | |||
{ | |||
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))]) | |||
{ | |||
rotate([0,90-mesh_angle,0]) | |||
{ | |||
for (w = [1 : 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([0,0,45]) | |||
{ | |||
//could put a scale command here to make opening a perfect square | |||
cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*(cage_wall/sin(90-mesh_angle)))], center=false); | |||
} | |||
} | |||
} | |||
//begin second row | |||
#for (w = [0 : floor((((tub_length-(spacing*2))-(cage_endwall*2))-(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening))))/mesh_spacing)]) | |||
{ | |||
translate([mesh_spacing/2,mesh_spacing/2,-mesh_spacing/2]) | |||
{ | |||
translate(w*[0,mesh_spacing,0]) | |||
{ | |||
rotate([0,0,45]) | |||
{ | |||
//could put a scale command here to make opening a perfect square | |||
cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*(cage_wall/sin(90-mesh_angle)))], center=false); | |||
} | |||
} | |||
} | |||
} | |||
//end second row | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
//calculate verticle height of mesh holes to take away from max height of holes | |||
//works okay up to 45 then bugs out | |||
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))); | |||
Revision as of 02:58, 7 November 2014
User:Dorkmo/Ideas/Battery/SCAD/Sandbox
inside cage
height = 60;
tub_width = 95;
tub_length = 70;
outsidewall = 5;
basethickness = 5;
tub_wall = 5;
spacing = 5;
cage_height = 40;
cage_wall = 10;
cage_endwall = 5;
cage_base = 5;
wedge_hieght = 10;
mesh_opening = 1 ;
mesh_angle = 35;
mesh_spacing = 2;
mesh_width = 17;
mesh_height = 10;
difference()
{
cube(size = [(tub_width-(spacing*3))/2,tub_length-(spacing*2),cage_height], center=false);
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);
translate([((tub_width-(spacing*3))/2)-cage_wall-((sin(mesh_angle)*sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/2), cage_endwall-(mesh_spacing/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])
{
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])
{
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))])
{
rotate([0,90-mesh_angle,0])
{
for (w = [1 : 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([0,0,45])
{
//could put a scale command here to make opening a perfect square
cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*(cage_wall/sin(90-mesh_angle)))], center=false);
}
}
}
//begin second row
#for (w = [0 : floor((((tub_length-(spacing*2))-(cage_endwall*2))-(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening))))/mesh_spacing)])
{
translate([mesh_spacing/2,mesh_spacing/2,-mesh_spacing/2])
{
translate(w*[0,mesh_spacing,0])
{
rotate([0,0,45])
{
//could put a scale command here to make opening a perfect square
cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*(cage_wall/sin(90-mesh_angle)))], center=false);
}
}
}
}
//end second row
}
}
}
}
}
}
//calculate verticle height of mesh holes to take away from max height of holes
//works okay up to 45 then bugs out
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)));
height = 60;
tub_width = 95;
tub_length = 70;
outsidewall = 5;
basethickness = 5;
tub_wall = 5;
spacing = 5;
cage_height = 40;
cage_wall = 10;
cage_endwall = 5;
cage_base = 5;
wedge_hieght = 10;
mesh_opening = 1 ;
mesh_angle = 35;
mesh_spacing = 2;
mesh_width = 17;
mesh_height = 10;
difference()
{
cube(size = [(tub_width-(spacing*3))/2,tub_length-(spacing*2),cage_height], center=false);
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);
translate([((tub_width-(spacing*3))/2)-cage_wall-((sin(mesh_angle)*sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening)))/2), cage_endwall-(mesh_spacing/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])
{
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])
{
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))])
{
rotate([0,90-mesh_angle,0])
{
for (w = [1 : 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([0,0,45])
{
//could put a scale command here to make opening a perfect square
cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*(cage_wall/sin(90-mesh_angle)))], center=false);
}
}
}
//begin second row
#for (w = [0 : floor((((tub_length-(spacing*2))-(cage_endwall*2))-(sqrt((mesh_opening*mesh_opening)+(mesh_opening*mesh_opening))))/mesh_spacing)])
{
translate([mesh_spacing/2,mesh_spacing/2,-mesh_spacing/2])
{
translate(w*[0,mesh_spacing,0])
{
rotate([0,0,45])
{
//could put a scale command here to make opening a perfect square
cube(size = [mesh_opening,mesh_opening,(mesh_opening*2)+(sin(90)*(cage_wall/sin(90-mesh_angle)))], center=false);
}
}
}
}
//end second row
}
}
}
}
}
}
//calculate verticle height of mesh holes to take away from max height of holes
//works okay up to 45 then bugs out
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)));
single cell tub
height = 60;
oa_width = 80;
oa_length = 105;
outsidewall = 5;
basethickness = 5;
membranethickness = 5;
tub_wall = 5;
spacing = 5;
cage_height = 40;
cage_wall = 10;
cage_base = 5;
difference()
{
cube(size = [oa_width, oa_length, height], center=false);
translate([outsidewall,outsidewall,basethickness])
cube(size = [oa_width-(outsidewall*2), oa_length-(outsidewall*2), height-basethickness], center=false);
}