chiark / gitweb /
Correctly size the bed for dual-extrusion-support prints.
authordaid <daid303@gmail.com>
Mon, 25 Nov 2013 13:14:14 +0000 (14:14 +0100)
committerdaid <daid303@gmail.com>
Mon, 25 Nov 2013 13:14:14 +0000 (14:14 +0100)
Cura/util/objectScene.py

index fd880365e95f04f47e5c71228f8031d5f9527c19..16744add5957bd3283887344813688782dde6c7c 100644 (file)
@@ -228,7 +228,10 @@ class Scene(object):
                offsetRight = 0.0
                offsetBack = 0.0
                offsetFront = 0.0
-               for n in xrange(1, len(obj._meshList)):
+               extruderCount = len(obj._meshList)
+               if profile.getProfileSetting('support_dual_extrusion') == 'Second extruder' and profile.getProfileSetting('support') != 'None':
+                       extruderCount = max(extruderCount, 2)
+               for n in xrange(1, extruderCount):
                        if offsetLeft < self._extruderOffset[n][0]:
                                offsetLeft = self._extruderOffset[n][0]
                        if offsetRight > self._extruderOffset[n][0]: