-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy paththumbscrew_long.scad
133 lines (109 loc) · 2.32 KB
/
thumbscrew_long.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
//
// GoPro Mounting Thumb-Screw (Long)
//
// By Jay Abbott 2014
//
use <lib/simple_objects.scad>;
// Constants
// --------------------------------
$fn = 32;
handleDiameter = 19.8;
handleLength = 10.6;
cutoutDiameter = 24;
cutoutOffset = 19;
shaftEndLength = 2;
shaftLength = 21;
shaftDiameterBot = 11.9;
shaftDiameterMid = 8.9;
shaftDiameterTop = 10.8;
totalLength = handleLength + shaftEndLength + shaftLength + shaftEndLength;
boltDepth = 18 + totalLength - 50;
boltDiameter = 10;
holeDiameter = 5.4;
// Modules
// --------------------------------
module handle()
{
intersection()
{
// Elongated sphere
scale([1, 1, 1.35])
sphere(r = handleDiameter / 2);
// Slice of the sphere
difference()
{
// Main slice volume
box([handleDiameter, handleDiameter, handleLength], cz = 0);
// Cylindrical cutout sections around four edges
for(t = [[ cutoutOffset, 0 ],
[ 0, cutoutOffset ],
[ -cutoutOffset, 0 ],
[ 0, -cutoutOffset ]])
{
translate([t[0], t[1], -0.1])
cylinder(h = handleLength + 0.2, r = cutoutDiameter / 2);
}
}
}
}
module shaft()
{
shaftCurveRad = 72;
union()
{
// Bottom cylinder
translate([0, 0, handleLength - 0.02])
cylinder(h = shaftEndLength + 0.02, r = shaftDiameterBot / 2);
// Curved mid-section
translate([0, 0, handleLength + shaftEndLength - 0.02])
{
rotate_extrude()
{
difference()
{
polygon(points =
[ [0, 0],
[shaftDiameterBot/2+1, 0],
[shaftDiameterTop/2+1, shaftLength + 0.02],
[0, shaftLength + 0.02]]);
translate([shaftCurveRad + shaftDiameterMid / 2 + 0.42, shaftLength / 2 + 1.88])
circle(r = shaftCurveRad, $fn=200);
}
}
}
// Top cylinder
translate([0, 0, handleLength + shaftEndLength + shaftLength - 0.02])
cylinder(h = shaftEndLength + 0.02, r = shaftDiameterTop / 2);
}
}
module boltHole()
{
translate([0, 0, -0.1])
cylinder(h = boltDepth + 0.1, r = boltDiameter / 2, $fn = 6);
}
module hole()
{
translate([0, 0, -0.1])
cylinder(h = totalLength + 0.2, r = holeDiameter / 2);
}
module thumbscrew()
{
translate([0, 0, totalLength])
rotate([0, 180, 0])
{
difference()
{
union()
{
handle();
shaft();
}
rotate([0, 0, 360/24])
boltHole();
hole();
}
}
}
// The Model
// --------------------------------
thumbscrew();