diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2023-06-27 07:44:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-27 07:44:34 +0200 |
| commit | 52ba1afb7532514adee18939f37c51805642f235 (patch) | |
| tree | c6544a0312ead30409fa27ffa1619ca70badce15 /lib/extensions/auto_satin.py | |
| parent | 4c562a71273d44e05efe64d4d37bd02c61448691 (diff) | |
filter satins for auto route satin (#2389)
Diffstat (limited to 'lib/extensions/auto_satin.py')
| -rw-r--r-- | lib/extensions/auto_satin.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/extensions/auto_satin.py b/lib/extensions/auto_satin.py index dfb1a87e..badc9d55 100644 --- a/lib/extensions/auto_satin.py +++ b/lib/extensions/auto_satin.py @@ -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) |
