"""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.""" import math from steve import Model designation = "30204" # Bearing number detail = "full" # full: rings and rolling elements; simple: one solid # 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 BEARINGS = {"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)} d, D, T, B, C, r, r1 = BEARINGS[designation] W = T model = Model() if detail == "simple": 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), (d / 2, W / 2 - r), (d / 2, -W / 2 + r)] with model.sketch("section", on="XZ", name="Section") as sk: sk.polyline("ring", outline, closed=True) model.revolve("inner", "section", axis="Z", name="Bearing") else: angle = math.radians(14) section = (D - d) / 2 mean_r = (D + d) / 4 roller = 0.2 * section # mean roller radius roller_length = 0.72 * C slope = math.tan(angle) offset = (roller * 1.04) / math.cos(angle) def cone_race(z): return mean_r - offset - z * slope def cup_race(z): return mean_r + offset - z * slope cone_top = -T / 2 + B cup_low = T / 2 - C rib = 0.35 * roller rib_z = -T / 2 + 0.16 * B 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)] 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)] with model.sketch("cone_section", on="XZ", name="Cone section") as sk: sk.polyline("cone_ring", cone, closed=True) model.revolve("cone", "cone_section", axis="Z", op="new", body="cone_body", name="Cone") with model.sketch("cup_section", on="XZ", name="Cup section") as sk: sk.polyline("cup_ring", cup, closed=True) model.revolve("cup", "cup_section", axis="Z", op="new", body="cup_body", name="Cup") ux, uz = -math.sin(angle), math.cos(angle) nx, nz = math.cos(angle), math.sin(angle) r_big, r_small = roller * 1.12, roller * 0.88 a = (mean_r - ux * roller_length / 2, -uz * roller_length / 2) b = (mean_r + ux * roller_length / 2, uz * roller_length / 2) with model.sketch("roller_section", on="XZ", name="Roller section") as sk: 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) model.revolve("roller", "roller_section", axis=((mean_r, 0, 0), (ux, 0, uz)), op="new", body="roller_body", name="Roller") rollers = max(6, int(2 * math.pi * mean_r / (2.5 * r_big))) model.circular_pattern("rollers", axis="Z", count=rollers, bodies=["roller_body"], name="Rollers") model.material("steel-generic") model.appearance(color="#b9bdc2") result = model.result()