Paul Kube wrote:
> 1. Composite layers. Not 100% clear to me what OLIMEX means by this,
> but they might mean that a layer appears to be defined across more than
> one file. (Compare
> http://ecommerce.pcbfabexpress.com/faq.jsp#faq080105_3) So, remove the
> %LNCUTS*% layer name parameter lines, which seem not to be needed, and
> otherwise make all layer names be unique across the gerber files.
This is a little shell script that postprocesses the gerbers so that
they are accepted by Basista. It does does what you suggest:
===============================================
#!/bin/bash
# A little, dirty script to deal with the complains of Basista.
# -<(kmk)>- Mar2006
if [[ $1 == -? ]] || [[ $1 == -h ]] || [[ $1 == --help ]] ; then
echo "usage: basista"
echo "This script postprocesses geda output with sed. It assumes
that there is a set Gerber files in the current directory"
exit
fi
# determine the name of the PCB
PCBNAME=`basename *_front.gbr _front.gbr`
echo PCB-Name: $PCBNAME
# Move output from previous runs of the script to /tmp
mv Bas_$PCBNAME*.gbr /tmp
mv Bas_$PCBNAME*.cnc /tmp
mv Bas_$PCBNAME.zip /tmp
# no need to prses the *.cnc files
ln -s $PCBNAME"_plated-drill.cnc" "Bas_"$PCBNAME"_Loecher_metallisiert.cnc"
ln -s $PCBNAME"_unplated-drill.cnc"
"Bas_"$PCBNAME"_Loecher_unmetallisiert.cnc"
# individualize the layer names
sed s/LNGROUP/LN_INFO/ \
$PCBNAME"_fab.gbr" > "Bas_"$PCBNAME"_info.gbr"
sed -e 's/LNGROUP/LN_TOP/' \
-e '/\%LNTRACKS/d' \
-e '/\%LNCUTS/d' \
$PCBNAME"_front.gbr" > "Bas_"$PCBNAME"_top.gbr"
sed s/LNGROUP/LN_TOPMASK/ \
$PCBNAME"_frontmask.gbr" > "Bas_"$PCBNAME"_top_mask.gbr"
sed -e 's/LNGROUP/LN_TOP_OVERLAY/' \
-e '/\%LNTRACKS/d' \
-e '/\%LNCUTS/d' \
$PCBNAME"_frontsilk.gbr" > "Bas_"$PCBNAME"_top_overlay.gbr"
sed -e 's/LNGROUP/LN_BOTTOM/' \
-e '/\%LNTRACKS/d' \
-e '/\%LNCUTS/d' \
$PCBNAME"_back.gbr" > "Bas_"$PCBNAME"_bottom.gbr"
sed s/LNGROUP/LN_BOTTOMMASK/ \
$PCBNAME"_backmask.gbr" > "Bas_"$PCBNAME"_bottom_mask.gbr"
sed s/LNGROUP/LN_LINEOUT/ \
$PCBNAME"_group8.gbr" > "Bas_"$PCBNAME"_lineout.gbr"
# zip it into one single file
zip "Bas_"$PCBNAME".zip" Bas*.gbr Bas*.cnc
echo "done."
==================================
--
Kai-Martin Knaak
kmk@xxxxxxxxxxxx
Blog: http://lilalaser.de/blog
Attachment:
signature.asc
Description: OpenPGP digital signature