chiark / gitweb /
Corrected extruder offset direction
authorDaid <daid303@gmail.com>
Sun, 29 Apr 2012 12:50:52 +0000 (14:50 +0200)
committerDaid <daid303@gmail.com>
Sun, 29 Apr 2012 12:50:52 +0000 (14:50 +0200)
Cura/gui/sliceProgessPanel.py
Cura/util/gcodeInterpreter.py

index bb83266b4228f0616c5deae2039e7256dc26a092..e3e96d258aee70cce37f0ecdc32025156e974d5d 100644 (file)
@@ -66,8 +66,8 @@ class sliceProgessPanel(wx.Panel):
                        if idx > 0:
                                profile.putProfileSetting('fan_enabled', 'False')
                                profile.putProfileSetting('skirt_line_count', '0')
-                               profile.putProfileSetting('machine_center_x', profile.getProfileSettingFloat('machine_center_x') + float(profile.getPreference('extruder_offset_x%d' % (idx))))
-                               profile.putProfileSetting('machine_center_y', profile.getProfileSettingFloat('machine_center_y') + float(profile.getPreference('extruder_offset_y%d' % (idx))))
+                               profile.putProfileSetting('machine_center_x', profile.getProfileSettingFloat('machine_center_x') - float(profile.getPreference('extruder_offset_x%d' % (idx))))
+                               profile.putProfileSetting('machine_center_y', profile.getProfileSettingFloat('machine_center_y') - float(profile.getPreference('extruder_offset_y%d' % (idx))))
                                profile.putProfileSetting('alternative_center', self.filelist[0])
                        if len(self.filelist) > 1:
                                profile.putProfileSetting('add_start_end_gcode', 'False')
index a84f1ec5b1af50d14559e32f6c6f68204f6ac0f8..5b7bda16f041251b498a03288b611c4521f8ee3d 100644 (file)
@@ -93,13 +93,13 @@ class gcode():
                                line = line[0:line.find(';')]
                        T = self.getCodeInt(line, 'T')
                        if T is not None:
-                               if currentExtruder > 0:
-                                       posOffset.x += float(profile.getPreference('extruder_offset_x%d' % (currentExtruder)))
-                                       posOffset.y += float(profile.getPreference('extruder_offset_y%d' % (currentExtruder)))
-                               currentExtruder = T
                                if currentExtruder > 0:
                                        posOffset.x -= float(profile.getPreference('extruder_offset_x%d' % (currentExtruder)))
                                        posOffset.y -= float(profile.getPreference('extruder_offset_y%d' % (currentExtruder)))
+                               currentExtruder = T
+                               if currentExtruder > 0:
+                                       posOffset.x += float(profile.getPreference('extruder_offset_x%d' % (currentExtruder)))
+                                       posOffset.y += float(profile.getPreference('extruder_offset_y%d' % (currentExtruder)))
                        
                        G = self.getCodeInt(line, 'G')
                        if G is not None: