summaryrefslogtreecommitdiff
path: root/mech
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-01-01 12:43:42 +0100
committerxengineering <me@xengineering.eu>2024-01-02 14:24:58 +0100
commit4b712ffec292a5db40dbd4850cacb18eb281e4e4 (patch)
tree8356523fa74ed84707eb701756bf83712ec153d0 /mech
parent382f78cfee52d0a29e1b5948ade7a1de293e9e30 (diff)
downloadsoundbox-4b712ffec292a5db40dbd4850cacb18eb281e4e4.tar
soundbox-4b712ffec292a5db40dbd4850cacb18eb281e4e4.tar.zst
soundbox-4b712ffec292a5db40dbd4850cacb18eb281e4e4.zip
mech: pcb_case: Add panel thickness tolerance test
This tests makes it easier to fine-tune the slot width which holds one of the two panels.
Diffstat (limited to 'mech')
-rw-r--r--mech/mech.mk2
-rw-r--r--mech/pcb_case/panel_thickness_tolerance_test.scad25
2 files changed, 26 insertions, 1 deletions
diff --git a/mech/mech.mk b/mech/mech.mk
index c10339f..e4df3ad 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 pcb_case/bolt_tolerance_test
+PARTS := bottom top back front pcb_case/nut_tolerance_test pcb_case/bolt_tolerance_test pcb_case/panel_thickness_tolerance_test
STL := $(PARTS:%=$(MECH_BUILD_DIR)/%.stl)
GCODE := $(PARTS:%=$(MECH_BUILD_DIR)/%.gcode)
diff --git a/mech/pcb_case/panel_thickness_tolerance_test.scad b/mech/pcb_case/panel_thickness_tolerance_test.scad
new file mode 100644
index 0000000..a9080e4
--- /dev/null
+++ b/mech/pcb_case/panel_thickness_tolerance_test.scad
@@ -0,0 +1,25 @@
+use <rounded_cube.scad>
+
+t = 2;
+current_tol = 0.4;
+height = 2*t;
+
+module panel_thickness_tolerance_test() {
+ steps = 3;
+ step_width = 0.2;
+
+ for(i = [-steps : steps]) {
+ tol = current_tol + i * step_width;
+ echo(tol=tol);
+ translate([i*5*t,0,0])
+ difference() {
+ cube([5*t, 5*t, height]);
+ translate([2*t, 0, t]) {
+ cube([t+tol, 5*t, t]);
+ }
+ }
+ }
+}
+
+panel_thickness_tolerance_test();
+translate([0, 6*t, 0]) rotate([0, -90, 0]) rounded_cube([t, 4*t, 7*t], t);