From 5a95e1d004862331cf54de9c90b6a6d965428e8a Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 28 Jan 2023 22:09:34 -0500 Subject: add lambda unwrapping to debug --- lib/stitches/meander_fill.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/stitches/meander_fill.py') diff --git a/lib/stitches/meander_fill.py b/lib/stitches/meander_fill.py index 81efa398..6b3df0e3 100644 --- a/lib/stitches/meander_fill.py +++ b/lib/stitches/meander_fill.py @@ -7,7 +7,7 @@ from .. import tiles from ..debug import debug from ..stitch_plan import Stitch from ..utils import smooth_path -from ..utils.geometry import Point as InkStitchPoint +from ..utils.geometry import Point as InkStitchPoint, ensure_geometry_collection from ..utils.list import poprandom from ..utils.prng import iter_uniform_floats @@ -20,11 +20,10 @@ 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') + debug.log_line_strings(lambda: 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') - # debug.log(f"graph connected? {nx.is_connected(graph)}") + debug.log_graph(graph, 'Meander graph') + debug.log(lambda: f"graph connected? {nx.is_connected(graph)}") start, end = find_starting_and_ending_nodes(graph, shape, starting_point, ending_point) rng = iter_uniform_floats(fill.random_seed, 'meander-fill', shape_index) -- cgit v1.2.3