component
TPS16850VMAR - 9 V to 80 V, 20 A eFuse
Public Made by Adomby adom
Texas Instruments TPS16850VMAR: 9 V to 80 V, 20 A stackable integrated hot-swap eFuse with a 3.5 mOhm FET, fast current monitor and auto-retry fault response, LQFN-CLIP-23 (VMA, 6.0 x 5.0 mm). KiCad symbol and footprint, Fusion and Altium libraries, datasheet-built 3D model and datasheet.
main
#!/usr/bin/env python3
"""Physical materials for a chip GLB by part (node name from the STEP assembly). step2glb writes base colours only,
so glTF defaults (metallic 1, roughness 1) render everything as rough metal. Sets:
body -> "Adom.Body (epoxy)" metallic 0, roughness 0.55 (colour kept)
pins -> "Adom.Terminals (NiPdAu)" metallic 1, roughness 0.35 (colour kept)
pin_ends -> "Adom.Terminals (sawn copper ends)" metallic 1, roughness 0.4 (colour kept)
Adom.LaserEtch -> "Adom.LaserEtch (virtual MPN)" metallic 0, roughness 0.7 (colour kept)
usage: materials.py in.glb [out.glb]"""
import sys
from pygltflib import GLTF2, PbrMetallicRoughness
TIN = [0.72, 0.72, 0.70, 1.0]
SPEC = {"body": ("Adom.Body (epoxy)", 0.0, 0.55, None), "pins": ("Adom.Terminals (NiPdAu)", 1.0, 0.35, None),
"pin_ends": ("Adom.Terminals (sawn copper ends)", 1.0, 0.4, None),
"Adom.LaserEtch": ("Adom.LaserEtch (virtual MPN)", 0.0, 0.7, None)}
src = sys.argv[1]; out = sys.argv[2] if len(sys.argv) > 2 else src
g = GLTF2().load(src); seen = {}
for n in g.nodes:
if n.mesh is None: continue
key = next((k for k in SPEC if (n.name or "").startswith(k)), None)
if key is None: continue
for p in g.meshes[n.mesh].primitives:
if p.material is None: continue
if seen.get(p.material, key) != key: sys.exit(f"ERROR: material {p.material} shared by {seen[p.material]} and {key}")
seen[p.material] = key
name, metal, rough, col = SPEC[key]; m = g.materials[p.material]
pbr = m.pbrMetallicRoughness or PbrMetallicRoughness()
pbr.metallicFactor, pbr.roughnessFactor = metal, rough
if col: pbr.baseColorFactor = col
m.pbrMetallicRoughness = pbr; m.name = name
missing = [k for k in ("body", "pins") if k not in seen.values()]
if missing: sys.exit(f"ERROR: no {missing} part in {src}")
g.save(out); print("OK", out, sorted(set(seen.values())))