From 642c6d4986c1902740ed0103564c625518d87dbb Mon Sep 17 00:00:00 2001 From: nickthetait Date: Fri, 14 Aug 2015 17:54:41 -0600 Subject: [PATCH] Update exiting LulzBot Minis to have correct 'extruder head size' settings --- Cura/util/profile.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 40f923bd..080310c8 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -1368,6 +1368,13 @@ def getAlterationFileContents(filename, extruderCount = 1): #postfix = ';CURA_PROFILE_STRING:%s\n' % (getProfileString()) return unicode(prefix + re.sub("(.)\{([^\}]*)\}", replaceTagMatch, alterationContents).rstrip() + '\n' + postfix).strip().encode('utf-8') + '\n' +def hasEmptyHeadSizeSettings(n): + return getMachineSetting('extruder_head_size_min_x', n) == '0.0' and \ + getMachineSetting('extruder_head_size_max_x', n) == '0.0' and \ + getMachineSetting('extruder_head_size_min_y', n) == '0.0' and \ + getMachineSetting('extruder_head_size_max_y', n) == '0.0' and \ + getMachineSetting('extruder_head_size_height', n) == '0.0' + def performVersionUpgrade(): for n in xrange(0, getMachineCount()): # This is a hack around an issue where the machine type in the wizard @@ -1405,3 +1412,11 @@ def performVersionUpgrade(): if machine_type.startswith('lulzbot_TAZ_') and \ 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 -- 2.30.2