mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Moved check to inside if statement to prevent undeeded parsing
This commit is contained in:
parent
69b8a06eca
commit
412b8bcb41
1 changed files with 4 additions and 4 deletions
|
@ -180,11 +180,11 @@ class GCodeReader(MeshReader):
|
||||||
|
|
||||||
def _processGCode(self, G, line, position, path):
|
def _processGCode(self, G, line, position, path):
|
||||||
func = getattr(self, "_gCode%s" % G, None)
|
func = getattr(self, "_gCode%s" % G, None)
|
||||||
|
if func is not None:
|
||||||
x = self._getFloat(line, "X")
|
x = self._getFloat(line, "X")
|
||||||
y = self._getFloat(line, "Y")
|
y = self._getFloat(line, "Y")
|
||||||
z = self._getFloat(line, "Z")
|
z = self._getFloat(line, "Z")
|
||||||
e = self._getFloat(line, "E")
|
e = self._getFloat(line, "E")
|
||||||
if func is not None:
|
|
||||||
if (x is not None and x < 0) or (y is not None and y < 0):
|
if (x is not None and x < 0) or (y is not None and y < 0):
|
||||||
self._center_is_zero = True
|
self._center_is_zero = True
|
||||||
params = self._position(x, y, z, e)
|
params = self._position(x, y, z, e)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue