Sign in with STEVE

Compare versions

3 files changed, +78 −16 1.1.0: Looks like a bearing: rings and rolling elements. detail = simple keeps one solid ring.

part.py +53 −10
@@ -1,18 +1,61 @@
1"""Tapered roller bearing, 302 and 303 series, bore up to 50 mm: envelope for assemblies. The cone (inner ring side) of width B and the cup
2(outer ring side) of width C share the overall width T: drawn as one solid ring d x D x T. Rollers and cage are not modelled. Axis along Z, centred."""
1"""Tapered roller bearing, 302 and 303 series, bore up to 50 mm. Bore d, outside diameter D, overall width T, cone width B, cup width C and chamfers r (cone back) and r1 (cup back) are sourced and make the fit. detail = "full": the cone with its back rib, the cup and the tapered rollers at an angle between them. The 14 degree angle, roller size, rib and roller count are proportions for looks, not for design, and never change the fit dimensions; the cage is not drawn. detail = "simple": one solid ring d x D x T. Axis along Z, centred on the origin; cone back face at z = -T/2, cup back face at z = +T/2."""
2import math
3
34from steve import Model
45
56designation = "30204" # Bearing number
7detail = "full" # full: rings and rolling elements; simple: one solid
68
7# number: (d, D, T, B, C). NTN Ball and Roller Bearings CAT. No. 2203-3/E (2024), PDF pages 165-167, boundary dimensions.
8BEARINGS = {"30203": (17, 40, 13.25, 12, 11), "30204": (20, 47, 15.25, 14, 12), "30205": (25, 52, 16.25, 15, 13), "30206": (30, 62, 17.25, 16, 14), "30207": (35, 72, 18.25, 17, 15), "30208": (40, 80, 19.75, 18, 16), "30209": (45, 85, 20.75, 19, 16), "30210": (50, 90, 21.75, 20, 17), "30302": (15, 42, 14.25, 13, 11), "30303": (17, 47, 15.25, 14, 12), "30304": (20, 52, 16.25, 16, 13), "30305": (25, 62, 18.25, 17, 15), "30306": (30, 72, 20.75, 19, 16), "30307": (35, 80, 22.75, 21, 18), "30308": (40, 90, 25.25, 23, 20), "30309": (45, 100, 27.25, 25, 22), "30310": (50, 110, 29.25, 27, 23)}
9# number: (d, D, T, B, C, r, r1). NTN Ball and Roller Bearings CAT. No. 2203-3/E (2024), PDF pages 165-167, https://www.ntnglobal.com/en/products/catalog/pdf/2203E.pdf
10BEARINGS = {"30203": (17, 40, 13.25, 12, 11, 1, 1), "30204": (20, 47, 15.25, 14, 12, 1, 1), "30205": (25, 52, 16.25, 15, 13, 1, 1), "30206": (30, 62, 17.25, 16, 14, 1, 1), "30207": (35, 72, 18.25, 17, 15, 1.5, 1.5), "30208": (40, 80, 19.75, 18, 16, 1.5, 1.5), "30209": (45, 85, 20.75, 19, 16, 1.5, 1.5), "30210": (50, 90, 21.75, 20, 17, 1.5, 1.5), "30302": (15, 42, 14.25, 13, 11, 1, 1), "30303": (17, 47, 15.25, 14, 12, 1, 1), "30304": (20, 52, 16.25, 16, 13, 1.5, 1.5), "30305": (25, 62, 18.25, 17, 15, 1.5, 1.5), "30306": (30, 72, 20.75, 19, 16, 1.5, 1.5), "30307": (35, 80, 22.75, 21, 18, 2, 1.5), "30308": (40, 90, 25.25, 23, 20, 2, 1.5), "30309": (45, 100, 27.25, 25, 22, 2, 1.5), "30310": (50, 110, 29.25, 27, 23, 2.5, 2)}
911
10d, D, T, B, C = BEARINGS[designation]
12d, D, T, B, C, r, r1 = BEARINGS[designation]
13W = T
1114model = Model()
12with model.sketch("rings", on="XY", name="Rings") as sk:
13 sk.circle("outer", (0, 0), D / 2)
14 sk.circle("bore", (0, 0), d / 2)
15model.extrude("body", "rings", distance=T, both=True, name="Bearing")
16model.material("steel-generic", color="#b9bdc2")
15if detail == "simple":
16 outline = [(d / 2 + r, -W / 2), (D / 2 - r, -W / 2), (D / 2, -W / 2 + r), (D / 2, W / 2 - r), (D / 2 - r, W / 2), (d / 2 + r, W / 2),
17 (d / 2, W / 2 - r), (d / 2, -W / 2 + r)]
18 with model.sketch("section", on="XZ", name="Section") as sk:
19 sk.polyline("ring", outline, closed=True)
20 model.revolve("inner", "section", axis="Z", name="Bearing")
21else:
22 angle = math.radians(14)
23 section = (D - d) / 2
24 mean_r = (D + d) / 4
25 roller = 0.2 * section # mean roller radius
26 roller_length = 0.72 * C
27 slope = math.tan(angle)
28 offset = (roller * 1.04) / math.cos(angle)
29
30 def cone_race(z):
31 return mean_r - offset - z * slope
32
33 def cup_race(z):
34 return mean_r + offset - z * slope
35
36 cone_top = -T / 2 + B
37 cup_low = T / 2 - C
38 rib = 0.35 * roller
39 rib_z = -T / 2 + 0.16 * B
40 cone = [(d / 2 + r, -T / 2), (cone_race(rib_z) + rib, -T / 2), (cone_race(rib_z) + rib, rib_z), (cone_race(rib_z), rib_z), (cone_race(cone_top), cone_top), (d / 2 + 0.3 * r, cone_top), (d / 2, cone_top - 0.3 * r), (d / 2, -T / 2 + r)]
41 cup = [(cup_race(cup_low), cup_low), (D / 2 - 0.3 * r1, cup_low), (D / 2, cup_low + 0.3 * r1), (D / 2, T / 2 - r1), (D / 2 - r1, T / 2), (cup_race(T / 2), T / 2)]
42 with model.sketch("cone_section", on="XZ", name="Cone section") as sk:
43 sk.polyline("cone_ring", cone, closed=True)
44 model.revolve("cone", "cone_section", axis="Z", op="new", body="cone_body", name="Cone")
45 with model.sketch("cup_section", on="XZ", name="Cup section") as sk:
46 sk.polyline("cup_ring", cup, closed=True)
47 model.revolve("cup", "cup_section", axis="Z", op="new", body="cup_body", name="Cup")
48 ux, uz = -math.sin(angle), math.cos(angle)
49 nx, nz = math.cos(angle), math.sin(angle)
50 r_big, r_small = roller * 1.12, roller * 0.88
51 a = (mean_r - ux * roller_length / 2, -uz * roller_length / 2)
52 b = (mean_r + ux * roller_length / 2, uz * roller_length / 2)
53 with model.sketch("roller_section", on="XZ", name="Roller section") as sk:
54 sk.polyline("roller_half", [a, b, (b[0] + nx * r_small, b[1] + nz * r_small), (a[0] + nx * r_big, a[1] + nz * r_big)], closed=True)
55 model.revolve("roller", "roller_section", axis=((mean_r, 0, 0), (ux, 0, uz)), op="new", body="roller_body", name="Roller")
56 rollers = max(6, int(2 * math.pi * mean_r / (2.5 * r_big)))
57 model.circular_pattern("rollers", axis="Z", count=rollers, bodies=["roller_body"], name="Rollers")
58model.material("steel-generic")
59model.appearance(color="#b9bdc2")
1760result = model.result()
1861
pypart.toml +18 −4
@@ -1,17 +1,24 @@
11name = "steve/tapered-roller-bearing"
2version = "1.0.0"
2version = "1.1.0"
33runtime = "steve"
44license = "MIT"
5summary = "Tapered roller bearing, 302 and 303 series, bore 15 to 50 mm, as a boundary-dimension envelope."
6description = """Tapered roller bearing (302 and 303 series) as an envelope for assemblies: one solid d x D x T, the overall width. Rollers and \
7cage are not modelled. Axis along Z, centred on the origin. Dimensions from a maker's public catalogue (see the README); not affiliated with any maker."""
5summary = "Tapered roller bearing, 302 and 303 series, bore 15 to 50 mm,."
6description = """Tapered roller bearing, 302 and 303 series, bore up to 50 mm. Bore d, outside diameter D, overall width T, cone width B, cup width C and chamfers r (cone back) and r1 (cup back) are sourced and make the fit. detail = \"full\": the cone with its back rib, the cup and the tapered rollers at an angle between them. The 14 degree angle, roller size, rib and roller count are proportions for looks, not for design, and never change the fit dimensions; the cage is not drawn. detail = \"simple\": one solid ring d x D x T. Axis along Z, centred on the origin; cone back face at z = -T/2, cup back face at z = +T/2. Dimensions from a maker's public catalogue (see the README); not affiliated with any maker."""
87tags = ["bearing", "roller-bearing", "tapered-roller", "iso-355", "metric"]
8changes = "Looks like a bearing: rings and rolling elements. detail = simple keeps one solid ring."
99
1010[parameters.designation]
1111type = "choice"
1212default = "30204"
1313choices = ["30203", "30204", "30205", "30206", "30207", "30208", "30209", "30210", "30302", "30303", "30304", "30305", "30306", "30307", "30308", "30309", "30310"]
1414label = "Bearing number"
15
16[parameters.detail]
17type = "choice"
18default = "full"
19choices = ["full", "simple"]
20label = "Detail"
21description = "full: rings and rolling elements. simple: one solid ring with the same boundary dimensions, for big assemblies."
1522
1623[[presets]]
1724id = "30203"
@@ -132,3 +139,10 @@
132139aliases = ["30310 bearing", "tapered roller bearing 30310", "4T-30310"]
133140standard = "ISO 355"
134141
142[[presets]]
143id = "30204-simple"
144title = "30204, simple (one solid)"
145params = { designation = "30204", detail = "simple" }
146aliases = ["30204 simple"]
147standard = "ISO 355"
148
README.md +7 −2
@@ -1,7 +1,10 @@
11# Tapered roller bearing
22
3302 and 303 series, bore 15 to 50 mm, as an envelope for assemblies: one solid d × D × T (T is the overall width). Axis along Z, centred
4on the origin. Rollers, cage and the separate cone and cup aren't modelled.
3## Geometry
4
5Tapered roller bearing, 302 and 303 series, bore up to 50 mm. Bore d, outside diameter D, overall width T, cone width B, cup width C and chamfers r (cone back) and r1 (cup back) are sourced and make the fit. detail = "full": the cone with its back rib, the cup and the tapered rollers at an angle between them. The 14 degree angle, roller size, rib and roller count are proportions for looks, not for design, and never change the fit dimensions; the cage is not drawn. detail = "simple": one solid ring d x D x T. Axis along Z, centred on the origin; cone back face at z = -T/2, cup back face at z = +T/2.
6
7**For the fit:** the sourced dimensions below. **For looks only, not for design:** every other proportion named above.
58
69## Source
710
@@ -29,3 +32,5 @@
2932
3033Maker names identify the source; this part isn't made by or affiliated with any maker.
3134
35Chamfers r and r1 are in `part.py` (`BEARINGS`), from the same tables. No tolerance class is stated yet.
36