Files
3dsign/requirements.txt
Brent Perteet 2719ec244d Add PNG to SVG color separation tool for multi-color 3D printing
Created split_png_by_brightness.py to split rasterized logos into separate
SVG files by color for Underground Magnetics logo conversion.

Key features:
- OpenCV contour hierarchy detection for proper hole handling
- Letters with enclosed shapes (d, o, g, etc.) now render correctly
- Tight brightness thresholds to avoid antialiasing artifacts
- Automatic bounding box cropping for optimal file sizes
- Black text: brightness < 40 (236k pixels, 21 shape groups)
- Grey icon: brightness 108-118 (119k pixels, 2 shape groups)

Results:
- um_black.svg: 6.1KB, 3070x233px (was 139KB, 3613x391px)
- um_grey.svg: 728B, 413x390px (was 253KB, 3613x391px)

Files:
- split_png_by_brightness.py: Main color separation tool
- IMPROVEMENTS.md: Detailed changelog and comparison
- README_underground_magnetics.md: Usage documentation
- underground-magnetics.eps: Source logo file
- um_black.svg: Separated black text (cropped)
- um_grey.svg: Separated grey icon (cropped)
- requirements.txt: Added opencv-python dependency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-31 09:51:24 -05:00

22 lines
357 B
Plaintext

cairocffi==1.7.1
CairoSVG==2.9.0
cffi==2.0.0
cssselect2==0.9.0
defusedxml==0.7.1
ImageIO==2.37.3
lazy-loader==0.5
mapbox_earcut==2.0.0
networkx==3.4.2
numpy==2.2.6
opencv-python==4.13.0.92
packaging==26.2
pillow==12.2.0
pycparser==3.0
scikit-image==0.25.2
scipy==1.15.3
shapely==2.1.2
tifffile==2025.5.10
tinycss2==1.5.1
trimesh==4.12.2
webencodings==0.5.1