#!/bin/bash ############################ # # Compile all STL files # ############################ while read line; do name=$(echo "${line}" | awk -F',' '{print $1}') if [[ "${name}" == "lens" ]]; then continue; fi diameter=$(echo "${line}" | awk -F',' '{print $2}') height=$(echo "${line}" | awk -F',' '{print $3}') thickness=$(echo "${line}" | awk -F',' '{print $4}') echo "Compiling ${name}..." stl="stl/${name}_front_cap.stl" openscad -o "${stl}" -D "Diameter=${diameter}" -D "Thickness=${thickness}" -D "Height=${height}" scad/front_cap.scad python scad/common/c14n_stl.py "${stl}" done < ./lenses.csv README=$(cat ./README.md)