summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mech/pcb_case/bolt.scad8
-rw-r--r--mech/pcb_case/common.scad7
-rw-r--r--mech/pcb_case/nut.scad9
3 files changed, 19 insertions, 5 deletions
diff --git a/mech/pcb_case/bolt.scad b/mech/pcb_case/bolt.scad
new file mode 100644
index 0000000..0a2f8a0
--- /dev/null
+++ b/mech/pcb_case/bolt.scad
@@ -0,0 +1,8 @@
+bolt_d = 3;
+bolt_r = bolt_d / 2;
+
+module bolt() {
+ cylinder(d=bolt_d,h=5); // TODO height is not considered at the moment
+}
+
+bolt();
diff --git a/mech/pcb_case/common.scad b/mech/pcb_case/common.scad
index 0f79e16..dfcf909 100644
--- a/mech/pcb_case/common.scad
+++ b/mech/pcb_case/common.scad
@@ -1,8 +1,5 @@
-nut_h = 3;
-nut_d = 4.15;
-nut_r = nut_d / 2;
-bolt_d = 3;
-bolt_r = bolt_d / 2;
+use <bolt.scad>
+use <nut.scad>
module rounded_cube(dim, radius) {
range_y = [radius, dim[1]-radius];
diff --git a/mech/pcb_case/nut.scad b/mech/pcb_case/nut.scad
new file mode 100644
index 0000000..bfd5b3d
--- /dev/null
+++ b/mech/pcb_case/nut.scad
@@ -0,0 +1,9 @@
+nut_h = 3;
+nut_d = 4.15;
+nut_r = nut_d / 2;
+
+module nut() {
+ cylinder(d=nut_d,h=nut_h);
+}
+
+nut();