From: daid Date: Wed, 7 Aug 2013 14:28:21 +0000 (+0200) Subject: Fixed #524 - Added message when the object gets scaled down on loading. X-Git-Tag: 13.10~104 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3a5d0e9ce87480a890b6c59f303395c0a12c8a5a;p=cura.git Fixed #524 - Added message when the object gets scaled down on loading. --- diff --git a/Cura/gui/sceneView.py b/Cura/gui/sceneView.py index 3d3fca64..52daba81 100644 --- a/Cura/gui/sceneView.py +++ b/Cura/gui/sceneView.py @@ -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): diff --git a/Cura/util/objectScene.py b/Cura/util/objectScene.py index 389d23d0..21c5bc80 100644 --- a/Cura/util/objectScene.py +++ b/Cura/util/objectScene.py @@ -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)) diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 9c519834..b984fdc5 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -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),