chiark / gitweb /
Add machine center is zero to machine settings. Properly handle depricated max_z_spee...
authordaid <daid303@gmail.com>
Mon, 7 Oct 2013 08:10:03 +0000 (10:10 +0200)
committerdaid <daid303@gmail.com>
Mon, 7 Oct 2013 08:10:03 +0000 (10:10 +0200)
Cura/gui/preferencesDialog.py
Cura/gui/simpleMode.py
Cura/resources/machine_profiles/MakerBotReplicator.ini
Cura/util/profile.py

index fe012cffa391d44852f1333fc0bbe1ecaf85e3cb..5d3b1501fc30b488ba1d795fcd7211c3ddf8cff6 100644 (file)
@@ -82,6 +82,7 @@ class machineSettingsDialog(wx.Dialog):
                        configBase.SettingRow(left, 'machine_height', index=idx)
                        configBase.SettingRow(left, 'extruder_amount', index=idx)
                        configBase.SettingRow(left, 'has_heated_bed', index=idx)
+                       configBase.SettingRow(left, 'machine_center_is_zero', index=idx)
                        configBase.SettingRow(left, 'gcode_flavor', index=idx)
 
                        configBase.TitleRow(right, _("Printer head size"))
index f34bf3bb928a09662f5e710803b1a559fd9113c1..34aad5a85deeaa0139a3e03411ae192e64517f20 100644 (file)
@@ -93,7 +93,6 @@ class simpleModePanel(wx.Panel):
                put('retraction_amount', '4.5')
                put('retraction_extra', '0.0')
                put('travel_speed', '150')
-               put('max_z_speed', '3.0')
                put('bottom_layer_speed', '25')
                put('cool_min_layer_time', '5')
                put('fan_enabled', 'True')
index 793011c9f39616a261636e5ce011e0ecde66ba8b..17b2b639ff0a458077ec55fbb8115e420fff2e9f 100644 (file)
@@ -25,7 +25,7 @@ start.gcode = ; -- START GCODE --
        G162 X Y F2000(home XY axes maximum)\r
        G161 Z F900(home Z axis minimum)\r
        G92 X0 Y0 Z-5 A0 B0 (set Z to -5)\r
-       G1 Z0.0 F{max_z_speed}(move Z to '0')\r
+       G1 Z0.0 F{travel_speed}(move Z to '0')\r
        G161 Z F100(home Z axis minimum)\r
        M132 X Y Z A B (Recall stored home offsets for XYZAB axis)\r
        G92 X152 Y72 Z0 A0 B0\r
index 878fe0ba3461b0392abbf83c62d36462c9e1caf6..077032088852e26a3750ac1075cec3322bc1b0ba 100644 (file)
@@ -308,21 +308,6 @@ setting('cool_start.gcode', '', str, 'alteration', 'alteration')
 setting('cool_end.gcode', '', str, 'alteration', 'alteration')
 setting('replace.csv', '', str, 'alteration', 'alteration')
 #######################################################################################
-setting('nextobject.gcode', """;Move to next object on the platform. clear_z is the minimal z height we need to make sure we do not hit any objects.
-G92 E0
-
-G91                                    ;relative positioning
-G1 E-1 F300                            ;retract the filament a bit before lifting the nozzle, to release some of the pressure
-G1 Z+0.5 E-5 F{travel_speed}           ;move Z up a bit and retract filament even more
-G90                                    ;absolute positioning
-
-G1 Z{clear_z} F{max_z_speed}
-G92 E0
-G1 X{object_center_x} Y{object_center_y} F{travel_speed}
-G1 F200 E6
-G92 E0
-""", str, 'alteration', 'alteration')
-#######################################################################################
 setting('switchExtruder.gcode', """;Switch between the current extruder and the next extruder, when printing with multiple extruders.
 G92 E0
 G1 E-36 F5000
@@ -363,7 +348,7 @@ setting('machine_type', 'unknown', str, 'machine', 'hidden') #Ultimaker, Ultimak
 setting('machine_width', '205', float, 'machine', 'hidden').setLabel(_("Maximum width (mm)"), _("Size of the machine in mm"))
 setting('machine_depth', '205', float, 'machine', 'hidden').setLabel(_("Maximum depth (mm)"), _("Size of the machine in mm"))
 setting('machine_height', '200', float, 'machine', 'hidden').setLabel(_("Maximum height (mm)"), _("Size of the machine in mm"))
-setting('machine_center_is_zero', 'False', bool, 'machine', 'hidden')
+setting('machine_center_is_zero', 'False', bool, 'machine', 'hidden').setLabel(_("Machine center 0,0"), _("Machines firmware defines the center of the bed as 0,0 instead of the front left corner."))
 setting('ultimaker_extruder_upgrade', 'False', bool, 'machine', 'hidden')
 setting('has_heated_bed', 'False', bool, 'machine', 'hidden').setLabel(_("Heated bed"), _("If you have an heated bed, this enabled heated bed settings (requires restart)"))
 setting('gcode_flavor', 'RepRap (Marlin/Sprinter)', ['RepRap (Marlin/Sprinter)', 'UltiGCode', 'MakerBot'], 'machine', 'hidden').setLabel(_("GCode Flavor"), _("Flavor of generated GCode.\nRepRap is normal 5D GCode which works on Marlin/Sprinter based firmwares.\nUltiGCode is a variation of the RepRap GCode which puts more settings in the machine instead of the slicer.\nMakerBot GCode has a few changes in the way GCode is generated, but still requires MakerWare to generate to X3G."))
@@ -888,7 +873,9 @@ def replaceTagMatch(m):
                return pre + '#F_WGHT#'
        if tag == 'filament_cost':
                return pre + '#F_COST#'
-       if pre == 'F' and tag in ['print_speed', 'retraction_speed', 'travel_speed', 'max_z_speed', 'bottom_layer_speed', 'cool_min_feedrate']:
+       if pre == 'F' and tag == 'max_z_speed':
+               f = getProfileSettingFloat('travel_speed') * 60
+       if pre == 'F' and tag in ['print_speed', 'retraction_speed', 'travel_speed', 'bottom_layer_speed', 'cool_min_feedrate']:
                f = getProfileSettingFloat(tag) * 60
        elif isProfileSetting(tag):
                f = getProfileSettingFloat(tag)