export.sh should print helpful message if aux_axis_origin is missing fix #317

This commit is contained in:
rusefillc 2023-08-02 10:41:07 -04:00
parent cc4c99b96d
commit 7678483251
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,10 @@ kicad-cli pcb export pos --format csv --units mm --use-drill-file-origin --botto
echo Getting Drill/Place origin from PCB
X=$(grep "aux_axis_origin" "$PCB_FILE" | tr -s ' ' | cut -d ' ' -f 3)
Y=$(grep "aux_axis_origin" "$PCB_FILE" | tr -s ' ' | cut -d ' ' -f 4 | tr -d ')')
if [ ! "$Y" ]; then
echo "aux_axis_origin is missing in the PCB file"
exit -1
fi
echo Export VRML using $X $Y
python "$DIR/export-vrml.py" "$PCB_FILE" "$X" "$Y" "gerber/$IN.wrl"