From: daid Date: Wed, 12 Feb 2014 15:16:11 +0000 (+0100) Subject: Fix the negative object sink crash. X-Git-Tag: 14.02-RC1~8 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2cb7a8c012a4c9424b05c149dd4b0a9a62da179b;p=cura.git Fix the negative object sink crash. --- diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 141737ce..8ad8b154 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -196,7 +196,7 @@ setting('retraction_combing', True, bool, 'expert', _('Retraction')).se 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 retraction 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 good. 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.")) -setting('object_sink', 0.0, float, 'advanced', _('Quality')).setLabel(_("Cut off object bottom (mm)"), _("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.")) +setting('object_sink', 0.0, float, 'advanced', _('Quality')).setRange(0).setLabel(_("Cut off object bottom (mm)"), _("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.")) #setting('enable_skin', False, bool, 'advanced', _('Quality')).setLabel(_("Duplicate outlines"), _("Skin prints the outer lines of the prints twice, each time with half the thickness. This gives the illusion of a higher print quality.")) setting('overlap_dual', 0.15, float, 'advanced', _('Quality')).setLabel(_("Dual extrusion overlap (mm)"), _("Add a certain amount of overlapping extrusion on dual-extrusion prints. This bonds the different colors better together.")) setting('travel_speed', 150.0, float, 'advanced', _('Speed')).setRange(0.1).setLabel(_("Travel speed (mm/s)"), _("Speed at which travel moves are done, a high quality build Ultimaker can reach speeds of 250mm/s. But some machines might miss steps then.")) diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 92466285..eafeecb5 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -452,7 +452,7 @@ class Engine(object): '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': int(profile.getProfileSettingFloat('object_sink') * 1000), + 'objectSink': max(0, int(profile.getProfileSettingFloat('object_sink') * 1000)), 'minimalLayerTime': int(profile.getProfileSettingFloat('cool_min_layer_time')), 'minimalFeedrate': int(profile.getProfileSettingFloat('cool_min_feedrate')), 'coolHeadLift': 1 if profile.getProfileSetting('cool_head_lift') == 'True' else 0,