COLORSCAD="../colorscad/colorscad.sh" FOLDER=Generated/HeroesKeepOut echo "Rendering Heros keep out ..." mkdir -p Generated mkdir -p $FOLDER # ── Boxes ───────────────────────────────────────────────────────────── mkdir -p $FOLDER/Box echo "Rendering Box-Items..." "$COLORSCAD" -o "$FOLDER/Box/Box-Items.3mf" -i "./HeroesKeepOut/Box-Items.scad" "$COLORSCAD" -o "$FOLDER/Box/Box-Items_and_Tokens-Lid-x2.3mf" -i "./HeroesKeepOut/Box-Items-Lid.scad" echo "Rendering Box-Tokens..." "$COLORSCAD" -o "$FOLDER/Box/Box-Tokens.3mf" -i "./HeroesKeepOut/Box-Tokens.scad" echo "Rendering Box-Figures-Heroes..." "$COLORSCAD" -o "$FOLDER/Box/Box-Figure-Heroes.3mf" -i "./HeroesKeepOut/Box-Figure-Heroes.scad" echo "Rendering Box-Figures-Big..." "$COLORSCAD" -o "$FOLDER/Box/Box-Figure-Big.3mf" -i "./HeroesKeepOut/Box-Figure-Big.scad" echo "Rendering Box-Figures-Monsters..." "$COLORSCAD" -o "$FOLDER/Box/Box-Figure-Monsters.3mf" -i "./HeroesKeepOut/Box-Figure-Monsters.scad" SCAD_FILE="./HeroesKeepOut/Box-Figure.scad" while IFS=',' read -r x y z name; do label=$(printf '%s' "$name" | sed 's/"//g; s/ /-/g') output="$FOLDER/Box/Box-Figure-$label.3mf" echo "Rendering $output..." "$COLORSCAD" -o "$output" -i "$SCAD_FILE" -- -D "x=$x" -D "y=$y" -D "z=$z" -D "name=\"$name\"" done <./HeroesKeepOut/Box-Figure-Configs.txt # ── Cards ───────────────────────────────────────────────────────────── SCAD_FILE="./Card-Holder.scad" mkdir -p $FOLDER/Cards while IFS=',' read -r x y z name; do label=$(printf '%s' "$name" | sed 's/"//g; s/ /-/g') output="$FOLDER/Cards/Cards-$label.3mf" echo "Rendering $output..." "$COLORSCAD" -o "$output" -i "$SCAD_FILE" -- -D "x=$x" -D "y=$y" -D "z=$z" -D "name=\"$name\"" done <./HeroesKeepOut/Card-Configs.txt