chiark
/
gitweb
/
~ianmdlvl
/
cura.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5297191
)
Fixed #446
author
daid
<daid303@gmail.com>
Fri, 21 Jun 2013 07:03:54 +0000
(09:03 +0200)
committer
daid
<daid303@gmail.com>
Fri, 21 Jun 2013 07:03:54 +0000
(09:03 +0200)
Cura/util/gcodeInterpreter.py
patch
|
blob
|
history
diff --git
a/Cura/util/gcodeInterpreter.py
b/Cura/util/gcodeInterpreter.py
index b613a641dc5af99e3377900dd7531f8ca3606588..74f2932dc3c548976bfd6b1fbf031916cf8eeb8a 100644
(file)
--- 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')
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:
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:
else:
if x is not None:
- pos[0] =
0.0
+ pos[0] =
center[0]
if y is not None:
if y is not None:
- pos[0] =
0.0
+ pos[0] =
center[1]
if z is not None:
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
elif G == 90: #Absolute position
posAbs = True
elif G == 91: #Relative position