From: Youness Alaoui Date: Thu, 25 Dec 2014 00:47:51 +0000 (-0500) Subject: Add support for Z offset machine setting X-Git-Tag: 14.09-1.18~5^2~19 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6ccd876852e9fcf320cee1b008624bd43a91a70f;p=cura.git Add support for Z offset machine setting Fixes issue #6 --- diff --git a/Cura/gui/preferencesDialog.py b/Cura/gui/preferencesDialog.py index 54bde5a4..ba7546c3 100644 --- a/Cura/gui/preferencesDialog.py +++ b/Cura/gui/preferencesDialog.py @@ -87,6 +87,7 @@ class machineSettingsDialog(wx.Dialog): configBase.SettingRow(left, 'machine_depth', index=idx) configBase.SettingRow(left, 'machine_height', index=idx) configBase.SettingRow(left, 'extruder_amount', index=idx) + configBase.SettingRow(left, 'extruder_z_offset', index=idx) configBase.SettingRow(left, 'has_heated_bed', index=idx) configBase.SettingRow(left, 'machine_center_is_zero', index=idx) configBase.SettingRow(left, 'machine_shape', index=idx) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 24776b8e..55e1a6ef 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -509,6 +509,7 @@ setting('extruder_offset_x2', '0.0', float, 'machine', 'hidden').setLabel(_("Off setting('extruder_offset_y2', '0.0', float, 'machine', 'hidden').setLabel(_("Offset Y"), _("The offset of your tertiary extruder compared to the primary.")) setting('extruder_offset_x3', '0.0', float, 'machine', 'hidden').setLabel(_("Offset X"), _("The offset of your forth extruder compared to the primary.")) setting('extruder_offset_y3', '0.0', float, 'machine', 'hidden').setLabel(_("Offset Y"), _("The offset of your forth extruder compared to the primary.")) +setting('extruder_z_offset', '0.0', float, 'machine', 'hidden').setLabel(_("Z-Offset"), _("This value will be added to the Z coordinate of every line in the output G-Code to compensate for a badly calibrate Z height endstop.")) setting('steps_per_e', '0', float, 'machine', 'hidden').setLabel(_("E-Steps per 1mm filament"), _("Amount of steps per mm filament extrusion. If set to 0 then this value is ignored and the value in your firmware is used.")) setting('serial_port', 'AUTO', str, 'machine', 'hidden').setLabel(_("Serial port"), _("Serial port to use for communication with the printer")) setting('serial_port_auto', '', str, 'machine', 'hidden') diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 9759720c..d01994ae 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -492,6 +492,7 @@ class Engine(object): 'extruderOffset[2].Y': int(profile.getMachineSettingFloat('extruder_offset_y2') * 1000), 'extruderOffset[3].X': int(profile.getMachineSettingFloat('extruder_offset_x3') * 1000), 'extruderOffset[3].Y': int(profile.getMachineSettingFloat('extruder_offset_y3') * 1000), + 'zOffset': int(profile.getMachineSettingFloat('extruder_z_offset') * 1000), 'fixHorrible': 0, } fanFullHeight = int(profile.getProfileSettingFloat('fan_full_height') * 1000)