diff options
Diffstat (limited to 'gerber/gerber_statements.py')
-rw-r--r-- | gerber/gerber_statements.py | 10 |
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 |