From 9f92a24358c8f5cca2105945d3371dc1f84de3f5 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 23 Dec 2023 17:02:51 +0100 Subject: mech: pcb_case: Move tolerance test for nut to own file That way it is easier to get that the test is built and not nut when building the corresponding file. --- mech/pcb_case/nut_tolerance_test.scad | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 mech/pcb_case/nut_tolerance_test.scad (limited to 'mech/pcb_case/nut_tolerance_test.scad') 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 + +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(); -- cgit v1.2.3-70-g09d2