From 698aa984b07cd1be05daf7a19493188ed9abdd76 Mon Sep 17 00:00:00 2001 From: Ryan Press Date: Wed, 14 Jan 2015 16:56:17 -0800 Subject: [PATCH] Add configuration option for combing 'No Skin' This adds the menu configuration option for CuraEngine enableCombing=2. This disables combing on skin surfaces. --- Cura/util/profile.py | 5 ++++- Cura/util/sliceEngine.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 3df63b3d..23b707fc 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -204,7 +204,7 @@ setting('retraction_speed', 40.0, float, 'advanced', _('Retraction')).se setting('retraction_amount', 4.5, float, 'advanced', _('Retraction')).setRange(0).setLabel(_("Distance (mm)"), _("Amount of retraction, set at 0 for no retraction at all. A value of 4.5mm seems to generate good results.")) setting('retraction_dual_amount', 16.5, float, 'advanced', _('Retraction')).setRange(0).setLabel(_("Dual extrusion switch amount (mm)"), _("Amount of retraction when switching nozzle with dual-extrusion, set at 0 for no retraction at all. A value of 16.0mm seems to generate good results.")) setting('retraction_min_travel', 1.5, float, 'expert', _('Retraction')).setRange(0).setLabel(_("Minimum travel (mm)"), _("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.")) -setting('retraction_combing', True, bool, 'expert', _('Retraction')).setLabel(_("Enable combing"), _("Combing is the act of avoiding holes in the print for the head to travel over. If combing is disabled the printer head moves straight from the start point to the end point and it will always retract.")) +setting('retraction_combing', 'All', ['Off','All','No Skin'], 'expert', _('Retraction')).setLabel(_("Enable combing"), _("Combing is the act of avoiding holes in the print for the head to travel over. If combing is \'Off\' the printer head moves straight from the start point to the end point and it will always retract. If \'All\', enable combing on all surfaces. If \'No Skin\', enable combing on all except skin surfaces.")) setting('retraction_minimal_extrusion',0.02, float,'expert', _('Retraction')).setRange(0).setLabel(_("Minimal extrusion before retracting (mm)"), _("The minimal amount of extrusion that needs to be done before retracting again if a retraction needs to happen before this minimal is reached the retraction is ignored.\nThis avoids retracting a lot on the same piece of filament which flattens the filament and causes grinding issues.")) setting('retraction_hop', 0.0, float, 'expert', _('Retraction')).setRange(0).setLabel(_("Z hop when retracting (mm)"), _("When a retraction is done, the head is lifted by this amount to travel over the print. A value of 0.075 works well. This feature has a lot of positive effect on delta towers.")) setting('bottom_thickness', 0.3, float, 'advanced', _('Quality')).setRange(0).setLabel(_("Initial layer thickness (mm)"), _("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.")) @@ -716,6 +716,9 @@ def loadProfile(filename, allMachines = False): section = 'alterations' if profileParser.has_option(section, set.getName()): set.setValue(unicode(profileParser.get(section, set.getName()), 'utf-8', 'replace')) + #Upgrade setting from older ini file + if getProfileSetting('retraction_combing') == '1': + putProfileSetting('retraction_combing', 'All') def saveProfile(filename, allMachines = False): """ diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index f4e521e2..f4fa2179 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -506,7 +506,6 @@ class Engine(object): 'retractionAmountExtruderSwitch': int(profile.getProfileSettingFloat('retraction_dual_amount') * 1000), 'retractionZHop': int(profile.getProfileSettingFloat('retraction_hop') * 1000), 'minimalExtrusionBeforeRetraction': int(profile.getProfileSettingFloat('retraction_minimal_extrusion') * 1000), - 'enableCombing': 1 if profile.getProfileSetting('retraction_combing') == 'True' else 0, 'multiVolumeOverlap': int(profile.getProfileSettingFloat('overlap_dual') * 1000), 'objectSink': max(0, int(profile.getProfileSettingFloat('object_sink') * 1000)), 'minimalLayerTime': int(profile.getProfileSettingFloat('cool_min_layer_time')), @@ -529,6 +528,10 @@ class Engine(object): settings['fanFullOnLayerNr'] = (fanFullHeight - settings['initialLayerThickness'] - 1) / settings['layerThickness'] + 1 if settings['fanFullOnLayerNr'] < 0: settings['fanFullOnLayerNr'] = 0 + if profile.getProfileSetting('enable_combing') == 'All': + settings['enableCombing'] = 1 + elif profile.getProfileSetting('enable_combing') == 'No Skin': + settings['enableCombing'] = 2 if profile.getProfileSetting('support_type') == 'Lines': settings['supportType'] = 1 -- 2.30.2