chiark / gitweb /
Fixed #524 - Added message when the object gets scaled down on loading.
authordaid <daid303@gmail.com>
Wed, 7 Aug 2013 14:28:21 +0000 (16:28 +0200)
committerdaid <daid303@gmail.com>
Wed, 7 Aug 2013 14:28:21 +0000 (16:28 +0200)
Cura/gui/sceneView.py
Cura/util/objectScene.py
Cura/util/sliceEngine.py

index 3d3fca64e787bf6a93364494b5095fd972ac6f19..52daba81ef08a9c3172442b744e91ea8b7eb561a 100644 (file)
@@ -480,6 +480,8 @@ class SceneView(openglGui.glGuiPanel):
                                        self._scene.add(obj)
                                        self._scene.centerAll()
                                        self._selectObject(obj)
+                                       if obj.getScale()[0] < 1.0:
+                                               self.notification.message("Warning: Object scaled down.")
                self.sceneUpdated()
 
        def _deleteObject(self, obj):
index 389d23d00bc2edc932e1877510f947fe688d1641..21c5bc8073ae45f5f4f5ffd4e7ea547395e0243d 100644 (file)
@@ -125,8 +125,8 @@ class Scene(object):
                self._findFreePositionFor(obj)
                self._objectList.append(obj)
                self.pushFree()
-               if numpy.max(obj.getSize()[0:2]) > numpy.max(self._machineSize[0:2]) * 1.5:
-                       scale = numpy.max(self._machineSize[0:2]) * 1.5 / numpy.max(obj.getSize()[0:2])
+               if numpy.max(obj.getSize()[0:2]) > numpy.max(self._machineSize[0:2]) * 2.5:
+                       scale = numpy.max(self._machineSize[0:2]) * 2.5 / numpy.max(obj.getSize()[0:2])
                        matrix = [[scale,0,0], [0, scale, 0], [0, 0, scale]]
                        obj.applyMatrix(numpy.matrix(matrix, numpy.float64))
 
index 9c5198344f6e178e8d665b629c9429a6b1cfbb03..b984fdc5ddcb82ee72ae8fc3dfef6c4287fa9365 100644 (file)
@@ -253,7 +253,7 @@ class Slicer(object):
                        'supportAngle': int(-1) if profile.getProfileSetting('support') == 'None' else int(60),
                        'supportEverywhere': int(1) if profile.getProfileSetting('support') == 'Everywhere' else int(0),
                        'supportLineWidth': int(profile.getProfileSettingFloat('support_rate') * profile.calculateEdgeWidth() * 1000 / 100),
-                       'supportExtruder': -1 if profile.getProfileSetting('support_dual_extrusion') == 'Both' else (0 if profile.getProfileSetting('support_dual_extrusion') == 'First extruder' else 1),
+                       'supportExtruder': 0 if profile.getProfileSetting('support_dual_extrusion') == 'First extruder' else (1 if profile.getProfileSetting('support_dual_extrusion') == 'Second extruder' else -1),
                        'retractionAmount': int(profile.getProfileSettingFloat('retraction_amount') * 1000) if profile.getProfileSetting('retraction_enable') == 'True' else 0,
                        'retractionSpeed': int(profile.getProfileSettingFloat('retraction_speed')),
                        'retractionMinimalDistance': int(profile.getProfileSettingFloat('retraction_min_travel') * 1000),