From 7dcb253d9b444ffadda389eca0b18280c7f428c4 Mon Sep 17 00:00:00 2001 From: George Steel Date: Sun, 4 Jun 2023 20:26:39 -0400 Subject: Add panelization options to zip export --- lib/stitch_plan/stitch_plan.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/stitch_plan/stitch_plan.py') diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py index 25571578..b9ce902a 100644 --- a/lib/stitch_plan/stitch_plan.py +++ b/lib/stitch_plan/stitch_plan.py @@ -4,6 +4,7 @@ # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. from sys import exit +from typing import List from inkex import errormsg @@ -11,6 +12,7 @@ from ..i18n import _ from ..svg import PIXELS_PER_MM from .color_block import ColorBlock from ..utils.threading import check_stop_flag +from ..utils.geometry import Point def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, min_stitch_len=0.1, disable_ties=False): # noqa: C901 @@ -207,3 +209,8 @@ class StitchPlan(object): return self.color_blocks[-1] else: return None + + def make_offsets(self, offsets: List[Point]): + out = StitchPlan() + out.color_blocks = [block.make_offsets(offsets) for block in self] + return out -- cgit v1.2.3 From 15ee5c458ba5cf3abfe2162d8eb4e8e1d13c6f91 Mon Sep 17 00:00:00 2001 From: Kaalleen Date: Sat, 22 Jul 2023 06:46:50 +0200 Subject: sort imports --- lib/stitch_plan/stitch_plan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/stitch_plan/stitch_plan.py') diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py index b9ce902a..caea9c09 100644 --- a/lib/stitch_plan/stitch_plan.py +++ b/lib/stitch_plan/stitch_plan.py @@ -10,9 +10,9 @@ from inkex import errormsg from ..i18n import _ from ..svg import PIXELS_PER_MM -from .color_block import ColorBlock -from ..utils.threading import check_stop_flag from ..utils.geometry import Point +from ..utils.threading import check_stop_flag +from .color_block import ColorBlock def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, min_stitch_len=0.1, disable_ties=False): # noqa: C901 -- cgit v1.2.3