160 lines
3.2 KiB
OpenSCAD
160 lines
3.2 KiB
OpenSCAD
use <inserts.scad>
|
|
use <threads.scad>
|
|
|
|
|
|
$fa = ($preview) ? 12 : 1;
|
|
$fs = ($preview) ? 2 : 1;
|
|
$incolor = false;
|
|
|
|
module ball(insert=true, top = true, bottom = true) {
|
|
bd=65;
|
|
difference() {
|
|
intersection() {
|
|
sphere(d=bd);
|
|
for (i = [-1, 1])
|
|
if ((i<0 && bottom) || (i>0 && top))
|
|
translate([0,0,i*bd/2])
|
|
cube([bd, bd, bd],center=true);
|
|
}
|
|
if (insert) for (iz = [-bd/2, bd/2]) {
|
|
rot = (iz < 0) ? 180 : 0;
|
|
//translate([0,0,bd/2])thread_insertM3($die=true);
|
|
translate([0,0,iz])
|
|
rotate([0,rot,0]) thread_insertM3($die=true);
|
|
}
|
|
}
|
|
}
|
|
|
|
module post() {
|
|
translate([0,0,0])cylinder(d=6, h=77, center=true);
|
|
}
|
|
|
|
module underball() {
|
|
translate([0,0,0]) intersection() {
|
|
cylinder(d=65, h=5, center=true);
|
|
translate([0,0,-48]) sphere(d=100, $fa=3);
|
|
}
|
|
|
|
translate([0,0,5])
|
|
cylinder(d=55, h=10, center=true);
|
|
translate([0,0,9])
|
|
rotate_extrude(angle=360)
|
|
translate([10+15/2,0,0])
|
|
circle(d=20);
|
|
}
|
|
|
|
module ring(d,id) {
|
|
rotate_extrude(angle=360) translate([(d+id)/2,0,0])circle(d=d);
|
|
}
|
|
|
|
//ball();
|
|
|
|
//underball();
|
|
BallD = 65;
|
|
module top(
|
|
bd,
|
|
c_base = $incolor ? "yellow" : undef,
|
|
c_seal = $incolor ? "red" : undef,
|
|
c_ins = $incolod ? "silver" : undef
|
|
) {
|
|
color(c_base) cylinder(d=95, h=4);
|
|
translate([0,0,4]) {
|
|
difference() {
|
|
color(c_base) sphere(d=bd);
|
|
translate([0,0,-70/2])cylinder(d=95, h=70/2);
|
|
}
|
|
cylinder(d=10, id=bd/2);
|
|
color(c_seal) ring(d=5, id=bd+5);
|
|
cylinder(d=8, h=bd/2+5);
|
|
}
|
|
cylinder(d=100, h=1+8);
|
|
translate([0,0,1+8-8])
|
|
metric_thread(diameter=95,length=8.01, internal=true);
|
|
|
|
cylinder(d=92, h=1+6);
|
|
}
|
|
|
|
module middle_top(
|
|
bd,
|
|
c_base = $incolor ? "yellow" : undef,
|
|
c_seal = $incolor ? "red" : undef,
|
|
c_ins = $incolod ? "silver" : undef
|
|
) {
|
|
difference() {
|
|
color(c_base) cylinder(d=95, h=4);
|
|
translate([0,0,4])
|
|
color(c_seal)
|
|
ring(d=5, id=bd+5);
|
|
}
|
|
translate([0,0,4]) {
|
|
difference() {
|
|
color(c_base) sphere(d=bd);
|
|
translate([0,0,-70/2])cylinder(d=95, h=70/2);
|
|
}
|
|
cylinder(d=10, id=bd/2);
|
|
cylinder(d=8, h=bd/2+4);
|
|
}
|
|
difference() {
|
|
cylinder(d=100, h=1+8);
|
|
translate([0,0,1+8-8])
|
|
metric_thread(diameter=95, length=8.01, internal=true);
|
|
|
|
cylinder(d=92, h=1+6);
|
|
}
|
|
|
|
}
|
|
|
|
module middle_bottom(
|
|
bd,
|
|
c_base = $incolor ? "yellow" : undef,
|
|
c_seal = $incolor ? "red" : undef,
|
|
c_ins = $incolod ? "silver" : undef
|
|
|
|
) {
|
|
difference() {
|
|
color(c_base) cylinder(d=95, h=4);
|
|
translate([0,0,4]) color(c_seal) ring(d=5, id=bd+5);
|
|
}
|
|
translate([0,0,4]) {
|
|
underball();
|
|
cylinder(d=10, id=bd/2);
|
|
cylinder(d=8, h=20);
|
|
}
|
|
difference() {
|
|
union() {
|
|
cylinder(d=100, h=1+8);
|
|
}
|
|
translate([0,0,1+8-8])metric_thread(diameter=95,length=8.01, internal=true);
|
|
|
|
cylinder(d=92, h=1+6);
|
|
}
|
|
|
|
}
|
|
// 20 + bd/2+4
|
|
module middle(bd, bh=20) {
|
|
tot = bd/2 + bh;
|
|
th = 2*8;
|
|
midl=tot-th;
|
|
difference() {
|
|
union() {
|
|
translate([0,0,8])cylinder(d=100, h=midl);
|
|
metric_thread(diameter=95,length=8.01);
|
|
translate([0,0,8+midl]) metric_thread(diameter=95,length=8.01);
|
|
|
|
}
|
|
|
|
translate([0,0,-.01]) cylinder(d=92, h=tot+1);
|
|
}
|
|
}
|
|
|
|
module plate_full() {
|
|
translate([100,100]) top(bd=BallD);
|
|
middle(bd=BallD);
|
|
translate([0,100]) middle_bottom(bd = BallD);
|
|
translate([100,0]) middle_top(bd = BallD);
|
|
}
|
|
|
|
//plate_full();
|
|
|
|
ball(bottom=false);
|