diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2023-12-25 08:50:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-25 08:50:28 +0100 |
| commit | a0016674707b35b76c1c7f29a89c208dd7032199 (patch) | |
| tree | 4f3d42e86df884aedc6e369a2876ba0d78ff2e6d /lib/elements/clone.py | |
| parent | 5daa3aa3f0daf5b6e48b5718117601fb0a9cf4ac (diff) | |
Add shape property to clone (#2637)
Diffstat (limited to 'lib/elements/clone.py')
| -rw-r--r-- | lib/elements/clone.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/elements/clone.py b/lib/elements/clone.py index 5100def1..fdcd6835 100644 --- a/lib/elements/clone.py +++ b/lib/elements/clone.py @@ -6,6 +6,7 @@ from math import atan2, degrees, radians from inkex import CubicSuperPath, Path, Transform +from shapely import MultiLineString from ..commands import is_command_symbol from ..i18n import _ @@ -142,6 +143,14 @@ class Clone(EmbroideryElement): center = self.node.bounding_box(transform).center return center + @property + def shape(self): + path = self.node.get_path() + transform = Transform(self.node.composed_transform()) + path = path.transform(transform) + path = path.to_superpath() + return MultiLineString(path) + def validation_warnings(self): source_node = get_clone_source(self.node) if source_node.tag not in EMBROIDERABLE_TAGS: |
