7 tests = [[4 + 0.5, 10 + 1.0]];
11 module RecessScrewCutout_RecessCylinder(recessdia,zbelow, h){
12 translate([0,0,-zbelow]) cylinder(r=recessdia/2, h=h+1, $fn=40);
15 RecessedScrewCutout_defaultrecessdepth_flat = -0.35;
16 RecessedScrewCutout_defaultrecessdepth_hex = -0.70;
18 module RecessedScrewCutout(shaftdia, recessdia, shaftlen,
20 recessdepth_arg=RecessedScrewCutout_defaultrecessdepth_flat) {
21 // pass recessdepth_arg=-1 for the default for flat heads
22 // pass recessdepth_arg=-1 for the default for flat heads
23 recessdepth = recessdepth_arg >= 0 ? recessdepth_arg
24 : -recessdepth_arg * recessdia;
25 recesstopz = recessdepth + 0.5*recessdia + 0.1;
26 xblocky = shaftdia + 0.1;
28 translate([0,0,-zbelow]) cylinder(r=shaftdia/2, h=shaftlen+zbelow, $fn=20);
29 RecessScrewCutout_RecessCylinder(recessdia,zbelow, recessdepth);
31 translate([-recessdia*1.5, -xblocky/2, -zbelow])
32 cube([recessdia*3, xblocky, recesstopz+2+zbelow]);
33 translate([0, -recessdia, recesstopz])
34 rotate([0,135,0]) cube([recessdia, recessdia*2, 10]);
35 RecessScrewCutout_RecessCylinder(recessdia,zbelow, recesstopz+1);
41 translate([-cubexy/2, -cubexy/2, 0])
42 cube([cubexy,cubexy,cubez]);
47 RecessedScrewCutout(tests[0][0],