1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-22 23:51:08 +02:00

cameo/templates/mkmk-simple: support new edge file names

KiCad recently changes file names. Edges used to be named *-PCB_Edges.gbr
but can now be named *-Edge_Cuts.gbr or *-Edge_Cuts.pho
This commit is contained in:
Werner Almesberger 2013-08-06 19:15:48 -03:00
parent 9a6772f79d
commit b8c927831f

View File

@ -42,6 +42,18 @@ if [ "$ROT" ]; then
rot="rotate $ROT"
fi
edges=
for n in PCB_Edges.gbr Edge_Cuts.gbr Edge_Cuts.pho; do
if [ -r "../$NAME-$n" ]; then
edges=../$NAME-$n
break
fi
done
if [ ! "$edges" ]; then
echo "no edges file found" 1>&2
exit 1
fi
write=write
yi=0
while [ $yi -lt $YN ]; do
@ -51,7 +63,7 @@ while [ $yi -lt $YN ]; do
cameo <<EOF || exit
mm
gerber 35mil ../$NAME-PCB_Edges.gbr
gerber 35mil $edges
$rot
align 1 $X0 $Y0 # align relative to board corner
translate 4mm 4mm # move to PCB zone assigned to project
@ -75,7 +87,7 @@ $write mill.gp
remainder
empty
gerber $MILL_OUT ../$NAME-PCB_Edges.gbr
gerber $MILL_OUT $edges
offset
append mill.gp
EOF