From 2717264ff4e99003b357969c74003957b2acdfd2 Mon Sep 17 00:00:00 2001 From: Dirk Heilig Date: Tue, 16 Apr 2024 00:21:15 +0200 Subject: [PATCH] add colorscad --- make.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/make.sh b/make.sh index 5008890..6aed2be 100755 --- a/make.sh +++ b/make.sh @@ -1,6 +1,9 @@ #!/bin/bash openscad="$(which openscad)" +colorscad="${COLORSCAD:-$(which colorscad.sh)}" +use_colorscad=false +test -x "$colorscad" || use_colorscad=false if [[ $? -gt 0 && "$(uname)" == "Darwin" ]]; then openscad="/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD" @@ -23,8 +26,12 @@ while [[ $# -gt 0 ]]; do name="$1" shift echo -n generating for "$name" + if [[ "$use_colorscad" == "true" ]]; then + "$colorscad" -i "AuerNameTag.scad" -o "$OUTDIR/${name}.3mf" -- -D "name=\"$name\"" -D "part=3" &>/dev/null & + fi "$openscad" -o "$OUTDIR/${name}_text.stl" -D "name=\"$name\"" -D "part=2" "AuerNameTag.scad" &>/dev/null & "$openscad" -o "$OUTDIR/${name}_base.stl" -D "name=\"$name\"" -D "part=1" "AuerNameTag.scad" &>/dev/null & wait + echo " done" done