Files
BoardGameInlets/.helperHerosKeepOut.sh
Elias Schröter bd6ea68d9a format&heroes
cleanup the formaat and make heroes box
2026-04-29 15:45:31 +02:00

34 lines
1.3 KiB
Bash
Executable File

OPENSCAD="openscad"
SCAD_FILE="./CardHolder.scad"
FOLDER=STL/HeroesKeepOut
mkdir -p STL
mkdir -p $FOLDER
# ── Boxes ─────────────────────────────────────────────────────────────
echo "Rendering Box-Items..."
"$OPENSCAD" -o "$FOLDER/Box-Items.stl" "./HeroesKeepOut/Box-Items.scad"
"$OPENSCAD" -o "$FOLDER/Box-Items-Lid.stl" "./HeroesKeepOut/Box-Items-Lid.scad"
echo "Rendering Box-Heroes..."
"$OPENSCAD" -o "$FOLDER/Box-Heroes.stl" "./HeroesKeepOut/Box-Heroes.scad"
"$OPENSCAD" -o "$FOLDER/Box-Heroes-Lid.stl" "./HeroesKeepOut/Box-Heroes-Lid.scad"
echo "Rendering Box-Figures-Heroes..."
"$OPENSCAD" -o "$FOLDER/Box-Figures-Heroes.stl" "./HeroesKeepOut/Box-Figures-Heroes.scad"
# ── Cards ─────────────────────────────────────────────────────────────
while IFS=',' read -r b t h name; do
# Remove quotes around name, replace spaces with -
label=$(printf '%s' "$name" | sed 's/"//g; s/ /-/g')
output="$FOLDER/Cards-$label.stl"
echo "Rendering $output..."
"$OPENSCAD" \
-D "b=$b" \
-D "t=$t" \
-D "h=$h" \
-D "name=\"$name\"" \
-o "$output" "$SCAD_FILE"
done <./HeroesKeepOut/cardConfigs.txt