Fix issue where did not always switch into the G01 mode after G03 when the point was unchanged

This commit is contained in:
Garret Fick 2016-05-19 23:19:28 +08:00
parent f1f07d74c4
commit 74c638c718
2 changed files with 6 additions and 0 deletions

View file

@ -887,6 +887,10 @@ class CoordStmt(Statement):
def line(cls, func, point):
return cls(func, point[0], point[1], None, None, CoordStmt.OP_DRAW, None)
@classmethod
def mode(cls, func):
return cls(func, None, None, None, None, None, None)
@classmethod
def arc(cls, func, point, center):
return cls(func, point[0], point[1], center[0], center[1], CoordStmt.OP_DRAW, None)

View file

@ -169,6 +169,8 @@ class Rs274xContext(GerberContext):
if point[0] != None or point[1] != None:
self.body.append(CoordStmt.line(func, self._simplify_point(line.end)))
self._pos = line.end
elif func:
self.body.append(CoordStmt.mode(func))
def _render_arc(self, arc, color):