diff options
| author | Lex Neva <github.com@lexneva.name> | 2019-03-29 15:03:28 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2019-03-29 15:03:28 -0400 |
| commit | 90a16fb7f9a44f4274d85cc693a51be9354737ec (patch) | |
| tree | d19184d2b4a59429a24df8812abbe178ec6fee4a /lib/stitches | |
| parent | 19950150210e5a3d7a76881b96e9b8b49e663309 (diff) | |
more debug logging
Diffstat (limited to 'lib/stitches')
| -rw-r--r-- | lib/stitches/auto_fill.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py index 496ac442..2a48b263 100644 --- a/lib/stitches/auto_fill.py +++ b/lib/stitches/auto_fill.py @@ -130,6 +130,8 @@ def build_fill_stitch_graph(shape, angle, row_spacing, end_row_spacing): path must exist. """ + debug.add_layer("auto-fill fill stitch") + # Convert the shape into a set of parallel line segments. rows_of_segments = intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing) segments = [segment for row in rows_of_segments for segment in row] @@ -160,6 +162,8 @@ def build_fill_stitch_graph(shape, angle, row_spacing, end_row_spacing): if data['index'] % 2 == 0: graph.add_edge(node1, node2, key="extra") + debug.log_graph(graph, "graph") + return graph @@ -228,6 +232,10 @@ def build_travel_graph(fill_stitch_graph, shape, fill_stitch_angle, underpath): grating1 = shgeo.MultiLineString(list(chain(*intersect_region_with_grating(shape, fill_stitch_angle + math.pi / 4, 2 * PIXELS_PER_MM)))) grating2 = shgeo.MultiLineString(list(chain(*intersect_region_with_grating(shape, fill_stitch_angle - math.pi / 4, 2 * PIXELS_PER_MM)))) + debug.add_layer("auto-fill travel") + debug.log_line_strings(grating1, "grating1") + debug.log_line_strings(grating2, "grating2") + # We'll add the endpoints of the crosshatch grating lines too These # will all be on the outline of the shape. This will ensure that a # path traveling inside the shape can reach its target on the outline, @@ -283,6 +291,8 @@ def build_travel_graph(fill_stitch_graph, shape, fill_stitch_angle, underpath): # <bound method STRtree.__del__ of <shapely.strtree.STRtree instance at 0x0D2BFD50>> ignored del rtree + debug.log_graph(graph, "travel graph") + return graph |
