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
|
|
|
|
|
2023-05-23 15:50:15 +00:00
|
|
|
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
|
2023-05-23 15:50:15 +00:00
|
|
|
echo "Rendering $m..."
|
|
|
|
openscad -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
|
|
|
|
|
|
|
|
#run client tests?
|