-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);
+hole_d = 35;
+hole_l = 1.25*hole_d;
+hole_xoff = 0.2*(bottom_w-hole_d);
+hole_yoff = bottom_h - 0.2*hole_d;
+hole_top_yoff = 7;
+hole_top_l = 20;
+hook_top_rx = 8;
+hook_top_ry = 12;
+module bottom_part() {
+ difference() {
+ hull() {
+ Tx(-inner_w/2) Ty(-inner_w_round_r)
+ cube([inner_w, wall/2, body_h]);
+ Ty(-bottom_h) cylinder(r = bottom_w/2, h = body_h);
+ }
+ // main hole
+ difference() {
+ hull() {
+ translate([hole_xoff, -hole_yoff, -eps])
+ cylinder(r = hole_d/2, h = body_h+2*eps);
+ translate([hole_xoff,
+ -hole_yoff-hole_d+hole_l, -eps])
+ cylinder(r = hole_d/2, h = body_h+2*eps);
+ }
+ // rounded hook inner bottom
+ translate([-inner_w/2, -hole_yoff-hole_d/2, body_h/2])
+ Sy(0.7)
+ Ry(90)
+ cylinder(r = 0.55*body_h, h = inner_w);
+ }
+ // cut to the top
+ hull() {
+ translate([inner_w/2+inner_w_round_r,
+ -hole_top_l-hole_top_yoff, -eps])
+ cube([eps, hole_top_l, body_h+2*eps]);
+ translate([hole_xoff, -hole_yoff-hole_d+hole_l, -eps])
+ intersection() {
+ cylinder(r = hole_d/2, h = body_h+2*eps);
+ translate([-infty, 0, -infty/2])
+ cube(infty);
+ }
+ }
+ // rounded hook end
+ difference() {
+ translate([hole_xoff, -hole_yoff, -eps])
+ cube([inner_w/2, hole_l-hole_d/2, body_h+2*eps]);
+ translate([hole_xoff + hole_d/2 + hook_top_rx - 2*eps,
+ -hole_yoff, -2*eps])
+ Sy(hook_top_ry/hook_top_rx)
+ cylinder(r = hook_top_rx, h = body_h + 4*eps);
+ }