* change satin underlay stitch length default for real
* fix zero length lock stitch
* fix typos
pull/3016/head dev-build-claudine-add_cooper_marif
Kaalleen 2024-06-23 13:59:20 +02:00 zatwierdzone przez GitHub
rodzic 7a856a77e4
commit 2281130ab7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
3 zmienionych plików z 11 dodań i 8 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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.