diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py index dd04b507d..5aa7652ca 100644 --- a/lib/elements/satin_column.py +++ b/lib/elements/satin_column.py @@ -126,7 +126,7 @@ class SatinColumn(EmbroideryElement): @param('random_width_decrease_percent', _('Random percentage of satin width decrease'), tooltip=_('shorten stitch across rails at most this percent. ' - 'Two values separated by a space may be used for an aysmmetric effect.'), + 'Two values separated by a space may be used for an asymmetric effect.'), default=0, type='float', unit=_("% (each side)"), sort_index=91) @cache def random_width_decrease(self): @@ -136,7 +136,7 @@ class SatinColumn(EmbroideryElement): @param('random_width_increase_percent', _('Random percentage of satin width increase'), tooltip=_('lengthen stitch across rails at most this percent. ' - 'Two values separated by a space may be used for an aysmmetric effect.'), + 'Two values separated by a space may be used for an asymmetric effect.'), default=0, type='float', unit=_("% (each side)"), sort_index=90) @cache def random_width_increase(self): @@ -365,7 +365,7 @@ class SatinColumn(EmbroideryElement): return self.get_boolean_param("contour_underlay") @property - @param('contour_underlay_stitch_length_mm', _('Stitch length'), unit='mm', group=_('Contour Underlay'), type='float', default=1.5) + @param('contour_underlay_stitch_length_mm', _('Stitch length'), unit='mm', group=_('Contour Underlay'), type='float', default=3) def contour_underlay_stitch_length(self): return max(self.get_float_param("contour_underlay_stitch_length_mm", 3), 0.01) @@ -422,7 +422,7 @@ class SatinColumn(EmbroideryElement): return self.get_boolean_param("center_walk_underlay") @property - @param('center_walk_underlay_stitch_length_mm', _('Stitch length'), unit='mm', group=_('Center-Walk Underlay'), type='float', default=1.5) + @param('center_walk_underlay_stitch_length_mm', _('Stitch length'), unit='mm', group=_('Center-Walk Underlay'), type='float', default=3) def center_walk_underlay_stitch_length(self): return max(self.get_float_param("center_walk_underlay_stitch_length_mm", 3), 0.01) diff --git a/lib/output.py b/lib/output.py index 23f0cf1e5..1f932a0b6 100644 --- a/lib/output.py +++ b/lib/output.py @@ -120,10 +120,10 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}): num_color_changes = re.search("d+", str(e)).group() msg = _("Couldn't save embrodiery file.") msg += '\n\n' - msg += _("There are {num_color_changes} in your design. This is way too many.").format(num_color_changes=num_color_changes) + msg += _("There are {num_color_changes} color changes in your design. This is way too many.").format(num_color_changes=num_color_changes) msg += '\n' msg += _("Please reduce color changes. Find more information on our website:") msg += '\n\n' - msg += _("http://inkstitch.org/docs/faq/#too-many-color-changes") + msg += _("https://inkstitch.org/docs/faq/#too-many-color-changes") inkex.errormsg(msg) sys.exit(1) diff --git a/lib/stitch_plan/lock_stitch.py b/lib/stitch_plan/lock_stitch.py index 1a8923afc..9d7201462 100644 --- a/lib/stitch_plan/lock_stitch.py +++ b/lib/stitch_plan/lock_stitch.py @@ -85,12 +85,15 @@ class RelativeLock(LockStitchDefinition): to_previous = stitches[1] - stitches[0] length = to_previous.length() + if length == 0: + direction = Stitch(0, 0.5) + else: + direction = to_previous.unit() + # travel at least 0.5 and at most 1.5 length = max(length, 0.5 * PIXELS_PER_MM) length = min(length, 1.5 * PIXELS_PER_MM) - direction = to_previous.unit() - # Travel back one stitch, stopping halfway there. # Then go forward one stitch, stopping halfway between # again.