chiark / gitweb /
Add support for Z offset machine setting
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Thu, 25 Dec 2014 00:47:51 +0000 (19:47 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Thu, 25 Dec 2014 01:00:57 +0000 (20:00 -0500)
Fixes issue #6

Cura/gui/preferencesDialog.py
Cura/util/profile.py
Cura/util/sliceEngine.py

index 54bde5a4fa5ec2a6186b33b1777688b84cc2332c..ba7546c3f8af7e7355647bd664a89b8f18c34709 100644 (file)
@@ -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)
index 24776b8e9b594d1eca975850b0920b1548607793..55e1a6ef8c5883e2923a252929abdcd2f190628d 100644 (file)
@@ -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')
index 9759720c352a5cd6af990d21fd0c26772368af49..d01994aecb0f04254fb58243a0ed4ab5093af831 100644 (file)
@@ -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)