From 61e4b763b76c235c5a7e770cbbf8f1ecd78266b6 Mon Sep 17 00:00:00 2001 From: tatarize Date: Tue, 2 Mar 2021 15:43:01 -0800 Subject: [PATCH 1/3] pec extra-write bug --- pyembroidery/EmbPattern.py | 5 +++++ pyembroidery/PecWriter.py | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pyembroidery/EmbPattern.py b/pyembroidery/EmbPattern.py index aa3b028e..2e58f05d 100644 --- a/pyembroidery/EmbPattern.py +++ b/pyembroidery/EmbPattern.py @@ -590,6 +590,11 @@ def add_pattern(self, pattern, dx=None, dy=None, sx=None, sy=None, rotate=None): Any prepended thread change command to the merging pattern is suppressed. :param pattern: pattern to add to current pattern + :param dx: position change of the added pattern x + :param dy: position change of the added pattern y + :param sx: scale of the added pattern x + :param sy: scale fo the added pattern y + :param rotate: rotation of the added pattern :return: """ if isinstance(pattern, str): diff --git a/pyembroidery/PecWriter.py b/pyembroidery/PecWriter.py index ba464eda..3280de97 100644 --- a/pyembroidery/PecWriter.py +++ b/pyembroidery/PecWriter.py @@ -133,8 +133,9 @@ def pec_encode(pattern, f): xx += dx yy += dy if data == STITCH: - if jumping and dx != 0 and dy != 0: - f.write(b'\x00\x00') + if jumping: + if dx != 0 and dy != 0: + f.write(b'\x00\x00') jumping = False if -64 < dx < 63 and -64 < dy < 63: f.write(bytes(bytearray([dx & MASK_07_BIT, dy & MASK_07_BIT]))) From ef18b683898c16351da39064b1fec4e12e5db114 Mon Sep 17 00:00:00 2001 From: tatarize Date: Tue, 2 Mar 2021 15:45:06 -0800 Subject: [PATCH 2/3] typo --- pyembroidery/EmbPattern.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyembroidery/EmbPattern.py b/pyembroidery/EmbPattern.py index 2e58f05d..be21874b 100644 --- a/pyembroidery/EmbPattern.py +++ b/pyembroidery/EmbPattern.py @@ -593,7 +593,7 @@ def add_pattern(self, pattern, dx=None, dy=None, sx=None, sy=None, rotate=None): :param dx: position change of the added pattern x :param dy: position change of the added pattern y :param sx: scale of the added pattern x - :param sy: scale fo the added pattern y + :param sy: scale of the added pattern y :param rotate: rotation of the added pattern :return: """ From 8e8f0e24fab6e33d774c49c5cba4ddd5ed28f1de Mon Sep 17 00:00:00 2001 From: tatarize Date: Tue, 2 Mar 2021 15:46:14 -0800 Subject: [PATCH 3/3] 1.4.27 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index be0d6734..5c531d22 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyembroidery", - version="1.4.26", + version="1.4.27", author="Tatarize", author_email="tatarize@gmail.com", description="Embroidery IO library",