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..."
|
2024-11-06 18:51:17 +00:00
|
|
|
openscad --export-format=asciistl --enable manifold -o "stl/contact_printer_$m.stl" -D "PART=\"$m\"" scad/contact_printer.scad
|
2023-05-23 15:50:15 +00:00
|
|
|
python scad/common/c14n_stl.py "stl/contact_printer_$m.stl"
|
2018-07-14 14:29:43 +00:00
|
|
|
done < models.txt
|
|
|
|
|
2024-11-06 18:51:17 +00:00
|
|
|
bash scripts/bom.sh "./scad/contact_printer.scad"
|
|
|
|
|
2018-07-14 14:29:43 +00:00
|
|
|
#run client tests?
|