summaryrefslogtreecommitdiff
path: root/lib/stitch_plan/stitch_plan.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
-rw-r--r--lib/stitch_plan/stitch_plan.py9
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