chiark / gitweb /
Add retraction configuration and object-sink feature.
authordaid303 <daid303@gmail.com>
Tue, 19 Mar 2013 07:50:28 +0000 (08:50 +0100)
committerdaid303 <daid303@gmail.com>
Tue, 19 Mar 2013 07:50:28 +0000 (08:50 +0100)
Cura/gui/mainWindow.py
Cura/slice/__main__.py

index 95175914657f61411f6bbadc7be1489934c17219..7cb4d20ee18014bb4066297c8a4b05bdaa77c09f 100644 (file)
@@ -549,7 +549,7 @@ class normalSettingsPanel(configBase.configPanelBase):
                c = configBase.SettingRow(left, "Wall thickness (mm)", 'wall_thickness', '0.8', 'Thickness of the walls.\nThis is used in combination with the nozzle size to define the number\nof perimeter lines and the thickness of those perimeter lines.')
                validators.validFloat(c, 0.0001)
                validators.wallThicknessValidator(c)
-#              c = configBase.SettingRow(left, "Enable retraction", 'retraction_enable', False, 'Retract the filament when the nozzle is moving over a none-printed area. Details about the retraction can be configured in the advanced tab.')
+               c = configBase.SettingRow(left, "Enable retraction", 'retraction_enable', False, 'Retract the filament when the nozzle is moving over a none-printed area. Details about the retraction can be configured in the advanced tab.')
 
                configBase.TitleRow(left, "Fill")
                c = configBase.SettingRow(left, "Bottom/Top thickness (mm)", 'solid_layer_thickness', '0.6', 'This controls the thickness of the bottom and top layers, the amount of solid layers put down is calculated by the layer thickness and this value.\nHaving this value a multiply of the layer thickness makes sense. And keep it near your wall thickness to make an evenly strong part.')
@@ -622,13 +622,13 @@ class normalSettingsPanel(configBase.configPanelBase):
                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")
+               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)
-#              c = configBase.SettingRow(left, "Speed (mm/s)", 'retraction_speed', '40.0', 'Speed at which the filament is retracted, a higher retraction speed works better. But a very high retraction speed can lead to filament grinding.')
-#              validators.validFloat(c, 0.1)
-#              c = configBase.SettingRow(left, "Distance (mm)", 'retraction_amount', '0.0', 'Amount of retraction, set at 0 for no retraction at all. A value of 2.0mm seems to generate good results.')
-#              validators.validFloat(c, 0.0)
+               c = configBase.SettingRow(left, "Speed (mm/s)", 'retraction_speed', '40.0', 'Speed at which the filament is retracted, a higher retraction speed works better. But a very high retraction speed can lead to filament grinding.')
+               validators.validFloat(c, 0.1)
+               c = configBase.SettingRow(left, "Distance (mm)", 'retraction_amount', '0.0', 'Amount of retraction, set at 0 for no retraction at all. A value of 2.0mm seems to generate good results.')
+               validators.validFloat(c, 0.0)
 #              c = configBase.SettingRow(left, "Extra length on start (mm)", 'retraction_extra', '0.0', 'Extra extrusion amount when restarting after a retraction, to better "Prime" your extruder after retraction.')
 #              validators.validFloat(c, 0.0)
 
@@ -650,8 +650,8 @@ class normalSettingsPanel(configBase.configPanelBase):
                c = configBase.SettingRow(right, "Initial layer thickness (mm)", 'bottom_thickness', '0.0', 'Layer thickness of the bottom layer. A thicker bottom layer makes sticking to the bed easier. Set to 0.0 to have the bottom layer thickness the same as the other layers.')
                validators.validFloat(c, 0.0)
                validators.warningAbove(c, lambda : (float(profile.getProfileSetting('nozzle_size')) * 3.0 / 4.0), "A bottom layer of more then %.2fmm (3/4 nozzle size) usually give bad results and is not recommended.")
-#              c = configBase.SettingRow(right, "Cut off object bottom (mm)", 'object_sink', 0.05, 'Sinks the object into the platform, this can be used for objects that do not have a flat bottom and thus create a too small first layer.')
-#              validators.validFloat(c, 0.0)
+               c = configBase.SettingRow(right, "Cut off object bottom (mm)", 'object_sink', 0.05, 'Sinks the object into the platform, this can be used for objects that do not have a flat bottom and thus create a too small first layer.')
+               validators.validFloat(c, 0.0)
 #              configBase.settingNotify(c, lambda : self.GetParent().GetParent().GetParent().preview3d.Refresh())
 #              c = configBase.SettingRow(right, "Duplicate outlines", 'enable_skin', False, 'Skin prints the outer lines of the prints twice, each time with half the thickness. This gives the illusion of a higher print quality.')
 
index 8adaf6fce68d50574195876dfe3bfaad15c29909..960262a3eca43efc00ebfb33e33e3df4f35c0b11 100644 (file)
@@ -74,6 +74,9 @@ def main():
                        settings['fanOnLayerNr'] = int(profile.getProfileSettingFloat('fan_layer'))
                        settings['supportAngle'] = int(60) if profile.getProfileSetting('support') != 'None' else int(-1)
                        settings['supportEverywhere'] = int(1) if profile.getProfileSetting('support') == 'Everywhere' else int(0)
+                       settings['retractionAmount'] = int(0) if profile.getProfileSetting('retraction_enable') == 'False' else int(profile.getProfileSettingFloat('retraction_amount') * 1000)
+                       settings['retractionSpeed'] = int(profile.getProfileSettingFloat('retraction_speed'))
+                       settings['objectSink'] = int(profile.getProfileSettingFloat('object_sink') * 1000.0)
 
                        cmdList = [steamEngineFilename, args[idx+1], '-o', options.output, '-m', ','.join(map(str, position[2:]))]
                        for (key, value) in settings.items():