main
John Lauer Component record for mal216099702e3: files batch 2 8841b6d 1d ago
#!/usr/bin/env python3
"""Datasheet-built 3D model of Vishay BCcomponents 160 CLA, case code 1216 (12.5 x 12.5 x 16, 4-pin version), as used
by MAL216099702E3 (100 uF, 80 V). Frame: Z up, millimetres, seated on z = 0, centred on the footprint origin, anode
(+, pad 1) toward -X like KiCad's CP_Elec footprints; the footprint is Vishay Fig. 4 turned 180 degrees.

Printed values (Vishay doc 28405, rev. 20-Aug-2026, p.2 Fig. 2 and Table 1, case 1216):
  L max 12.9, W max 12.9, H max 16.5, D 12.5, B max 1.3 (terminal width), S 3.6 (dummy pin length),
  L1 max 14.9 (over the terminals), terminals protrude min 0.4 / max 1.0 beyond the base plate.
Chosen inside those limits: base plate 12.8 x 12.8, total height 16.0 (nominal case 16), terminal protrusion 0.75
(mid of 0.4 to 1.0, so L1 = 14.3), terminal width 1.2.
Not dimensioned, measured off Fig. 2 at its own scale (plate edge 12.9 = 415 px at 600 dpi crop, 32.2 px/mm; D = 390 px,
31.2 px/mm): base plate thickness 2.2, anode-side corner bevels 2.6 x 2.6, cathode-side corner radius 0.6, can neck
1.4 long at D 11.6, terminal inner end 2.7 from the centre, dummy pins 2.6 deep from 0.2 inside the plate edge,
cathode bar on the top about 6.0 x 2.5 at 3.0 to 5.5 mm from the centre on the cathode side (drawn 5.0 x 2.3 at 2.6 to 4.9 so it stays on the flat top inside the 0.6 edge round). Terminal thickness 0.3
(not drawn; typical lead-frame strip), base plate bottom 0.2 above the seating plane (Fig. 3 allows 0.3).
Colours from the maker's product photo (DigiKey image of the 12.5 mm 160 CLA): bare aluminium can, black base plate,
black cathode bar, tinned terminals.
usage: build_cla1216.py out.step [--simple]   (CadQuery python; --simple = low-detail stand-in: no neck, no fillets, cathode bar kept)"""
import sys
import cadquery as cq
out = sys.argv[1]; simple = "--simple" in sys.argv
PLATE, PT, PZ = 12.8, 2.2, 0.2           # plate size, thickness, bottom height
H, D, DN, NECK = 16.0, 12.5, 11.6, 1.4    # total height, can diameter, neck diameter, neck length
BEV, RAD = 2.6, 0.6
TW, TT, TIN, PROT = 1.2, 0.3, 2.7, 0.75  # terminal width, thickness, inner end, protrusion
h = PLATE / 2
# base plate: square with two bevelled corners on the anode (-X) side
pts = [(-h + BEV, -h), (h - 0.0, -h), (h, h), (-h + BEV, h), (-h, h - BEV), (-h, -h + BEV)]
plate = cq.Workplane("XY").polyline(pts).close().extrude(PT).translate((0, 0, PZ))
if not simple:
    plate = plate.edges("|Z and >X").fillet(RAD)
# can: neck then body, top edge rounded
z0 = PZ + PT
if simple:
    can = cq.Workplane("XY").circle(D / 2).extrude(H - z0).translate((0, 0, z0))
else:
    neck = cq.Workplane("XY").circle(DN / 2).extrude(NECK + 0.2).translate((0, 0, z0))
    body = cq.Workplane("XY").circle(D / 2).extrude(H - z0 - NECK).translate((0, 0, z0 + NECK)).faces(">Z").edges().fillet(0.6).faces("<Z").edges().fillet(0.4)
    can = neck.union(body)
# terminals: flat strips under the plate, from the inner end to the protruding tip
def strip(x0, x1, y0, y1, z0_=0.0, t=TT):
    return cq.Workplane("XY").box(abs(x1 - x0), abs(y1 - y0), t, centered=False).translate((min(x0, x1), min(y0, y1), z0_))
tip = h + PROT
anode = strip(-tip, -TIN, -TW / 2, TW / 2)
cathode = strip(TIN, tip, -TW / 2, TW / 2)
# dummy pins (no electrical connection): 3.6 along X (S), 2.6 deep in Y from 0.2 inside the plate edge
dummy_a = strip(-1.8, 1.8, h - 0.2 - 2.6, h - 0.2); dummy_b = strip(-1.8, 1.8, -h + 0.2, -h + 0.2 + 2.6)
mark = cq.Workplane("XY").box(2.3, 5.0, 0.01, centered=(False, True, False)).translate((2.6, 0, H))  # kept on the flat top (inside the 0.6 edge round)

def srgb(c):  # cq.Color takes sRGB and stores linear values
    return tuple(12.92 * v if v <= 0.0031308 else 1.055 * v ** (1 / 2.4) - 0.055 for v in c)
asm = cq.Assembly(name="MAL216099702E3")
asm.add(can, name="can", color=cq.Color(*srgb((0.62, 0.63, 0.64))))
asm.add(plate, name="base_plate", color=cq.Color(*srgb((0.025, 0.025, 0.027))))
asm.add(anode, name="terminal_anode_pad1", color=cq.Color(*srgb((0.66, 0.66, 0.64))))
asm.add(cathode, name="terminal_cathode_pad2", color=cq.Color(*srgb((0.66, 0.66, 0.64))))
asm.add(dummy_a, name="dummy_pin_MP_a", color=cq.Color(*srgb((0.66, 0.66, 0.64))))
asm.add(dummy_b, name="dummy_pin_MP_b", color=cq.Color(*srgb((0.66, 0.66, 0.64))))
asm.add(mark, name="cathode_mark", color=cq.Color(*srgb((0.03, 0.03, 0.03))))
asm.save(out)
print("OK", out)