main
John Lauer Component files 1/1 bf15c11 2d ago
"""AI-created simplified 3D model of Wurth Elektronik 7499111121A (WE-RJ45LAN, RJ45 tab down with
integrated 10/100/1000BASE-T magnetics, yellow/green LEDs, shielded, THT), built from the Wurth
datasheet 7499111121A rev 003.000 page 1 (body 16.0 x 21.25 x 13.5, pin length 3.5 +-0.5 below the
PCB, recommended hole pattern: 10 x d0.9 signal, 4 x d1.03 LED, 2 x d1.6 shield, 2 x d3.25 posts).

Frame: Adom Z-up, millimetres, seating plane z = 0, origin = body centre (footprint origin).
Model y = -(KiCad y); the RJ45 opening faces model -y (front edge y = -10.625). Seen from the front,
looking into the port, the yellow LED (pins 11/12) is on the left and the green LED (13/14) on the right.

Simplifications: the shield is a closed sheet-metal box with the port opening; the RJ45 cavity is a
plain rectangular opening with the latch slot at the bottom (tab down); LED light pipes are drawn as
translucent blocks at the lower front corners; no panel EMI fingers, no internal contacts; pins are
straight round posts.

Run: python 7499111121a_model.py <out.step>
"""
import sys
import cadquery as cq

W, D, H = 16.0, 21.25, 13.5
YF, YR = -D / 2, D / 2
T = 0.25              # shield sheet
PIN_L = 3.5


def box(x0, x1, y0, y1, z0, z1):
    return (cq.Workplane("XY").box(x1 - x0, y1 - y0, z1 - z0, centered=False)
            .translate((x0, y0, z0)))


def post(x, y, d, z0, z1):
    return cq.Workplane("XY").circle(d / 2).extrude(z1 - z0).translate((x, y, z0))


# port opening (tab down: latch slot at the bottom, between the LEDs)
OPEN = box(-5.85, 5.85, YF - 1, YF + 15.0, 3.3, 11.5)
LATCH = box(-1.75, 1.75, YF - 1, YF + 15.0, 1.7, 3.4)
LED_POCKETS = box(-6.9, -3.85, YF - 1, YF + 4.4, 0.95, 2.95).union(
    box(3.85, 6.9, YF - 1, YF + 4.4, 0.95, 2.95))

housing = box(-W / 2 + T, W / 2 - T, YF + T, YR - T, T, H - T)
housing = housing.cut(OPEN).cut(LATCH).cut(LED_POCKETS)

shield = box(-W / 2, W / 2, YF, YR, 0.0, H).cut(box(-W / 2 + T, W / 2 - T, YF + T, YR - T, T, H - T))
shield = shield.cut(OPEN).cut(LATCH).cut(LED_POCKETS)
# shield tabs into the d1.6 holes (KiCad (+-7.745, -3.315) -> model (+-7.745, +3.315))
for s in (-1, 1):
    shield = shield.union(box(s * 7.745 - 0.15, s * 7.745 + 0.15, 3.315 - 0.5, 3.315 + 0.5, -PIN_L, 0.0))
    shield = shield.union(box(min(s * 7.745, s * (W / 2)) - 0.0, max(s * 7.745, s * (W / 2)),
                              3.315 - 0.5, 3.315 + 0.5, 0.0, 0.6))

# plastic locating posts d3.25 (KiCad (+-5.715, -0.265) -> model y = +0.265), 2.5 below the seat
posts = post(-5.715, 0.265, 3.15, -2.5, 0.0).union(post(5.715, 0.265, 3.15, -2.5, 0.0))
housing = housing.union(posts)

# pins: signal 1-10 d0.6 posts; LED 11-14 d0.6 posts
pins = None
sig = {1: (-5.715, -9.155), 2: (-4.445, -6.615), 3: (-3.175, -9.155), 4: (-1.905, -6.615),
       5: (-0.635, -9.155), 6: (0.635, -6.615), 7: (1.905, -9.155), 8: (3.175, -6.615),
       9: (4.445, -9.155), 10: (5.715, -6.615),
       11: (-6.625, 3.815), 12: (-4.085, 3.815), 13: (4.085, 3.815), 14: (6.625, 3.815)}
for n, (kx, ky) in sig.items():
    p = post(kx, -ky, 0.6, -PIN_L, 0.5)
    pins = p if pins is None else pins.union(p)

led_y = box(-6.85, -3.9, YF + 0.05, YF + 4.3, 1.0, 2.9)
led_g = box(3.9, 6.85, YF + 0.05, YF + 4.3, 1.0, 2.9)

asm = cq.Assembly(name="7499111121A")
asm.add(shield, name="shield", color=cq.Color(0.80, 0.81, 0.82))
asm.add(housing, name="housing", color=cq.Color(0.06, 0.06, 0.06))
asm.add(pins, name="pins", color=cq.Color(0.86, 0.70, 0.30))
asm.add(led_y, name="led_yellow", color=cq.Color(0.95, 0.85, 0.10, 0.6))
asm.add(led_g, name="led_green", color=cq.Color(0.10, 0.75, 0.20, 0.6))
asm.export(sys.argv[1])
print("OK", sys.argv[1])