Recent Updates

Doing 4 at once trays
This commit is contained in:
sjc
2026-03-21 07:46:14 -04:00
parent ecf0220f6f
commit 3762ae4baf
3 changed files with 148 additions and 39 deletions

View File

@@ -1,29 +1,106 @@
use <inserts.scad>
use <threads.scad> include <BOSL/constants.scad>
use <BOSL/shapes.scad>
use <BOSL/transforms.scad>
use <BOSL/threading.scad>
use <inserts/inserts.scad>
use <threads/threads.scad>
$fa = ($preview) ? 12 : 1;
$fs = ($preview) ? 2 : 1;
$incolor = true; $incolor = true;
// Config // Config
BallDiameter = 65; BallDiameter = 65;
BallClearance = 2; BallClearance = 4;
BallSealWidth = 3; BallSealWidth = 6;
PlateLip = 2; PlateLip = 4;
PlateDiameter = BallDiameter + 2*(BallClearance + BallSealWidth + PlateLip); PlateDiameter = BallDiameter + 2*(BallClearance + BallSealWidth + PlateLip);
PlateThick = BallSealWidth/2 + 1; 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(); //plate_full();
PlateSep = 0;
pd = PlateDiameter+PlateSep; pd = PlateDiameter+PlateSep;
pt = PlateThick; pt = PlateThick;
wt=BallSealWidth;
echo("PD=", pd); echo("PD=", pd);
translate([pd+5,0]) plate_top(thickness=pt); //translate([pd+15,0]) plate_top(thickness=pt);
translate([0,pd+5]) plate_mid(thickness=pt); //translate([0,pd+15]) plate_mid(thickness=pt);
translate([pd+5,pd+5]) cap_compression(PlateDiameter, pt); //translate([pd+15,pd+i15]) cap_compression(PlateDiameter, pt+8);
translate([-(pd+5),0]) mold_wall(PlateDiameter, pt, BallDiameter); //translate([-(pd+15),0]) mold_wall(PlateDiameter, pt, BallDiameter);
translate([0,-(pd+5)]) plate_under(); //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) { module stack(pt, ed=10 ,expand=false) {
d = expand ? pt + ed : pt+.01; 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; threadc = $incolor ? "green" : undef;
ptol = 2; ptol = 2;
wh = bd/2+pt+sd; wh = bd/2+pt+sd;
od = pd + 2*wt;
difference() { difference() {
union() { union() {
translate([0,0,2]) cylinder(d=pd, h=wh); translate([0,0,6]) cylinder(d=od, h=wh);
color(threadc) metric_thread( color(threadc) threaded_rod(
diameter=pd+ptol, d=od,
length=4.01, l=6,
internal=false); internal=false, align=V_TOP);
//color(threadc) metric_thread(
// diameter=pd+ptol,
// length=4.01,
// internal=false);
} }
translate([0,0,-.1]) translate([0,0,-2.1+pt])
cylinder(d1=pd-wt, d2=pd-wt-3, h=wh+4+.2); 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) { module bottom(pd, wt=3, wh=10, fh=2) {
td=pd+2; id = pd + 2*wt + .4;
od = id + 2*wt;
difference() { difference() {
cylinder(d=td+wt, h=th); cylinder(d=od, h=wh);
translate([0,0,-.01]) cylinder(d=3, h=5); translate([0,0,fh]) cylinder(d=id, h=wh);
translate([0,0,-.01]) cylinder(d=6, h=3); }
translate([0,0,2*pt]) metric_thread(diameter=td,length=th+.01, internal=true); }
if (register && ! key)
translate([0,0,2*pt]) register_seal();
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-2]) register_seal();
cylinder(d=pd-5,h=10);
} }
if (register && key) if (register && key)
translate([0,0,2*pt]) register_seal(); translate([0,0,2*pt-2]) register_seal();
} }
module plate( module plate(
@@ -74,19 +168,30 @@ module plate(
} }
module plate_mid(thickness = 1) { module plate_mid(thickness = 1) {
th=thickness;
translate([0,0,thickness]) { translate([0,0,thickness]) {
ball(bottom=false); //ball(bottom=false);
difference() {
union() {
plate(thickness=thickness); plate(thickness=thickness);
register_seal(); 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) { module plate_top(thickness = 1) {
translate([0,0,thickness]) { translate([0,0,thickness]) {
ball(bottom=false); //ball(bottom=false);
difference() { difference() {
plate(thickness=thickness); plate(thickness=thickness);
register_seal(); 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]) rotate([0,rot,0])
thread_insertM25($die=true); thread_insertM25($die=true);
} }
if (! bottom) //if (! bottom)
rotate([0,0,0]) // rotate([0,0,0])
thread_insertM25($die=true); // thread_insertM25($die=true);
} }
} }
} }

View File

@@ -5,7 +5,7 @@ $fs = ($preview) ? 2 : 1;
$fn = undef; $fn = undef;
// Config // Config
BallDiameter = 65; BallDiameter = 79;
BallClearance = 2; BallClearance = 2;
BallSealWidth = 2; BallSealWidth = 2;
PlateLip = 2; PlateLip = 2;

View File

@@ -3,7 +3,11 @@ $fa = $preview ? 12 : 4;
$fs = $preview ? 2 : .4; $fs = $preview ? 2 : .4;
difference() { difference() {
union() {
cylinder(d1=4.5, d2=8, h=10.5); 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,-.5]) cylinder(d=3, h=11);
translate([0,0,10]) cylinder(d=4.5, h=1); translate([0,0,10]) cylinder(d=4.5, h=1);
translate([0,0,10]) cylinder(d=6, h=11);
} }