From: Jan "Yenya" Kasprzak Date: Fri, 22 Sep 2023 05:51:39 +0000 (+0200) Subject: mrizka do koupelny X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?p=things.git;a=commitdiff_plain;h=a3b95b09e469daf983ccc6acd06291175a07bdf8 mrizka do koupelny --- diff --git a/koupelna-mrizka.scad b/koupelna-mrizka.scad new file mode 100644 index 0000000..51ff056 --- /dev/null +++ b/koupelna-mrizka.scad @@ -0,0 +1,73 @@ +include + +sdk = 12; +d_in = 104; +d_out = 140; +wall = 1.2; +h_out = 3; +h_in = h_out + 8.5; +out_angle = 60; +thin_wall = 0.9; +rib_angle = 60; +rib_w = 5; +rib_dist = 9; +rib_off = 1; +top_beam_w = 15; +top_beam_h = 2; + +clip_wall = 3; +clip_mid = clip_wall + 3; + +magnet_d = 10 + 0.5; +magnet_h = 0.8 + 0.1; + +magnet_off = d_in/2 - 1.5*magnet_d; + +$fn = 256; + +difference() { + cylinder(r1 = d_out/2-h_out*cos(out_angle), + r2 = d_out/2, + h = h_out); + Tz(wall) cylinder(r1 = d_out/2-wall-h_out*cos(out_angle), + r2 = d_out/2-wall, + h = h_out); + Tz(-eps) cylinder(r = d_in/2-wall+eps, h = wall+2*eps); +} + +difference() { + cylinder(r = d_in/2, h = h_in); + Tz(-eps) cylinder(r = d_in/2-wall, h = h_in + 2*eps); +} + +difference() { + intersection() { + cylinder(r = d_in/2-wall/2, h = h_in); + union() { + for(i = [-d_in/2+rib_off:rib_dist:d_in/2]) Tx(i) Ty(-d_in/2) { + Tx(-rib_w/2) cube([rib_w, d_in, thin_wall]); + Tx(rib_w/2)Ry(-rib_angle) cube([h_in/cos(rib_angle), d_in, thin_wall]); + } + translate([-d_in/2, -top_beam_w/2, h_in-top_beam_h]) + cube([d_in, top_beam_w, top_beam_h]); + } + } + for (x = [-1, 1]) Sx(x) Tx(magnet_off) Tz(h_in-magnet_h) + cylinder(r = magnet_d/2, h = magnet_h+eps); +} + +Ty(d_out/2 + top_beam_w/2 + 5) difference() { + union() { + hull() for(x = [-1, 1]) Sx(x) { + Tx(d_out/2-top_beam_w/2) + cylinder(r = top_beam_w/2, h = clip_wall); + } + hull() for(x = [-1, 1]) Sx(x) { + Tx(d_in/2-top_beam_w/2) + cylinder(r = top_beam_w/2, h = clip_mid); + } + } + for (x = [-1, 1]) Sx(x) Tx(magnet_off) Tz(clip_mid-magnet_h) + cylinder(r = magnet_d/2, h = magnet_h+eps); + +}