diff --git a/Baller.scad b/Baller.scad index 9265143..bb400c2 100644 --- a/Baller.scad +++ b/Baller.scad @@ -1,29 +1,106 @@ -use -use + +include +use +use +use + +use +use -$fa = ($preview) ? 12 : 1; -$fs = ($preview) ? 2 : 1; $incolor = true; // Config BallDiameter = 65; -BallClearance = 2; -BallSealWidth = 3; -PlateLip = 2; +BallClearance = 4; +BallSealWidth = 6; +PlateLip = 4; PlateDiameter = BallDiameter + 2*(BallClearance + BallSealWidth + PlateLip); PlateThick = BallSealWidth/2 + 1; +PlateSep = 0; + +/* [Render Options] */ +PreviewFA = 12; +RenderFA = 1; +PreviewFS = 2; +RenderFS = .1; + + +$fa = ($preview) ? PreviewFA : RenderFA; +$fs = ($preview) ? PreviewFS : RenderFS; //plate_full(); -PlateSep = 0; pd = PlateDiameter+PlateSep; pt = PlateThick; +wt=BallSealWidth; echo("PD=", pd); -translate([pd+5,0]) plate_top(thickness=pt); -translate([0,pd+5]) plate_mid(thickness=pt); -translate([pd+5,pd+5]) cap_compression(PlateDiameter, pt); -translate([-(pd+5),0]) mold_wall(PlateDiameter, pt, BallDiameter); -translate([0,-(pd+5)]) plate_under(); +//translate([pd+15,0]) plate_top(thickness=pt); +//translate([0,pd+15]) plate_mid(thickness=pt); +//translate([pd+15,pd+i15]) cap_compression(PlateDiameter, pt+8); +//translate([-(pd+15),0]) mold_wall(PlateDiameter, pt, BallDiameter); +//bottom(pd=pd); +//translate([0,-(pd+5)]) plate_under(); +//ball(bottom=false); + + +/*{ + bd=BallDiameter; + bsd=BallSealWidth; + gap=10; + w=6; + l = 2*(bd+gap+bsd)+gap+w; + + p4_bottom(); + down(12)fwd(l/2 - gap/2 + 3) p4_wall(align=V_TOP); +} */ + +//xrot(90)p4_wall(); +p4_top(); +module p4_seal_corner(bd=BallDiameter, bsd=BallSealWidth, gap=10) { + translate([gap/2+bd/2,gap/2+bd/2,0]) rotate_extrude(angle=90) + translate([(bd+bsd+gap)/2,0,0]) + circle(d=bsd); +} + +module p4_top(bd=BallDiameter, bsd=BallSealWidth, gap=10) { + xspread(l=bd+gap, n=2)yspread(l=bd+gap, n=2) ball(bottom=false); + //cyl(h=bd/2, d1=20, d2=10, align=V_TOP); + difference() { + cuboid([2*(bd+gap+bsd)+gap,2*(bd+gap+bsd)+gap,bsd/2+1], fillet=5, edges=EDGES_Z_ALL,align=V_BOTTOM); + p4_seal_corner(); + xspread(l=2*(bd+gap+bsd/2)) cyl(h=bd+gap, d=bsd, orient=ORIENT_Y); + yspread(l=2*(bd+gap+bsd/2)) cyl(h=bd+gap, d=bsd, orient=ORIENT_X); + rot(90)p4_seal_corner(); + rot(180)p4_seal_corner(); + rot(270)p4_seal_corner(); + } +} + +module p4_bottom(bd=BallDiameter, bsd=BallSealWidth, gap=10) { + xspread(l=bd+gap, n=2)yspread(l=bd+gap, n=2) ball(bottom=false); + xspread(l=2*(bd+gap+bsd/2)) cyl(h=bd+gap, d=bsd, orient=ORIENT_Y); + yspread(l=2*(bd+gap+bsd/2)) cyl(h=bd+gap, d=bsd, orient=ORIENT_X); + p4_seal_corner(); + rot(90)p4_seal_corner(); + rot(180)p4_seal_corner(); + rot(270)p4_seal_corner(); + cuboid([2*(bd+gap+bsd)+gap,2*(bd+gap+bsd)+gap,bsd/2+1], fillet=5, edges=EDGES_Z_ALL,align=V_BOTTOM); + +} + +module p4_wall(w=6, bd=BallDiameter, bsd=BallSealWidth, gap=10, orient=ORIENT_X, align=V_CENTER) { + h = bd + bsd; + l = 2*(bd+gap+bsd)+gap+w/2; + orient_and_align([l,w,h], align=align, orient=orient, orig_orient=ORIENT_X) + difference() { + left(w)cuboid([l, w, h], fillet=1); + zspread(n=3, l=h-gap) { + yrot(90)up((l-w)/2)insert_clear(bl=10, bz=-10); + xrot(90)down(w+4)left((l)/2+3)insert_clear(bl=10, sh=.2, bz=0); + } + right(0)back(w/2)down(h/2- 10) cuboid([l,w, bsd/2+1.2]); + } +} module stack(pt, ed=10 ,expand=false) { d = expand ? pt + ed : pt+.01; @@ -32,37 +109,54 @@ module stack(pt, ed=10 ,expand=false) { } } -module mold_wall(pd, pt, bd, sd=4, wt=3) { +module mold_wall(pd, pt, bd, sd=4, wt=3, $incolor=$incolor) { threadc = $incolor ? "green" : undef; ptol = 2; wh = bd/2+pt+sd; + od = pd + 2*wt; difference() { union() { - translate([0,0,2]) cylinder(d=pd, h=wh); - color(threadc) metric_thread( - diameter=pd+ptol, - length=4.01, - internal=false); + translate([0,0,6]) cylinder(d=od, h=wh); + color(threadc) threaded_rod( + d=od, + l=6, + internal=false, align=V_TOP); + //color(threadc) metric_thread( + // diameter=pd+ptol, + // length=4.01, + // internal=false); } - translate([0,0,-.1]) - cylinder(d1=pd-wt, d2=pd-wt-3, h=wh+4+.2); + translate([0,0,-2.1+pt]) + cylinder(d1=pd-wt, d2=pd-wt-3, h=wh+6+.2); + down(01)cylinder(d=pd, h=pt+.01); } } -module cap_compression(pd, pt, th=7, wt=3, register=true, key=true) { - td=pd+2; +module bottom(pd, wt=3, wh=10, fh=2) { + id = pd + 2*wt + .4; + od = id + 2*wt; + difference() { - cylinder(d=td+wt, h=th); - translate([0,0,-.01]) cylinder(d=3, h=5); - translate([0,0,-.01]) cylinder(d=6, h=3); - translate([0,0,2*pt]) metric_thread(diameter=td,length=th+.01, internal=true); + cylinder(d=od, h=wh); + translate([0,0,fh]) cylinder(d=id, h=wh); + } +} + +module cap_compression(pd, pt, th=9, wt=3, register=true, key=false) { + td=pd+2*wt; + difference() { + cylinder(d=td+wt, h=th+wt/2); + translate([0,0,th-5-.01]) cylinder(d=3, h=5); + translate([0,0,th-1+.01]) cylinder(d=6, h=3); + //translate([0,0,2*pt]) metric_thread(diameter=td,length=th+.01, internal=true); + translate([0,0,th-1]) threaded_rod(d=td,l=th+.01, internal=true); if (register && ! key) - translate([0,0,2*pt]) register_seal(); - + translate([0,0,2*pt-2]) register_seal(); + cylinder(d=pd-5,h=10); } if (register && key) - translate([0,0,2*pt]) register_seal(); + translate([0,0,2*pt-2]) register_seal(); } module plate( @@ -74,19 +168,30 @@ module plate( } module plate_mid(thickness = 1) { + th=thickness; translate([0,0,thickness]) { - ball(bottom=false); - plate(thickness=thickness); - register_seal(); + //ball(bottom=false); + difference() { + union() { + plate(thickness=thickness); + register_seal(); + } + translate([0,0,-thickness]) cylinder(h=10, d=4); + ranslate([0,0,-th+.01]) cylinder(d=3, h=5); + translate([0,0,-th]) cylinder(d=6, h=3); + } } } module plate_top(thickness = 1) { translate([0,0,thickness]) { - ball(bottom=false); + //ball(bottom=false); difference() { plate(thickness=thickness); register_seal(); + translate([0,0,-thickness]) cylinder(h=10, d=4); + translate([0,0,-th/2]) cylinder(d=3, h=5); + translate([0,0,-thickness-.01]) cylinder(d=6, h=3); } } } @@ -124,9 +229,9 @@ module ball( rotate([0,rot,0]) thread_insertM25($die=true); } - if (! bottom) - rotate([0,0,0]) - thread_insertM25($die=true); + //if (! bottom) + // rotate([0,0,0]) + // thread_insertM25($die=true); } } } diff --git a/part_cap2.scad b/part_cap2.scad index 42cbc3a..a3e98df 100644 --- a/part_cap2.scad +++ b/part_cap2.scad @@ -5,7 +5,7 @@ $fs = ($preview) ? 2 : 1; $fn = undef; // Config -BallDiameter = 65; +BallDiameter = 79; BallClearance = 2; BallSealWidth = 2; PlateLip = 2; diff --git a/sprue.scad b/sprue.scad index 56675d9..a2babe3 100644 --- a/sprue.scad +++ b/sprue.scad @@ -3,7 +3,11 @@ $fa = $preview ? 12 : 4; $fs = $preview ? 2 : .4; difference() { - cylinder(d1=4.5, d2=8, h=10.5); + union() { + cylinder(d1=4.5, d2=8, h=10.5); + translate([0,0,10.5]) cylinder(d=8, h=9); + } translate([0,0,-.5]) cylinder(d=3, h=11); translate([0,0,10]) cylinder(d=4.5, h=1); + translate([0,0,10]) cylinder(d=6, h=11); }