From 90423897e1297d5b35bc6a5a5d328e8d310ed83b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 11 Feb 2015 21:33:28 +0000 Subject: [PATCH] screw-recess-test: break out RecessedScrewCutout_totaldepth (nfc) --- screw-recess-test.scad | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/screw-recess-test.scad b/screw-recess-test.scad index c4c2618..576c216 100644 --- a/screw-recess-test.scad +++ b/screw-recess-test.scad @@ -18,13 +18,17 @@ RecessedScrewCutout_defaultrecessdepth_hex = -0.70; function RecessedScrewCutout_recessdepth(recessdia, recessdepth_arg) = recessdepth_arg >= 0 ? recessdepth_arg : -recessdepth_arg * recessdia; +function RecessedScrewCutout_totaldepth(recessdia, recessdepth_arg) = + RecessedScrewCutout_recessdepth(recessdia, recessdepth_arg) + + + 0.5*recessdia + 0.1; + module RecessedScrewCutout(shaftdia, recessdia, shaftlen, zbelow=1, recessdepth_arg=RecessedScrewCutout_defaultrecessdepth_flat) { // pass recessdepth_arg=-1 for the default for flat heads // pass recessdepth_arg=-1 for the default for flat heads recessdepth = RecessedScrewCutout_recessdepth(recessdia, recessdepth_arg); - recesstopz = recessdepth + 0.5*recessdia + 0.1; + recesstopz = RecessedScrewCutout_totaldepth(recessdia, recessdepth_arg); xblocky = shaftdia + 0.1; translate([0,0,-zbelow]) cylinder(r=shaftdia/2, h=shaftlen+zbelow, $fn=20); -- 2.30.2