summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mech/mech.mk2
-rw-r--r--mech/pcb_case/nut.scad22
-rw-r--r--mech/pcb_case/nut_tolerance_test.scad23
3 files changed, 24 insertions, 23 deletions
diff --git a/mech/mech.mk b/mech/mech.mk
index c92ef7b..aa58d95 100644
--- a/mech/mech.mk
+++ b/mech/mech.mk
@@ -1,5 +1,5 @@
MECH_BUILD_DIR := $(BUILD_DIR)/mech
-PARTS := bottom top back front pcb_case/nut
+PARTS := bottom top back front pcb_case/nut_tolerance_test
STL := $(PARTS:%=$(MECH_BUILD_DIR)/%.stl)
GCODE := $(PARTS:%=$(MECH_BUILD_DIR)/%.gcode)
diff --git a/mech/pcb_case/nut.scad b/mech/pcb_case/nut.scad
index 407ab09..b7916d3 100644
--- a/mech/pcb_case/nut.scad
+++ b/mech/pcb_case/nut.scad
@@ -6,25 +6,3 @@ nut_d_tol = 0.5;
module nut() {
cylinder(d=nut_d,h=nut_h);
}
-
-module nut_tolerance_test() {
- steps = 3;
- step_width = 0.1;
-
- for(i = [-steps : steps]) {
- tol = nut_d_tol + i * step_width;
- translate([i*5*nut_d,0,0])
- difference() {
- cube([5*nut_d, 5*nut_d, 2*nut_h]);
- translate([2.5*nut_d,2.5*nut_d,0]) {
- union() {
- cylinder(d=nut_d,h=2*nut_h,$fn=50);
- translate([0,0,nut_h])
- cylinder(d=nut_d_tol+nut_d,h=nut_h,$fn=50);
- }
- }
- }
- }
-}
-
-nut_tolerance_test();
diff --git a/mech/pcb_case/nut_tolerance_test.scad b/mech/pcb_case/nut_tolerance_test.scad
new file mode 100644
index 0000000..b67166a
--- /dev/null
+++ b/mech/pcb_case/nut_tolerance_test.scad
@@ -0,0 +1,23 @@
+include <nut.scad>
+
+module nut_tolerance_test() {
+ steps = 3;
+ step_width = 0.1;
+
+ for(i = [-steps : steps]) {
+ tol = nut_d_tol + i * step_width;
+ translate([i*5*nut_d,0,0])
+ difference() {
+ cube([5*nut_d, 5*nut_d, 2*nut_h]);
+ translate([2.5*nut_d,2.5*nut_d,0]) {
+ union() {
+ cylinder(d=nut_d,h=2*nut_h,$fn=50);
+ translate([0,0,nut_h])
+ cylinder(d=nut_d_tol+nut_d,h=nut_h,$fn=50);
+ }
+ }
+ }
+ }
+}
+
+nut_tolerance_test();