summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2015-02-25 22:07:33 (GMT)
committerJan Huwald <jh@sotun.de>2015-02-25 22:07:33 (GMT)
commit47c0592196c8335113888931a5a82056685ce872 (patch)
tree629b321e81580fa43fa608cceb7c417cca6e4c20
parent1eb220fe33b0a119773d6fd038a7df5076f3f50b (diff)
move computed variables into parameter file
-rw-r--r--parameters.scad13
-rw-r--r--tray.scad6
2 files changed, 15 insertions, 4 deletions
diff --git a/parameters.scad b/parameters.scad
index d402243..f437c46 100644
--- a/parameters.scad
+++ b/parameters.scad
@@ -57,3 +57,16 @@ large = 1000;
// A small quantity that does not change the print results. Use to
// displace surfaces of CSG operations to prevent them from overlapping.
epsilon = 0.0001;
+
+
+/// COMPUTED DIMENSIONS
+
+tray_width = hdd_width + vrail_width/2;
+tray_height = hdd_height + hrail_height;
+
+
+/// COMMON FUNCTIONS
+// they do not belong here but are not enough to warrant a seperate
+// file. sorry
+
+module ccube(x) cube(x, center=true);
diff --git a/tray.scad b/tray.scad
index b5e59f2..0f165f6 100644
--- a/tray.scad
+++ b/tray.scad
@@ -7,8 +7,8 @@ use <hdd.scad>
R = 2;
// size of the core box
-W = hdd_width + vrail_width/2;
-H = hdd_height + hrail_height;
+W = tray_width;
+H = tray_height;
// strap dimensions
SW=5;
@@ -54,8 +54,6 @@ module back() {
}
}
-module ccube(x) cube(x, center=true);
-
module tray(D, power_hole=true, straps=true, inlet=[-1,1], rail=[0,1], support_bar=true)
union() {
difference() {
contact: Jan Huwald // Impressum