--- /dev/null
+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);
+