diff options
Diffstat (limited to 'full_model.scad')
-rw-r--r-- | full_model.scad | 89 |
1 files changed, 14 insertions, 75 deletions
diff --git a/full_model.scad b/full_model.scad index 9ea1b4a..d2f18e0 100644 --- a/full_model.scad +++ b/full_model.scad @@ -1,85 +1,24 @@ include <parameters.scad> -use <connector_back.scad> -use <connector_front.scad> -use <connector_pole.scad> +use <entry.scad> +use <tray.scad> +use <side.scad> use <hdd.scad> use <rail.scad> -use <backplane.scad> -module rand_color(base, seed1=0, seed2=0, seed3=0) { - c = base + rands(0, 0.2, 3, round(1000000 * sin(0.329045 + 17*seed1 + 23*seed2 + 29*seed3))); - color(c) - children(); -} +tray_width = hdd_width + vrail_width; +tray_height = hdd_height + hrail_height; -for (x = [0:num_hdd_x]) -for (y = [0:num_hdd_y-1]) -translate([bar_thickness/2 + x*tray_width, 0, y*tray_height]) { - // front connector - rand_color([0.0, 0.8, 0.0], x, y) - front_connector( - border_left = x == 0, - border_right = x == num_hdd_x, - border_top = y == num_hdd_y - 1, - border_bottom = y == 0 - ); +//for (x = [0:num_hdd_x]) +assign(x=0) + translate([x * tray_width, (hdd_length - hdd_standout)/2 - 7.5, - 1]) + rotate([0, 0, -90]) + entry(); - // back connector - rand_color([0.0, 0.8, 0.0], y, x) - translate([0, hdd_length - hdd_standout - bar_thickness, 0]) - back_connector( - border_left = x == 0, - border_right = x == num_hdd_x, - border_top = y == num_hdd_y - 1, - border_bottom = y == 0 - ); - - // internal elements (that have nothing right of the last hdd column) - if (x != num_hdd_x) { - // rails - rand_color([0.7, 0.7, 0.7], -x, y) - translate([bar_thickness/2 - rail_thickness, 0, bar_thickness - rail_thickness]) - rail(); - - rand_color([0.7, 0.7, 0.7], x, -y) - translate([tray_width + rail_thickness - bar_thickness/2, 0, bar_thickness - rail_thickness]) - mirror() - rail(); - - // backplane (to be inserted into the back connector) - translate([backplane_hoffset, hdd_length - hdd_standout, - backplane_voffset]) - backplane_populated(); - } -} - -// back connector pole -// TODO: split correctly if size exceeds printing area -for (x = [0:num_hdd_x]) - assign(border = (x==0 || x==num_hdd_x)) - translate([x*tray_width, - hdd_length - hdd_standout + (border ? 0 : backplane_thickness), - y*tray_height]) - connector_pole(num_hdd_y, - pole_depth - (border ? 0 : backplane_thickness), - cable_funnel = !border); - - -// thread rods -for (x = [0:num_hdd_x]) - translate([bar_thickness/2 + x * tray_width, bar_thickness/2, -tray_height/2]) - cylinder(h = (num_hdd_y + 1) * tray_height, r = rod_diameter/2, $fs=0.1); - -// vertical front screws -for (x = [0:num_hdd_x-1]) - for (y = [0:num_hdd_y-1]) - translate([(x + 0.5) * tray_width - bar_thickness, bar_thickness * 1.5, (y+1) * tray_height - bar_thickness/2]) - rotate([0, 90, 0]) - cylinder(h = 3 * bar_thickness, r = rod_diameter/2, $fs=0.1); - -translate([bar_thickness + floor(num_hdd_x/2) * tray_width, -hdd_standout, bar_thickness + floor(num_hdd_y/2) * tray_height]) - color("Blue") hdd(); +//for (x = [0:num_hdd_x-1]) +assign(x=0) + translate([(x + 0.5) * tray_width, 0, 0]) + # front(); echo("MODEL INFO: total height = ", num_hdd_y * tray_height); echo("MODEL INFO: total width = ", num_hdd_x * tray_width + bar_thickness); |