From 038875f876d79d0f1e971886fe42f5bee4f9f31e Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 21 Aug 2018 20:32:50 -0400 Subject: autopep8 --- lib/stitches/fill.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/stitches/fill.py') diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py index 14971cb4..ac8b52ee 100644 --- a/lib/stitches/fill.py +++ b/lib/stitches/fill.py @@ -37,6 +37,7 @@ def adjust_stagger(stitch, angle, row_spacing, max_stitch_length, staggers): return stitch - offset * east(angle) + def stitch_row(stitches, beg, end, angle, row_spacing, max_stitch_length, staggers): # We want our stitches to look like this: # @@ -163,6 +164,7 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non return rows + def section_to_stitches(group_of_segments, angle, row_spacing, max_stitch_length, staggers): stitches = [] first_segment = True -- cgit v1.2.3 From 94f391ab4262b5e1c8dace0263467a0ec1f17058 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 21 Aug 2018 20:50:14 -0400 Subject: more pep8 fixes --- lib/stitches/fill.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/stitches/fill.py') diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py index ac8b52ee..b6b97e1b 100644 --- a/lib/stitches/fill.py +++ b/lib/stitches/fill.py @@ -120,7 +120,7 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non height = abs(end - start) - #print >> dbg, "grating:", start, end, height, row_spacing, end_row_spacing + # print >> dbg, "grating:", start, end, height, row_spacing, end_row_spacing # offset start slightly so that rows are always an even multiple of # row_spacing_px from the origin. This makes it so that abutting -- cgit v1.2.3 From 908f2cd7727e939b87e3f57c1d3a189705de4c94 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 21 Aug 2018 21:43:09 -0400 Subject: pyflakes fixes --- lib/stitches/fill.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/stitches/fill.py') diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py index b6b97e1b..af0a8403 100644 --- a/lib/stitches/fill.py +++ b/lib/stitches/fill.py @@ -1,6 +1,5 @@ import shapely import math -import sys from ..svg import PIXELS_PER_MM from ..utils import cache, Point as InkstitchPoint @@ -167,9 +166,7 @@ def intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing=Non def section_to_stitches(group_of_segments, angle, row_spacing, max_stitch_length, staggers): stitches = [] - first_segment = True swap = False - last_end = None for segment in group_of_segments: (beg, end) = segment @@ -240,7 +237,7 @@ def pull_runs(rows, shape, row_spacing): # print >> sys.stderr, len(run) runs.append(run) - rows = [row for row in rows if len(row) > 0] + rows = [r for r in rows if len(r) > 0] count += 1 -- cgit v1.2.3