1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-23 04:13:20 +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" rot="rotate $ROT"
fi 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 write=write
yi=0 yi=0
while [ $yi -lt $YN ]; do while [ $yi -lt $YN ]; do
@ -51,7 +63,7 @@ while [ $yi -lt $YN ]; do
cameo <<EOF || exit cameo <<EOF || exit
mm mm
gerber 35mil ../$NAME-PCB_Edges.gbr gerber 35mil $edges
$rot $rot
align 1 $X0 $Y0 # align relative to board corner align 1 $X0 $Y0 # align relative to board corner
translate 4mm 4mm # move to PCB zone assigned to project translate 4mm 4mm # move to PCB zone assigned to project
@ -75,7 +87,7 @@ $write mill.gp
remainder remainder
empty empty
gerber $MILL_OUT ../$NAME-PCB_Edges.gbr gerber $MILL_OUT $edges
offset offset
append mill.gp append mill.gp
EOF EOF