summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2014-11-10 12:24:09 -0200
committerPaulo Henrique Silva <ph.silva@gmail.com>2014-11-10 12:24:09 -0200
commitab69ee0172353e64fbe5099a974341e88feaf24b (patch)
tree13dacd4fc7fceb664d86dae1457d4511ff928181 /gerber/rs274x.py
parentf5abd5b0bdc0b9f524456dc9216bd0f3732e82a0 (diff)
downloadgerbonara-ab69ee0172353e64fbe5099a974341e88feaf24b.tar.gz
gerbonara-ab69ee0172353e64fbe5099a974341e88feaf24b.tar.bz2
gerbonara-ab69ee0172353e64fbe5099a974341e88feaf24b.zip
Bunch of small fixes to improve Gerber read/write.
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r--gerber/rs274x.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index f7be44d..a41760e 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -109,7 +109,7 @@ class GerberFile(CamFile):
"""
with open(filename, 'w') as f:
for statement in self.statements:
- f.write(statement.to_gerber())
+ f.write(statement.to_gerber() + "\n")
class GerberParser(object):
@@ -149,7 +149,7 @@ class GerberParser(object):
r"(I(?P<i>{number}))?(J(?P<j>{number}))?"
r"(?P<op>{op})?\*".format(number=NUMBER, function=FUNCTION, op=COORD_OP)))
- APERTURE_STMT = re.compile(r"(G54)?D(?P<d>\d+)\*")
+ APERTURE_STMT = re.compile(r"(?P<deprecated>G54)?D(?P<d>\d+)\*")
COMMENT_STMT = re.compile(r"G04(?P<comment>[^*]*)(\*)?")