From b2cd2268c545699be6fd312185226baa58144768 Mon Sep 17 00:00:00 2001 From: daid303 Date: Mon, 3 Dec 2012 15:29:12 +0100 Subject: [PATCH] Set the default minimal layer time to 5 seconds. Properly scale collada files. --- .../fabmetheus_tools/interpret_plugins/dae.py | 8 +++++--- Cura/gui/mainWindow.py | 12 ++++++------ Cura/util/dae.py | 3 +++ Cura/util/profile.py | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/dae.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/dae.py index c51e026..c4a44ab 100644 --- a/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/dae.py +++ b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/dae.py @@ -27,6 +27,8 @@ class daeModel(triangle_mesh.TriangleMesh): self._idMap = {} self._geometryList = [] r.ParseFile(open(filename, "r")) + + self._scale = float(self._base['collada'][0]['asset'][0]['unit'][0]['_meter']) * 1000 for instance_visual_scene in self._base['collada'][0]['scene'][0]['instance_visual_scene']: for node in self._idMap[instance_visual_scene['_url']]['node']: @@ -81,9 +83,9 @@ class daeModel(triangle_mesh.TriangleMesh): startIndex = len(self.vertexes) for idx in xrange(0, len(positionList)/3): - x = positionList[idx*3] - y = positionList[idx*3+1] - z = positionList[idx*3+2] + x = positionList[idx*3] * self._scale + y = positionList[idx*3+1] * self._scale + z = positionList[idx*3+2] * self._scale if matrix != None: self.vertexes.append(Vector3(x * matrix[0] + y * matrix[1] + z * matrix[2] + matrix[3], x * matrix[4] + y * matrix[5] + z * matrix[6] + matrix[7], x * matrix[8] + y * matrix[9] + z * matrix[10] + matrix[11])) else: diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index bd08dc9..98a57c5 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -150,12 +150,6 @@ class mainWindow(configBase.configWindowBase): c = configBase.SettingRow(left, "Fill Density (%)", 'fill_density', '20', 'This controls how densily filled the insides of your print will be. For a solid part use 100%, for an empty part use 0%. A value around 20% is usually enough') validators.validFloat(c, 0.0, 100.0) - configBase.TitleRow(left, "Skirt") - c = configBase.SettingRow(left, "Line count", 'skirt_line_count', '1', 'The skirt is a line drawn around the object at the first layer. This helps to prime your extruder, and to see if the object fits on your platform.\nSetting this to 0 will disable the skirt. Multiple skirt lines can help priming your extruder better for small objects.') - validators.validInt(c, 0, 10) - c = configBase.SettingRow(left, "Start distance (mm)", 'skirt_gap', '6.0', 'The distance between the skirt and the first layer.\nThis is the minimal distance, multiple skirt lines will be put outwards from this distance.') - validators.validFloat(c, 0.0) - configBase.TitleRow(right, "Speed && Temperature") c = configBase.SettingRow(right, "Print speed (mm/s)", 'print_speed', '50', 'Speed at which printing happens. A well adjusted Ultimaker can reach 150mm/s, but for good quality prints you want to print slower. Printing speed depends on a lot of factors. So you will be experimenting with optimal settings for this.') validators.validFloat(c, 1.0) @@ -195,6 +189,12 @@ class mainWindow(configBase.configWindowBase): validators.validInt(c, 10) configBase.settingNotify(c, self.preview3d.updateCenterY) + configBase.TitleRow(left, "Skirt") + c = configBase.SettingRow(left, "Line count", 'skirt_line_count', '1', 'The skirt is a line drawn around the object at the first layer. This helps to prime your extruder, and to see if the object fits on your platform.\nSetting this to 0 will disable the skirt. Multiple skirt lines can help priming your extruder better for small objects.') + validators.validInt(c, 0, 10) + c = configBase.SettingRow(left, "Start distance (mm)", 'skirt_gap', '6.0', 'The distance between the skirt and the first layer.\nThis is the minimal distance, multiple skirt lines will be put outwards from this distance.') + validators.validFloat(c, 0.0) + configBase.TitleRow(left, "Retraction") c = configBase.SettingRow(left, "Minimum travel (mm)", 'retraction_min_travel', '5.0', 'Minimum amount of travel needed for a retraction to happen at all. To make sure you do not get a lot of retractions in a small area') validators.validFloat(c, 0.0) diff --git a/Cura/util/dae.py b/Cura/util/dae.py index d694b46..deae1a8 100644 --- a/Cura/util/dae.py +++ b/Cura/util/dae.py @@ -27,6 +27,9 @@ class daeModel(mesh.mesh): for instance_visual_scene in self._base['collada'][0]['scene'][0]['instance_visual_scene']: for node in self._idMap[instance_visual_scene['_url']]['node']: self._ProcessNode2(node) + + scale = float(self._base['collada'][0]['asset'][0]['unit'][0]['_meter']) * 1000 + self.origonalVertexes *= scale self._base = None self._cur = None diff --git a/Cura/util/profile.py b/Cura/util/profile.py index e48c53d..142df2e 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -42,7 +42,7 @@ profileDefaultSettings = { 'travel_speed': '150', 'max_z_speed': '3.0', 'bottom_layer_speed': '20', - 'cool_min_layer_time': '10', + 'cool_min_layer_time': '5', 'fan_enabled': 'True', 'fan_layer': '1', 'fan_speed': '100',