diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-07-13 19:51:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-13 19:51:25 -0400 |
| commit | c6ebfea5425229f19e12d40391ff1d6253ea4c55 (patch) | |
| tree | 58a53c0730c516b9ce53ec873fd23e9463cb631f /lib/elements/polyline.py | |
| parent | 67342608b0d059bc3ec79001e62d0bc0cdb251d4 (diff) | |
| parent | 6caba7b839e9f4e90ab9f3ff1110c8759e30337d (diff) | |
Merge pull request #224 from inkstitch/lexelby-trim-stop-commands
trim and stop commands
Diffstat (limited to 'lib/elements/polyline.py')
| -rw-r--r-- | lib/elements/polyline.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/elements/polyline.py b/lib/elements/polyline.py index 5c474237..b9ffdc0b 100644 --- a/lib/elements/polyline.py +++ b/lib/elements/polyline.py @@ -1,3 +1,5 @@ +from shapely import geometry as shgeo + from .element import param, EmbroideryElement, Patch from ..i18n import _ from ..utils.geometry import Point @@ -28,6 +30,11 @@ class Polyline(EmbroideryElement): return points @property + @cache + def shape(self): + return shgeo.LineString(self.points) + + @property def path(self): # A polyline is a series of connected line segments described by their # points. In order to make use of the existing logic for incorporating |
