diff options
author | Jan Huwald <jh@sotun.de> | 2014-02-04 13:28:31 (GMT) |
---|---|---|
committer | Jan Huwald <jh@sotun.de> | 2014-02-04 13:28:31 (GMT) |
commit | 204458e17ad84e6367e000ee7362ea34b976a4ad (patch) | |
tree | 46ef2151a25d21fc76cb3000a6d24b993653d844 | |
parent | e02e0267da00818566408d019fd307c44c54dbd5 (diff) |
full model: add thread rods
-rw-r--r-- | full_model.scad | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/full_model.scad b/full_model.scad index 42b5115..b1ef36f 100644 --- a/full_model.scad +++ b/full_model.scad @@ -4,7 +4,7 @@ use <connector_front.scad> use <rail.scad> module rand_color(base, seed1=0, seed2=0, seed3=0) { - c = base + rands(0, 0.2, 3, round(1000000 * sin(17*seed1 + 23*seed2 + 29*seed3))); + c = base + rands(0, 0.2, 3, round(1000000 * sin(0.329045 + 17*seed1 + 23*seed2 + 29*seed3))); color(c) children(); } @@ -12,7 +12,7 @@ module rand_color(base, seed1=0, seed2=0, seed3=0) { for (x = [0:num_hdd_x]) for (y = [0:num_hdd_x-1]) { // front connector - rand_color([0.2, 0.8, 0.2], x, y) translate([bar_thickness/2 + x*tray_width, 0, y*tray_height]) + rand_color([0.0, 0.8, 0.0], x, y) translate([bar_thickness/2 + x*tray_width, 0, y*tray_height]) front_connector( border_left = x == 0, border_right = x == num_hdd_x, @@ -23,13 +23,22 @@ for (x = [0:num_hdd_x]) // rail if (x != num_hdd_x) translate([x * tray_width, 0, y * tray_height]) { - rand_color([0.7, 0.7, 0.7], x, y) translate([bar_thickness - rail_thickness, 0, bar_thickness - rail_thickness]) + rand_color([0.7, 0.7, 0.7], -x, y) translate([bar_thickness - rail_thickness, 0, bar_thickness - rail_thickness]) rail(); - rand_color([0.7, 0.7, 0.7], x, y) translate([tray_width + rail_thickness, 0, bar_thickness - rail_thickness]) + rand_color([0.7, 0.7, 0.7], x, -y) translate([tray_width + rail_thickness, 0, bar_thickness - rail_thickness]) mirror() rail(); -} + } // TODO: back connector - // TODO: thread rod } + +// 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); + +for (y = [0:num_hdd_y-1]) + translate([-tray_width/4, bar_thickness * 1.5, (y+1) * tray_height - bar_thickness/2]) + rotate([0, 90, 0]) + cylinder(h = (num_hdd_x + 0.5) * tray_width, r = rod_diameter/2, $fs=0.1); |