summaryrefslogtreecommitdiff
path: root/gerber/gerber.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-08 09:27:52 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-08 09:27:52 -0400
commit1653ae5cbe88757e453bccf499dc1b8ccb278e58 (patch)
treeb80b610fb0c5c52c91edbe753947daeb0e39db20 /gerber/gerber.py
parent100ab899ed7a1a49c3401b87b7d6b0f53a043dbc (diff)
downloadgerbonara-1653ae5cbe88757e453bccf499dc1b8ccb278e58.tar.gz
gerbonara-1653ae5cbe88757e453bccf499dc1b8ccb278e58.tar.bz2
gerbonara-1653ae5cbe88757e453bccf499dc1b8ccb278e58.zip
Update readme and example
Diffstat (limited to 'gerber/gerber.py')
-rw-r--r--gerber/gerber.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gerber/gerber.py b/gerber/gerber.py
index 220405c..04203fa 100644
--- a/gerber/gerber.py
+++ b/gerber/gerber.py
@@ -111,13 +111,14 @@ class GerberFile(CncFile):
for statement in self.statements:
f.write(statement.to_gerber())
- def render(self, filename, ctx):
+ def render(self, ctx, filename=None):
""" Generate image of layer.
"""
ctx.set_bounds(self.bounds)
for statement in self.statements:
ctx.evaluate(statement)
- ctx.dump(filename)
+ if filename is not None:
+ ctx.dump(filename)
class GerberParser(object):