chiark / gitweb /
Some minor corrections for dual head offset calibration.
authordaid303 <daid303@gmail.com>
Wed, 8 May 2013 14:27:34 +0000 (16:27 +0200)
committerdaid303 <daid303@gmail.com>
Wed, 8 May 2013 14:27:34 +0000 (16:27 +0200)
Cura/gui/configWizard.py
Cura/util/sliceEngine.py

index ab1473679924dea6a66938e37daf75a4859baaba..e2a26b3d72ac616553cde9f911ad940cc68ae2c3 100644 (file)
@@ -1074,17 +1074,18 @@ class headOffsetCalibrationPage(InfoPage):
                        self.comm.printGCode(gcode.list())
                elif self._wizardState == 7:
                        try:
-                               n = int(self.textEntry.GetValue())
+                               n = int(self.textEntry.GetValue()) - 1
                        except:
                                return
                        x = profile.getPreferenceFloat('extruder_offset_x1')
                        x += -1.0 + n * 0.1
                        profile.putPreference('extruder_offset_x1', '%0.2f' % (x))
                        self.infoBox.SetAttention('Which horizontal line number lays perfect on top of each other? Front most line is zero.')
+                       self.textEntry.SetValue('10')
                        self._wizardState = 8
                elif self._wizardState == 8:
                        try:
-                               n = int(self.textEntry.GetValue())
+                               n = int(self.textEntry.GetValue()) - 1
                        except:
                                return
                        y = profile.getPreferenceFloat('extruder_offset_y1')
@@ -1129,7 +1130,7 @@ class headOffsetCalibrationPage(InfoPage):
                                elif self._wizardState == 6:
                                        self._wizardState = 7
                                        wx.CallAfter(self.infoBox.SetAttention, 'Which vertical line number lays perfect on top of each other? Leftmost line is zero.')
-                                       wx.CallAfter(self.textEntry.SetValue, '5')
+                                       wx.CallAfter(self.textEntry.SetValue, '10')
                                        wx.CallAfter(self.textEntry.Enable, True)
                                        wx.CallAfter(self.resumeButton.Enable, True)
                                        wx.CallAfter(self.resumeButton.SetFocus)
index f72f51bc7bf0a3998cf2f06b64bc5fb0af8a58ff..0f2c19681243048271e4be2d896eec8585587611 100644 (file)
@@ -196,7 +196,7 @@ class Slicer(object):
                        'insetCount': int(profile.calculateLineCount()),
                        'downSkinCount': int(profile.calculateSolidLayerCount()) if profile.getProfileSetting('solid_bottom') == 'True' else 0,
                        'upSkinCount': int(profile.calculateSolidLayerCount()) if profile.getProfileSetting('solid_top') == 'True' else 0,
-                       'sparseInfillLineDistance': int(100 * profile.calculateEdgeWidth() * 1000 / profile.getProfileSettingFloat('fill_density')) if profile.getProfileSettingFloat('fill_density') > 0 else 9999999999,
+                       'sparseInfillLineDistance': int(100 * profile.calculateEdgeWidth() * 1000 / profile.getProfileSettingFloat('fill_density')) if profile.getProfileSettingFloat('fill_density') > 0 else -1,
                        'initialSpeedupLayers': int(4),
                        'initialLayerSpeed': int(profile.getProfileSettingFloat('bottom_layer_speed')),
                        'printSpeed': int(profile.getProfileSettingFloat('print_speed')),