summaryrefslogtreecommitdiff
path: root/lib/stitches
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-05-01 21:21:07 -0400
committerLex Neva <github.com@lexneva.name>2018-05-01 21:21:07 -0400
commit05daffb7e01db55879eb24f3c00532324a5d41af (patch)
tree43ff5d954e035e0e8b5a507b9c1bf9d6b4d3338d /lib/stitches
parent1b31806423c8fec4040fed6d1009db016860b763 (diff)
refactor everything out of lib/__init__.py
Diffstat (limited to 'lib/stitches')
-rw-r--r--lib/stitches/auto_fill.py7
-rw-r--r--lib/stitches/fill.py6
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py
index 7f265909..518a2812 100644
--- a/lib/stitches/auto_fill.py
+++ b/lib/stitches/auto_fill.py
@@ -1,5 +1,3 @@
-from fill import intersect_region_with_grating, row_num, stitch_row
-from .. import _, PIXELS_PER_MM, Point as InkstitchPoint
import sys
import shapely
import networkx
@@ -7,6 +5,11 @@ import math
from itertools import groupby
from collections import deque
+from .fill import intersect_region_with_grating, row_num, stitch_row
+from ..i18n import _
+from ..svg import PIXELS_PER_MM
+from ..utils.geometry import Point as InkstitchPoint
+
class MaxQueueLengthExceeded(Exception):
pass
diff --git a/lib/stitches/fill.py b/lib/stitches/fill.py
index 1b7377b0..14971cb4 100644
--- a/lib/stitches/fill.py
+++ b/lib/stitches/fill.py
@@ -1,9 +1,10 @@
-from .. import PIXELS_PER_MM
-from ..utils import cache, Point as InkstitchPoint
import shapely
import math
import sys
+from ..svg import PIXELS_PER_MM
+from ..utils import cache, Point as InkstitchPoint
+
def legacy_fill(shape, angle, row_spacing, end_row_spacing, max_stitch_length, flip, staggers):
rows_of_segments = intersect_region_with_grating(shape, angle, row_spacing, end_row_spacing, flip)
@@ -242,4 +243,3 @@ def pull_runs(rows, shape, row_spacing):
count += 1
return runs
-