Convert all v3 files to binary from ascii where appropriate.
This commit is contained in:
parent
f636e4127a
commit
a0145d462e
|
@ -47,6 +47,15 @@ do
|
||||||
facets="N/A"
|
facets="N/A"
|
||||||
volume="N/A"
|
volume="N/A"
|
||||||
else
|
else
|
||||||
|
firstline=`head -n 1 "$stl"`
|
||||||
|
if [[ $firstline == solid* ]]; then
|
||||||
|
#convert from ascii to binary
|
||||||
|
admesh -c -b "$stl" "$stl"
|
||||||
|
newSize=`wc -c < "$stl"`
|
||||||
|
newSize=`echo $newSize | xargs`
|
||||||
|
percent=`echo "scale=1;($newSize/$fileSize)*100" | bc`
|
||||||
|
echo "Binary conversion created STL file ${percent}% of original"
|
||||||
|
fi
|
||||||
ao=`admesh -c "$stl"`
|
ao=`admesh -c "$stl"`
|
||||||
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
facets=`echo "$ao" | grep "Number of facets" | awk '{print $5}'`
|
||||||
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
volume=`echo "$ao" | grep "Number of parts" | awk '{print $8}'`
|
||||||
|
|
Loading…
Reference in New Issue