Add a test case that compares the sorted stl of the python c14n script vs. sort-stl (does not pass)

This commit is contained in:
Matt McWilliams 2023-04-14 18:47:57 -04:00
parent 85bcc06ea0
commit 57c5f9cccf
1 changed files with 25 additions and 0 deletions

View File

@ -101,3 +101,28 @@ rm -rf "${RANDOM_SEED}"
#--export-format asciistl
#--export-format binstl
##############
# SORT-STL vs. C14N
##############
echo "sort-stl..."
SORTSTL=$(mktemp -d)
FIRST="${SORTSTL}/first.stl"
SECOND="${SORTSTL}/second.stl"
openscad -q -o "${FIRST}" --enable sort-stl scad/deterministic.scad
openscad -q -o "${SECOND}" scad/deterministic2.scad
python3 python/c14n_stl.py "${SECOND}"
DIFF_VAL=$(diff "${FIRST}" "${SECOND}")
if [[ "${DIFF_VAL}" == "" ]]; then
echo "Files are the same"
else
#echo "${DIFF_VAL}"
echo "Files are different"
fi
rm -rf "${SORTSTL}"