diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2014-10-26 22:26:04 -0200 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2014-10-26 22:36:47 -0400 |
commit | 0a0331c5f389c4a6574d42e7c2ad9811fdc6f443 (patch) | |
tree | 0e7a39eff55bc59b20e27d538e088c16590ba131 | |
parent | 0f85d5b07082a34ee053a7ada4e31e52d584ac46 (diff) | |
download | gerbonara-0a0331c5f389c4a6574d42e7c2ad9811fdc6f443.tar.gz gerbonara-0a0331c5f389c4a6574d42e7c2ad9811fdc6f443.tar.bz2 gerbonara-0a0331c5f389c4a6574d42e7c2ad9811fdc6f443.zip |
Fix parsing for AM macros and support for zero sized circle primitives
-rw-r--r-- | gerber/rs274x.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py index 627fcf9..08c492a 100644 --- a/gerber/rs274x.py +++ b/gerber/rs274x.py @@ -127,11 +127,11 @@ class GerberParser(object): MO = r"(?P<param>MO)(?P<mo>(MM|IN))" IP = r"(?P<param>IP)(?P<ip>(POS|NEG))" LP = r"(?P<param>LP)(?P<lp>(D|C))" - AD_CIRCLE = r"(?P<param>AD)D(?P<d>\d+)(?P<shape>C)[,](?P<modifiers>[^,]*)" - AD_RECT = r"(?P<param>AD)D(?P<d>\d+)(?P<shape>R)[,]?(?P<modifiers>[^,]+)?" + AD_CIRCLE = r"(?P<param>AD)D(?P<d>\d+)(?P<shape>C)[,]?(?P<modifiers>[^,]*)?" + AD_RECT = r"(?P<param>AD)D(?P<d>\d+)(?P<shape>R)[,](?P<modifiers>[^,]*)" AD_OBROUND = r"(?P<param>AD)D(?P<d>\d+)(?P<shape>O)[,](?P<modifiers>[^,]*)" AD_POLY = r"(?P<param>AD)D(?P<d>\d+)(?P<shape>P)[,](?P<modifiers>[^,]*)" - AD_MACRO = r"(?P<param>AD)D(?P<d>\d+)(?P<shape>{name})[,]?(?P<modifiers>[^,]+)?".format(name=NAME) + AD_MACRO = r"(?P<param>AD)D(?P<d>\d+)(?P<shape>{name})[,]?(?P<modifiers>[^,]*)?".format(name=NAME) AM = r"(?P<param>AM)(?P<name>{name})\*(?P<macro>.*)".format(name=NAME) # begin deprecated |