summaryrefslogtreecommitdiff
path: root/mech
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-01-01 13:34:29 +0100
committerxengineering <me@xengineering.eu>2024-01-02 14:24:58 +0100
commitd5655c62a5016f89f3b7fc8f6c2f9db68479b261 (patch)
treed42c6dbc19f4478bd1eb97a584895355d0d5bb42 /mech
parent4b712ffec292a5db40dbd4850cacb18eb281e4e4 (diff)
downloadsoundbox-d5655c62a5016f89f3b7fc8f6c2f9db68479b261.tar
soundbox-d5655c62a5016f89f3b7fc8f6c2f9db68479b261.tar.zst
soundbox-d5655c62a5016f89f3b7fc8f6c2f9db68479b261.zip
mech: pcb_case: Add panel size tolerance test
This allows to check the tolerances for panel width and length.
Diffstat (limited to 'mech')
-rw-r--r--mech/mech.mk2
-rw-r--r--mech/pcb_case/panel_size_tolerance_test.scad26
2 files changed, 27 insertions, 1 deletions
diff --git a/mech/mech.mk b/mech/mech.mk
index e4df3ad..7758dcf 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 pcb_case/panel_thickness_tolerance_test
+PARTS := bottom top back front pcb_case/nut_tolerance_test pcb_case/bolt_tolerance_test pcb_case/panel_thickness_tolerance_test pcb_case/panel_size_tolerance_test
STL := $(PARTS:%=$(MECH_BUILD_DIR)/%.stl)
GCODE := $(PARTS:%=$(MECH_BUILD_DIR)/%.gcode)
diff --git a/mech/pcb_case/panel_size_tolerance_test.scad b/mech/pcb_case/panel_size_tolerance_test.scad
new file mode 100644
index 0000000..8a0b20b
--- /dev/null
+++ b/mech/pcb_case/panel_size_tolerance_test.scad
@@ -0,0 +1,26 @@
+use <rounded_cube.scad>
+
+t = 2;
+t_tol = 0.4;
+current_tol = 0.8;
+height = 3*t;
+
+module panel_size_tolerance_test() {
+ steps = 3;
+ step_width = 0.2;
+
+ for(i = [-steps : steps]) {
+ tol = current_tol + i * step_width;
+ echo(tol=tol);
+ translate([i*3*t,0,0])
+ difference() {
+ cube([3*t, 8*t, height]);
+ translate([t, t-tol/2, t]) {
+ rounded_cube([t, 6*t+tol, 6*t+tol], t);
+ }
+ }
+ }
+}
+
+panel_size_tolerance_test();
+translate([0, 9*t, 0]) rotate([0, -90, 0]) rounded_cube([t, 6*t, 6*t], t);