diff options
| author | Kaalleen <reni@allenka.de> | 2022-05-04 18:27:12 +0200 |
|---|---|---|
| committer | Kaalleen <reni@allenka.de> | 2022-05-04 19:19:54 +0200 |
| commit | 48d0a0250e2787a3351137172924d1c4d277f002 (patch) | |
| tree | e436545e417b6cac03eee2240df6344997642297 /lib | |
| parent | 330c6be78786b85ed2528cf2788e529cfda714fd (diff) | |
undo build changes for depq, update clone
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/elements/clone.py | 2 | ||||
| -rw-r--r-- | lib/elements/utils.py | 7 | ||||
| -rw-r--r-- | lib/stitches/guided_fill.py | 1 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/elements/clone.py b/lib/elements/clone.py index 3f133471..303c1c2f 100644 --- a/lib/elements/clone.py +++ b/lib/elements/clone.py @@ -70,7 +70,7 @@ class Clone(EmbroideryElement): def clone_to_element(self, node): from .utils import node_to_elements - return node_to_elements(node) + return node_to_elements(node, True) def to_stitch_groups(self, last_patch=None): patches = [] diff --git a/lib/elements/utils.py b/lib/elements/utils.py index 561188aa..dafde759 100644 --- a/lib/elements/utils.py +++ b/lib/elements/utils.py @@ -19,11 +19,12 @@ from .stroke import Stroke from .text import TextObject -def node_to_elements(node): # noqa: C901 +def node_to_elements(node, clone_to_element=False): # noqa: C901 if node.tag == SVG_POLYLINE_TAG: return [Polyline(node)] - elif is_clone(node): + elif is_clone(node) and not clone_to_element: + # clone_to_element: get an actual embroiderable element once a clone has been defined as a clone return [Clone(node)] elif node.tag == SVG_PATH_TAG and not node.get('d', ''): @@ -32,7 +33,7 @@ def node_to_elements(node): # noqa: C901 elif has_marker(node): return [MarkerObject(node)] - elif node.tag in EMBROIDERABLE_TAGS: + elif node.tag in EMBROIDERABLE_TAGS or is_clone(node): element = EmbroideryElement(node) if element.get_boolean_param("satin_column") and element.get_style("stroke"): diff --git a/lib/stitches/guided_fill.py b/lib/stitches/guided_fill.py index 9694a546..e4918e1d 100644 --- a/lib/stitches/guided_fill.py +++ b/lib/stitches/guided_fill.py @@ -5,7 +5,6 @@ from .auto_fill import (build_fill_stitch_graph, build_travel_graph, collapse_sequential_outline_edges, fallback, find_stitch_path, graph_is_valid, travel) from .running_stitch import running_stitch -from ..debug import debug from ..i18n import _ from ..stitch_plan import Stitch from ..utils.geometry import Point as InkstitchPoint, reverse_line_string |
