summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2014-02-04 23:51:41 +0100
committerPaulo Henrique Silva <ph.silva@gmail.com>2014-02-04 23:51:41 +0100
commitaad4fe368f5c5fb86b2c64fb0a2d0987f444d375 (patch)
treee60b2ecbcb67077201b0a7e70caea03ec2e7fe7e
parent3c825e4caee83f01f22b8279a90c1c40714d859d (diff)
downloadgerbonara-aad4fe368f5c5fb86b2c64fb0a2d0987f444d375.tar.gz
gerbonara-aad4fe368f5c5fb86b2c64fb0a2d0987f444d375.tar.bz2
gerbonara-aad4fe368f5c5fb86b2c64fb0a2d0987f444d375.zip
Handle wierd cases where FS has no leading/trailing zero specification
-rw-r--r--gerber/gerber.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerber/gerber.py b/gerber/gerber.py
index 49c64b2..ee7fcbc 100644
--- a/gerber/gerber.py
+++ b/gerber/gerber.py
@@ -33,7 +33,7 @@ class ParamStmt(Statement):
class FSParamStmt(ParamStmt):
- def __init__(self, param, zero, notation, x, y):
+ def __init__(self, param, zero = "L", notation = "A", x = "24", y = "24"):
ParamStmt.__init__(self, param)
self.zero = zero
self.notation = notation
@@ -342,7 +342,7 @@ class Gerber(object):
COORD_OP = r"D[0]?[123]"
- FS = r"(?P<param>FS)(?P<zero>(L|T))(?P<notation>(A|I))X(?P<x>[0-7][0-7])Y(?P<y>[0-7][0-7])"
+ FS = r"(?P<param>FS)(?P<zero>(L|T))?(?P<notation>(A|I))X(?P<x>[0-7][0-7])Y(?P<y>[0-7][0-7])"
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))"