diff options
author | daid <daid303@gmail.com> | 2013-06-21 11:03:54 +0400 |
---|---|---|
committer | daid <daid303@gmail.com> | 2013-06-21 11:03:54 +0400 |
commit | 54451ab87fcb83bc69118fcc43611752eb98bb2d (patch) | |
tree | 8b8bb2de74fa89549d7826523af4afd8e6872e20 | |
parent | 52971912992aa51b5db1ccc6afa892a1eba7ac78 (diff) |
Fixed #446
-rw-r--r-- | Cura/util/gcodeInterpreter.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Cura/util/gcodeInterpreter.py b/Cura/util/gcodeInterpreter.py index b613a641dc..74f2932dc3 100644 --- a/Cura/util/gcodeInterpreter.py +++ b/Cura/util/gcodeInterpreter.py @@ -192,15 +192,19 @@ class gcode(object): x = getCodeFloat(line, 'X') y = getCodeFloat(line, 'Y') z = getCodeFloat(line, 'Z') + if profile.getPreference('machine_center_is_zero') == 'True': + center = [profile.getProfileSettingFloat('machine_width') / 2, profile.getProfileSettingFloat('machine_depth') / 2,0.0] + else: + center = [0.0,0.0,0.0] if x is None and y is None and z is None: - pos = [0.0,0.0,0.0] + pos = center else: if x is not None: - pos[0] = 0.0 + pos[0] = center[0] if y is not None: - pos[0] = 0.0 + pos[0] = center[1] if z is not None: - pos[0] = 0.0 + pos[0] = center[2] elif G == 90: #Absolute position posAbs = True elif G == 91: #Relative position |