main
Caleb Publish 0.1.1 fe38c5c 1d ago
#!/bin/bash
# Rebuild the STM32G0B1KBU6 3D model (Adom, 2026-10-27). Needs cadquery 2.8, step2glb, adom-chip-laser.
set -e
git clone https://gitlab.com/kicad/libraries/kicad-footprint-generator.git kfg && cd kfg && git checkout 6ef686944ab44b3d3d75965a66730ac65d057e63
git apply ../kicad-generator-ds13560.patch      # UFQFPN-32 entry set to ST DS13560 Rev 6 Table 83 values
PYTHONPATH=src:. python3 src/generators/generate.py -g package/no_lead -p UFQFPN-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm -m ../gen
cd ..
# header: author/description rewritten to Adom (geometry bytes untouched), saved as stm32g0b1kbu6.step
adom-chip-laser etch stm32g0b1kbu6.step STM32G0B1KBU6 stm32g0b1kbu6-etched.step
for f in stm32g0b1kbu6 stm32g0b1kbu6-etched; do
  step2glb convert $f.step -o $f.raw.glb
  python3 glbmat.py $f.raw.glb $f.glb "0.019,0.018,0.018=0.0,0.55,Adom.Body (epoxy)" "0.645,0.638,0.572=1.0,0.35,Adom.Leads (matte tin)" "0.435,0.398,0.316=0.0,0.6,Adom.Pin1Mark"
done