From 7678483251fc5f4b37c4d0ee04d345764206857d Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 2 Aug 2023 10:41:07 -0400 Subject: [PATCH] export.sh should print helpful message if aux_axis_origin is missing fix #317 --- kicad/bin/export.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kicad/bin/export.sh b/kicad/bin/export.sh index 65c75ea..be19f37 100644 --- a/kicad/bin/export.sh +++ b/kicad/bin/export.sh @@ -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"