diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2019-02-16 17:07:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-16 17:07:34 -0500 |
| commit | 2ab4c451e8042868b2516a6b3fe1f60836f27ffe (patch) | |
| tree | 0ce616ac57e6a2aa507461486233c71373467c9a /lib/elements/satin_column.py | |
| parent | bd6e4d9d32fd314b66f3c5d798c7151bf543d07f (diff) | |
| parent | fa3236372bcee28f4aaa78da47b68c5d7f32cca4 (diff) | |
tons of bug fixes (#364)
bug fixes
Diffstat (limited to 'lib/elements/satin_column.py')
| -rw-r--r-- | lib/elements/satin_column.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py index 1f9854ed..f891e049 100644 --- a/lib/elements/satin_column.py +++ b/lib/elements/satin_column.py @@ -1,12 +1,13 @@ -from itertools import chain, izip from copy import deepcopy -from shapely import geometry as shgeo, affinity as shaffinity +from itertools import chain, izip + import cubicsuperpath +from shapely import geometry as shgeo, affinity as shaffinity -from .element import param, EmbroideryElement, Patch from ..i18n import _ -from ..utils import cache, Point, cut, collapse_duplicate_point from ..svg import line_strings_to_csp, point_lists_to_csp +from ..utils import cache, Point, cut, collapse_duplicate_point +from .element import param, EmbroideryElement, Patch class SatinColumn(EmbroideryElement): @@ -255,7 +256,7 @@ class SatinColumn(EmbroideryElement): intersections += len(intersection) break elif not isinstance(intersection, shgeo.Point): - self.fatal("intersection is a: %s %s" % (intersection, intersection.geoms)) + self.fatal("INTERNAL ERROR: intersection is: %s %s" % (intersection, getattr(intersection, 'geoms', None))) else: intersections += 1 @@ -716,22 +717,22 @@ class SatinColumn(EmbroideryElement): # First, verify that we have valid paths. self.validate_satin_column() - patches = [] + patch = Patch(color=self.color) if self.center_walk_underlay: - patches.append(self.do_center_walk()) + patch += self.do_center_walk() if self.contour_underlay: - patches.append(self.do_contour_underlay()) + patch += self.do_contour_underlay() if self.zigzag_underlay: # zigzag underlay comes after contour walk underlay, so that the # zigzags sit on the contour walk underlay like rail ties on rails. - patches.append(self.do_zigzag_underlay()) + patch += self.do_zigzag_underlay() if self.e_stitch: - patches.append(self.do_e_stitch()) + patch += self.do_e_stitch() else: - patches.append(self.do_satin()) + patch += self.do_satin() - return patches + return [patch] |
