From: daid303 Date: Tue, 19 Mar 2013 07:50:28 +0000 (+0100) Subject: Add retraction configuration and object-sink feature. X-Git-Tag: 13.05~182 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6ce072d3e208185f4073829722c0d8ce736c4eba;p=cura.git Add retraction configuration and object-sink feature. --- diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 95175914..7cb4d20e 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -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.') diff --git a/Cura/slice/__main__.py b/Cura/slice/__main__.py index 8adaf6fc..960262a3 100644 --- a/Cura/slice/__main__.py +++ b/Cura/slice/__main__.py @@ -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():