summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2014-02-04 13:10:30 (GMT)
committerJan Huwald <jh@sotun.de>2014-02-04 13:10:30 (GMT)
commite02e0267da00818566408d019fd307c44c54dbd5 (patch)
tree88b3bb2d570b692bf7b311c4aa99d2c70e493e68
parent535382613db920c0d0b49b3c1f30e596ddf58aa8 (diff)
full model: add rails, add color
-rw-r--r--full_model.scad34
1 files changed, 31 insertions, 3 deletions
diff --git a/full_model.scad b/full_model.scad
index 368b82c..42b5115 100644
--- a/full_model.scad
+++ b/full_model.scad
@@ -1,7 +1,35 @@
include <parameters.scad>
use <connector_front.scad>
+use <rail.scad>
-for (x = [0:num_hdd_x-1])
- for (y = [0:num_hdd_x-1])
- translate([x*tray_width, 0, y*tray_height]) front_connector();
+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)));
+ color(c)
+ children();
+}
+
+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])
+ front_connector(
+ border_left = x == 0,
+ border_right = x == num_hdd_x,
+ border_top = y == num_hdd_y - 1,
+ border_bottom = y == 0
+ );
+
+ // 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])
+ rail();
+ 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
+}
contact: Jan Huwald // Impressum