Add build step which orders stl if ascii

This commit is contained in:
mmcwilliams 2023-01-16 21:58:57 -05:00
parent bc5789018e
commit 54f16a864a
2 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@ DEPS=(
sqlite3 sqlite3
admesh admesh
openscad openscad
python3
) )
for dep in ${DEPS[@]}; do for dep in ${DEPS[@]}; do

View File

@ -66,6 +66,8 @@ render_part () {
else else
firstline=`head -n 1 "$stl"` firstline=`head -n 1 "$stl"`
if [[ $firstline == solid* ]]; then if [[ $firstline == solid* ]]; then
#order stl file if ascii
python3 scripts/c14n_stl.py "$stl"
#convert from ascii to binary #convert from ascii to binary
tmpBinary=`mktemp` tmpBinary=`mktemp`
admesh -c -b "$tmpBinary" "$stl" admesh -c -b "$tmpBinary" "$stl"