Sign in with STEVE

Compare versions

4 files changed, +81 −14 1.1.0: Real tooth grooves. detail = simple keeps a plain cylinder.

part.py +45 −6
@@ -1,9 +1,11 @@
1"""Flanged timing pulley, 2GT (GT2), 3GT (GT3) and MXL: envelope for assemblies.
1"""Flanged timing pulley, 2GT (GT2), 3GT (GT3) and MXL. Axis along Z, the bottom flange's outer face on the XY plane; a flange of diameter F, 1 mm thick, at each end of the width W;
2optionally the hub (diameter D, up to the overall length L) above the top flange. Set screws are not modelled.
23
3The toothed body is drawn at its outside diameter O.D. (teeth not modelled: only the tooth groove's depth is published),
4axis along Z, the bottom flange's outer face on the XY plane. A flange of diameter F, 1 mm thick, at each end of the
5width W; optionally the hub (diameter D, up to the overall length L) above the top flange. Set screws are not modelled.
4detail = "full": the body at its outside diameter O.D. with its tooth grooves cut in. MXL grooves follow the published rack: depth 0.64, bottom 0.67, flanks 20 degrees (28 under 24 teeth).
52GT and 3GT publish the groove depth only, so the rounded groove's width is a proportion for looks, not for design. detail = "simple": a plain cylinder at O.D.
66"""
7import math
8
79from steve import Model
810
911profile = "2GT" # Belt profile
@@ -11,6 +13,7 @@
1113belt_width = 6 # mm Nominal belt width
1214bore = 5 # mm Bore
1315hub = False # Hub above the top flange (shape B)
16detail = "full" # full: tooth grooves; simple: a plain cylinder at the outside diameter
1417
1518# profile: {teeth: (P.D., O.D., D, F, E)}, D None: no hub offered. MISUMI FA Mechanical Components, High Torque Timing
1619# Pulleys 2GT pp. 1381-1382, 3GT pp. 1383-1384, Timing Pulleys MXL pp. 1389-1390 (2014), Number of Teeth / Dimension tables.
@@ -58,9 +61,45 @@
5861if bore + 2 > e:
5962 raise ValueError(f"Bore {bore} leaves no wall under the teeth: at most {e - 2} mm.")
6063
64# profile: groove depth, from the Standard Tooth Profile drawings of the same pages (2GT 0.75; 3GT 1.14; MXL 0.64).
65GROOVE_DEPTH = {"2GT": 0.75, "3GT": 1.14, "MXL": 0.64}
66PITCH = {"2GT": 2.0, "3GT": 3.0, "MXL": 2.032}
67GROOVE_WIDTH = 0.62 # x pitch: mouth of the rounded 2GT and 3GT grooves, a proportion for looks
68MXL_BOTTOM = 0.67 # bottom of the MXL groove, same pages
69
70if teeth not in PULLEYS[profile]:
71 raise ValueError(f"{profile} tooth counts in the source: {', '.join(str(t) for t in PULLEYS[profile])}.")
72if belt_width not in WIDTHS[profile]:
73 raise ValueError(f"{profile} belt widths: {', '.join(str(w) for w in WIDTHS[profile])} mm.")
74pd, od, d_hub, f, e = PULLEYS[profile][teeth]
75a, w, l = WIDTHS[profile][belt_width]
76if hub and d_hub is None:
77 raise ValueError(f"{profile} {teeth} teeth: the source offers no hub for this size.")
78if bore + 2 > e:
79 raise ValueError(f"Bore {bore} leaves no wall under the teeth: at most {e - 2} mm.")
80
6181model = Model()
62with model.sketch("body_sketch", on="XY", name="Toothed body") as sk:
63 sk.circle("body_od", (0, 0), od / 2)
82radius = od / 2
83depth = GROOVE_DEPTH[profile]
84if detail == "simple":
85 with model.sketch("body_sketch", on="XY", name="Toothed body") as sk:
86 sk.circle("body_od", (0, 0), radius)
87else:
88 if profile == "MXL":
89 flank = math.tan(math.radians(28 if teeth < 24 else 20))
90 half_bottom = MXL_BOTTOM / 2
91 groove = [(half_bottom + depth * flank, 0.0), (half_bottom, depth), (-half_bottom, depth), (-half_bottom - depth * flank, 0.0)]
92 else:
93 half_mouth = GROOVE_WIDTH * PITCH[profile] / 2
94 groove = [(half_mouth * math.cos(math.pi * i / 6), depth * math.sin(math.pi * i / 6)) for i in range(7)]
95 outline = []
96 for n in range(teeth):
97 centre = 2 * math.pi * n / teeth
98 for u, v in groove:
99 angle = centre - u / radius
100 outline.append(((radius - v) * math.sin(angle), (radius - v) * math.cos(angle)))
101 with model.sketch("body_sketch", on="XY", name="Toothed body") as sk:
102 sk.polyline("body_outline", outline, closed=True)
64103model.extrude("body", "body_sketch", distance=w, name="Toothed body")
65104with model.sketch("flange_low_sketch", on="XY", name="Lower flange") as sk:
66105 sk.circle("flange_low_od", (0, 0), f / 2)
pypart.toml +10 −4
@@ -1,12 +1,11 @@
11name = "steve/timing-pulley"
2version = "1.0.0"
2version = "1.1.0"
33runtime = "steve"
44license = "MIT"
55summary = "Flanged timing pulley envelope: GT2 (2GT), GT3 (3GT) and MXL, tooth counts, belt widths and bores as presets."
6description = """Flanged timing pulley for 2GT, 3GT and MXL belts as an envelope for assemblies: the toothed body at its outside \
7diameter, two flanges and the bore, optionally with a hub. Teeth and set screws are not modelled. Axis along Z, bottom flange \
8on the XY plane. Dimensions from a maker's public catalogue (see the README); not affiliated with any maker or belt brand."""
6description = """Flanged timing pulley for 2GT, 3GT and MXL belts: the toothed body with its grooves cut in, two flanges and the bore, optionally with a hub. Set screws are not modelled. detail = simple is a plain cylinder at the outside diameter for big assemblies. Axis along Z, bottom flange on the XY plane. Dimensions from a maker's public catalogue (see the README); not affiliated with any maker or belt brand."""
97tags = ["pulley", "timing-pulley", "gt2", "gt3", "mxl", "belt", "power-transmission"]
8changes = "Real tooth grooves. detail = simple keeps a plain cylinder."
109
1110[parameters.profile]
1211type = "choice"
@@ -45,3 +44,10 @@
4544label = "Hub"
4645description = "Hub above the top flange (the source's shape B), on sizes that offer one."
4746
47[parameters.detail]
48type = "choice"
49default = "full"
50choices = ["full", "simple"]
51label = "Detail"
52description = "full: tooth grooves. simple: a plain cylinder at the outside diameter, for big assemblies."
53
presets.toml +21 −0
@@ -1512,3 +1512,24 @@
15121512aliases = ["MXL 40 tooth", "MXL 40T", "MXL pulley 40 tooth", "MXL 40T 10mm bore", "MXL 40 teeth bore 10", "MXL", "belt profile=MXL; teeth=40; bore=10 mm; belt width=6.35 mm; flanged"]
15131513standard = "MISUMI catalogue"
15141514
1515[[presets]]
1516id = "GT2-20T-B5-W6-simple"
1517title = "GT2 20 teeth, bore 5, belt 6 mm, simple (no grooves)"
1518params = { profile = "2GT", teeth = 20, belt_width = 6, bore = 5, hub = false, detail = "simple" }
1519aliases = ["GT2 20T simple"]
1520standard = "MISUMI catalogue"
1521
1522[[presets]]
1523id = "GT2-40T-B8-W6-hub"
1524title = "GT2 40 teeth, bore 8, belt 6 mm, with hub"
1525params = { profile = "2GT", teeth = 40, belt_width = 6, bore = 8, hub = true }
1526aliases = ["GT2 40T hub"]
1527standard = "MISUMI catalogue"
1528
1529[[presets]]
1530id = "MXL-40T-B8-W6.4-hub"
1531title = "MXL 40 teeth, bore 8, belt 6.4 mm, with hub"
1532params = { profile = "MXL", teeth = 40, belt_width = 6.4, bore = 8, hub = true }
1533aliases = ["MXL 40T hub"]
1534standard = "MISUMI catalogue"
1535
README.md +5 −4
@@ -6,13 +6,13 @@
66
77Axis along Z, bottom flange's outer face on the XY plane:
88
9- the toothed body, a cylinder at the **outside diameter O.D.** over the width **W**. Teeth aren't modelled: the source
10 gives the tooth groove's depth, not its full shape, and it says the groove varies with the number of teeth;
9- the toothed body at the **outside diameter O.D.** over the width **W**, with its grooves cut in;
1110- a flange of diameter **F**, 1 mm thick, at each end of W;
1211- the bore; with `hub`, a hub of diameter **D** up to the overall length **L**.
1312
14The pitch diameter **P.D.** sits outside the O.D. and is in the table below, for centre distances. Set screws aren't
15modelled.
13**MXL** grooves follow the published rack: depth 0.64, bottom 0.67, flanks 20° (28° under 24 teeth). **2GT and 3GT:** the source draws a rounded groove and dimensions its depth (0.75 and 1.14) only, adding that it varies with the number of teeth, so the groove's width is a proportion for looks, not for design.
14
15The pitch diameter **P.D.** sits outside the O.D. and is in `part.py`, for centre distances. `detail = "simple"` is a plain cylinder at O.D., for big assemblies. Set screws aren't modelled.
1616
1717## Parameters
1818
@@ -23,6 +23,7 @@
2323| `belt_width` | Nominal belt width: 2GT 6, 9; 3GT 6, 9, 15; MXL 4.8, 6.4, 9.5, 12.7 |
2424| `bore` | Bore, mm |
2525| `hub` | Hub above the top flange, on sizes that offer one |
26| `detail` | `full` (tooth grooves) or `simple` (plain cylinder at O.D.) |
2627
2728## Source
2829