diff options
-rw-r--r-- | lampenhalter.scad | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lampenhalter.scad b/lampenhalter.scad new file mode 100644 index 0000000..8a9c545 --- /dev/null +++ b/lampenhalter.scad @@ -0,0 +1,39 @@ +t = 50; +w = 20; +wi = 15; +h = 5; +d = 1; + +aw = 4; +at = 5; +ad = 2; + +cr = 2; + +module round_corner(r, h) { + translate([-r, -r, 0]) + difference() { + cube(size=[r, r, h]); + cylinder(h=h, r=r, $fn=50); + } +} + +difference() { + union() { + cube(size = [w,t,h], center=false); + }; + union() { + // rail negative + translate([d, d, d]) cube(size = [w-2*d,t,h-2*d], center=false); + translate([(w-wi)/2, d, h-d]) cube(size = [wi, t, d], center=false); + + // retainer hole + translate([(w-aw)/2, t-at-ad, 0]) cube(size = [aw, at, 2*d]); + + // round corners + translate([0, 0, 0]) rotate(a=180) round_corner(r=cr, h=h); + translate([w, 0, 0]) rotate(a=270) round_corner(r=cr, h=h); + translate([w, t, 0]) rotate(a=0 ) round_corner(r=cr, h=h); + translate([0, t, 0]) rotate(a=90 ) round_corner(r=cr, h=h); + } +} |