use buffer(0) when fill rule is nonzero (#3561)

pull/3562/head
Kaalleen 2025-03-08 16:58:58 +01:00 zatwierdzone przez GitHub
rodzic ba555c7ea3
commit c2aeb39a44
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -772,7 +772,10 @@ class FillStitch(EmbroideryElement):
# biggest path. # biggest path.
paths = self.paths paths = self.paths
paths.sort(key=lambda point_list: shgeo.Polygon(point_list).area, reverse=True) paths.sort(key=lambda point_list: shgeo.Polygon(point_list).area, reverse=True)
return shgeo.MultiPolygon([(paths[0], paths[1:])]) shape = shgeo.MultiPolygon([(paths[0], paths[1:])])
if self.node.style('fill-rule') == 'nonzero':
shape = shape.buffer(0)
return shape
@property @property
@cache @cache