Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crashes in gerber output and excellon parser code #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

neinseg
Copy link

@neinseg neinseg commented Feb 6, 2021

am_expression.py will crash with gerber files that contain comments like these, generated by a recent KiCAD:

[...]
G04 APERTURE LIST*
G04 Aperture macros list*
%AMRoundRect*
0 Rectangle with rounded corners*   <<<< here ====
0 $1 Rounding radius*
0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners*
0 Add a 4 corners polygon primitive as box body*
4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0*
0 Add four circle primitives for the rounded corners*
1,1,$1+$1,$2,$3*
1,1,$1+$1,$4,$5*
[...]

Also, excellon.py did not work for me. This patch makes it not crash during parsing, but please review my changes--I was unsure of how this code was meant to work in the first place.

jaseg added 2 commits February 6, 2021 09:38
I don't know this code and I don't get what was intended here, but it
makes way more sense to me this way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant