Element info: take pattern into account (#3581)

* element info: take pattern into account
* ensure multi-polygon for fill nonzero shapes
pull/3583/head
Kaalleen 2025-03-15 08:51:40 +01:00 zatwierdzone przez GitHub
rodzic 732de4fecb
commit 89b472d319
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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'],