Commit 92821f7e authored by kliment's avatar kliment

Merge pull request #317 from sivu/experimental

gcoder updated
parents 917256f9 aa1e576a
...@@ -94,21 +94,36 @@ class Line(object): ...@@ -94,21 +94,36 @@ class Line(object):
return None return None
def _parse_coordinates(self): def _parse_coordinates(self):
if "X" in self.raw: try:
self._x = self._get_float("X") if "X" in self.raw:
self._x = self._get_float("X")
if "Y" in self.raw: except:
self._y = self._get_float("Y") pass
if "Z" in self.raw:
self._z = self._get_float("Z")
if "E" in self.raw:
self.e = self._get_float("E")
if "F" in self.raw:
self.f = self._get_float("F")
try:
if "Y" in self.raw:
self._y = self._get_float("Y")
except:
pass
try:
if "Z" in self.raw:
self._z = self._get_float("Z")
except:
pass
try:
if "E" in self.raw:
self.e = self._get_float("E")
except:
pass
try:
if "F" in self.raw:
self.f = self._get_float("F")
except:
pass
def is_move(self): def is_move(self):
return self.command() and ("G1" in self.raw or "G0" in self.raw) return self.command() and ("G1" in self.raw or "G0" in self.raw)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment