Created
August 29, 2025 13:14
-
-
Save srvanderplas/05c66fb4635984ecd23f14f6bf6327a8 to your computer and use it in GitHub Desktop.
Script to compile a multi-color OpenSCAD file to a 3mf file using colorscad.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Requires https://github.com/jschobben/colorscad to be somewhere on the path | |
| for m in {1..15} | |
| do | |
| file="multiplication/$(printf '%02dx.scad' ${m})" | |
| cp spinner-multiplication.scad $file | |
| #awk -v a="m=${m};" 'NR==3 { sub(".*insert-m-here", a) }' $file | |
| sed -E -i "3s/.*/m=${m};/" $file | |
| colorscad.sh -i "$file" -o "${file%.scad}.3mf" -f | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment