2 # By Braddock Gaskill (braddock@braddock.com), August 2004. This
3 # software is hereby declared to be in the public domain by Braddock
6 if [ -z "$FNAME" ]; then
7 echo "$0 <inputfile.sch>"
8 echo "This script will read a gschem schematic and attempt to
9 extract the relative positions of the components in the schematic,
10 and generate corresponding MOVE instructions for Eagle. You will
11 likely have to adjust XOFFSET, YOFFSET, XSCAL, and YSCALE at the
12 top of the script to obtain usable positions."
13 echo "By Braddock Gaskill (braddock@braddock.com), August 2004"
24 grep -B1 refdes
= "$FNAME" |
sed 's/=/ /' | cut
-d" " -f2,3 |
grep -v '^--' >/tmp
/$$
28 # the directory on the client to backup
29 X
=`echo $REPLY | cut -d' ' -f1`
30 Y
=`echo $REPLY | cut -d' ' -f2`
33 X
=`echo "scale=5; ($X - $XOFFSET) / $XSCALE" |bc`
34 Y
=`echo "scale=5; ($Y - $YOFFSET) / $YSCALE" |bc`
35 echo "MOVE '$PART' ($X $Y);"