summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mech/mech.mk2
-rw-r--r--mech/pcb_case/bolt_tolerance_test.scad21
2 files changed, 22 insertions, 1 deletions
diff --git a/mech/mech.mk b/mech/mech.mk
index f541cf9..c10339f 100644
--- a/mech/mech.mk
+++ b/mech/mech.mk
@@ -1,7 +1,7 @@
PRINTER := anycubic_i3_mega_s
PRINTER_CONFIG := $(PRINTER:%=mech/prusa-slicer/%.ini)
MECH_BUILD_DIR := $(BUILD_DIR)/mech
-PARTS := bottom top back front pcb_case/nut_tolerance_test
+PARTS := bottom top back front pcb_case/nut_tolerance_test pcb_case/bolt_tolerance_test
STL := $(PARTS:%=$(MECH_BUILD_DIR)/%.stl)
GCODE := $(PARTS:%=$(MECH_BUILD_DIR)/%.gcode)
diff --git a/mech/pcb_case/bolt_tolerance_test.scad b/mech/pcb_case/bolt_tolerance_test.scad
new file mode 100644
index 0000000..b658183
--- /dev/null
+++ b/mech/pcb_case/bolt_tolerance_test.scad
@@ -0,0 +1,21 @@
+include <bolt.scad>
+
+module bolt_tolerance_test() {
+ steps = 3;
+ step_width = 0.1;
+ height = 3;
+
+ for(i = [-steps : steps]) {
+ tol = bolt_ds_tol + i * step_width;
+ echo(tol=tol);
+ translate([i*5*bolt_ds,0,0])
+ difference() {
+ cube([5*bolt_ds, 5*bolt_ds, height]);
+ translate([2.5*bolt_ds,2.5*bolt_ds,0]) {
+ cylinder(d=bolt_ds+tol,h=height,$fn=50);
+ }
+ }
+ }
+}
+
+bolt_tolerance_test();