]> www.fi.muni.cz Git - things.git/commitdiff
vesak pro Fildovu aktovku
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 15 Sep 2023 12:52:37 +0000 (14:52 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 15 Sep 2023 12:52:37 +0000 (14:52 +0200)
vesak-filip-aktovka.scad [new file with mode: 0644]

diff --git a/vesak-filip-aktovka.scad b/vesak-filip-aktovka.scad
new file mode 100644 (file)
index 0000000..2d8ae6c
--- /dev/null
@@ -0,0 +1,81 @@
+include <yenyalib.scad>;
+
+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();