summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2014-10-26 22:26:04 -0200
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-26 22:36:47 -0400
commit0a0331c5f389c4a6574d42e7c2ad9811fdc6f443 (patch)
tree0e7a39eff55bc59b20e27d538e088c16590ba131
parent0f85d5b07082a34ee053a7ada4e31e52d584ac46 (diff)
downloadgerbonara-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.py6
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