From c8d30e2dab7a1c513db9a76d5e00c303e960034c Mon Sep 17 00:00:00 2001 From: Jan Huwald Date: Fri, 20 Feb 2015 11:04:45 +0100 Subject: add version of the front with capped bottom to save space diff --git a/tray.scad b/tray.scad index fa8f3ab..df0ab3c 100644 --- a/tray.scad +++ b/tray.scad @@ -20,7 +20,9 @@ spc_width=3; support_bar_width = 10; -module front() { +module front(capped_bottom=true) { + total_height = num_hdd_y*H + (capped_bottom ? 2 : hrail_height); + translate([0, 0, capped_bottom ? -(hrail_height/2 - 3) : -hrail_height/2]) intersection() { union() { translate([0, 0, 0*H]) @@ -34,8 +36,8 @@ module front() { tray(front_depth, inlet=[-1], rail=false); } - translate([0, 0, num_hdd_y*H/2]) - ccube([2*W, front_depth, num_hdd_y*H + hrail_height]); + translate([0, 0, num_hdd_y*H/2 + (capped_bottom ? (hrail_height/2 - 2) : 0)]) + ccube([2*W, front_depth, total_height]); } } @@ -163,4 +165,4 @@ module hdd_inlet(D) cylinder(r=R, h=W, center=true); } -front(); \ No newline at end of file +tray(); -- cgit v0.10.1