use use //$fa = ($preview) ? 12 : .01; //$fs = ($preview) ? 2 : .01; //$fn = ($preview) ? 0 : 27; $incolor = false; module ball() { bd=65; difference() { sphere(d=bd); translate([0,0,bd/2])thread_insertM3($die=true); translate([0,0,-bd/2]) rotate(0,180,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) { color($incolor ? "yellow" : undef) cylinder(d=95, h=4); translate([0,0,4]) { difference() { color($incolor ? "lightblue" : undef) sphere(d=bd); translate([0,0,-70/2])cylinder(d=95, h=70/2); } cylinder(d=10, id=bd/2); color($incolor ? "red" : undef) ring(d=5, id=bd+5); cylinder(d=8, h=bd/2+5); } 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); } } module middle_top(bd) { difference() { color($incolor ? "yellow" : undef) cylinder(d=95, h=4); translate([0,0,4]) color($incolor ? "red" : undef ) ring(d=5, id=bd+5); } translate([0,0,4]) { difference() { color("lightblue") 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() { 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); } } module middle_bottom(bd) { difference() { color($incolor ? "yellow" : undef) cylinder(d=95, h=4); translate([0,0,4]) color($incolor ? "red" : undef) 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); } } translate([100,100]) top(bd=BallD); middle(bd=BallD); translate([0,100]) middle_bottom(bd = BallD); translate([100,0]) middle_top(bd = BallD);