diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2020-05-27 16:08:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-27 16:08:19 +0200 |
| commit | 455b02847f14983ef8c2463849981f5e9fc44063 (patch) | |
| tree | d4ed8df3fbf9d57bdda366dbc71bfd58b0b2ce0b /lib/elements/stroke.py | |
| parent | b461b2d85b10951f700d8f5c51b050bed8468cd2 (diff) | |
cleanup extension (#713)
Co-authored-by: Lex Neva <github.com@lexneva.name>
Diffstat (limited to 'lib/elements/stroke.py')
| -rw-r--r-- | lib/elements/stroke.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/elements/stroke.py b/lib/elements/stroke.py index 65e30634..36d1048e 100644 --- a/lib/elements/stroke.py +++ b/lib/elements/stroke.py @@ -76,11 +76,16 @@ class Stroke(EmbroideryElement): @property def paths(self): path = self.parse_path() + flattened = self.flatten(path) + + # manipulate invalid path + if len(flattened[0]) == 1: + return [[[flattened[0][0][0], flattened[0][0][1]], [flattened[0][0][0]+1.0, flattened[0][0][1]]]] if self.manual_stitch_mode: return [self.strip_control_points(subpath) for subpath in path] else: - return self.flatten(path) + return flattened @property @cache |
