diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-08-17 16:16:32 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-17 16:16:32 -0400 |
| commit | ece81d0c91c8b96f7da2c0339f6807a47d57112e (patch) | |
| tree | 0daf0758b275a2eb4d794c202dc8d2c0e17749eb /lib/elements | |
| parent | d7fddb0c946e19c571325a88ae5516bcbd0df128 (diff) | |
| parent | 72b8c367db613c3f44bce1174a8a5e8226bd2863 (diff) | |
Merge pull request #268 from inkstitch/lexelby-auto-fill-run
avoid cutting corners in auto-fill running stitch
Diffstat (limited to 'lib/elements')
| -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 8018b2b4..394f523e 100644 --- a/lib/elements/fill.py +++ b/lib/elements/fill.py @@ -105,9 +105,12 @@ class Fill(EmbroideryElement): last_pt = pt else: last_pt = pt - if point_ary: + if len(point_ary) > 2: poly_ary.append(point_ary) + if not poly_ary: + self.fatal(_("shape %s is so small that it cannot be filled with stitches. Please make it bigger or delete it.") % self.node.get('id')) + # shapely's idea of "holes" are to subtract everything in the second set # from the first. So let's at least make sure the "first" thing is the # biggest path. |
