summaryrefslogtreecommitdiff
path: root/lib/stitches
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stitches')
-rw-r--r--lib/stitches/meander_fill.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/stitches/meander_fill.py b/lib/stitches/meander_fill.py
index 964a7a41..6043b4bc 100644
--- a/lib/stitches/meander_fill.py
+++ b/lib/stitches/meander_fill.py
@@ -66,7 +66,9 @@ def find_starting_and_ending_nodes(graph, shape, starting_point, ending_point):
starting_point = Point(starting_point)
if ending_point is None:
- ending_point = starting_point
+ # pick a spot on the opposite side of the shape
+ projection = (shape.exterior.project(starting_point, normalized=True) + 0.5) % 1.0
+ ending_point = shape.exterior.interpolate(projection, normalized=True)
else:
ending_point = Point(ending_point)