-
Notifications
You must be signed in to change notification settings - Fork 13
/
adjustmentKnob.scad
37 lines (32 loc) · 958 Bytes
/
adjustmentKnob.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Licensed under MIT license or CC 3.0-by-nc-sa
use <tubemesh.scad>;
//<params>
d = 20;
h = 17;
lineHeight = 1.5;
lineThickness = 2;
holeDiameter = 3.2;
holeHeight = 10;
stickoutRatio = 0.5;
knurl = 1.3;
//</params>
//<params>
module knurledCylinder(h=10,r1=5,r2=1.5) {
n = ceil(2 * PI * r1 / (2 * r2));
cylinder(h=h,r=r1,$fn=n);
for (i=[0:n-1]) {
x = r1*cos(360./n*i);
y = r1*sin(360./n*i);
translate([x,y,0]) cylinder(h=h,r=r2,$fn=12);
}
}
//</params>
render(convexity=3)
difference() {
knurledCylinder(h=h,r1=d/2,r2=knurl);
translate([0,0,-0.01]) cylinder(h=holeHeight,d=holeDiameter,$fn=12);
}
translate([0,0,h])
morphExtrude([[0,-lineThickness/2],[d/2+knurl,-lineThickness/2],[d/2+knurl,lineThickness/2],[0,lineThickness/2]],
[[0,-lineThickness/2],[d/2+knurl+lineHeight*stickoutRatio,-lineThickness/2],[d/2+knurl+lineHeight*stickoutRatio,lineThickness/2],[0,lineThickness/2]],
height=lineHeight);