summaryrefslogtreecommitdiff
path: root/lib/elements/polyline.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-07-25 21:39:39 -0400
committerLex Neva <github.com@lexneva.name>2018-07-25 21:39:39 -0400
commit6c5e256d73500be4674e8778d80b12c5b6228335 (patch)
tree979795c683ae5dbf683cfe53c9eece4939955246 /lib/elements/polyline.py
parent5b5188ef9918d196173a4a543532c497140e639c (diff)
parentd14880db5820ce2175bda7bbe761c21fd6c454d0 (diff)
Merge remote-tracking branch 'origin/master' into lexelby-mac-build-mk2
Diffstat (limited to 'lib/elements/polyline.py')
-rw-r--r--lib/elements/polyline.py7
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