From: Jan "Yenya" Kasprzak Date: Tue, 21 Nov 2023 06:53:30 +0000 (+0100) Subject: led-strip-end-round.scad printed version X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=f6e342c35968d126bfd09be6398821d35be15b1e;p=things.git led-strip-end-round.scad printed version --- diff --git a/led-strip-end-round.scad b/led-strip-end-round.scad index a901a3f..9dd4d50 100644 --- a/led-strip-end-round.scad +++ b/led-strip-end-round.scad @@ -1,8 +1,11 @@ include base_wall = 0.6; +// base_wall = 0.45*3; inside_z = base_wall + 5; +inside_wall = 0.45*3; +/* base_w = 18; base_h1 = 7.5; base_h2 = 14; @@ -13,39 +16,60 @@ inside_h = 3.9-0.2; inside_w1 = inside_w - 2; inside_h1 = 2; +*/ -/* base_w = 23.5; base_h1 = 10; base_h2 = 11; -inside_yoff = 1; -inside_w = 21; +inside_yoff = 1.3; +inside_w = 20.9; inside_h = 1.8; inside_w1 = inside_w - 2; inside_h1 = 2; + +/* +cable_w = 7; +cable_h = 3 + inside_yoff; */ -// base -union() { - intersection() { - let(r = (base_w^2)/(8*(base_h2-base_h1)) - + (base_h2-base_h1)/2) - Ty(-r+base_h2) - cylinder(r = r, h = base_wall, $fn = 256); - Tx(-base_w/2) cube([base_w, infty, base_wall]); +module body() { + // base + union() { + intersection() { + let(r = (base_w^2)/(8*(base_h2-base_h1)) + + (base_h2-base_h1)/2) + Ty(-r+base_h2) + cylinder(r = r, h = base_wall, $fn = 256); + Tx(-base_w/2) cube([base_w, infty, base_wall]); + } + Tx(-base_w/2) cube([base_w, base_h1, base_wall]); } - Tx(-base_w/2) cube([base_w, base_h1, base_wall]); -} -// inside -Tx(-inside_w/2) Ty(inside_yoff) - cube([inside_w, inside_h, inside_z]); + difference() { + union() { + // inside + Tx(-inside_w/2) Ty(inside_yoff) + cube([inside_w, inside_h, inside_z]); + + // inside upper + Tx(-inside_w1/2) Ty(inside_yoff+inside_h-eps) + cube([inside_w1, inside_h1+eps, inside_z]); + } + translate([-inside_w1/2+inside_wall, + inside_yoff+inside_wall, -eps]) + cube([inside_w1-2*inside_wall, + inside_h + inside_h1, inside_z+2*eps]); + } +} -// innside higher part -if (inside_w1 > 0) { - Tx(-inside_w1/2) Ty(inside_yoff+inside_h-eps) - cube([inside_w1, inside_h1+eps, inside_z]); +difference() { + body(); + // cable hole + if (cable_w != undef) { + translate([-cable_w/2, -eps, -eps]) + cube([cable_w, cable_h+eps, inside_z+2*eps]); + } }