summaryrefslogtreecommitdiff
path: root/lib/stitches
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stitches')
-rw-r--r--lib/stitches/auto_fill.py3
-rw-r--r--lib/stitches/fill.py5
2 files changed, 1 insertions, 7 deletions
diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py
index e777d026..e732c940 100644
--- a/lib/stitches/auto_fill.py
+++ b/lib/stitches/auto_fill.py
@@ -1,14 +1,12 @@
import sys
import shapely
import networkx
-import math
from itertools import groupby, izip
from collections import deque
from .fill import intersect_region_with_grating, row_num, stitch_row
from .running_stitch import running_stitch
from ..i18n import _
-from ..svg import PIXELS_PER_MM
from ..utils.geometry import Point as InkstitchPoint, cut
@@ -367,7 +365,6 @@ def find_stitch_path(graph, segments, starting_point=None, ending_point=None):
the order of most-recently-visited first.
"""
- original_graph = graph
graph = graph.copy()
num_segments = len(segments)
segments_visited = 0
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