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

TypeError, caused by Aperture Macro? #6

Open
senic35 opened this issue Nov 6, 2020 · 1 comment
Open

TypeError, caused by Aperture Macro? #6

senic35 opened this issue Nov 6, 2020 · 1 comment

Comments

@senic35
Copy link

senic35 commented Nov 6, 2020

I'm experiencing a type error occurring while trying to parse gerber files which contain aperture macros.

You can find a reference to it here: (under 4.5 Aperture Macro (AM))
ucamco gerber specification

Here is the error that occurs in file \gerberex\am_expression.py", line 54, in to_gerber :

gerber = '%.6g' % self._value
                  │    └ 'Rectangle Pad at angle 45'<gerberex.am_expression.AMConstantExpression object at 0x037F0BC8>
TypeError: must be real number, not str

The whole expression in my gerberfile that should create a rectangle with a side length of 0.05512 mils, placed at an 45 degree angle looks like this:

%AMT83*0 Rectangle Pad at angle 45*21,1,0.05512,0.05512,0,0,45*%

@senic35 senic35 changed the title https://www.ucamco.com/files/downloads/file_en/81/the-gerber-file-format-specification_en.pdf?c0748ea9bf8efa9d8e145205a173e460 TypeError, caused by Aperture Macro? Nov 9, 2020
@senic35
Copy link
Author

senic35 commented Nov 10, 2020

It seems like the 0 in the start marks a comment, which this library does not handle.

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

No branches or pull requests

1 participant