From 749afaadf7c82b0ff8e8a9216ea1b196a925deca Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 11 Feb 2015 21:29:45 +0000 Subject: [PATCH] screw-recess-test: make shaftlen a parameter (nfc) --- screw-recess-test.scad | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/screw-recess-test.scad b/screw-recess-test.scad index 8176878..9e3a333 100644 --- a/screw-recess-test.scad +++ b/screw-recess-test.scad @@ -15,7 +15,7 @@ module RecessScrewCutout_RecessCylinder(recessdia,zbelow, h){ RecessedScrewCutout_defaultrecessdepth_flat = -0.35; RecessedScrewCutout_defaultrecessdepth_hex = -0.70; -module RecessedScrewCutout(shaftdia, recessdia, +module RecessedScrewCutout(shaftdia, recessdia, shaftlen, recessdepth_arg=RecessedScrewCutout_defaultrecessdepth_flat, zbelow=1) { // pass recessdepth_arg=-1 for the default for flat heads @@ -25,7 +25,7 @@ module RecessedScrewCutout(shaftdia, recessdia, recesstopz = recessdepth + 0.5*recessdia + 0.1; xblocky = shaftdia + 0.1; - translate([0,0,-zbelow]) cylinder(r=shaftdia/2, h=shaftz+1+zbelow, $fn=20); + translate([0,0,-zbelow]) cylinder(r=shaftdia/2, h=shaftlen+zbelow, $fn=20); RecessScrewCutout_RecessCylinder(recessdia,zbelow, recessdepth); intersection(){ translate([-recessdia*1.5, -xblocky/2, -zbelow]) @@ -45,7 +45,8 @@ module Test(){ module Hole(){ RecessedScrewCutout(tests[0][0], - tests[0][1]); + tests[0][1], + shaftz+1); } //Test(); -- 2.30.2