chiark / gitweb /
Add configuration option for combing 'No Skin'
authorRyan Press <ryan@presslab.us>
Thu, 15 Jan 2015 00:56:17 +0000 (16:56 -0800)
committerRyan Press <ryan@presslab.us>
Thu, 15 Jan 2015 00:56:17 +0000 (16:56 -0800)
This adds the menu configuration option for CuraEngine
enableCombing=2.  This disables combing on skin surfaces.

Cura/util/profile.py
Cura/util/sliceEngine.py

index 3df63b3d56c88b7a9b987ae0dde856884224b9ff..23b707fc7f44c1cc4ae1d1010335c66d74fa0e3a 100644 (file)
@@ -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):
        """
index f4e521e2380486ccbeb8b9c4e9aa4cb295600d7b..f4fa2179ec75dc853322f6cb63905dd1a76f87e9 100644 (file)
@@ -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