diff options
Diffstat (limited to 'lampenhalter.scad')
-rw-r--r-- | lampenhalter.scad | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/lampenhalter.scad b/lampenhalter.scad index b70a3fd..1d5777f 100644 --- a/lampenhalter.scad +++ b/lampenhalter.scad @@ -33,26 +33,29 @@ module side() { polygon([[0,0], [0,h], [w2,h], [w2,h-d+s], [d,h-d], [d,0]]); } -difference() { - union() { - // base plate - cube([w, t, d]); - - // back - cube([w, d, h]); - - // sides and top - side(); - translate([w, 0, 0]) mirror() side(); - } - union() { - // retainer hole - translate([(w-aw)/2, t-at-ad, 0]) cube([aw, at, 2*d]); - - // round vertical 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); +module half() { + translate([-w/2, 0, 0]) + difference() { + union() { + // base plate + cube([w/2, t, d]); + + // back + cube([w/2, d, h]); + + // sides and top + side(); + } + union() { + // retainer hole + translate([(w-aw)/2, t-at-ad, 0]) cube([aw/2, at, 2*d]); + + // round vertical corners + translate([0, 0, 0]) rotate(a=180) round_corner(r=cr, h=h); + translate([0, t, 0]) rotate(a=90 ) round_corner(r=cr, h=h); + } } } + +half(); +mirror() half(); |