"""Bel Fuse 0ZRE series radial-leaded resettable PTC fuse: an epoxy-coated polymer PTC body, a round disc (Fig. 1 and 4) or a rectangular block (Fig. 2 and 3), standing on two straight leads fixed to its two faces. The body is centred on the Z axis, its faces normal to Y; lead 1 at -X and +Y, lead 2 at +X and -Y, the leads C apart along X and F apart along Y. The board's top face is the XY plane, at the foot of the coating, and the leads go straight down through it. The body and each lead are their own solids. Dimensions from Bel Fuse's data sheet; see the README.""" import math from steve import Model part_number = "0ZRE0005FF" # Bel Fuse part number (any packaging suffix) tail = 3.0 # mm Leads below the board # Part number: (figure, A width max, B height max, C lead spacing typical, D lead length min, E thickness max, F lead offset typical), # mm. Bel Fuse "Type 0ZRE Series", Rev. 0ZRE Apr2023 (www.belfuse.com/media/datasheets/products/circuit-protection/ # ds-cp-0zre-series.pdf), page 3, "Product Dimensions" (all dimensions in mm). PARTS = { "0ZRE0005FF": (1, 8.3, 10.7, 5.1, 7.6, 3.8, 1.6), "0ZRE0008FF": (1, 8.3, 10.7, 5.1, 7.6, 3.8, 1.6), "0ZRE0012FF": (1, 8.3, 10.7, 5.1, 7.6, 3.8, 1.6), "0ZRE0016FF": (1, 9.9, 12.5, 5.1, 7.6, 3.8, 1.6), "0ZRE0025FF": (2, 9.6, 17.4, 5.1, 7.6, 3.8, 1.8), "0ZRE0033FF": (2, 11.4, 16.5, 5.1, 7.6, 3.8, 1.8), "0ZRE0040FF": (2, 11.5, 19.5, 5.1, 7.6, 3.8, 1.8), "0ZRE0055FF": (3, 14.0, 21.7, 5.1, 7.6, 4.1, 1.9), "0ZRE0075FF": (3, 11.5, 23.4, 5.1, 7.6, 4.8, 1.9), "0ZRE0100FF": (4, 18.7, 24.4, 10.2, 7.6, 5.1, 1.9), "0ZRE0125FF": (4, 21.2, 27.4, 10.2, 7.6, 5.3, 1.9), "0ZRE0150FF": (4, 23.4, 30.9, 10.2, 7.6, 5.3, 1.9), "0ZRE0200FF": (3, 24.9, 33.8, 10.2, 7.6, 6.1, 1.9), } # Lead diameter by figure, the same page: Fig. 1 24 AWG 0.51, Fig. 2 22 AWG 0.65, Fig. 3 and 4 20 AWG 0.81. LEADS = {1: 0.51, 2: 0.65, 3: 0.81, 4: 0.81} # Proportions, for looks (the figures draw these but don't dimension them; README): a round body (Fig. 1 and 4) is a disc A across, # its top at B; below it the coating runs down each lead to the board as a sleeve 2.5 x the lead's diameter. A rectangular body # (Fig. 2 and 3) is a block A wide and B high from the board, its top corners rounded with a radius of 0.15 x A. SLEEVE = 2.5 CORNER = 0.15 if part_number not in PARTS: raise ValueError(f"no part {part_number!r}: {', '.join(PARTS)}") fig, A, B, C, D, E, F = PARTS[part_number] d = LEADS[fig] round_body = fig in (1, 4) model = Model() # The body, drawn in the XZ plane at y = +E / 2 and extruded through to -E / 2. model.plane("body_plane", on="XZ", offset=-E / 2, name="Body") with model.sketch("body_sketch", on="body_plane", name="Body") as sk: if round_body: sk.circle("body_disc", (0, B - A / 2), A / 2) else: r = CORNER * A arc = [(r * math.cos(math.pi / 2 * k / 6), r * math.sin(math.pi / 2 * k / 6)) for k in range(7)] outline = [(-A / 2, 0), (A / 2, 0)] outline += [(A / 2 - r + u, B - r + v) for u, v in arc] outline += [(-A / 2 + r - u, B - r + v) for u, v in reversed(arc)] sk.polyline("body_outline", outline, closed=True) model.extrude("body", "body_sketch", distance=E, op="new", body="body_body", name="Body") leads = [(-C / 2, F / 2), (C / 2, -F / 2)] if round_body: # Coating sleeves from the board up into the disc. for i, (x, y) in enumerate(leads, 1): with model.sketch(f"sleeve_{i}_sketch", on="XY", name="Coating") as sk: sk.circle(f"sleeve_{i}_round", (x, y), SLEEVE * d / 2) model.extrude(f"sleeve_{i}", f"sleeve_{i}_sketch", distance=B - A / 2, op="join", body="body_body", name="Coating") # Leads: straight, from the tail below the board up to the body's foot. model.plane("leads_start", on="XY", offset=-tail, name="Lead ends") bodies = [] for i, (x, y) in enumerate(leads, 1): with model.sketch(f"lead_{i}_section", on="leads_start", name=f"Lead {i}") as sk: sk.circle(f"lead_{i}_round", (x, y), d / 2) model.extrude(f"lead_{i}", f"lead_{i}_section", distance=tail, op="new", body=f"lead_{i}_body", name=f"Lead {i}") bodies.append(f"lead_{i}_body") # Materials (page 3: "Insulating coating: Flame retardant epoxy"; "Lead material: Matte tin plated copper"; no weight given): the body is # a carbon-filled polymer between two metal plates under the epoxy coat, shown as pmma (1.18, epoxy about 1.2), in a colour for looks; # the leads copper. model.material("pmma", bodies=["body_body"], color="#d9a02b") model.material("copper", bodies=bodies, color="#c9ccd1") result = model.result()