by adom
0402 SMD Green LED · 3.3 V drop · 25 mA max
master
John Lauer
Datasheet-true STEP height (0.45 mm), side MPN mark re-applied; GLBs, hero rebuilt without Z stretch; 0402 pads 0.4 x 0…
d9ab1e9
20d ago
#!/bin/bash
# Datasheet-true STEP heights (2026-09-30): scale the originally shipped KiCad model in Z about the seating plane,
# then colour, side-etch, convert and rebuild the page GLBs (no Z stretch any more), hero GLB. Serial. Run from led-pass/.
set -e
P=~/.local/share/adom-aiflow/occ/bin/python
ETCH=/home/adom/project/aiflow-work/merged/tools/laser-etch/etch_part.py
SRC=/tmp/claude-1001/-home-adom-project/0a736c0e-0cd6-4308-915d-67b05c9b563f/scratchpad/leds # originally shipped files
only="$*"
while IFS=$'\t' read slug mpn fam wl lens; do
case $mpn in IN-S42ATR|WS2812B-2020) continue;; IN-S42*) H=0.45; F=0.9; lh=0.2;; IN-S63*) H=0.55; F=0.5; lh=0.25;; esac
[ -n "$only" ] && [[ " $only " != *" $slug "* ]] && continue
case $mpn in *UW) c=white_phosphor;; *A) c=amber;; *B) c=blue;; *G) c=green;; *R) c=red;; esac
cp $SRC/$slug/$mpn.step $slug/provenance/$mpn-kicad-original.step
$P tools/xcaf_scale_axis.py $slug/provenance/$mpn-kicad-original.step $slug/$mpn-uncoloured.step $F 2>/dev/null | grep scaled > $slug/provenance/$mpn-height.report.txt
$P tools/colour_led.py $slug/$mpn-uncoloured.step work/etch/$mpn.coloured.step --family $fam --lens $lens --report $slug/provenance/$mpn-colour.report.json > /dev/null 2>&1
$P $ETCH --in work/etch/$mpn.coloured.step --mpn $mpn --out $slug/$mpn.step --face side 2>/dev/null | grep '^{' | tail -1 > $slug/provenance/$mpn-etch.report.json
step2glb convert $slug/$mpn.step -o work/$mpn.s2g.glb 2>&1 | grep '^OK' | cut -c1-70
for kind in glb insertion.glb; do
if [ $mpn = IN-S63BT5B ] && [ $kind = glb ]; then cp work/$mpn.s2g.glb $slug/$mpn.glb; continue; fi
python3 tools/rebuild_composite.py $SRC/$slug/$mpn.$kind work/$mpn.s2g.glb $slug/$mpn.$kind --mpn $mpn --colour $c --lens $lens --node-zscale 1 > work/reports/$mpn.$kind.json
done
case $mpn in *UW) note="White LED: lens drawn as the pale yellow phosphor (emission CIE x/y $wl)";; *A) note="Amber lens colour (dominant wavelength $wl nm); the real lens is clear";; *B) note="Blue lens colour (dominant wavelength $wl nm); the real lens is clear";; *G) note="Green lens colour (dominant wavelength $wl nm); the real lens is clear";; *R) note="Red lens colour (dominant wavelength $wl nm); the real lens is clear";; esac
python3 tools/build_hero.py $slug $mpn work/$mpn.s2g.glb --lens $lens --zscale 1 --height-mm $H --label-height $lh --colour-note "$note"
done < tools/colours.tsv