include ; eps = 0.01; infty = 200; wall = 10; width = 20; top_h = wall * 1.5; top_hole_w = 40 + 1; top_back_h = wall*1.5; beam_h = 10; bottom_hole_w = 15; bottom_hole_r = 1.2*width; bottom_h = 40; front_h = 20; module valcova_usec(r, w, h) { intersection() { tx(-sqrt(r^2 - (h/2)^2)) tz(h/2) rx(-90) cylinder(r = r, h = w); cube([r, w, h]); } } module vesak() { // top front intersection() { sx(top_h/wall) cylinder(r = wall, h = width); cube(infty); } // top back ty(-top_hole_w) intersection() { sx(top_back_h/wall) cylinder(r = wall, h = width); translate([-infty, -infty, 0]) cube(infty); } // top intersection() { sx(top_h/(top_hole_w+wall)) cylinder(r = top_hole_w + wall, h = width); ty(-infty) cube(infty); } // beam tx(-beam_h) cube([beam_h, wall, width]); // bottom tx(-beam_h) intersection() { sy((bottom_hole_w+2*wall)/bottom_h) cylinder(r = bottom_h, h = width); tx(-infty) cube(infty); } // hook front translate([-beam_h, bottom_hole_w+wall, 0]) cube([front_h, wall, width]); // hook rounded top translate([front_h-beam_h, bottom_hole_w+wall, 0]) valcova_usec(bottom_hole_r, wall, width); // hook rounded bottom translate([-beam_h, wall, 0]) valcova_usec(bottom_hole_r, bottom_hole_w, width); } $fn = 128; round_with() { union() { for (z = [-1, 1]) sz(z) cylinder(r1 = 1, r2 = 0, h = 2, $fn = 32); } vesak(); } // round_edges(1) vesak();