summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--back.scad4
-rw-r--r--front.scad157
-rw-r--r--parameters.scad55
-rw-r--r--side.scad31
-rw-r--r--tray.scad161
5 files changed, 210 insertions, 198 deletions
diff --git a/back.scad b/back.scad
new file mode 100644
index 0000000..f27b79f
--- /dev/null
+++ b/back.scad
@@ -0,0 +1,4 @@
+use <tray.scad>
+
+rotate([-90, 0, 0])
+back();
diff --git a/front.scad b/front.scad
index dd98d0a..fc512d4 100644
--- a/front.scad
+++ b/front.scad
@@ -1,155 +1,4 @@
-include <parameters.scad>
+use <tray.scad>
-use <rail.scad>
-use <hdd.scad>
-
-// bend radius on hdd inlet
-R = 2;
-
-// size of the core box
-W = hdd_width + vrail_width/2;
-H = hdd_height + hrail_height;
-D = 15;
-
-// strap dimensions
-SW=5;
-SH=1.5;
-
-// dimensions of the SATA power connector
-spc_width=25;
-spc_height=8.2;
-
-support_bar_width = 10;
-
-module back() {
- translate([0, 0, 0])
- tray(D, bt=[1], power_hole=true, straps=true);
-
- for (i = [1:num_hdd_y-1])
- translate([0, 0, i*H])
- tray(D, bt=[-1,1], power_hole=true, straps=true);
-
- translate([0, 0, (num_hdd_y-1)*H])
- tray(D, bt=[-1], power_hole=true, straps=true);
-}
-
-module front() {
- intersection() {
- union() {
- translate([0, 0, 0*H])
- tray(D, inlet=[1]);
-
- for (i = [1:num_hdd_y-1])
- translate([0, 0, i*H])
- tray(D);
-
- translate([0, 0, num_hdd_y*H])
- tray(D, inlet=[-1], rail=false);
- }
-
- translate([0, 0, num_hdd_y*H/2])
- ccube([2*W, D, num_hdd_y*H + hrail_height]);
- }
-}
-
-module ccube(x) cube(x, center=true);
-
-module tray(D, power_hole=true, straps=true, inlet=[-1,1], rail=true, support_bar=true)
-//translate([0, D/2, H/2])
-union() {
- difference() {
- union() {
- // horizontal rail
- ccube([hdd_width, D, hrail_height]);
-
- // vertical rails
- for (i = [-1,1])
- translate([i*(W/2 - vrail_width/8), 0, 0])
- ccube([vrail_width/4, D, H]);
- }
-
- // round corners for easy hdd insertion
- for (i = inlet)
- translate([0, 0, i*(hdd_height + hrail_height)/2])
- hdd_inlet();
-
- // notches to attach cable strap
- if (straps) {
- // horizontal strap holes
- for (i = [-0.65, -0.12, 0.25, 0.65])
- for (k = [-1, 1])
- translate([i*hdd_width/2, 0, k*(hrail_height/2 - SH/2)])
- strap_hole();
-
- // vertical strap holes
- for (i = [-1, 1])
- translate([i * (hdd_width/2 + SH/2 - epsilon), 0, -hrail_height])
- rotate([0, 90, 0])
- strap_hole();
- }
-
- // hole for support bar
- if (support_bar)
- translate([0, D/4, 0])
- ccube([W, D, support_bar_width]);
-
- // hole for SATA power connector and cable
- if (power_hole)
- translate([-hdd_width/2 + 30, 0])
- ccube([spc_width, D, spc_height]);
-
- // space for rail
- if (rail)
- for (i = [0:1])
- mirror([i, 0, 0])
- translate([-hdd_width/2 - rail_thickness, -D, hrail_height/2 - rail_thickness])
- rail();
-
- // female side connectors
- for (i = [-1,1])
- connector_pos(i, -1);
- }
-
- // male side connectors
- for (i = [-1,1])
- connector_pos(i, 1);
-}
-
-module connector_pos(lr, gender)
-translate([lr*(W/2 + vrail_width/4), -D/2, H*lr*gender*0.3])
-connector();
-
-module connector() {
- intersection() {
- translate([0, 2.5, 0]) ccube([vrail_width-4, 5, 10]);
- rotate([45, 0, 0]) ccube([vrail_width-4, 5, 5]);
- }
-}
-
-module strap_hole() {
- ccube([SW, D, SH]);
-}
-
-module hdd_inlet()
- render()
- for (i = [0,1]) mirror([i, 0, 0])
- for (j = [0,1]) mirror([0, j, 0])
- for (k = [0,1]) mirror([0, 0, k])
- difference() {
- union() {
- translate([0, D/2-R, 0])
- cube([hdd_width/2 + R, D, hdd_height/2 + R]);
-
- cube([hdd_width/2, D/2-R, hdd_height/2]);
- };
-
- translate([hdd_width/2 + R, D/2-R, 0])
- rotate([0, 0, 0])
- cylinder(r=R, h=H, center=true);
-
- translate([0, D/2-R, hdd_height/2 + R])
- rotate([0, 90, 0])
- cylinder(r=R, h=W, center=true);
- }
-
-front(); \ No newline at end of file
+rotate([90, 0, 0])
+front();
diff --git a/parameters.scad b/parameters.scad
index c0291cd..d8b36e3 100644
--- a/parameters.scad
+++ b/parameters.scad
@@ -2,37 +2,26 @@
// size of the array
num_hdd_x = 4;
-num_hdd_y = 5;
+num_hdd_y = 4;
/// PRIMARY DIMENSIONS
-// space above hdd available for air flow
-cooling_height = 10;
+// width of vertical and horizontal bars
+vrail_width = 15;
+hrail_height = 15;
-// thickness of the support bar
-bar_thickness = 10;
+// depth of front and back
+front_depth = 15;
+back_depth = 6;
// length hdd is standing out to be grabbed
-hdd_standout = 25;
-
-// back connector pole depth and shunt space (only used when multipe
-// parts are required to build one pole)
-pole_depth = 20;
-pole_overlap_shunt = 2;
-pole_cable_funnel_width = 3;
-
-/// METAL PARTS: SCREWS AND RAILS
-
-// outer diameter of thread rod and nut used for support
-rod_diameter = 4;
-nut_diameter = 6;
-nut_height = 3;
+hdd_standout = 15;
// dimensions of the L-shaped rail between front and back
-rail_width = 15;
+rail_width = 20;
rail_height = rail_width;
-rail_thickness = 1;
+rail_thickness = 2;
/// HDD SIZE (from spec)
@@ -55,29 +44,7 @@ pla_epsilon = 0.1;
// dimension of a single hdd tray (hdd + space around)
tray_height = hdd_height + max(cooling_height, 2 * bar_thickness + 10 * pla_epsilon);
tray_width = hdd_width + bar_thickness;
-
-
-/// PCB DIMENSIONS
-
-// free space around backplanes
-backplane_margin = 1;
-
-// dimensions of the backplane PCB
-backplane_width = tray_width / 2 + 2 * bar_thickness;
-backplane_height = tray_height - 2 * backplane_margin;
-backplane_thickness = 1.6;
-
-// offsets of the backplane relative to the hdd
-backplane_hoffset = -backplane_margin - bar_thickness/2;
-backplane_voffset = backplane_margin;
-
-// display only: dimensions and offsets of the SATA connector relative
-// to the backplane
-backplane_con_width = 45;
-backplane_con_height = 5;
-backplane_con_depth = 10;
-backplane_con_hoffset = 5 - backplane_hoffset;
-backplane_con_voffset = 15;
+tray_length = hdd_length - hdd_standout;
/// OPENSCAD HACKS
diff --git a/side.scad b/side.scad
new file mode 100644
index 0000000..e093b70
--- /dev/null
+++ b/side.scad
@@ -0,0 +1,31 @@
+include <parameters.scad>
+
+module side() {
+ // frame
+ difference() {
+ cube([tray_length, num_hdd_y * tray_height, 10], center=true);
+ side_inner();
+ }
+
+ // support
+ intersection() {
+ side_inner();
+ union() {
+ for (i = [-1:1])
+ for (j = [-2:2])
+ translate([0, j*50, 0])
+ rotate(i*30)
+ line();
+ }
+ }
+
+ // TODO: joins
+}
+
+module line()
+cube([300, 0.8, 10], center=true);
+
+module side_inner()
+cube([tray_length - 10, num_hdd_y * tray_height - 10, 10], center=true);
+
+side(); \ No newline at end of file
diff --git a/tray.scad b/tray.scad
new file mode 100644
index 0000000..9ea7f60
--- /dev/null
+++ b/tray.scad
@@ -0,0 +1,161 @@
+include <parameters.scad>
+
+use <rail.scad>
+use <hdd.scad>
+
+// bend radius on hdd inlet
+R = 2;
+
+// size of the core box
+W = hdd_width + vrail_width/2;
+H = hdd_height + hrail_height;
+
+// strap dimensions
+SW=5;
+SH=1.5;
+
+// dimensions of the SATA power connector
+spc_width=25;
+spc_height=8.2;
+
+support_bar_width = 10;
+
+module front() {
+ intersection() {
+ union() {
+ translate([0, 0, 0*H])
+ tray(front_depth, inlet=[1]);
+
+ for (i = [1:num_hdd_y-1])
+ translate([0, 0, i*H])
+ tray(front_depth);
+
+ translate([0, 0, num_hdd_y*H])
+ 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]);
+ }
+}
+
+module back() {
+ intersection() {
+ union() {
+ translate([0, 0, 0*H])
+ tray(back_depth, inlet=[1], power_hole=false);
+
+ for (i = [1:num_hdd_y-1])
+ translate([0, 0, i*H])
+ tray(back_depth, power_hole=false);
+
+ translate([0, 0, num_hdd_y*H])
+ tray(back_depth, inlet=[-1], rail=false, power_hole=false);
+ }
+
+ translate([0, 0, num_hdd_y*H/2])
+ ccube([2*W, front_depth, num_hdd_y*H + hrail_height]);
+ }
+}
+
+module ccube(x) cube(x, center=true);
+
+module tray(D, power_hole=true, straps=true, inlet=[-1,1], rail=true, support_bar=true)
+//translate([0, D/2, H/2])
+union() {
+ difference() {
+ union() {
+ // horizontal rail
+ ccube([hdd_width, D, hrail_height]);
+
+ // vertical rails
+ for (i = [-1,1])
+ translate([i*(W/2 - vrail_width/8), 0, 0])
+ ccube([vrail_width/4, D, H]);
+ }
+
+ // round corners for easy hdd insertion
+ for (i = inlet)
+ translate([0, 0, i*(hdd_height + hrail_height)/2])
+ hdd_inlet(D);
+
+ // notches to attach cable strap
+ if (straps) {
+ // horizontal strap holes
+ for (i = [-0.65, -0.12, 0.25, 0.65])
+ for (k = [-1, 1])
+ translate([i*hdd_width/2, 0, k*(hrail_height/2 - SH/2)])
+ strap_hole();
+
+ // vertical strap holes
+ for (i = [-1, 1])
+ translate([i * (hdd_width/2 + SH/2 - epsilon), 0, -hrail_height])
+ rotate([0, 90, 0])
+ strap_hole(D);
+ }
+
+ // hole for support bar
+ if (support_bar)
+ translate([0, D/4, 0])
+ ccube([W, D, support_bar_width]);
+
+ // hole for SATA power connector and cable
+ if (power_hole)
+ translate([-hdd_width/2 + 30, 0])
+ ccube([spc_width, D, spc_height]);
+
+ // space for rail
+ if (rail)
+ for (i = [0:1])
+ mirror([i, 0, 0])
+ translate([-hdd_width/2 - rail_thickness, -D, hrail_height/2 - rail_thickness])
+ rail();
+
+ // female side connectors
+ for (i = [-1,1])
+ connector_pos(D, i, -1);
+ }
+
+ // male side connectors
+ for (i = [-1,1])
+ connector_pos(D, i, 1);
+}
+
+module connector_pos(D, lr, gender)
+translate([lr*(W/2 + vrail_width/4), -D/2, H*lr*gender*0.3])
+connector();
+
+module connector() {
+ intersection() {
+ translate([0, 2.5, 0]) ccube([vrail_width-4, 5, 10]);
+ rotate([45, 0, 0]) ccube([vrail_width-4, 5, 5]);
+ }
+}
+
+module strap_hole(D) {
+ ccube([SW, D, SH]);
+}
+
+module hdd_inlet(D)
+ render()
+ for (i = [0,1]) mirror([i, 0, 0])
+ for (j = [0,1]) mirror([0, j, 0])
+ for (k = [0,1]) mirror([0, 0, k])
+ difference() {
+ union() {
+ translate([0, D/2-R, 0])
+ cube([hdd_width/2 + R, D, hdd_height/2 + R]);
+
+ cube([hdd_width/2, D/2-R, hdd_height/2]);
+ };
+
+ translate([hdd_width/2 + R, D/2-R, 0])
+ rotate([0, 0, 0])
+ cylinder(r=R, h=H, center=true);
+
+ translate([0, D/2-R, hdd_height/2 + R])
+ rotate([0, 90, 0])
+ cylinder(r=R, h=W, center=true);
+ }
+
+front(); \ No newline at end of file
contact: Jan Huwald // Impressum