chiark / gitweb /
Fix center coords for lulzbot mini if using non square size
[cura.git] / Cura / util / profile.py
index d170dc71d4730fbd24ec815d3aa804520578f7b3..f71ca9169f3b224b57e05ce938a6f9668b1edf87 100644 (file)
@@ -1213,10 +1213,9 @@ def calculateObjectSizeOffsets():
 def getMachineCenterCoords():
        if getMachineSetting('machine_center_is_zero') == 'True':
                return [0, 0]
-       elif getMachineSetting('machine_type') == 'lulzbot_mini' or \
-                getMachineSetting('machine_type') == 'lulzbot_TAZ_6':
+       elif getMachineSetting('machine_type') == 'lulzbot_mini':
                return [(getMachineSettingFloat('machine_width') / 2) + 2.5,
-                           (getMachineSettingFloat('machine_width') / 2) + 0.5]
+                           (getMachineSettingFloat('machine_depth') / 2) + 0.5]
        return [getMachineSettingFloat('machine_width') / 2, getMachineSettingFloat('machine_depth') / 2]
 
 #Returns a list of convex polygons, first polygon is the allowed area of the machine,
@@ -1416,10 +1415,14 @@ def performVersionUpgrade():
                        getMachineSetting('machine_width', n) == '298':
                        putMachineSetting('machine_width', '290', n)
                        
-               #Set valid extruder head size numbers for Mini
-               if machine_type == 'lulzbot_mini' and hasEmptyHeadSizeSettings(n):
-                       putMachineSetting('extruder_head_size_min_x', '40', n)
-                       putMachineSetting('extruder_head_size_max_x', '75', n)
-                       putMachineSetting('extruder_head_size_min_y', '25', n)
-                       putMachineSetting('extruder_head_size_max_y', '55', n)
-                       putMachineSetting('extruder_head_size_height', '17', n)
\ No newline at end of file
+               if machine_type == 'lulzbot_mini':
+                       if getMachineSetting('machine_height', n) == '163':
+                               putMachineSetting('machine_height', '158', n)
+                               
+                       #Set valid extruder head size numbers
+                       if hasEmptyHeadSizeSettings(n): 
+                               putMachineSetting('extruder_head_size_min_x', '40', n)
+                               putMachineSetting('extruder_head_size_max_x', '75', n)
+                               putMachineSetting('extruder_head_size_min_y', '25', n)
+                               putMachineSetting('extruder_head_size_max_y', '55', n)
+                               putMachineSetting('extruder_head_size_height', '17', n)
\ No newline at end of file