From 4935d59f5dfbf3c4a8a0733b1aa6380cd11aefb4 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 28 Jan 2023 21:35:24 -0500 Subject: wip --- lib/stitches/meander_fill.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/stitches') diff --git a/lib/stitches/meander_fill.py b/lib/stitches/meander_fill.py index cb6e3f4e..81efa398 100644 --- a/lib/stitches/meander_fill.py +++ b/lib/stitches/meander_fill.py @@ -20,6 +20,7 @@ def meander_fill(fill, shape, shape_index, starting_point, ending_point): debug.log(f"tile name: {tile.name}") + # from ..utils.geometry import ensure_geometry_collection # debug.log_line_strings(ensure_geometry_collection(shape.boundary).geoms, 'Meander shape') graph = tile.to_graph(shape, fill.meander_scale, fill.meander_padding) # debug.log_graph(graph, 'Meander graph') @@ -67,6 +68,8 @@ def find_initial_path(graph, start, end): # nx.all_simple_paths(graph, start, end) and choose the first one. # However, that tends to pick a really "orderly" path. Shortest # path looks more random. + + # TODO: handle if this can't find a path return nx.shortest_path(graph, start, end) -- cgit v1.2.3