mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 00:17:11 +02:00
fab/prettygerbv: search also for current KiCad Gerber file names
This commit is contained in:
parent
50dd3bc0fe
commit
1d762923e4
@ -2,8 +2,8 @@
|
|||||||
#
|
#
|
||||||
# prettygerbv - Use gerbv to generate "pretty" views of a PCB
|
# prettygerbv - Use gerbv to generate "pretty" views of a PCB
|
||||||
#
|
#
|
||||||
# Written 2011, 2013 by Werner Almesberger
|
# Written 2011, 2013, 2017 by Werner Almesberger
|
||||||
# Copyright 2011, 2013 Werner Almesberger
|
# Copyright 2011, 2013, 2017 Werner Almesberger
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -58,11 +58,16 @@ EOF
|
|||||||
|
|
||||||
choose()
|
choose()
|
||||||
{
|
{
|
||||||
if [ -e "$1-$3" ]; then
|
name=$1
|
||||||
echo "$1-$3"
|
shift
|
||||||
else
|
for n in "$@"; do
|
||||||
echo "$1-$2"
|
if [ -e "$name-$n" ]; then
|
||||||
fi
|
echo "$name-$n"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "no choice for $@" 1>&2
|
||||||
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -81,12 +86,12 @@ run_gerbv()
|
|||||||
front()
|
front()
|
||||||
{
|
{
|
||||||
layers_begin 5
|
layers_begin 5
|
||||||
layer `choose $NAME Front.gtl F_Cu.gtl` $COPPER
|
layer `choose $NAME Front.gtl F_Cu.gtl F.Cu.gbr` $COPPER
|
||||||
[ "$drill" ] && layer $drill $DRILL
|
[ "$drill" ] && layer $drill $DRILL
|
||||||
layer `choose $NAME SoldP_Front.gtp F_Paste.gtp` $PASTE
|
layer `choose $NAME SoldP_Front.gtp F_Paste.gtp F.Paste.gbr` $PASTE
|
||||||
layer `choose $NAME Mask_Front.gts F_Mask.gts` $INV $MASK
|
layer `choose $NAME Mask_Front.gts F_Mask.gts F.Mask.gbr` $INV $MASK
|
||||||
layer `choose $NAME SilkS_Front.gto F_SilkS.gto` $SILK
|
layer `choose $NAME SilkS_Front.gto F_SilkS.gto F.SilkS.gbr` $SILK
|
||||||
layer `choose $NAME PCB_Edges.gbr Edge_Cuts.gbr` $EDGE
|
layer `choose $NAME PCB_Edges.gbr Edge_Cuts.gbr Edge.Cuts.gbr` $EDGE
|
||||||
layers_end
|
layers_end
|
||||||
|
|
||||||
run_gerbv "$1"
|
run_gerbv "$1"
|
||||||
@ -96,12 +101,12 @@ front()
|
|||||||
back()
|
back()
|
||||||
{
|
{
|
||||||
layers_begin 5
|
layers_begin 5
|
||||||
layer `choose $NAME Back.gbl B_Cu.gbl` $COPPER
|
layer `choose $NAME Back.gbl B_Cu.gbl B.Cu.gbr` $COPPER
|
||||||
[ "$drill" ] && layer $drill $DRILL
|
[ "$drill" ] && layer $drill $DRILL
|
||||||
layer `choose $NAME SoldP_Back.gbp B_Paste.gbp` $PASTE
|
layer `choose $NAME SoldP_Back.gbp B_Paste.gbp B.Paste.gbr` $PASTE
|
||||||
layer `choose $NAME Mask_Back.gbs B_Mask.gbs` $INV $MASK
|
layer `choose $NAME Mask_Back.gbs B_Mask.gbs B.Mask.gbr` $INV $MASK
|
||||||
layer `choose $NAME SilkS_Back.gbo B_SilkS.gbo` $SILK
|
layer `choose $NAME SilkS_Back.gbo B_SilkS.gbo B.SilkS.gbr` $SILK
|
||||||
layer `choose $NAME PCB_Edges.gbr Edge_Cuts.gbr` $EDGE
|
layer `choose $NAME PCB_Edges.gbr Edge_Cuts.gbr Edge.Cuts.gbr` $EDGE
|
||||||
layers_end
|
layers_end
|
||||||
|
|
||||||
run_gerbv _tmp.png
|
run_gerbv _tmp.png
|
||||||
@ -113,9 +118,9 @@ back()
|
|||||||
conn()
|
conn()
|
||||||
{
|
{
|
||||||
layers_begin 3
|
layers_begin 3
|
||||||
layer `choose $NAME Back.gbl B_Cu.gbl` $BACK
|
layer `choose $NAME Back.gbl B_Cu.gbl B.Cu.gbr` $BACK
|
||||||
layer `choose $NAME Front.gtl F_Cu.gtl` $FRONT
|
layer `choose $NAME Front.gtl F_Cu.gtl F.Cu.gbr` $FRONT
|
||||||
layer `choose $NAME PCB_Edges.gbr Edge_Cuts.gbr` $EDGE2
|
layer `choose $NAME PCB_Edges.gbr Edge_Cuts.gbr Edge.Cuts.gbr` $EDGE2
|
||||||
layers_end
|
layers_end
|
||||||
|
|
||||||
run_gerbv "$1"
|
run_gerbv "$1"
|
||||||
|
Loading…
Reference in New Issue
Block a user