summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2014-10-26 22:26:04 -0200
committerPaulo Henrique Silva <ph.silva@gmail.com>2014-10-26 22:26:04 -0200
commit8f584d6396e82ad9929fe771d72b21b5303b9cd6 (patch)
tree84d4e6e2dc2ac39112871bd454fd7cda30f3acde /gerber/rs274x.py
parent459e0205d17724b35f0f869cd46f679bc70defce (diff)
downloadgerbonara-8f584d6396e82ad9929fe771d72b21b5303b9cd6.tar.gz
gerbonara-8f584d6396e82ad9929fe771d72b21b5303b9cd6.tar.bz2
gerbonara-8f584d6396e82ad9929fe771d72b21b5303b9cd6.zip
Fix parsing for AM macros and support for zero sized circle primitives
Diffstat (limited to 'gerber/rs274x.py')
-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