gEDA-dev: gerbv mis-parses aperture macro definitions
Bernd Jendrissek
berndj at prism.co.za
Mon Aug 7 04:29:44 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Below is a reduced gerber from a board we produce that I tried to view
with gerbv. It looked good where it was right but unfortunately it had
some ghastly diagonal lines across several layers.
The problem seems to be that gerbv cannot parse the following two lines
in the aperture macro MTHOLE definition:
$1=$1-$2*
$1=$1/2*
I had a look through src/amacro.c and unfortunately fixing this would
exceed the trivial-change copyrightability threshold. It would need
either a proper precedence-aware parse, or a simple right-to-left rule.
There's an implementation of infix to postfix conversion at
http://andrewd.ces.clemson.edu/courses/cpsc215/spring01/hw/asg2/cal.c
The comment right above in2post() outlines the algorithm.
%IN114-35D.IN2*%
%ICAS*%
%MOMM*%
G04*
G04 Aperture MACROs for general use --- invoked via D-code assignment *
G04*
G04 General MACRO for mounting hole *
%AMMTHOLE*
1,1,$1,0,0*
1,0,$2,0,0*
$1=$1-$2*
$1=$1/2*
21,1,$2+$1,$3,0,0,$4*
21,1,$3,$2+$1,0,0,$4*%
G04*
G04 D59 : "Ellipse X1.700mm Y1.700mm H0.000mm 0.0deg (0.000mm,0.000mm) Flash"*
G04 Disc: OuterDia=1.7000*
%ADD59C, 1.7000*%
G04 D74 : "Mounting Hole X7.000mm Y7.000mm H0.000mm 0.0deg (0.000mm,0.000mm) Flash"*
G04 Mounting Hole: Diameter=7.0000, Rotation=0.0, LineWidth=0.1270 *
%ADD74MTHOLE, 7.0000 X6.4920 X0.1270 X0.0*%
G04*
%FSLAX44Y44*%
%SFA1B1*%
%OFA0.000B0.000*%
G04*
G71*
G90*
G01*
D59*
X4000050D3*
D74*
Y1068200D3*
D02M02*
- --
Q: Why does this scheme have so many keys?
A: We added them as the need arose.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)
Comment: Please fetch my new key 804177F8 from hkp://wwwkeys.eu.pgp.net/
iD8DBQFE1vmQwyMv24BBd/gRAvtUAJ9vVHMhnaQmEcxtBNnEReiDNfDTOgCfdxAV
9KJaHLP1b+nD2/zIlgoq0lE=
=uBeu
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 114-35D.IN2
Type: application/octet-stream
Size: 728 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20060807/faa88c0d/114-35D.obj
More information about the geda-dev
mailing list