summaryrefslogtreecommitdiff
path: root/gerber/gerber_statements.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-07-10 15:07:17 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-07-10 15:07:17 +0800
commit9b0d3b1122ffc3b7c2211b0cdc2cb6de6be9b242 (patch)
tree943e11c4167fecec83fbe68ca7df9de294b5989b /gerber/gerber_statements.py
parent0107d159b5a04c282478ceb4c51fdd03af3bd8c9 (diff)
downloadgerbonara-9b0d3b1122ffc3b7c2211b0cdc2cb6de6be9b242.tar.gz
gerbonara-9b0d3b1122ffc3b7c2211b0cdc2cb6de6be9b242.tar.bz2
gerbonara-9b0d3b1122ffc3b7c2211b0cdc2cb6de6be9b242.zip
Fix issue with chaning region mode via flash. Add options for controlling output from rendered gerber
Diffstat (limited to 'gerber/gerber_statements.py')
-rw-r--r--gerber/gerber_statements.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/gerber/gerber_statements.py b/gerber/gerber_statements.py
index 881e5bc..52e7ac3 100644
--- a/gerber/gerber_statements.py
+++ b/gerber/gerber_statements.py
@@ -886,7 +886,10 @@ class CoordStmt(Statement):
@classmethod
def move(cls, func, point):
- return cls(func, point[0], point[1], None, None, CoordStmt.OP_MOVE, None)
+ if point:
+ return cls(func, point[0], point[1], None, None, CoordStmt.OP_MOVE, None)
+ # No point specified, so just write the function. This is normally for ending a region (D02*)
+ return cls(func, None, None, None, None, CoordStmt.OP_MOVE, None)
@classmethod
def line(cls, func, point):
@@ -902,7 +905,10 @@ class CoordStmt(Statement):
@classmethod
def flash(cls, point):
- return cls(None, point[0], point[1], None, None, CoordStmt.OP_FLASH, None)
+ if point:
+ return cls(None, point[0], point[1], None, None, CoordStmt.OP_FLASH, None)
+ else:
+ return cls(None, None, None, None, None, CoordStmt.OP_FLASH, None)
def __init__(self, function, x, y, i, j, op, settings):
""" Initialize CoordStmt class