gokul/macro-six-usbc
USB-powered ATmega32U4 controller board with protected/switched 5 V power, six tactile keys, rotary encoder, reset/boot/ISP interfaces, power LED, and six daisy-chained SK6812 RGB LEDs driven through MOSFETs.
- Version
- 0.1.6
- License
- MIT
- Stars
- 0
enclosure/compact-previews.py
from pathlib import Path
import trimesh
for stem in ['enclosure-preview','enclosure-exploded']:
p=Path('enclosure/exports')/(stem+'.glb');s=trimesh.load(p,force='scene')
for node in list(s.graph.nodes_geometry):
placement,key=s.graph[node];m=s.geometry[key]
if node in ['top','bottom','switch-plate','PCB-reference'] or len(m.faces)<1500:continue
color=m.visual.face_colors[0].copy()
reduced=m.simplify_quadric_decimation(face_count=max(1000,len(m.faces)//4))
reduced.visual.face_colors=color;s.geometry[key]=reduced
s.export(str(p));print(stem,p.stat().st_size)