chiark / gitweb /
Add different filament diameters for multiple extruders.
authordaid303 <daid303@gmail.com>
Fri, 15 Mar 2013 09:21:53 +0000 (10:21 +0100)
committerdaid303 <daid303@gmail.com>
Fri, 15 Mar 2013 09:21:53 +0000 (10:21 +0100)
Cura/gui/mainWindow.py
Cura/slice/__main__.py
Cura/util/profile.py

index 915c84278ce633d804fc6f0534eb96a3a870f7ee..29b22fb35ee029a6cbf98079f424933013e946a5 100644 (file)
@@ -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)
 
index 29d698aef9b71ede72623b8d6fed0f98abf2328b..80a1489e1ce369147c9c6a360e211c7d109f42e8 100644 (file)
@@ -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:
index 6e37195845aeb826753163b3c44524ed19870423..b2aa0bca55d26c90fedf9eeb2b42f86cc938016c 100644 (file)
@@ -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',