Files
3dsign/command.txt
Brent Perteet 8b80f68a19 Fix SVG to STL conversion for multi-color 3D printing
Split green features into separate non-overlapping parts to fix slicing issues.

Key changes:
- Split green mask into icon (top) and text (bottom) using white text as separator
- Create 4 separate parts: base, green_icon, white_text, green_text
- Parts positioned at same Z height but don't overlap in XY space
- Assembly structure matches nameplate.3mf (components with identity transforms)
- Fixed polygon detection: reduced min_size, added preserve_topology
- Added mesh repair logic to ensure watertight meshes
- Updated material maps for new part names

Files:
- svg_logo_to_stl.py: Main conversion script with green split logic
- Color logo - no background.svg: Source SVG file
- command.txt: Usage documentation with working parameters
- requirements.txt: Python dependencies
- .gitignore: Exclude output files and debug images

Minimum scale: 254mm width for 0.4mm nozzle (smaller features too thin to print)

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

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

29 lines
1.5 KiB
Plaintext

# SVG to STL Conversion Command
# Note: The DYLD_LIBRARY_PATH is needed for Cairo to work on macOS
export DYLD_LIBRARY_PATH="/opt/homebrew/lib:$DYLD_LIBRARY_PATH" && source .venv/bin/activate && python svg_logo_to_stl.py "Color logo - no background.svg" logo_output --width-mm 254 --base-thickness 1.5 --feature-height 2.5
# Or if you've already activated the venv and set the library path:
python svg_logo_to_stl.py "Color logo - no background.svg" logo_output --width-mm 254 --base-thickness 1.5 --feature-height 2.5
# Output files:
# - logo_output_base.stl - Black base plate (Z: 0 to 1.5mm)
# - logo_output_green_icon.stl - Green microchip icon at top (Z: 1.5 to 4.0mm)
# - logo_output_white.stl - White "SPARKSOFT DESIGN" text (Z: 1.5 to 4.0mm)
# - logo_output_green_bottom.stl - Green "EMBEDDED SOLUTIONS" text (Z: 1.5 to 4.0mm)
# - logo_output_assembled.stl - All parts combined (single object)
# - logo_output_assembled.3mf - All parts as single mesh (for paint tool)
# - logo_output_parts.3mf - 4 separate selectable parts (BEST for multi-color!)
# Import logo_output_parts.3mf into BambuStudio
# You'll see 4 separate parts that can each be assigned different filaments:
# 1. base - black base plate
# 2. green_icon - microchip icon
# 3. white_text - middle text
# 4. green_text - bottom text
# Parts do NOT overlap in XY space, preventing slicing issues
# Total model height: 4.0mm (1.5mm base + 2.5mm features)
# IMPORTANT: Scale must be 254mm or larger for 0.4mm nozzle
# Smaller sizes cause features to be too small for proper toolpath generation