-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththumbnut_reflector.scad
89 lines (69 loc) · 1.88 KB
/
thumbnut_reflector.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Total diameter
total_d = 35;
// Number of wings
wing_count = 3; //[1:16]
// Wing diameter on the outside
wing_thick_d = 10;
// Wing diameter on the inside
wing_thin_d = 5;
// Wing height (on the outside)
wing_h = 7;
// Nut diameter (from corner to corner). eg. 14.6 for a M8 or 8 for a M4. Zero to disable.
nut_d = 11;
// Hex nut vs. just a cylindrical hole
hex_nut = 1; //[1:Hexagonal,0:Cylindrical]
// Nut thickness or lower for the nut to protrude, eg. 6.6 for M8 or 3.1 for M4.
nut_th = 5;
// Thread diameter, eg. 8 for M8 or 4 for M4
thread_d = 6.2;
// Thickness below the central nut (core thickness is the nut thickness added to this)
nut_shoulder_z = 18;
// Thickness around the central nut
nut_shoulder_x= 4;
// Overall roundness ratio (100 produces fully rounded wings)
roundness_ratio = 35; // [1:99]
roundness= roundness_ratio * min(wing_h, nut_th + nut_shoulder_z) / 100;
echo(roundness);
roundness=2.45;
$fs=0.3+0;
tol= 0.05+0;
$fn=50;
module torus(r,rnd)
{
translate([0,0,rnd/2])
rotate_extrude(convexity= 10)
translate([r-rnd/2, 0, 0])
circle(r= rnd/2, $fs=0.2);
}
module rcyl(r,h, zcenter=false, rnd=1)
{
translate([0,0,zcenter ? -h/2 : 0])
hull()
{
translate([0,0,0]) torus(r=r, rnd=rnd);
translate([0,0,h-rnd]) torus(r=r, rnd=rnd);
}
}
module one_wing()
{
hull()
{
translate([total_d/2 - wing_thick_d/2, 0, 16])
rcyl(r= wing_thick_d/2, h= wing_h, rnd= roundness);
translate([nut_d/2+nut_shoulder_x-roundness, 0, 10])
rcyl(r= wing_thin_d/2, h= nut_shoulder_z+nut_th-10, rnd= roundness);
}
}
difference()
{
for(rot=[0:360/wing_count:359])
{
rotate([0,0,rot])
one_wing();
rcyl(r= nut_d/2+nut_shoulder_x, h= nut_shoulder_z+nut_th, rnd= roundness);
}
translate([0,0,nut_shoulder_z - tol])
cylinder(r=nut_d/2, h=nut_th+nut_shoulder_z+2*tol, $fn=(hex_nut?6:60));
translate([0,0,-tol])
cylinder(r=thread_d/2, h=nut_th+nut_shoulder_z+2*tol);
}