Cleanup and add ball intersections
This commit is contained in:
95
Baller.scad
95
Baller.scad
@@ -2,17 +2,26 @@ use <inserts.scad>
|
|||||||
use <threads.scad>
|
use <threads.scad>
|
||||||
|
|
||||||
|
|
||||||
//$fa = ($preview) ? 12 : .01;
|
$fa = ($preview) ? 12 : 1;
|
||||||
//$fs = ($preview) ? 2 : .01;
|
$fs = ($preview) ? 2 : 1;
|
||||||
//$fn = ($preview) ? 0 : 27;
|
|
||||||
$incolor = false;
|
$incolor = false;
|
||||||
|
|
||||||
module ball() {
|
module ball(insert=true, top = true, bottom = true) {
|
||||||
bd=65;
|
bd=65;
|
||||||
difference() {
|
difference() {
|
||||||
|
intersection() {
|
||||||
sphere(d=bd);
|
sphere(d=bd);
|
||||||
translate([0,0,bd/2])thread_insertM3($die=true);
|
for (i = [-1, 1])
|
||||||
translate([0,0,-bd/2]) rotate(0,180,0) thread_insertM3($die=true);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,8 +35,12 @@ module underball() {
|
|||||||
translate([0,0,-48]) sphere(d=100, $fa=3);
|
translate([0,0,-48]) sphere(d=100, $fa=3);
|
||||||
}
|
}
|
||||||
|
|
||||||
translate([0,0,5]) cylinder(d=55, h=10, center=true);
|
translate([0,0,5])
|
||||||
translate([0,0,9]) rotate_extrude(angle=360) translate([10+15/2,0,0])circle(d=20);
|
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) {
|
module ring(d,id) {
|
||||||
@@ -38,55 +51,69 @@ module ring(d,id) {
|
|||||||
|
|
||||||
//underball();
|
//underball();
|
||||||
BallD = 65;
|
BallD = 65;
|
||||||
module top(bd) {
|
module top(
|
||||||
color($incolor ? "yellow" : undef) cylinder(d=95, h=4);
|
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]) {
|
translate([0,0,4]) {
|
||||||
difference() {
|
difference() {
|
||||||
color($incolor ? "lightblue" : undef) sphere(d=bd);
|
color(c_base) sphere(d=bd);
|
||||||
translate([0,0,-70/2])cylinder(d=95, h=70/2);
|
translate([0,0,-70/2])cylinder(d=95, h=70/2);
|
||||||
}
|
}
|
||||||
cylinder(d=10, id=bd/2);
|
cylinder(d=10, id=bd/2);
|
||||||
color($incolor ? "red" : undef) ring(d=5, id=bd+5);
|
color(c_seal) ring(d=5, id=bd+5);
|
||||||
cylinder(d=8, h=bd/2+5);
|
cylinder(d=8, h=bd/2+5);
|
||||||
}
|
}
|
||||||
difference() {
|
|
||||||
union() {
|
|
||||||
cylinder(d=100, h=1+8);
|
cylinder(d=100, h=1+8);
|
||||||
}
|
translate([0,0,1+8-8])
|
||||||
translate([0,0,1+8-8])metric_thread(diameter=95,length=8.01, internal=true);
|
metric_thread(diameter=95,length=8.01, internal=true);
|
||||||
|
|
||||||
cylinder(d=92, h=1+6);
|
cylinder(d=92, h=1+6);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module middle_top(bd) {
|
module middle_top(
|
||||||
|
bd,
|
||||||
|
c_base = $incolor ? "yellow" : undef,
|
||||||
|
c_seal = $incolor ? "red" : undef,
|
||||||
|
c_ins = $incolod ? "silver" : undef
|
||||||
|
) {
|
||||||
difference() {
|
difference() {
|
||||||
color($incolor ? "yellow" : undef) cylinder(d=95, h=4);
|
color(c_base) cylinder(d=95, h=4);
|
||||||
translate([0,0,4]) color($incolor ? "red" : undef ) ring(d=5, id=bd+5);
|
translate([0,0,4])
|
||||||
|
color(c_seal)
|
||||||
|
ring(d=5, id=bd+5);
|
||||||
}
|
}
|
||||||
translate([0,0,4]) {
|
translate([0,0,4]) {
|
||||||
difference() {
|
difference() {
|
||||||
color("lightblue") sphere(d=bd);
|
color(c_base) sphere(d=bd);
|
||||||
translate([0,0,-70/2])cylinder(d=95, h=70/2);
|
translate([0,0,-70/2])cylinder(d=95, h=70/2);
|
||||||
}
|
}
|
||||||
cylinder(d=10, id=bd/2);
|
cylinder(d=10, id=bd/2);
|
||||||
cylinder(d=8, h=bd/2+4);
|
cylinder(d=8, h=bd/2+4);
|
||||||
}
|
}
|
||||||
difference() {
|
difference() {
|
||||||
union() {
|
|
||||||
cylinder(d=100, h=1+8);
|
cylinder(d=100, h=1+8);
|
||||||
}
|
translate([0,0,1+8-8])
|
||||||
translate([0,0,1+8-8])metric_thread(diameter=95,length=8.01, internal=true);
|
metric_thread(diameter=95, length=8.01, internal=true);
|
||||||
|
|
||||||
cylinder(d=92, h=1+6);
|
cylinder(d=92, h=1+6);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module middle_bottom(bd) {
|
module middle_bottom(
|
||||||
|
bd,
|
||||||
|
c_base = $incolor ? "yellow" : undef,
|
||||||
|
c_seal = $incolor ? "red" : undef,
|
||||||
|
c_ins = $incolod ? "silver" : undef
|
||||||
|
|
||||||
|
) {
|
||||||
difference() {
|
difference() {
|
||||||
color($incolor ? "yellow" : undef) cylinder(d=95, h=4);
|
color(c_base) cylinder(d=95, h=4);
|
||||||
translate([0,0,4]) color($incolor ? "red" : undef) ring(d=5, id=bd+5);
|
translate([0,0,4]) color(c_seal) ring(d=5, id=bd+5);
|
||||||
}
|
}
|
||||||
translate([0,0,4]) {
|
translate([0,0,4]) {
|
||||||
underball();
|
underball();
|
||||||
@@ -120,7 +147,13 @@ module middle(bd, bh=20) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
translate([100,100]) top(bd=BallD);
|
module plate_full() {
|
||||||
middle(bd=BallD);
|
translate([100,100]) top(bd=BallD);
|
||||||
translate([0,100]) middle_bottom(bd = BallD);
|
middle(bd=BallD);
|
||||||
translate([100,0]) middle_top(bd = BallD);
|
translate([0,100]) middle_bottom(bd = BallD);
|
||||||
|
translate([100,0]) middle_top(bd = BallD);
|
||||||
|
}
|
||||||
|
|
||||||
|
//plate_full();
|
||||||
|
|
||||||
|
ball(bottom=false);
|
||||||
|
|||||||
Reference in New Issue
Block a user