contact_printer/scripts/scad.sh

22 lines
631 B
Bash
Raw Normal View History

2018-07-14 14:29:43 +00:00
#!/bin/bash
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
echo "Building ${green}contact_printer${reset} project..."
#build OpenSCAD models
mkdir -p stl
cat scad/contact_printer.scad | grep "PART ==" | awk -F'==' '{print $2}' | awk -F'"' '{print $2}' | awk -F'"' '{print $1}' | sort > models.txt
2018-07-14 14:29:43 +00:00
while read m; do
echo "Rendering $m..."
openscad --export-format=asciistl --enable manifold -o "stl/contact_printer_$m.stl" -D "PART=\"$m\"" scad/contact_printer.scad
python scad/common/c14n_stl.py "stl/contact_printer_$m.stl"
2018-07-14 14:29:43 +00:00
done < models.txt
bash scripts/bom.sh "./scad/contact_printer.scad"
2018-07-14 14:29:43 +00:00
#run client tests?