-
Notifications
You must be signed in to change notification settings - Fork 1
/
screws.scad
198 lines (163 loc) · 11 KB
/
screws.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
module make_screw_spacer(height = 10, outer_D = 6, inner_D = 3) {
difference() {
ccylinder(d = outer_D, h = height);
ccylinder(d = inner_D, h = height + 1);
}
}
module screw(height = 10, threadD = 3, headtype = "button", headD = 5, headH = 2.5) {
union() {
cylinder(d=threadD, h=height, center=true);
translate([0,0,(height/2) + (headH/2) - 0.01]) {
cylinder(d=headD, h=headH+0.01, center=true);
}
}
}
module screw6M3Button(withHexBlank=false, hexBlankH = 4, hexBlankD=6.22, screwPurchase = 2, screwheadHeight = 3) {
screwM3Button(height=6, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadHeight=screwheadHeight);
}
module screw10M3Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadHeight = 10) {
screwM3Button(height=10, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadHeight=screwheadHeight);
}
module screw16M3Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3) {
screwM3Button(withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase);
}
module screw16M3ButtonOversize(screwthreadwidth = 3.2, withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3) {
screwM3Button(withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase);
}
module screw29M3Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwheadDiameter=6.5, screwPurchase = 3, screwheadHeight = 10) {
screwM3Button(height=29, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwheadDiameter=screwheadDiameter, screwPurchase=screwPurchase, screwheadHeight=screwheadHeight);
}
module screw39M3Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwheadDiameter=6.5, screwPurchase = 3, screwheadHeight = 10) {
screwM3Button(height=39, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwheadDiameter=screwheadDiameter, screwPurchase=screwPurchase, screwheadHeight=screwheadHeight);
}
module screw59M3Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwheadDiameter=6.5, screwPurchase = 3, screwheadHeight = 10) {
screwM3Button(height=59, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwheadDiameter=screwheadDiameter, screwPurchase=screwPurchase, screwheadHeight=screwheadHeight);
}
module screwM3Button(height=16, withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwheadDiameter=6.5, screwPurchase = 3, screwheadHeight = 10) {
screwButton(height = height, withHexBlank = withHexBlank, hexBlankH = hexBlankH, hexBlankD = hexBlankD, screwheadDiameter=screwheadDiameter, screwPurchase = screwPurchase, screwheadHeight = screwheadHeight);
}
module screwButton(screwthreadwidth = 3.2, height=16, withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5, screwheadHeight = 10) {
screwheight = height;
screwheadtype = "button";
screw(height = screwheight, threadD = screwthreadwidth, headtype = screwheadtype, headD = screwheadDiameter, headH = screwheadHeight);
if (withHexBlank) {
newPosition=[0,0,-hexBlankH/2 + screwPurchase - height/2];
hexBlank(newPosition=newPosition, blankHeight=hexBlankH, centerObject=true, hexBlankD=hexBlankD);
}
}
module screwM3DoubleWithHex_m3_29_button_10mhex(headBuffer=0, hexBlankBuffer=0, screwPurchase=3.5, screwHeadD=6.5) {
screwHeight=29;
screwD=3.2;
screwHeadH=4 + headBuffer;
screwHeadD=screwHeadD;
hexBlankBaseH = 10;
hexBlankH= hexBlankBaseH + hexBlankBuffer;
screwVerticalOffset=hexBlankBaseH/2 - screwPurchase;
screwM3DoubleWithHex(
screwHeight=screwHeight,
screwD=screwD,
screwHeadH=screwHeadH,
screwHeadD=screwHeadD,
hexBlankH=hexBlankH,
screwVerticalOffset=screwVerticalOffset);
}
module screwM3DoubleWithHex_m3_16_button_10mhex(headBuffer=0, hexBlankBuffer=0, hexBlankD=6.22, screwPurchase=3.5, screwHeadD=6.5) {
screwHeight=16;
screwD=3.2;
screwHeadH=4 + headBuffer;
screwHeadD=screwHeadD;
hexBlankBaseH = 10;
hexBlankH= hexBlankBaseH + hexBlankBuffer;
screwVerticalOffset=hexBlankBaseH/2 - screwPurchase;
screwM3DoubleWithHex(
screwHeight=screwHeight,
screwD=screwD,
screwHeadH=screwHeadH,
screwHeadD=screwHeadD,
hexBlankH=hexBlankH,
screwVerticalOffset=screwVerticalOffset,
hexBlankD=hexBlankD);
}
module screwM3DoubleWithHex_m3_20_button_10mhex(headBuffer=0, hexBlankBuffer=0, hexBlankD=6.22, screwPurchase=3.5, screwHeadD=6.5) {
screwHeight=20;
screwD=3.2;
screwHeadH=4 + headBuffer;
screwHeadD=screwHeadD;
hexBlankBaseH = 10;
hexBlankH= hexBlankBaseH + hexBlankBuffer;
screwVerticalOffset=hexBlankBaseH/2 - screwPurchase;
screwM3DoubleWithHex(
screwHeight=screwHeight,
screwD=screwD,
screwHeadH=screwHeadH,
screwHeadD=screwHeadD,
hexBlankH=hexBlankH,
screwVerticalOffset=screwVerticalOffset,
hexBlankD=hexBlankD);
}
module screwM3DoubleWithHex(screwHeight, screwD, screwHeadH, screwHeadD, hexBlankH, screwVerticalOffset, hexBlankD=6.22) {
union() {
//head1
translate([0,0,(screwVerticalOffset + screwHeadH/2 + screwHeight - 0.01)])
cylinder(h=screwHeadH, d=screwHeadD, center=true);
//shaft1
translate([0,0,(screwVerticalOffset + screwHeight/2)])
cylinder(d=screwD, h=screwHeight, center=true);
//hexblank1
hexBlank(blankHeight = hexBlankH, hexBlankD = hexBlankD);
//shaft2
translate([0,0,-(screwVerticalOffset + screwHeight/2)])
cylinder(d=screwD, h=screwHeight, center=true);
//head2
translate([0,0,-(screwVerticalOffset + screwHeadH/2 + screwHeight - 0.01)])
cylinder(h=screwHeadH, d=screwHeadD, center=true);
}
}
module screw8M25Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5) {
screwM25Button(height=8, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter);
}
module screw6M25Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5) {
screwM25Button(height=6, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter);
}
module screw10M25Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5) {
screwM25Button(height=10, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter);
}
module screw20M25Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5) {
screwM25Button(height=20, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter);
}
module screwM25Button(height=16, screwheadDiameter=6.5, screwheadHeight = 8, withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5) {
screwButton(screwthreadwidth = 2.7, height = height, withHexBlank = withHexBlank, hexBlankH = hexBlankH, hexBlankD = hexBlankD, screwPurchase = screwPurchase, screwheadDiameter=screwheadDiameter);
}
module screw40M4Button(withHexBlank=false, hexBlankH = 10, hexBlankD=8.2, screwPurchase = 3, screwheadDiameter = 7.5) {
screwM4Button(height=40, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter);
}
module screw20M4Button(withHexBlank=false, hexBlankH = 10, hexBlankD=8.2, screwPurchase = 3, screwheadDiameter = 7.5, screwheadHeight = 8) {
screwM4Button(height=20, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter, screwheadHeight = screwheadHeight);
}
module screw60M4Button(withHexBlank=false, hexBlankH = 10, hexBlankD=8.2, screwPurchase = 3, screwheadDiameter = 7.5, screwheadHeight = 8) {
screwM4Button(height=60, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter, screwheadHeight = screwheadHeight);
}
module screw40M4Button(withHexBlank=false, hexBlankH = 10, hexBlankD=8.2, screwPurchase = 6, screwheadDiameter = 7.5, screwheadHeight = 8) {
screwM4Button(height=40, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter, screwheadHeight = screwheadHeight);
}
module screw30M4Button(withHexBlank=false, hexBlankH = 10, hexBlankD=8.2, screwPurchase = 3, screwheadDiameter = 7.5, screwheadHeight = 8) {
screwM4Button(height=30, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter, screwheadHeight = screwheadHeight);
}
module screwM4Button(height=16, screwheadDiameter=6.5, screwheadHeight = 8, withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5) {
screwButton(screwthreadwidth = 4.2, height = height, withHexBlank = withHexBlank, hexBlankH = hexBlankH, hexBlankD = hexBlankD, screwPurchase = screwPurchase, screwheadDiameter=screwheadDiameter, screwheadHeight = screwheadHeight);
}
module screwM2Button(height=16, screwheadDiameter=6.5, screwheadHeight = 8, withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5) {
screwButton(screwthreadwidth = 2.2, height = height, withHexBlank = withHexBlank, hexBlankH = hexBlankH, hexBlankD = hexBlankD, screwPurchase = screwPurchase, screwheadDiameter=screwheadDiameter, screwheadHeight = screwheadHeight);
}
module screw8M2Button(withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5) {
screwM2Button(height=8, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter);
}
module screw65M5Button(withHexBlank=false, hexBlankH = 4, hexBlankD=9.2, screwPurchase = 4, screwheadDiameter = 8.6, screwheadHeight = 8) {
screwM5Button(height=65, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter, screwheadHeight = screwheadHeight);
}
module screw20M5Button(withHexBlank=false, hexBlankH = 4, hexBlankD=9.2, screwPurchase = 4, screwheadDiameter = 8.6, screwheadHeight = 8) {
screwM5Button(height=20, withHexBlank=withHexBlank, hexBlankH = hexBlankH, hexBlankD=hexBlankD, screwPurchase=screwPurchase, screwheadDiameter = screwheadDiameter, screwheadHeight = screwheadHeight);
}
module screwM5Button(height=16, screwheadDiameter=6.5, screwheadHeight = 8, withHexBlank=false, hexBlankH = 10, hexBlankD=6.22, screwPurchase = 3, screwheadDiameter = 6.5) {
screwButton(screwthreadwidth = 5.2, height = height, withHexBlank = withHexBlank, hexBlankH = hexBlankH, hexBlankD = hexBlankD, screwPurchase = screwPurchase, screwheadDiameter=screwheadDiameter, screwheadHeight = screwheadHeight);
}