summaryrefslogtreecommitdiff
path: root/lib/stitches/contour_fill.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2023-05-06 18:31:54 +0200
committerGitHub <noreply@github.com>2023-05-06 18:31:54 +0200
commit2e62ba7926a19e2952148c6ced3b6ebf1a96d78a (patch)
tree611df4000c633b66746b64589bb4fafc4f310cf9 /lib/stitches/contour_fill.py
parent909df7b33b07420b086f9a70b1107dfd81f9175b (diff)
Avoid duplicated points in make_spiral (#2268)
* avoid duplicated points in make_spiral * circular fill: add end_row_spacing, repeats and bean repeats * fix circular fill if original shape is a circle
Diffstat (limited to 'lib/stitches/contour_fill.py')
-rw-r--r--lib/stitches/contour_fill.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/stitches/contour_fill.py b/lib/stitches/contour_fill.py
index f5f2a3ee..2ea61afb 100644
--- a/lib/stitches/contour_fill.py
+++ b/lib/stitches/contour_fill.py
@@ -574,6 +574,10 @@ def _make_spiral(rings, stitch_length, starting_point):
check_stop_flag()
spiral_part = _interpolate_linear_rings(ring1, ring2, stitch_length, starting_point)
- path.extend(spiral_part.coords)
+ # skip last to avoid duplicated points
+ path.extend(spiral_part.coords[:-1])
+
+ # at the end add last point
+ path.append(spiral_part.coords[-1])
return path