Add sleeve functionality to set a depth clearance for dropping through a component without threading in.

This commit is contained in:
Greyscale 2025-05-06 00:48:32 +02:00
parent a407f8fc9f
commit 00e335484f
Signed by: grey
GPG key ID: DDB392AE64B32D89

View file

@ -1,7 +1,12 @@
$fn=30;
module selfTappingScrew(mSize=3, length=30, recessCap=0.1, sleeve=0, sleeveRatio=0){
dk = mSize*2;
d = mSize;
ratioFitClose=1.1;
ratioFitNormal=1.2;
ratioFitLoose=1.3;
sleeveRatio = sleeveRatio ? sleeveRatio : ratioFitNormal;
module selfTappingScrew(mSize=3, length=30, recessCap=0.1){
dk = mSize*2;
d = mSize;
k = (1.86/3)*mSize;
color("lightblue"){
// Shaft
@ -18,8 +23,18 @@ d = mSize;
cylinder(d=dk,h=recessCap+0.01, center=true);
}
}
// Sleeve
color("lightblue",0.5){
if(sleeve){
translate([0,0,((length-sleeve-k)/2)])
cylinder(d=d*sleeveRatio,h=sleeve+k, center=true);
}
}
}
translate([0,0,0])selfTappingScrew(mSize=3, length=30);
translate([0,20,0])selfTappingScrew(mSize=5, length=20);
translate([0,40,0])selfTappingScrew(mSize=3, length=20, recessCap=10);
translate([0,60,0])selfTappingScrew(mSize=3, length=20, sleeve=5);
translate([0,80,0])selfTappingScrew(mSize=3, length=20, sleeve=5, sleeveRatio=1.5);