summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-01-25 16:08:35 +0100
committerGitHub <noreply@github.com>2025-01-25 16:08:35 +0100
commit7fcb5fcfb2d816523bcfdf325375e7fda8dd1e69 (patch)
tree56261bad9658d2ed2ca812821fbf605230f04e64
parent82c6af07a530e43ecb1804066a8cfff34c077a8f (diff)
satin: ignore ending_point when it is already at the end (#3460)
-rw-r--r--lib/elements/satin_column.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py
index 11ee92b5..3aa54f90 100644
--- a/lib/elements/satin_column.py
+++ b/lib/elements/satin_column.py
@@ -1821,6 +1821,9 @@ class SatinColumn(EmbroideryElement):
if end_point is None and self.end_at_nearest_point and next_stitch is not None:
end_point = nearest_points(next_stitch, self.shape)[1]
end_point = Point(*list(end_point.coords[0]))
+ # if we are already near to the end, we won't need to specify an ending point
+ if end_point and shgeo.Point(self.center_line.coords[-1]).distance(shgeo.Point(end_point)) < 5:
+ end_point = None
return end_point
def uses_previous_stitch(self):