diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-09-12 21:32:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-12 21:32:15 -0400 |
| commit | 7b8af2ed5731bc10b331db2b32dbce48f60c33a9 (patch) | |
| tree | ac06f38cde84e676f8aa8e91f08b71d45b9f2642 /lib/elements/fill.py | |
| parent | 3fd741a1a4218b6559184aaadcde8abca178bde2 (diff) | |
| parent | d30507171b04f37871db74609c0a521325bddbd1 (diff) | |
Merge pull request #301 from inkstitch/lexelby/bug-fixes
bug fixes
Diffstat (limited to 'lib/elements/fill.py')
| -rw-r--r-- | lib/elements/fill.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/elements/fill.py b/lib/elements/fill.py index 626573e6..4156a24b 100644 --- a/lib/elements/fill.py +++ b/lib/elements/fill.py @@ -120,7 +120,10 @@ class Fill(EmbroideryElement): poly_ary.sort(key=lambda point_list: shgeo.Polygon(point_list).area, reverse=True) polygon = shgeo.MultiPolygon([(poly_ary[0], poly_ary[1:])]) - # print >> sys.stderr, "polygon valid:", polygon.is_valid + + if not polygon.is_valid: + self.fatal(_("shape is not valid. This can happen if the border crosses over itself.")) + return polygon def to_patches(self, last_patch): |
