]> www.fi.muni.cz Git - things.git/commitdiff
elliptical pulley
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 27 Mar 2018 15:25:44 +0000 (17:25 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 27 Mar 2018 15:25:44 +0000 (17:25 +0200)
pulley-elliptical.scad [new file with mode: 0644]

diff --git a/pulley-elliptical.scad b/pulley-elliptical.scad
new file mode 100644 (file)
index 0000000..0329f10
--- /dev/null
@@ -0,0 +1,35 @@
+infty = 100;
+eps = 0.01;
+
+wall = 0.6;            // minimum wall
+d_x = 25;              // inner diameter in the X axis
+y_scale = 0.5;         // scale y/x
+height = 2.5;           // height of the rim
+
+module half(d_x, y_scale, height) {
+       hull($fn = 128) {
+               scale([1, (d_x*y_scale+height)/(d_x+height), 1])
+                       cylinder(r = d_x/2 + height/2, h = eps);
+               translate([0, 0, height/2])
+                       scale([1, y_scale, 1])
+                       cylinder(r = d_x/2, h = eps);
+       }
+}
+
+module pulley(d_x, y_scale, height, center_hole_d) {
+       difference() {
+               union() {
+                       half(d_x, y_scale, height);
+                       translate([0, 0, height]) scale([1, 1, -1])
+                               half(d_x, y_scale, height);
+               }
+               translate([0, 0, -eps])
+                       cylinder(r = center_hole_d/2, h = height + 2*eps);
+       }
+}
+
+pulley(d_x = 15, y_scale = 0.5, height=2.5, center_hole_d = 3);
+
+translate([0, 20, 0])
+pulley(d_x = 30, y_scale = 0.5, height=2.5, center_hole_d = 5);
+