2026-03-21 07:46:14 -04:00
|
|
|
|
|
|
|
|
include <BOSL/constants.scad>
|
|
|
|
|
use <BOSL/shapes.scad>
|
|
|
|
|
use <BOSL/transforms.scad>
|
|
|
|
|
use <BOSL/threading.scad>
|
|
|
|
|
|
|
|
|
|
use <inserts/inserts.scad>
|
|
|
|
|
use <threads/threads.scad>
|
2021-01-14 15:44:07 -05:00
|
|
|
|
|
|
|
|
|
2021-01-16 09:39:35 -05:00
|
|
|
$incolor = true;
|
2021-01-14 15:44:07 -05:00
|
|
|
|
2021-01-16 09:39:35 -05:00
|
|
|
// Config
|
|
|
|
|
BallDiameter = 65;
|
2026-03-21 07:46:14 -04:00
|
|
|
BallClearance = 4;
|
|
|
|
|
BallSealWidth = 6;
|
|
|
|
|
PlateLip = 4;
|
2021-01-16 09:39:35 -05:00
|
|
|
PlateDiameter = BallDiameter + 2*(BallClearance + BallSealWidth + PlateLip);
|
|
|
|
|
PlateThick = BallSealWidth/2 + 1;
|
2026-03-21 07:46:14 -04:00
|
|
|
PlateSep = 0;
|
|
|
|
|
|
|
|
|
|
/* [Render Options] */
|
|
|
|
|
PreviewFA = 12;
|
|
|
|
|
RenderFA = 1;
|
|
|
|
|
PreviewFS = 2;
|
|
|
|
|
RenderFS = .1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$fa = ($preview) ? PreviewFA : RenderFA;
|
|
|
|
|
$fs = ($preview) ? PreviewFS : RenderFS;
|
2021-01-14 15:44:07 -05:00
|
|
|
|
2021-01-16 09:39:35 -05:00
|
|
|
//plate_full();
|
|
|
|
|
pd = PlateDiameter+PlateSep;
|
|
|
|
|
pt = PlateThick;
|
2026-03-21 07:46:14 -04:00
|
|
|
wt=BallSealWidth;
|
2021-01-16 09:39:35 -05:00
|
|
|
echo("PD=", pd);
|
2026-03-21 07:46:14 -04:00
|
|
|
//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]);
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-01-16 09:39:35 -05:00
|
|
|
|
|
|
|
|
module stack(pt, ed=10 ,expand=false) {
|
|
|
|
|
d = expand ? pt + ed : pt+.01;
|
|
|
|
|
for (i = [0:$children-1]) {
|
|
|
|
|
translate([0,0,d*i]) children(i);
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-21 07:46:14 -04:00
|
|
|
module mold_wall(pd, pt, bd, sd=4, wt=3, $incolor=$incolor) {
|
2021-01-16 09:39:35 -05:00
|
|
|
threadc = $incolor ? "green" : undef;
|
2021-10-26 20:53:48 -04:00
|
|
|
ptol = 2;
|
|
|
|
|
wh = bd/2+pt+sd;
|
2026-03-21 07:46:14 -04:00
|
|
|
od = pd + 2*wt;
|
2021-01-16 09:39:35 -05:00
|
|
|
difference() {
|
|
|
|
|
union() {
|
2026-03-21 07:46:14 -04:00
|
|
|
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);
|
2021-01-16 09:39:35 -05:00
|
|
|
}
|
2026-03-21 07:46:14 -04:00
|
|
|
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);
|
2021-01-16 09:39:35 -05:00
|
|
|
}
|
|
|
|
|
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
|
|
|
|
|
2026-03-21 07:46:14 -04:00
|
|
|
module bottom(pd, wt=3, wh=10, fh=2) {
|
|
|
|
|
id = pd + 2*wt + .4;
|
|
|
|
|
od = id + 2*wt;
|
|
|
|
|
|
2021-01-16 09:39:35 -05:00
|
|
|
difference() {
|
2026-03-21 07:46:14 -04:00
|
|
|
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);
|
2021-10-26 20:53:48 -04:00
|
|
|
if (register && ! key)
|
2026-03-21 07:46:14 -04:00
|
|
|
translate([0,0,2*pt-2]) register_seal();
|
|
|
|
|
cylinder(d=pd-5,h=10);
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
2021-10-26 20:53:48 -04:00
|
|
|
if (register && key)
|
2026-03-21 07:46:14 -04:00
|
|
|
translate([0,0,2*pt-2]) register_seal();
|
2021-01-16 09:39:35 -05:00
|
|
|
}
|
2021-01-14 15:44:07 -05:00
|
|
|
|
2021-01-16 09:39:35 -05:00
|
|
|
module plate(
|
|
|
|
|
d=PlateDiameter,
|
|
|
|
|
thickness = PlateThick)
|
|
|
|
|
{
|
|
|
|
|
translate([0,0,-thickness])
|
|
|
|
|
cylinder(d=d, h=thickness+.01);
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
|
|
|
|
|
2021-01-16 09:39:35 -05:00
|
|
|
module plate_mid(thickness = 1) {
|
2026-03-21 07:46:14 -04:00
|
|
|
th=thickness;
|
2021-01-16 09:39:35 -05:00
|
|
|
translate([0,0,thickness]) {
|
2026-03-21 07:46:14 -04:00
|
|
|
//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);
|
|
|
|
|
}
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
2021-01-16 09:39:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module plate_top(thickness = 1) {
|
|
|
|
|
translate([0,0,thickness]) {
|
2026-03-21 07:46:14 -04:00
|
|
|
//ball(bottom=false);
|
2021-01-14 15:44:07 -05:00
|
|
|
difference() {
|
2021-01-16 09:39:35 -05:00
|
|
|
plate(thickness=thickness);
|
|
|
|
|
register_seal();
|
2026-03-21 07:46:14 -04:00
|
|
|
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);
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
|
|
|
|
}
|
2021-01-16 09:39:35 -05:00
|
|
|
}
|
2021-01-14 15:44:07 -05:00
|
|
|
|
2021-01-16 09:39:35 -05:00
|
|
|
module plate_under(thickness = 1) {
|
|
|
|
|
translate([0,0,thickness]) {
|
|
|
|
|
underball();
|
|
|
|
|
plate(thickness=thickness);
|
|
|
|
|
register_seal();
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-15 09:40:59 -05:00
|
|
|
|
2021-01-16 09:39:35 -05:00
|
|
|
module ball(
|
|
|
|
|
bd=BallDiameter,
|
|
|
|
|
insert=true,
|
|
|
|
|
top = true,
|
|
|
|
|
bottom = true)
|
|
|
|
|
{
|
|
|
|
|
insertc = $incolor ? "gold" : undef;
|
|
|
|
|
maxz = top ? bd/2 : 0;
|
|
|
|
|
minz = bottom ? -bd/2 : 0;
|
|
|
|
|
echo("maxz:", maxz);
|
|
|
|
|
echo("minz:", minz);
|
2021-01-14 15:44:07 -05:00
|
|
|
difference() {
|
2021-01-16 09:39:35 -05:00
|
|
|
intersection() {
|
|
|
|
|
sphere(d=bd);
|
|
|
|
|
translate([0,0,(maxz+minz)/2])
|
|
|
|
|
cube([bd, bd, maxz-minz],center=true);
|
|
|
|
|
}
|
2021-10-26 20:53:48 -04:00
|
|
|
color(insertc) {
|
|
|
|
|
if (insert) for (iz = [-bd/2, bd/2]) {
|
|
|
|
|
rot = (iz < 0) ? 180 : 0;
|
|
|
|
|
translate([0,0,iz])
|
|
|
|
|
rotate([0,rot,0])
|
|
|
|
|
thread_insertM25($die=true);
|
|
|
|
|
}
|
2026-03-21 07:46:14 -04:00
|
|
|
//if (! bottom)
|
|
|
|
|
// rotate([0,0,0])
|
|
|
|
|
// thread_insertM25($die=true);
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
|
|
|
|
}
|
2021-01-16 09:39:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module register_seal(
|
|
|
|
|
bd = BallDiameter,
|
|
|
|
|
cl = BallClearance, // Clearance around ball
|
|
|
|
|
sw = BallSealWidth, // Width of register
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
rotate_extrude()
|
|
|
|
|
translate([bd/2+cl,0,0])
|
|
|
|
|
circle(d=sw);
|
2021-01-14 15:44:07 -05:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-16 09:39:35 -05:00
|
|
|
module underball() {
|
|
|
|
|
intersection() {
|
|
|
|
|
translate([0,0,9]) {
|
|
|
|
|
rotate_extrude(angle=360)
|
|
|
|
|
translate([10+15/2,0,0])
|
|
|
|
|
circle(d=20);
|
|
|
|
|
translate([0,0,-4])
|
|
|
|
|
cylinder(d=55, h=10, center=true);
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
2021-01-16 09:39:35 -05:00
|
|
|
cylinder(d=70,h=35);
|
2021-01-14 15:44:07 -05:00
|
|
|
}
|
|
|
|
|
}
|