From 8f3984634997618d9f056ed32d6c07d159e08ee1 Mon Sep 17 00:00:00 2001 From: Daid Date: Sun, 29 Apr 2012 14:50:52 +0200 Subject: [PATCH] Corrected extruder offset direction --- Cura/gui/sliceProgessPanel.py | 4 ++-- Cura/util/gcodeInterpreter.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cura/gui/sliceProgessPanel.py b/Cura/gui/sliceProgessPanel.py index bb83266b..e3e96d25 100644 --- a/Cura/gui/sliceProgessPanel.py +++ b/Cura/gui/sliceProgessPanel.py @@ -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') diff --git a/Cura/util/gcodeInterpreter.py b/Cura/util/gcodeInterpreter.py index a84f1ec5..5b7bda16 100644 --- a/Cura/util/gcodeInterpreter.py +++ b/Cura/util/gcodeInterpreter.py @@ -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: -- 2.30.2