Sign in with STEVE

Compare versions

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

Requirements

at each version’s default parameters

4 changes 4 added

  1. 19638148tolerance_class addedNote: ISO 492 normal tolerance class
  2. 29309899width added? 0/−0.120
  3. 42771306bore added? 0/−0.010 (SD) (ACS)
  4. 64593396outside_diameter added⌀47 0/−0.011 (SD) (ACS)

1.1.0 has 2 broken requirements.

part.py +53 −11
@@ -1,18 +1,60 @@
1"""Cylindrical roller bearing, NU2 and NU3 series, bore up to 50 mm: envelope for assemblies, one solid with the boundary dimensions bore d, outside
2diameter D and width B. Rolling elements, cage and the gaps between the rings are not modelled. Axis along Z, centred on the origin."""
1"""Cylindrical roller bearing, NU2 and NU3 series, bore up to 50 mm. Bore d, outside diameter D, width B, chamfer r and the raceway diameters Fw (inner) and Ew (outer) are sourced and make the fit. detail = "full": a plain inner ring, an outer ring with a rib at each end, and the rollers between them, whose diameter follows from (Ew - Fw) / 2. Rib height, roller length 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. Axis along Z, centred on the origin."""
2import math
3
34from steve import Model
45
5designation = "NU208" # Bearing number
6designation = "NU204" # Bearing number
7detail = "full" # full: rings and rolling elements; simple: one solid
68
7# number: (d, D, B). NTN Ball and Roller Bearings CAT. No. 2203-3/E (2024), pp. B-71 to B-72 (PDF pages 147 and 148), boundary dimensions.
8BEARINGS = {"NU204": (20, 47, 14), "NU205": (25, 52, 15), "NU206": (30, 62, 16), "NU207": (35, 72, 17), "NU208": (40, 80, 18), "NU209": (45, 85, 19), "NU210": (50, 90, 20), "NU304": (20, 52, 15), "NU305": (25, 62, 17), "NU306": (30, 72, 19), "NU307": (35, 80, 21), "NU308": (40, 90, 23), "NU309": (45, 100, 25), "NU310": (50, 110, 27)}
9# number: (d, D, B, r, Fw, Ew). NTN Ball and Roller Bearings CAT. No. 2203-3/E (2024), pp. B-71 to B-72 (PDF pages 147-148), https://www.ntnglobal.com/en/products/catalog/pdf/2203E.pdf
10BEARINGS = {"NU204": (20, 47, 14, 1, 26.5, 41.5), "NU205": (25, 52, 15, 1, 31.5, 46.5), "NU206": (30, 62, 16, 1, 37.5, 55.5), "NU207": (35, 72, 17, 1.1, 44, 64), "NU208": (40, 80, 18, 1.1, 49.5, 71.5), "NU209": (45, 85, 19, 1.1, 54.5, 76.5), "NU210": (50, 90, 20, 1.1, 59.5, 81.5), "NU304": (20, 52, 15, 1.1, 27.5, 45.5), "NU305": (25, 62, 17, 1.1, 34, 54), "NU306": (30, 72, 19, 1.1, 40.5, 62.5), "NU307": (35, 80, 21, 1.5, 46.2, 70.2), "NU308": (40, 90, 23, 1.5, 52, 80), "NU309": (45, 100, 25, 1.5, 58.5, 88.5), "NU310": (50, 110, 27, 2, 65, 97)}
911
10d, D, width = BEARINGS[designation]
12# Requirements: ISO 492 normal tolerance class, deviations in mm (upper deviation 0), by size range (over, up to and including). NTN CAT. No. 2203-3/E, Table 6.4,
13# pp. A-58 to A-59, https://www.ntnglobal.com/en/products/catalog/pdf/2203E.pdf (checked 2026-11-03).
14BORE_DEVIATION = ((2.5, "-0.008"), (10, "-0.008"), (18, "-0.008"), (30, "-0.010"), (50, "-0.012"), (80, "-0.015"))
15OD_DEVIATION = ((6, "-0.008"), (18, "-0.008"), (30, "-0.009"), (50, "-0.011"), (80, "-0.013"), (120, "-0.015"))
16WIDTH_DEVIATION = ((2.5, "-0.040"), (10, "-0.120"), (18, "-0.120"), (30, "-0.120"), (50, "-0.120"), (80, "-0.150"))
17
18
19def lower_deviation(rows, size):
20 return next(value for upto, value in rows if size <= upto)
21
22d, D, W, r, Fw, Ew = BEARINGS[designation]
1123model = 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=width, both=True, name="Bearing")
16model.material("steel-generic", color="#b9bdc2")
24if detail == "simple":
25 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),
26 (d / 2, W / 2 - r), (d / 2, -W / 2 + r)]
27 with model.sketch("section", on="XZ", name="Section") as sk:
28 sk.polyline("ring", outline, closed=True)
29 model.revolve("inner", "section", axis="Z", name="Bearing")
30 bore_face, od_face, low_face, high_face = "inner.side(ring.side6)", "inner.side(ring.side2)", "inner.side(ring.side0)", "inner.side(ring.side4)"
31else:
32 roller = (Ew - Fw) / 2
33 pitch_r = (Ew + Fw) / 4
34 rib_width = 0.14 * W
35 rib_r = Ew / 2 - 0.3 * roller
36 roller_length = W - 2 * rib_width - 0.1 * W
37 clear = 0.01 * roller
38 inner = [(d / 2 + r, -W / 2), (Fw / 2 - r / 2, -W / 2), (Fw / 2, -W / 2 + r / 2), (Fw / 2, W / 2 - r / 2), (Fw / 2 - r / 2, W / 2), (d / 2 + r, W / 2), (d / 2, W / 2 - r), (d / 2, -W / 2 + r)]
39 outer = [(rib_r, -W / 2), (D / 2 - r, -W / 2), (D / 2, -W / 2 + r), (D / 2, W / 2 - r), (D / 2 - r, W / 2), (rib_r, W / 2), (rib_r, W / 2 - rib_width), (Ew / 2, W / 2 - rib_width), (Ew / 2, -W / 2 + rib_width), (rib_r, -W / 2 + rib_width)]
40 with model.sketch("inner_section", on="XZ", name="Inner ring section") as sk:
41 sk.polyline("inner_ring", inner, closed=True)
42 model.revolve("inner", "inner_section", axis="Z", op="new", body="inner_body", name="Inner ring")
43 with model.sketch("outer_section", on="XZ", name="Outer ring section") as sk:
44 sk.polyline("outer_ring", outer, closed=True)
45 model.revolve("outer", "outer_section", axis="Z", op="new", body="outer_body", name="Outer ring")
46 with model.sketch("roller_section", on="XZ", name="Roller section") as sk:
47 sk.polyline("roller_half", [(pitch_r, -roller_length / 2), (pitch_r + roller / 2 - clear, -roller_length / 2), (pitch_r + roller / 2 - clear, roller_length / 2), (pitch_r, roller_length / 2)], closed=True)
48 model.revolve("roller", "roller_section", axis=((pitch_r, 0, 0), (0, 0, 1)), op="new", body="roller_body", name="Roller")
49 rollers = max(6, int(2 * math.pi * pitch_r / (1.25 * roller)))
50 model.circular_pattern("rollers", axis="Z", count=rollers, bodies=["roller_body"], name="Rollers")
51 bore_face, od_face, low_face, high_face = "inner.side(inner_ring.side7)", "outer.side(outer_ring.side2)", "inner.side(inner_ring.side0)", "inner.side(inner_ring.side5)"
52model.material("steel-generic")
53model.appearance(color="#b9bdc2")
54model.standard("ISO")
55model.size("bore", bore_face, tol=("0", lower_deviation(BORE_DEVIATION, d)), modifiers=["SD", "ACS"])
56model.size("outside_diameter", od_face, tol=("0", lower_deviation(OD_DEVIATION, D)), modifiers=["SD", "ACS"])
57model.size("width", [low_face, high_face], tol=("0", lower_deviation(WIDTH_DEVIATION, d)))
58model.note("tolerance_class", "ISO 492 normal tolerance class")
1759result = model.result()
1860
pypart.toml +19 −5
@@ -1,17 +1,24 @@
11name = "steve/cylindrical-roller-bearing"
2version = "1.0.0"
2version = "1.1.0"
33runtime = "steve"
44license = "MIT"
5summary = "Cylindrical roller bearing, NU2 and NU3 series, bore 10 to 50 mm, as a boundary-dimension envelope."
6description = """Cylindrical roller bearing (NU2 and NU3 series) as an envelope for assemblies: one solid with the boundary dimensions. Rolling elements, cage and \
7the gaps between the rings 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 = "Cylindrical roller bearing, NU2 and NU3 series, bore 10 to 50 mm,."
6description = """Cylindrical roller bearing, NU2 and NU3 series, bore up to 50 mm. Bore d, outside diameter D, width B, chamfer r and the raceway diameters Fw (inner) and Ew (outer) are sourced and make the fit. detail = \"full\": a plain inner ring, an outer ring with a rib at each end, and the rollers between them, whose diameter follows from (Ew - Fw) / 2. Rib height, roller length 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. Axis along Z, centred on the origin. Dimensions from a maker's public catalogue (see the README); not affiliated with any maker."""
87tags = ["bearing", "roller-bearing", "cylindrical-roller", "iso-15", "metric"]
8changes = "Looks like a bearing: rings and rolling elements. detail = simple keeps one solid ring."
99
1010[parameters.designation]
1111type = "choice"
12default = "NU208"
12default = "NU204"
1313choices = ["NU204", "NU205", "NU206", "NU207", "NU208", "NU209", "NU210", "NU304", "NU305", "NU306", "NU307", "NU308", "NU309", "NU310"]
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 = "NU204"
@@ -111,3 +118,10 @@
111118aliases = ["NU310 bearing", "cylindrical roller bearing NU310", "50x110x27 roller-bearing"]
112119standard = "ISO 15"
113120
121[[presets]]
122id = "NU204-simple"
123title = "NU204, simple (one solid)"
124params = { designation = "NU204", detail = "simple" }
125aliases = ["NU204 simple"]
126standard = "ISO 15"
127
README.md +8 −3
@@ -1,7 +1,10 @@
11# Cylindrical roller bearing
22
3Nu2 and nu3 series, bore 10 to 50 mm, as an envelope for assemblies: one solid with the boundary dimensions. Axis along Z,
4centred on the origin. Rolling elements, cage and the gaps between the rings aren't modelled.
3## Geometry
4
5Cylindrical roller bearing, NU2 and NU3 series, bore up to 50 mm. Bore d, outside diameter D, width B, chamfer r and the raceway diameters Fw (inner) and Ew (outer) are sourced and make the fit. detail = "full": a plain inner ring, an outer ring with a rib at each end, and the rollers between them, whose diameter follows from (Ew - Fw) / 2. Rib height, roller length 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. Axis along Z, centred on the origin.
6
7**For the fit:** the sourced dimensions below. **For looks only, not for design:** every other proportion named above.
58
69## Source
710
@@ -24,5 +27,7 @@
2427| NU309 | 45 | 100 | 25 |
2528| NU310 | 50 | 110 | 27 |
2629
27No tolerance class is stated here yet. Maker names identify the source; this part isn't made by or affiliated with any maker.
30Maker names identify the source; this part isn't made by or affiliated with any maker.
2831
32Raceway diameters Fw and Ew and chamfers r are in `part.py` (`BEARINGS`), from the same tables; the ISO 492 normal class is from Table 6.4, pp. A-58 to A-59.
33