kopia lustrzana https://github.com/inkstitch/inkstitch
filter satins for auto route satin (#2389)
rodzic
4c562a7127
commit
52ba1afb75
|
@ -830,6 +830,8 @@ class SatinColumn(EmbroideryElement):
|
|||
def center_line(self):
|
||||
# similar technique to do_center_walk()
|
||||
center_walk = [p[0] for p in self.plot_points_on_rails(self.zigzag_spacing, (0, 0), (-0.5, -0.5))]
|
||||
if len(center_walk) < 2:
|
||||
center_walk = [center_walk[0], center_walk[0]]
|
||||
return shgeo.LineString(center_walk)
|
||||
|
||||
def offset_points(self, pos1, pos2, offset_px, offset_proportional):
|
||||
|
|
|
@ -63,7 +63,12 @@ class AutoSatin(CommandsExtension):
|
|||
starting_point = self.get_starting_point()
|
||||
ending_point = self.get_ending_point()
|
||||
|
||||
# Ignore fills
|
||||
elements = [element for element in self.elements if isinstance(element, SatinColumn) or isinstance(element, Stroke)]
|
||||
# Ignore fills and zero length satins
|
||||
elements = [element for element in self.elements if (isinstance(element, SatinColumn) and element.center_line.length != 0) or
|
||||
isinstance(element, Stroke)]
|
||||
|
||||
# at this point we possibly removed all the elements, in this case stop here
|
||||
if not elements:
|
||||
return
|
||||
|
||||
auto_satin(elements, self.options.preserve_order, starting_point, ending_point, self.options.trim)
|
||||
|
|
Ładowanie…
Reference in New Issue