diff options
Diffstat (limited to 'mech/pcb_case/nut.scad')
-rw-r--r-- | mech/pcb_case/nut.scad | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/mech/pcb_case/nut.scad b/mech/pcb_case/nut.scad index bfd5b3d..407ab09 100644 --- a/mech/pcb_case/nut.scad +++ b/mech/pcb_case/nut.scad @@ -1,9 +1,30 @@ nut_h = 3; nut_d = 4.15; nut_r = nut_d / 2; +nut_d_tol = 0.5; module nut() { cylinder(d=nut_d,h=nut_h); } -nut(); +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(); |