From f75641f364d085501e04f29e34ef8cb1620aadff Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sun, 6 Jul 2014 06:41:16 +0000 Subject: [PATCH] ball end --- ball-end.scad | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ball-end.scad diff --git a/ball-end.scad b/ball-end.scad new file mode 100644 index 0000000..f316f9c --- /dev/null +++ b/ball-end.scad @@ -0,0 +1,33 @@ +$fn=40; +HOLE_RADIUS=2.4; // my Wanhao Duplicator 4 makes no errors with Slic3r, 2.4mm is ideal lego hole + +difference() { + union() { + translate([0, 0, 16+4]) sphere(r=3); + hull() { + translate([0, 0, 4]) cylinder(r=4, h=4+8); + translate([0, 0, 4]) cylinder(r=1.5, h=4+8+3); + } + translate([0, 4, 4]) rotate([90, 0, 0]) cylinder(r=4, h=8); + } + translate([0, 4.1, 4-0.1]) rotate([90, 0, 0]) linear_extrude(height=8.2) axle(); +} + +module axle() { + axle_gap = 1.95; + union() { + translate([-HOLE_RADIUS, -axle_gap/2, 0]) + roundedRect(HOLE_RADIUS * 2, axle_gap, .2); + translate([-axle_gap/2, -HOLE_RADIUS, 0]) + roundedRect(axle_gap, HOLE_RADIUS * 2, .2); + } +} + +module roundedRect(x, y, radius) { + hull() { + translate([radius, radius, 0]) circle(r=radius); + translate([x - radius, radius, 0]) circle(r=radius); + translate([x - radius, y - radius, 0]) circle(r=radius); + translate([radius, y - radius, 0]) circle(r=radius); + } +}