From: daid303 Date: Fri, 15 Mar 2013 09:21:53 +0000 (+0100) Subject: Add different filament diameters for multiple extruders. X-Git-Tag: 13.05~64^2~27 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2f53afc39a3457e6156616665d7dc9bbaba6da09;p=cura.git Add different filament diameters for multiple extruders. --- diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 915c8427..29b22fb3 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -590,9 +590,21 @@ class normalSettingsPanel(configBase.configPanelBase): c = configBase.SettingRow(right, "Support dual extrusion", 'support_dual_extrusion', False, 'Print the support material with the 2nd extruder in a dual extrusion setup. The primary extruder will be used for normal material, while the second extruder is used to print support material.') configBase.TitleRow(right, "Filament") - c = configBase.SettingRow(right, "Diameter (mm)", 'filament_diameter', '2.89', 'Diameter of your filament, as accurately as possible.\nIf you cannot measure this value you will have to callibrate it, a higher number means less extrusion, a smaller number generates more extrusion.') + c = configBase.SettingRow(right, "Diameter (mm)", 'filament_diameter', '2.89', 'Diameter of your filament, as accurately as possible.\nIf you cannot measure this value you will have to calibrate it, a higher number means less extrusion, a smaller number generates more extrusion.') validators.validFloat(c, 1.0) validators.warningAbove(c, 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.") + if int(profile.getPreference('extruder_amount')) > 1: + c = configBase.SettingRow(right, "Diameter (mm)", 'filament_diameter2', '2.89', 'Diameter of your filament for the 2nd nozzle, as accurately as possible.\nIf you cannot measure this value you will have to calibrate it, a higher number means less extrusion, a smaller number generates more extrusion. Use 0 to use the same diameter as for nozzle 1.') + validators.validFloat(c, 0.0) + validators.warningAbove(c, 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.") + if int(profile.getPreference('extruder_amount')) > 2: + c = configBase.SettingRow(right, "Diameter (mm)", 'filament_diameter3', '2.89', 'Diameter of your filament for the 3th nozzle, as accurately as possible.\nIf you cannot measure this value you will have to calibrate it, a higher number means less extrusion, a smaller number generates more extrusion. Use 0 to use the same diameter as for nozzle 1.') + validators.validFloat(c, 0.0) + validators.warningAbove(c, 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.") + if int(profile.getPreference('extruder_amount')) > 3: + c = configBase.SettingRow(right, "Diameter (mm)", 'filament_diameter4', '2.89', 'Diameter of your filament for the 4th nozzle, as accurately as possible.\nIf you cannot measure this value you will have to calibrate it, a higher number means less extrusion, a smaller number generates more extrusion. Use 0 to use the same diameter as for nozzle 1.') + validators.validFloat(c, 0.0) + validators.warningAbove(c, 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.") c = configBase.SettingRow(right, "Packing Density", 'filament_density', '1.00', 'Packing density of your filament. This should be 1.00 for PLA and 0.85 for ABS') validators.validFloat(c, 0.5, 1.5) diff --git a/Cura/slice/__main__.py b/Cura/slice/__main__.py index 29d698ae..80a1489e 100644 --- a/Cura/slice/__main__.py +++ b/Cura/slice/__main__.py @@ -78,6 +78,9 @@ def main(): profile.setTempOverride('object_center_x', position[0]) profile.setTempOverride('object_center_y', position[1]) profile.setTempOverride('object_matrix', ','.join(map(str, position[2:11]))) + if extruderNr > 0: + if profile.getProfileSettingFloat('filament_diameter%d' % (extruderNr + 1)) > 0: + profile.setTempOverride('filament_diameter', profile.getProfileSetting('filament_diameter%d' % (extruderNr + 1))) output.append(export.getOutput(filename)) profile.resetTempOverride() if len(output) == 1: diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 6e371958..b2aa0bca 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -32,6 +32,9 @@ profileDefaultSettings = { 'print_bed_temperature': '70', 'support': 'None', 'filament_diameter': '2.89', + 'filament_diameter2': '0', + 'filament_diameter3': '0', + 'filament_diameter4': '0', 'filament_density': '1.00', 'retraction_min_travel': '5.0', 'retraction_enable': 'False',