component
MAL216099702E3 - 100 uF 80 V SMD Aluminium Electrolytic Capacitor, 150 C
Public Made by Adomby adom
Vishay BCcomponents MAL216099702E3 (160 CLA series): polarized SMD aluminium electrolytic capacitor, 100 uF +-20 %, 80 V, -55 C to +150 C, low impedance, AEC-Q200, 12.5 x 12.5 x 16 mm 4-pin case (1216). KiCad, Fusion and Altium libraries, 3D model and datasheet.
main
#!/usr/bin/env python3
"""Physical materials for the MAL216099702E3 GLBs, chosen by the node that uses each material (step2glb keeps the
STEP part names): can -> "Adom.Can (aluminium)" metallic 1 roughness 0.45; base_plate -> "Adom.BasePlate (black
plastic)" metallic 0 roughness 0.6; terminal_* / dummy_pin_* -> "Adom.Terminals (tin)" metallic 1 roughness 0.35;
cathode_mark -> "Adom.CathodeMark (black print)" metallic 0 roughness 0.8; Adom.LaserEtch -> "Adom.LaserEtch
(virtual MPN)" metallic 0 roughness 0.7. Base colours kept. usage: materials_cap.py in.glb [out.glb]"""
import sys
from pygltflib import GLTF2, PbrMetallicRoughness
SPEC = [("can", "Adom.Can (aluminium)", 1.0, 0.45), ("base_plate", "Adom.BasePlate (black plastic)", 0.0, 0.6),
("terminal", "Adom.Terminals (tin)", 1.0, 0.35), ("dummy_pin", "Adom.Terminals (tin)", 1.0, 0.35),
("cathode_mark", "Adom.CathodeMark (black print)", 0.0, 0.8), ("Adom.LaserEtch", "Adom.LaserEtch (virtual MPN)", 0.0, 0.7)]
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
sp = next((x for x in SPEC if (n.name or "").startswith(x[0])), None)
if sp is None: sys.exit(f"ERROR: unknown node {n.name}")
for p in g.meshes[n.mesh].primitives:
if seen.get(p.material, sp[1]) != sp[1]: sys.exit(f"ERROR: material {p.material} shared by {seen[p.material]} and {sp[1]}")
seen[p.material] = sp[1]; m = g.materials[p.material]
pbr = m.pbrMetallicRoughness or PbrMetallicRoughness(); pbr.metallicFactor, pbr.roughnessFactor = sp[2], sp[3]
m.pbrMetallicRoughness = pbr; m.name = sp[1]
g.save(out); print("OK", out, sorted(set(seen.values())))