summaryrefslogtreecommitdiff
path: root/lib/elements
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-07-20 11:29:07 +0200
committerGitHub <noreply@github.com>2025-07-20 11:29:07 +0200
commite01532e2acbfa523185b8be2e168f2fee4fb1ffb (patch)
tree87e39bbf471876b5b0370a81a11571a3020d67f7 /lib/elements
parentcb7248c9c28957d02e2774195e707244d2d83b50 (diff)
Satin: first_stitch method fails on invalid path (#3882)
* satin: do not fail on invalid path in first stitch method * fix validation errors too
Diffstat (limited to 'lib/elements')
-rw-r--r--lib/elements/satin_column.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py
index 42b650ed..2bc00304 100644
--- a/lib/elements/satin_column.py
+++ b/lib/elements/satin_column.py
@@ -835,8 +835,8 @@ class SatinColumn(EmbroideryElement):
point = (0, 0)
yield NotStitchableError(point)
- if not self.to_stitch_groups():
- yield NotStitchableError(self.line_string_rails[0].representative_point())
+ elif not self.to_stitch_groups() and self.line_string_rails:
+ yield NotStitchableError(self.line_string_rails[0].representative_point())
def _center_walk_is_odd(self):
return self.center_walk_underlay and self.center_walk_underlay_repeats % 2 == 1
@@ -1831,7 +1831,7 @@ class SatinColumn(EmbroideryElement):
@property
def first_stitch(self):
- if self.start_at_nearest_point:
+ if not self.rails or self.start_at_nearest_point:
return None
return shgeo.Point(self.line_string_rails[0].coords[0])