Skip to content

Commit 6dbd1dd

Browse files
committed
cross stitch groups
1 parent d537dfc commit 6dbd1dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/elements/fill_stitch.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from ..utils.param import ParamOption
3131
from .element import EmbroideryElement, param
3232
from .validation import ValidationError, ValidationWarning
33+
import sys
3334

3435

3536
class SmallShapeWarning(ValidationWarning):
@@ -1165,7 +1166,9 @@ def do_cross_stitch(self, previous_stitch_group, start, end):
11651166
fill_shapes.sort(key=lambda shape: shape.bounds[0])
11661167
final_end = end
11671168

1169+
stitch_groups = []
11681170
for i, shape in enumerate(fill_shapes):
1171+
print(shape, file=sys.stderr)
11691172
start = self.get_starting_point(previous_stitch_group)
11701173
if i < len(fill_shapes) - 1:
11711174
end = nearest_points(shape, fill_shapes[i+1])[0].coords
@@ -1179,7 +1182,8 @@ def do_cross_stitch(self, previous_stitch_group, start, end):
11791182
lock_stitches=self.lock_stitches
11801183
)
11811184
previous_stitch_group = stitch_group
1182-
return [stitch_group]
1185+
stitch_groups.append(stitch_group)
1186+
return stitch_groups
11831187

11841188
def do_circular_fill(self, shape, starting_point, ending_point):
11851189
# get target position

0 commit comments

Comments
 (0)