Sign in with STEVE

Compare versions

4 files changed, +711 −36

part.py +40 −28
@@ -1,42 +1,54 @@
1"""ISO 4017 (DIN 933) hex head screw, fully threaded. Envelope: hex head and plain shank.
2The head's bearing face is on the XY plane at the origin; the shank points down -Z.
1"""Hexagon head screw (fully threaded), ISO 4017 (DIN 933), M1.6 to M36, any length.
32
4Material: property class 8.8 medium-carbon steel, quenched and tempered (C45), zinc plated."""
3Envelope model for assemblies: hexagon head (width across flats s, height k, sharp corners) and a plain shank at the
4nominal thread diameter d (the thread is not modelled). The head's bearing face is on the XY plane at the origin,
5the head above it, the shank along -Z; `length` is the nominal length l, measured from under the head. Two flats of
6the head are parallel to the X axis.
7"""
58from steve import Model
69
710size = "M6" # Thread size
8length = 20 # mm Length under the head
11length = 20 # mm Nominal length (under the head)
12material = "steel" # Material
913
10# size: (across flats s, head height k)
11HEADS = {
12 'M3': (5.5, 2.0),
13 'M4': (7.0, 2.8),
14 'M5': (8.0, 3.5),
15 'M6': (10.0, 4.0),
16 'M8': (13.0, 5.3),
17 'M10': (16.0, 6.4),
18 'M12': (18.0, 7.5),
14# ISO 4017:2022, Tables 1-3 (official preview pp. 3-5:
15# https://cdn.standards.iteh.ai/samples/72585/1179998ddd594550a909d6e13c416f3e/ISO-4017-2022.pdf); the same values in
16# ISO 4017:2011 Table 1 and ISO 4017:2014 (M1.6-M6 seen). size: (thread d, width across flats s nominal, head height k nominal)
17DIMENSIONS = {
18 "M1.6": (1.6, 3.2, 1.1),
19 "M2": (2.0, 4.0, 1.4),
20 "M2.5": (2.5, 5.0, 1.7),
21 "M3": (3.0, 5.5, 2.0),
22 "M4": (4.0, 7.0, 2.8),
23 "M5": (5.0, 8.0, 3.5),
24 "M6": (6.0, 10.0, 4.0),
25 "M8": (8.0, 13.0, 5.3),
26 "M10": (10.0, 16.0, 6.4),
27 "M12": (12.0, 18.0, 7.5),
28 "M14": (14.0, 21.0, 8.8),
29 "M16": (16.0, 24.0, 10.0),
30 "M20": (20.0, 30.0, 12.5),
31 "M24": (24.0, 36.0, 15.0),
32 "M30": (30.0, 46.0, 18.7),
33 "M36": (36.0, 55.0, 22.5),
1934}
20NOMINAL = {
21 'M3': 3.0,
22 'M4': 4.0,
23 'M5': 5.0,
24 'M6': 6.0,
25 'M8': 8.0,
26 'M10': 10.0,
27 'M12': 12.0,
35# material choice: (STEVE material library id, appearance colour)
36MATERIALS = {
37 "steel": ("steel-generic", "#b4b8bd"), # property class 8.8, zinc plated
38 "stainless-a2": ("stainless-304", "#c9ccd0"), # ISO 3506-1 A2-70
39 "stainless-a4": ("stainless-316", "#c9ccd0"), # ISO 3506-1 A4-70 / A4-80
2840}
29s, k = HEADS[size]
30d = NOMINAL[size]
41
42d, s, k = DIMENSIONS[size]
43material_id, colour = MATERIALS[material]
3144
3245model = Model()
3346with model.sketch("head_sketch", on="XY", name="Head") as sk:
3447 sk.polygon("hex", (0, 0), s / 2, 6, inscribed=False)
35model.extrude("head", "head_sketch", distance=k)
48model.extrude("head", "head_sketch", distance=k, name="Head")
3649with model.sketch("shank_sketch", on="XY", name="Shank") as sk:
37 sk.circle("shank", (0, 0), d / 2)
38model.extrude("shank", "shank_sketch", distance=-length)
39model.material("steel-1c45") # class 8.8 steel
40model.appearance(color="#c9d1d9", metalness=1.0, roughness=0.3) # clear zinc plating
50 sk.circle("shank_circle", (0, 0), d / 2)
51model.extrude("shank", "shank_sketch", distance=-length, name="Shank")
52model.material(material_id, color=colour)
4153result = model.result()
4254
pypart.toml +19 −8
@@ -1,24 +1,35 @@
11name = "steve/hex-head-screw"
2version = "1.1.0"
2version = "2.0.0"
33runtime = "steve"
44license = "MIT"
5summary = "Hex head screw, ISO 4017 / DIN 933, M3 to M12, any length."
6description = "ISO 4017 (DIN 933) hex head screw, fully threaded. Envelope: hex head and plain shank.\nThe head's bearing face is on the XY plane at the origin; the shank points down -Z.\n\nMaterial: property class 8.8 medium-carbon steel, quenched and tempered (C45), zinc plated.\n\nDimensions from STEVE's standard-part tables (nominal values of the standard). Envelope geometry: no modelled thread."
7tags = ["fastener", "screw", "bolt", "iso-4017", "din-933", "metric"]
8changes = "Materials and finishes: each part is made of its standard's engineering material, with its usual finish."
5summary = "Hexagon head screw, fully threaded, ISO 4017 / DIN 933, M1.6 to M36, any length, with catalogue sizes as presets."
6description = """ISO 4017 (DIN 933) hexagon head screw, thread to the head. Envelope geometry for assemblies: hexagon \
7head (s, k, sharp corners) and a plain shank at the nominal thread diameter; the thread itself is not modelled.
8
9The head's bearing face is on the XY plane at the origin and the shank points along -Z; `length` is the nominal \
10length under the head. Dimensions from ISO 4017:2014 Table 1 (see the README)."""
11tags = ["fastener", "screw", "bolt", "hex-head", "iso-4017", "din-933", "metric"]
912
1013[parameters.size]
1114type = "choice"
1215default = "M6"
13choices = ["M3", "M4", "M5", "M6", "M8", "M10", "M12"]
16choices = ["M1.6", "M2", "M2.5", "M3", "M4", "M5", "M6", "M8", "M10", "M12", "M14", "M16", "M20", "M24", "M30", "M36"]
1417label = "Thread size"
1518
1619[parameters.length]
1720type = "number"
1821default = 20
19min = 3
20max = 120
22min = 2
23max = 400
2124step = 1
2225unit = "mm"
2326label = "Length"
27description = "Nominal length l, from under the head to the end of the shank."
2428
29[parameters.material]
30type = "choice"
31default = "steel"
32choices = ["steel", "stainless-a2", "stainless-a4"]
33label = "Material"
34description = "steel: property class 8.8, zinc plated; stainless-a2 / stainless-a4: ISO 3506-1 A2 / A4."
35
presets.toml added in 2.0.0
@@ -1,0 +1,597 @@
1# Presets of this part (factory/PRESETS.md). Written by factory/gen.py.
2
3[[presets]]
4id = "M2x4"
5title = "M2 × 4"
6params = { size = "M2", length = 4 }
7aliases = ["ISO 4017 M2x4", "DIN 933 M2x4", "hex bolt M2x4", "hex head screw M2x4", "M2 x 4 mm"]
8standard = "ISO 4017"
9
10[[presets]]
11id = "M2x5"
12title = "M2 × 5"
13params = { size = "M2", length = 5 }
14aliases = ["ISO 4017 M2x5", "DIN 933 M2x5", "hex bolt M2x5", "hex head screw M2x5", "M2 x 5 mm"]
15standard = "ISO 4017"
16
17[[presets]]
18id = "M2x6"
19title = "M2 × 6"
20params = { size = "M2", length = 6 }
21aliases = ["ISO 4017 M2x6", "DIN 933 M2x6", "hex bolt M2x6", "hex head screw M2x6", "M2 x 6 mm"]
22standard = "ISO 4017"
23
24[[presets]]
25id = "M2x8"
26title = "M2 × 8"
27params = { size = "M2", length = 8 }
28aliases = ["ISO 4017 M2x8", "DIN 933 M2x8", "hex bolt M2x8", "hex head screw M2x8", "M2 x 8 mm"]
29standard = "ISO 4017"
30
31[[presets]]
32id = "M2x10"
33title = "M2 × 10"
34params = { size = "M2", length = 10 }
35aliases = ["ISO 4017 M2x10", "DIN 933 M2x10", "hex bolt M2x10", "hex head screw M2x10", "M2 x 10 mm"]
36standard = "ISO 4017"
37
38[[presets]]
39id = "M2x12"
40title = "M2 × 12"
41params = { size = "M2", length = 12 }
42aliases = ["ISO 4017 M2x12", "DIN 933 M2x12", "hex bolt M2x12", "hex head screw M2x12", "M2 x 12 mm"]
43standard = "ISO 4017"
44
45[[presets]]
46id = "M2x16"
47title = "M2 × 16"
48params = { size = "M2", length = 16 }
49aliases = ["ISO 4017 M2x16", "DIN 933 M2x16", "hex bolt M2x16", "hex head screw M2x16", "M2 x 16 mm"]
50standard = "ISO 4017"
51
52[[presets]]
53id = "M2x20"
54title = "M2 × 20"
55params = { size = "M2", length = 20 }
56aliases = ["ISO 4017 M2x20", "DIN 933 M2x20", "hex bolt M2x20", "hex head screw M2x20", "M2 x 20 mm"]
57standard = "ISO 4017"
58
59[[presets]]
60id = "M2x25"
61title = "M2 × 25"
62params = { size = "M2", length = 25 }
63aliases = ["ISO 4017 M2x25", "DIN 933 M2x25", "hex bolt M2x25", "hex head screw M2x25", "M2 x 25 mm"]
64standard = "ISO 4017"
65
66[[presets]]
67id = "M2x30"
68title = "M2 × 30"
69params = { size = "M2", length = 30 }
70aliases = ["ISO 4017 M2x30", "DIN 933 M2x30", "hex bolt M2x30", "hex head screw M2x30", "M2 x 30 mm"]
71standard = "ISO 4017"
72
73[[presets]]
74id = "M2.5x4"
75title = "M2.5 × 4"
76params = { size = "M2.5", length = 4 }
77aliases = ["ISO 4017 M2.5x4", "DIN 933 M2.5x4", "hex bolt M2.5x4", "hex head screw M2.5x4", "M2.5 x 4 mm"]
78standard = "ISO 4017"
79
80[[presets]]
81id = "M2.5x5"
82title = "M2.5 × 5"
83params = { size = "M2.5", length = 5 }
84aliases = ["ISO 4017 M2.5x5", "DIN 933 M2.5x5", "hex bolt M2.5x5", "hex head screw M2.5x5", "M2.5 x 5 mm"]
85standard = "ISO 4017"
86
87[[presets]]
88id = "M2.5x6"
89title = "M2.5 × 6"
90params = { size = "M2.5", length = 6 }
91aliases = ["ISO 4017 M2.5x6", "DIN 933 M2.5x6", "hex bolt M2.5x6", "hex head screw M2.5x6", "M2.5 x 6 mm"]
92standard = "ISO 4017"
93
94[[presets]]
95id = "M2.5x8"
96title = "M2.5 × 8"
97params = { size = "M2.5", length = 8 }
98aliases = ["ISO 4017 M2.5x8", "DIN 933 M2.5x8", "hex bolt M2.5x8", "hex head screw M2.5x8", "M2.5 x 8 mm"]
99standard = "ISO 4017"
100
101[[presets]]
102id = "M2.5x10"
103title = "M2.5 × 10"
104params = { size = "M2.5", length = 10 }
105aliases = ["ISO 4017 M2.5x10", "DIN 933 M2.5x10", "hex bolt M2.5x10", "hex head screw M2.5x10", "M2.5 x 10 mm"]
106standard = "ISO 4017"
107
108[[presets]]
109id = "M2.5x12"
110title = "M2.5 × 12"
111params = { size = "M2.5", length = 12 }
112aliases = ["ISO 4017 M2.5x12", "DIN 933 M2.5x12", "hex bolt M2.5x12", "hex head screw M2.5x12", "M2.5 x 12 mm"]
113standard = "ISO 4017"
114
115[[presets]]
116id = "M2.5x16"
117title = "M2.5 × 16"
118params = { size = "M2.5", length = 16 }
119aliases = ["ISO 4017 M2.5x16", "DIN 933 M2.5x16", "hex bolt M2.5x16", "hex head screw M2.5x16", "M2.5 x 16 mm"]
120standard = "ISO 4017"
121
122[[presets]]
123id = "M2.5x20"
124title = "M2.5 × 20"
125params = { size = "M2.5", length = 20 }
126aliases = ["ISO 4017 M2.5x20", "DIN 933 M2.5x20", "hex bolt M2.5x20", "hex head screw M2.5x20", "M2.5 x 20 mm"]
127standard = "ISO 4017"
128
129[[presets]]
130id = "M2.5x25"
131title = "M2.5 × 25"
132params = { size = "M2.5", length = 25 }
133aliases = ["ISO 4017 M2.5x25", "DIN 933 M2.5x25", "hex bolt M2.5x25", "hex head screw M2.5x25", "M2.5 x 25 mm"]
134standard = "ISO 4017"
135
136[[presets]]
137id = "M2.5x30"
138title = "M2.5 × 30"
139params = { size = "M2.5", length = 30 }
140aliases = ["ISO 4017 M2.5x30", "DIN 933 M2.5x30", "hex bolt M2.5x30", "hex head screw M2.5x30", "M2.5 x 30 mm"]
141standard = "ISO 4017"
142
143[[presets]]
144id = "M3x4"
145title = "M3 × 4"
146params = { size = "M3", length = 4 }
147aliases = ["ISO 4017 M3x4", "DIN 933 M3x4", "hex bolt M3x4", "hex head screw M3x4", "M3 x 4 mm"]
148standard = "ISO 4017"
149
150[[presets]]
151id = "M3x5"
152title = "M3 × 5"
153params = { size = "M3", length = 5 }
154aliases = ["ISO 4017 M3x5", "DIN 933 M3x5", "hex bolt M3x5", "hex head screw M3x5", "M3 x 5 mm"]
155standard = "ISO 4017"
156
157[[presets]]
158id = "M3x6"
159title = "M3 × 6"
160params = { size = "M3", length = 6 }
161aliases = ["ISO 4017 M3x6", "DIN 933 M3x6", "hex bolt M3x6", "hex head screw M3x6", "M3 x 6 mm"]
162standard = "ISO 4017"
163
164[[presets]]
165id = "M3x8"
166title = "M3 × 8"
167params = { size = "M3", length = 8 }
168aliases = ["ISO 4017 M3x8", "DIN 933 M3x8", "hex bolt M3x8", "hex head screw M3x8", "M3 x 8 mm"]
169standard = "ISO 4017"
170
171[[presets]]
172id = "M3x10"
173title = "M3 × 10"
174params = { size = "M3", length = 10 }
175aliases = ["ISO 4017 M3x10", "DIN 933 M3x10", "hex bolt M3x10", "hex head screw M3x10", "M3 x 10 mm"]
176standard = "ISO 4017"
177
178[[presets]]
179id = "M3x12"
180title = "M3 × 12"
181params = { size = "M3", length = 12 }
182aliases = ["ISO 4017 M3x12", "DIN 933 M3x12", "hex bolt M3x12", "hex head screw M3x12", "M3 x 12 mm"]
183standard = "ISO 4017"
184
185[[presets]]
186id = "M3x16"
187title = "M3 × 16"
188params = { size = "M3", length = 16 }
189aliases = ["ISO 4017 M3x16", "DIN 933 M3x16", "hex bolt M3x16", "hex head screw M3x16", "M3 x 16 mm"]
190standard = "ISO 4017"
191
192[[presets]]
193id = "M3x20"
194title = "M3 × 20"
195params = { size = "M3", length = 20 }
196aliases = ["ISO 4017 M3x20", "DIN 933 M3x20", "hex bolt M3x20", "hex head screw M3x20", "M3 x 20 mm"]
197standard = "ISO 4017"
198
199[[presets]]
200id = "M3x25"
201title = "M3 × 25"
202params = { size = "M3", length = 25 }
203aliases = ["ISO 4017 M3x25", "DIN 933 M3x25", "hex bolt M3x25", "hex head screw M3x25", "M3 x 25 mm"]
204standard = "ISO 4017"
205
206[[presets]]
207id = "M3x30"
208title = "M3 × 30"
209params = { size = "M3", length = 30 }
210aliases = ["ISO 4017 M3x30", "DIN 933 M3x30", "hex bolt M3x30", "hex head screw M3x30", "M3 x 30 mm"]
211standard = "ISO 4017"
212
213[[presets]]
214id = "M3x35"
215title = "M3 × 35"
216params = { size = "M3", length = 35 }
217aliases = ["ISO 4017 M3x35", "DIN 933 M3x35", "hex bolt M3x35", "hex head screw M3x35", "M3 x 35 mm"]
218standard = "ISO 4017"
219
220[[presets]]
221id = "M3x40"
222title = "M3 × 40"
223params = { size = "M3", length = 40 }
224aliases = ["ISO 4017 M3x40", "DIN 933 M3x40", "hex bolt M3x40", "hex head screw M3x40", "M3 x 40 mm"]
225standard = "ISO 4017"
226
227[[presets]]
228id = "M3x50"
229title = "M3 × 50"
230params = { size = "M3", length = 50 }
231aliases = ["ISO 4017 M3x50", "DIN 933 M3x50", "hex bolt M3x50", "hex head screw M3x50", "M3 x 50 mm"]
232standard = "ISO 4017"
233
234[[presets]]
235id = "M4x4"
236title = "M4 × 4"
237params = { size = "M4", length = 4 }
238aliases = ["ISO 4017 M4x4", "DIN 933 M4x4", "hex bolt M4x4", "hex head screw M4x4", "M4 x 4 mm"]
239standard = "ISO 4017"
240
241[[presets]]
242id = "M4x5"
243title = "M4 × 5"
244params = { size = "M4", length = 5 }
245aliases = ["ISO 4017 M4x5", "DIN 933 M4x5", "hex bolt M4x5", "hex head screw M4x5", "M4 x 5 mm"]
246standard = "ISO 4017"
247
248[[presets]]
249id = "M4x6"
250title = "M4 × 6"
251params = { size = "M4", length = 6 }
252aliases = ["ISO 4017 M4x6", "DIN 933 M4x6", "hex bolt M4x6", "hex head screw M4x6", "M4 x 6 mm"]
253standard = "ISO 4017"
254
255[[presets]]
256id = "M4x8"
257title = "M4 × 8"
258params = { size = "M4", length = 8 }
259aliases = ["ISO 4017 M4x8", "DIN 933 M4x8", "hex bolt M4x8", "hex head screw M4x8", "M4 x 8 mm"]
260standard = "ISO 4017"
261
262[[presets]]
263id = "M4x10"
264title = "M4 × 10"
265params = { size = "M4", length = 10 }
266aliases = ["ISO 4017 M4x10", "DIN 933 M4x10", "hex bolt M4x10", "hex head screw M4x10", "M4 x 10 mm"]
267standard = "ISO 4017"
268
269[[presets]]
270id = "M4x12"
271title = "M4 × 12"
272params = { size = "M4", length = 12 }
273aliases = ["ISO 4017 M4x12", "DIN 933 M4x12", "hex bolt M4x12", "hex head screw M4x12", "M4 x 12 mm"]
274standard = "ISO 4017"
275
276[[presets]]
277id = "M4x16"
278title = "M4 × 16"
279params = { size = "M4", length = 16 }
280aliases = ["ISO 4017 M4x16", "DIN 933 M4x16", "hex bolt M4x16", "hex head screw M4x16", "M4 x 16 mm"]
281standard = "ISO 4017"
282
283[[presets]]
284id = "M4x20"
285title = "M4 × 20"
286params = { size = "M4", length = 20 }
287aliases = ["ISO 4017 M4x20", "DIN 933 M4x20", "hex bolt M4x20", "hex head screw M4x20", "M4 x 20 mm"]
288standard = "ISO 4017"
289
290[[presets]]
291id = "M4x25"
292title = "M4 × 25"
293params = { size = "M4", length = 25 }
294aliases = ["ISO 4017 M4x25", "DIN 933 M4x25", "hex bolt M4x25", "hex head screw M4x25", "M4 x 25 mm"]
295standard = "ISO 4017"
296
297[[presets]]
298id = "M4x30"
299title = "M4 × 30"
300params = { size = "M4", length = 30 }
301aliases = ["ISO 4017 M4x30", "DIN 933 M4x30", "hex bolt M4x30", "hex head screw M4x30", "M4 x 30 mm"]
302standard = "ISO 4017"
303
304[[presets]]
305id = "M4x35"
306title = "M4 × 35"
307params = { size = "M4", length = 35 }
308aliases = ["ISO 4017 M4x35", "DIN 933 M4x35", "hex bolt M4x35", "hex head screw M4x35", "M4 x 35 mm"]
309standard = "ISO 4017"
310
311[[presets]]
312id = "M4x40"
313title = "M4 × 40"
314params = { size = "M4", length = 40 }
315aliases = ["ISO 4017 M4x40", "DIN 933 M4x40", "hex bolt M4x40", "hex head screw M4x40", "M4 x 40 mm"]
316standard = "ISO 4017"
317
318[[presets]]
319id = "M4x50"
320title = "M4 × 50"
321params = { size = "M4", length = 50 }
322aliases = ["ISO 4017 M4x50", "DIN 933 M4x50", "hex bolt M4x50", "hex head screw M4x50", "M4 x 50 mm"]
323standard = "ISO 4017"
324
325[[presets]]
326id = "M5x4"
327title = "M5 × 4"
328params = { size = "M5", length = 4 }
329aliases = ["ISO 4017 M5x4", "DIN 933 M5x4", "hex bolt M5x4", "hex head screw M5x4", "M5 x 4 mm"]
330standard = "ISO 4017"
331
332[[presets]]
333id = "M5x5"
334title = "M5 × 5"
335params = { size = "M5", length = 5 }
336aliases = ["ISO 4017 M5x5", "DIN 933 M5x5", "hex bolt M5x5", "hex head screw M5x5", "M5 x 5 mm"]
337standard = "ISO 4017"
338
339[[presets]]
340id = "M5x6"
341title = "M5 × 6"
342params = { size = "M5", length = 6 }
343aliases = ["ISO 4017 M5x6", "DIN 933 M5x6", "hex bolt M5x6", "hex head screw M5x6", "M5 x 6 mm"]
344standard = "ISO 4017"
345
346[[presets]]
347id = "M5x8"
348title = "M5 × 8"
349params = { size = "M5", length = 8 }
350aliases = ["ISO 4017 M5x8", "DIN 933 M5x8", "hex bolt M5x8", "hex head screw M5x8", "M5 x 8 mm"]
351standard = "ISO 4017"
352
353[[presets]]
354id = "M5x10"
355title = "M5 × 10"
356params = { size = "M5", length = 10 }
357aliases = ["ISO 4017 M5x10", "DIN 933 M5x10", "hex bolt M5x10", "hex head screw M5x10", "M5 x 10 mm"]
358standard = "ISO 4017"
359
360[[presets]]
361id = "M5x12"
362title = "M5 × 12"
363params = { size = "M5", length = 12 }
364aliases = ["ISO 4017 M5x12", "DIN 933 M5x12", "hex bolt M5x12", "hex head screw M5x12", "M5 x 12 mm"]
365standard = "ISO 4017"
366
367[[presets]]
368id = "M5x16"
369title = "M5 × 16"
370params = { size = "M5", length = 16 }
371aliases = ["ISO 4017 M5x16", "DIN 933 M5x16", "hex bolt M5x16", "hex head screw M5x16", "M5 x 16 mm"]
372standard = "ISO 4017"
373
374[[presets]]
375id = "M5x20"
376title = "M5 × 20"
377params = { size = "M5", length = 20 }
378aliases = ["ISO 4017 M5x20", "DIN 933 M5x20", "hex bolt M5x20", "hex head screw M5x20", "M5 x 20 mm"]
379standard = "ISO 4017"
380
381[[presets]]
382id = "M5x25"
383title = "M5 × 25"
384params = { size = "M5", length = 25 }
385aliases = ["ISO 4017 M5x25", "DIN 933 M5x25", "hex bolt M5x25", "hex head screw M5x25", "M5 x 25 mm"]
386standard = "ISO 4017"
387
388[[presets]]
389id = "M5x30"
390title = "M5 × 30"
391params = { size = "M5", length = 30 }
392aliases = ["ISO 4017 M5x30", "DIN 933 M5x30", "hex bolt M5x30", "hex head screw M5x30", "M5 x 30 mm"]
393standard = "ISO 4017"
394
395[[presets]]
396id = "M5x35"
397title = "M5 × 35"
398params = { size = "M5", length = 35 }
399aliases = ["ISO 4017 M5x35", "DIN 933 M5x35", "hex bolt M5x35", "hex head screw M5x35", "M5 x 35 mm"]
400standard = "ISO 4017"
401
402[[presets]]
403id = "M5x40"
404title = "M5 × 40"
405params = { size = "M5", length = 40 }
406aliases = ["ISO 4017 M5x40", "DIN 933 M5x40", "hex bolt M5x40", "hex head screw M5x40", "M5 x 40 mm"]
407standard = "ISO 4017"
408
409[[presets]]
410id = "M5x50"
411title = "M5 × 50"
412params = { size = "M5", length = 50 }
413aliases = ["ISO 4017 M5x50", "DIN 933 M5x50", "hex bolt M5x50", "hex head screw M5x50", "M5 x 50 mm"]
414standard = "ISO 4017"
415
416[[presets]]
417id = "M6x4"
418title = "M6 × 4"
419params = { size = "M6", length = 4 }
420aliases = ["ISO 4017 M6x4", "DIN 933 M6x4", "hex bolt M6x4", "hex head screw M6x4", "M6 x 4 mm"]
421standard = "ISO 4017"
422
423[[presets]]
424id = "M6x5"
425title = "M6 × 5"
426params = { size = "M6", length = 5 }
427aliases = ["ISO 4017 M6x5", "DIN 933 M6x5", "hex bolt M6x5", "hex head screw M6x5", "M6 x 5 mm"]
428standard = "ISO 4017"
429
430[[presets]]
431id = "M6x6"
432title = "M6 × 6"
433params = { size = "M6", length = 6 }
434aliases = ["ISO 4017 M6x6", "DIN 933 M6x6", "hex bolt M6x6", "hex head screw M6x6", "M6 x 6 mm"]
435standard = "ISO 4017"
436
437[[presets]]
438id = "M6x8"
439title = "M6 × 8"
440params = { size = "M6", length = 8 }
441aliases = ["ISO 4017 M6x8", "DIN 933 M6x8", "hex bolt M6x8", "hex head screw M6x8", "M6 x 8 mm"]
442standard = "ISO 4017"
443
444[[presets]]
445id = "M6x10"
446title = "M6 × 10"
447params = { size = "M6", length = 10 }
448aliases = ["ISO 4017 M6x10", "DIN 933 M6x10", "hex bolt M6x10", "hex head screw M6x10", "M6 x 10 mm"]
449standard = "ISO 4017"
450
451[[presets]]
452id = "M6x12"
453title = "M6 × 12"
454params = { size = "M6", length = 12 }
455aliases = ["ISO 4017 M6x12", "DIN 933 M6x12", "hex bolt M6x12", "hex head screw M6x12", "M6 x 12 mm"]
456standard = "ISO 4017"
457
458[[presets]]
459id = "M6x16"
460title = "M6 × 16"
461params = { size = "M6", length = 16 }
462aliases = ["ISO 4017 M6x16", "DIN 933 M6x16", "hex bolt M6x16", "hex head screw M6x16", "M6 x 16 mm"]
463standard = "ISO 4017"
464
465[[presets]]
466id = "M6x20"
467title = "M6 × 20"
468params = { size = "M6", length = 20 }
469aliases = ["ISO 4017 M6x20", "DIN 933 M6x20", "hex bolt M6x20", "hex head screw M6x20", "M6 x 20 mm"]
470standard = "ISO 4017"
471
472[[presets]]
473id = "M6x25"
474title = "M6 × 25"
475params = { size = "M6", length = 25 }
476aliases = ["ISO 4017 M6x25", "DIN 933 M6x25", "hex bolt M6x25", "hex head screw M6x25", "M6 hex head cap screw", "ISO4017 M6x25"]
477standard = "ISO 4017"
478
479[[presets]]
480id = "M6x30"
481title = "M6 × 30"
482params = { size = "M6", length = 30 }
483aliases = ["ISO 4017 M6x30", "DIN 933 M6x30", "hex bolt M6x30", "hex head screw M6x30", "M6 x 30 mm"]
484standard = "ISO 4017"
485
486[[presets]]
487id = "M6x35"
488title = "M6 × 35"
489params = { size = "M6", length = 35 }
490aliases = ["ISO 4017 M6x35", "DIN 933 M6x35", "hex bolt M6x35", "hex head screw M6x35", "M6 x 35 mm"]
491standard = "ISO 4017"
492
493[[presets]]
494id = "M6x40"
495title = "M6 × 40"
496params = { size = "M6", length = 40 }
497aliases = ["ISO 4017 M6x40", "DIN 933 M6x40", "hex bolt M6x40", "hex head screw M6x40", "M6 x 40 mm"]
498standard = "ISO 4017"
499
500[[presets]]
501id = "M6x50"
502title = "M6 × 50"
503params = { size = "M6", length = 50 }
504aliases = ["ISO 4017 M6x50", "DIN 933 M6x50", "hex bolt M6x50", "hex head screw M6x50", "M6 x 50 mm"]
505standard = "ISO 4017"
506
507[[presets]]
508id = "M8x4"
509title = "M8 × 4"
510params = { size = "M8", length = 4 }
511aliases = ["ISO 4017 M8x4", "DIN 933 M8x4", "hex bolt M8x4", "hex head screw M8x4", "M8 x 4 mm"]
512standard = "ISO 4017"
513
514[[presets]]
515id = "M8x5"
516title = "M8 × 5"
517params = { size = "M8", length = 5 }
518aliases = ["ISO 4017 M8x5", "DIN 933 M8x5", "hex bolt M8x5", "hex head screw M8x5", "M8 x 5 mm"]
519standard = "ISO 4017"
520
521[[presets]]
522id = "M8x6"
523title = "M8 × 6"
524params = { size = "M8", length = 6 }
525aliases = ["ISO 4017 M8x6", "DIN 933 M8x6", "hex bolt M8x6", "hex head screw M8x6", "M8 x 6 mm"]
526standard = "ISO 4017"
527
528[[presets]]
529id = "M8x8"
530title = "M8 × 8"
531params = { size = "M8", length = 8 }
532aliases = ["ISO 4017 M8x8", "DIN 933 M8x8", "hex bolt M8x8", "hex head screw M8x8", "M8 x 8 mm"]
533standard = "ISO 4017"
534
535[[presets]]
536id = "M8x10"
537title = "M8 × 10"
538params = { size = "M8", length = 10 }
539aliases = ["ISO 4017 M8x10", "DIN 933 M8x10", "hex bolt M8x10", "hex head screw M8x10", "M8 x 10 mm"]
540standard = "ISO 4017"
541
542[[presets]]
543id = "M8x12"
544title = "M8 × 12"
545params = { size = "M8", length = 12 }
546aliases = ["ISO 4017 M8x12", "DIN 933 M8x12", "hex bolt M8x12", "hex head screw M8x12", "M8 x 12 mm"]
547standard = "ISO 4017"
548
549[[presets]]
550id = "M8x16"
551title = "M8 × 16"
552params = { size = "M8", length = 16 }
553aliases = ["ISO 4017 M8x16", "DIN 933 M8x16", "hex bolt M8x16", "hex head screw M8x16", "M8 x 16 mm"]
554standard = "ISO 4017"
555
556[[presets]]
557id = "M8x20"
558title = "M8 × 20"
559params = { size = "M8", length = 20 }
560aliases = ["ISO 4017 M8x20", "DIN 933 M8x20", "hex bolt M8x20", "hex head screw M8x20", "M8 x 20 mm"]
561standard = "ISO 4017"
562
563[[presets]]
564id = "M8x25"
565title = "M8 × 25"
566params = { size = "M8", length = 25 }
567aliases = ["ISO 4017 M8x25", "DIN 933 M8x25", "hex bolt M8x25", "hex head screw M8x25", "M8 x 25 mm"]
568standard = "ISO 4017"
569
570[[presets]]
571id = "M8x30"
572title = "M8 × 30"
573params = { size = "M8", length = 30 }
574aliases = ["ISO 4017 M8x30", "DIN 933 M8x30", "hex bolt M8x30", "hex head screw M8x30", "M8 x 30 mm"]
575standard = "ISO 4017"
576
577[[presets]]
578id = "M8x35"
579title = "M8 × 35"
580params = { size = "M8", length = 35 }
581aliases = ["ISO 4017 M8x35", "DIN 933 M8x35", "hex bolt M8x35", "hex head screw M8x35", "M8 x 35 mm"]
582standard = "ISO 4017"
583
584[[presets]]
585id = "M8x40"
586title = "M8 × 40"
587params = { size = "M8", length = 40 }
588aliases = ["ISO 4017 M8x40", "DIN 933 M8x40", "hex bolt M8x40", "hex head screw M8x40", "M8 x 40 mm"]
589standard = "ISO 4017"
590
591[[presets]]
592id = "M8x50"
593title = "M8 × 50"
594params = { size = "M8", length = 50 }
595aliases = ["ISO 4017 M8x50", "DIN 933 M8x50", "hex bolt M8x50", "hex head screw M8x50", "M8 x 50 mm"]
596standard = "ISO 4017"
597
README.md added in 2.0.0
@@ -1,0 +1,55 @@
1# Hex head screw (ISO 4017 / DIN 933)
2
3Hexagon head screw threaded up to the head, metric coarse thread, M1.6 to M36, at any length. Presets cover the
4common catalogue sizes (M6 × 20, M8 × 40, ...).
5
6## Geometry
7
8Envelope for assemblies and clearance checks:
9
10- hexagon head, width across flats **s** (nominal), height **k** (nominal), sharp corners (across corners
11 s / cos 30°, the largest the head can be); two flats parallel to the X axis;
12- plain shank at the nominal thread diameter **d**, length **l** (`length`); the thread is not modelled.
13
14The head's bearing face is on the XY plane at the origin, the head above it, the shank along -Z.
15
16## Parameters
17
18| Parameter | Meaning |
19|---|---|
20| `size` | Thread size, M1.6 to M36 |
21| `length` | Nominal length l under the head, mm |
22| `material` | `steel` (property class 8.8, zinc plated), `stainless-a2`, `stainless-a4` (ISO 3506-1) |
23
24## Source
25
26ISO 4017:2022, *Fasteners — Hexagon head screws — Product grades A and B*, Tables 1 to 3, pp. 3-5: d, s (nominal =
27max), k (nominal), read from the official preview
28(<https://cdn.standards.iteh.ai/samples/72585/1179998ddd594550a909d6e13c416f3e/ISO-4017-2022.pdf>; M30 and M36 are
29product grade B, Table 3). The same values in ISO 4017:2011, Table 1
30(<https://fpg-co.com/Standards/ISO%204017-2011%20Hexagon%20head%20screws%20%E2%80%94%20Product%20grades%20A%20and%20B.pdf>)
31and, for M1.6 to M6, the ISO 4017:2014 preview. fasten.it's DIN EN ISO 4017:2014 page gives k 19 and 23 for M30 and
32M36, which are DIN 933 heights and contradict its own k min (18.28, 22.08); the ISO tables' 18.7 and 22.5 are used.
33DIN 933 uses the same s for these sizes except M10 (17), M12 (19), M14 (22) and M22; this recipe follows ISO 4017.
34
35| Size | s | k |
36|---|---|---|
37| M1.6 | 3.2 | 1.1 |
38| M2 | 4.0 | 1.4 |
39| M2.5 | 5.0 | 1.7 |
40| M3 | 5.5 | 2.0 |
41| M4 | 7.0 | 2.8 |
42| M5 | 8.0 | 3.5 |
43| M6 | 10.0 | 4.0 |
44| M8 | 13.0 | 5.3 |
45| M10 | 16.0 | 6.4 |
46| M12 | 18.0 | 7.5 |
47| M14 | 21.0 | 8.8 |
48| M16 | 24.0 | 10.0 |
49| M20 | 30.0 | 12.5 |
50| M24 | 36.0 | 15.0 |
51| M30 | 46.0 | 18.7 |
52| M36 | 55.0 | 22.5 |
53
54Preset list: sizes and lengths of the step.parts catalogue (MIT), see `library/NOTICE.md`.
55