diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2023-07-22 06:50:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-22 06:50:48 +0200 |
| commit | 91a0aea6a1ca4021b7915989634fdccb0dedb1bf (patch) | |
| tree | 45ed5dc7584f251bc7d6afbaeb1afd0bc66b1ea3 /lib/stitch_plan/stitch_plan.py | |
| parent | f140f2f0f950c40b37393b47c57f0725e4a2a8ce (diff) | |
| parent | 160284d21dcadddfb5e4b22dc2f71073d012b96c (diff) | |
Merge pull request #2349 from inkstitch/george-steel/export-panel
* Add panelization options to zip export
* Add input field for custom file names (inside the zip archive)
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
| -rw-r--r-- | lib/stitch_plan/stitch_plan.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py index 25571578..caea9c09 100644 --- a/lib/stitch_plan/stitch_plan.py +++ b/lib/stitch_plan/stitch_plan.py @@ -4,13 +4,15 @@ # 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 from ..i18n import _ from ..svg import PIXELS_PER_MM -from .color_block import ColorBlock +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 @@ -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 |
