diff options
| author | George Steel <george.steel@gmail.com> | 2023-06-04 20:26:39 -0400 |
|---|---|---|
| committer | George Steel <george.steel@gmail.com> | 2023-06-15 12:25:15 -0400 |
| commit | 7dcb253d9b444ffadda389eca0b18280c7f428c4 (patch) | |
| tree | f654ff1594305092ab46b920e2a72a12a283d50c /lib/stitch_plan/stitch_plan.py | |
| parent | 92623d460d82f01c01353a5a5c992ec53baf7f41 (diff) | |
Add panelization options to zip export
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
| -rw-r--r-- | lib/stitch_plan/stitch_plan.py | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
