From 382f78cfee52d0a29e1b5948ade7a1de293e9e30 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 23 Dec 2023 22:38:56 +0100 Subject: mech: pcb_case: Add bolt_tolerance_test.scad This should make sure the right hole diameter is selected for bolts. --- mech/pcb_case/bolt_tolerance_test.scad | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 mech/pcb_case/bolt_tolerance_test.scad (limited to 'mech/pcb_case') 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 + +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(); -- cgit v1.2.3-70-g09d2