From 2e61345df1e55138415676f016fca99e112cb5c3 Mon Sep 17 00:00:00 2001 From: "Jan \"Yenya\" Kasprzak" Date: Mon, 13 Nov 2023 07:55:33 +0100 Subject: [PATCH] drzak na hlinikove pasky v koupelne --- lampa-koupelna.scad | 98 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 lampa-koupelna.scad diff --git a/lampa-koupelna.scad b/lampa-koupelna.scad new file mode 100644 index 0000000..e2d7b66 --- /dev/null +++ b/lampa-koupelna.scad @@ -0,0 +1,98 @@ +include + +sirka 17.8 +vyska 9.5 + +body_w = 15; +base_w = 30; +step1_h = 50; +step1_w = 20; +step1_off = 40; + +step2_h = 25; +step2_w = 15; +step2_off = 40; + +step23_plus = 7; + +step3_h = -step2_h; +step3_w = 10; +step3_off = 40; + +clip_wall = 1.5; +alu_w = 24 + 0.5; +alu_h = 8; +clip_end = 1; + +module clip() { + difference() { + cube([alu_w + 2*clip_wall, alu_h + clip_wall, body_w]); + translate([clip_wall, clip_wall, -eps]) + cube([alu_w, alu_h + eps, body_w + 2*eps]); + } + translate([clip_wall, alu_h + clip_wall - clip_end, 0]) + cylinder(r = clip_end, h = body_w, $fn = 4); + translate([clip_wall + alu_w, alu_h + clip_wall - clip_end, 0]) + cylinder(r = clip_end, h = body_w, $fn = 4); +} + +module body() { + // cube to prevent rounded bottom + Ty(-10) cube([base_w, 10, body_w]); + // step 1 + hull () { + cube([base_w, eps, body_w]); + translate([step1_off, step1_h, 0]) + cube([step1_w, eps, body_w]); + } + + // step 2 + translate([step1_off, step1_h, 0]) hull() { + cube([step1_w, eps, body_w]); + translate([step2_off, step2_h, 0]) + cube([step2_w, eps, body_w]); + } + + // under the top corner + translate([step1_off + step2_off, step1_h + step2_h - step23_plus, 0]) + cube([step2_w, step23_plus, body_w]); + // step 3 + translate([step1_off + step2_off, step1_h + step2_h, 0]) hull() { + cube([step2_w, eps, body_w]); + translate([step3_off, step3_h, 0]) + cube([step3_w, eps, body_w]); + } +} + +screw_d1 = 3.5; +screw_wall = 3; +screw_d2 = 9; +screw_off = 10; + +difference() { + round_with() { + union() { + Mz() cylinder(r1 = 1, r2 = 0, h = 2); + } + body(); + } + // cut bottom + translate([-infty/2, -infty, -infty/2]) cube(infty); + translate([screw_off, -eps, body_w/2]) + Rx(-90) + cylinder(r = screw_d1/2, h = screw_wall + 2*eps, $fn = 6); + translate([screw_off, screw_wall, body_w/2]) + Rx(-90) + cylinder(r = screw_d2/2, h = step1_h, $fn = 6); +} + + // upper clip + translate([step1_off + step2_off + step2_w/2-alu_w/2-clip_wall, + step1_h + step2_h - clip_wall, 0]) + clip(); + + // lower clip + translate([step1_off+step2_off+step3_off+step3_w/2-alu_w/2-clip_wall, + step1_h + step2_h + step3_h + clip_wall, 0]) + Sy(-1) clip(); + -- 2.43.0