summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-03-15 08:51:40 +0100
committerGitHub <noreply@github.com>2025-03-15 08:51:40 +0100
commit89b472d319d7247fb2ff19eb8d264a80baff8df7 (patch)
tree76d3e974dfe6d434040c6061872610fd36c52010
parent732de4fecb952dad58fabe51c7e7dc382a04383b (diff)
Element info: take pattern into account (#3581)
* element info: take pattern into account * ensure multi-polygon for fill nonzero shapes
-rw-r--r--lib/elements/fill_stitch.py2
-rw-r--r--lib/extensions/element_info.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py
index ee77cd60..923ce23f 100644
--- a/lib/elements/fill_stitch.py
+++ b/lib/elements/fill_stitch.py
@@ -774,7 +774,7 @@ class FillStitch(EmbroideryElement):
paths.sort(key=lambda point_list: shgeo.Polygon(point_list).area, reverse=True)
shape = shgeo.MultiPolygon([(paths[0], paths[1:])])
if self.node.style('fill-rule') == 'nonzero':
- shape = shape.buffer(0)
+ shape = ensure_multi_polygon(shape.buffer(0))
return shape
@property
diff --git a/lib/extensions/element_info.py b/lib/extensions/element_info.py
index 06acbb16..ed879f43 100644
--- a/lib/extensions/element_info.py
+++ b/lib/extensions/element_info.py
@@ -40,7 +40,7 @@ class ElementInfo(InkstitchExtension):
app.MainLoop()
def _element_info(self, element, previous_stitch_group, next_element):
- stitch_groups = element.to_stitch_groups(previous_stitch_group)
+ stitch_groups = element.embroider(previous_stitch_group, next_element)
stitch_plan = stitch_groups_to_stitch_plan(
stitch_groups,
collapse_len=self.metadata['collapse_len_mm'],