diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-10-21 16:45:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-21 16:45:10 +0200 |
| commit | dbfdb3e8d4fe3787927e8ab536473f9db6264e2b (patch) | |
| tree | 2eb1318df53471ebda7e1d7b1490eb4e9d500706 /lib/elements/satin_column.py | |
| parent | bd4d300ed70929b5975c18c77dc04deae9108675 (diff) | |
satin column: ignore single point paths (#3244)
Diffstat (limited to 'lib/elements/satin_column.py')
| -rw-r--r-- | lib/elements/satin_column.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py index 912dad4b..2353fc1c 100644 --- a/lib/elements/satin_column.py +++ b/lib/elements/satin_column.py @@ -556,7 +556,7 @@ class SatinColumn(EmbroideryElement): def csp(self): paths = self.parse_path() # exclude subpaths which are just a point - paths = [path for path in paths if shgeo.LineString(self.flatten_subpath(path)).length > 0] + paths = [path for path in paths if len(self.flatten_subpath(path)) > 1] return paths @property @@ -641,7 +641,7 @@ class SatinColumn(EmbroideryElement): @cache def rail_indices(self): paths = [self.flatten_subpath(subpath) for subpath in self.csp] - paths = [shgeo.LineString(path) for path in paths] + paths = [shgeo.LineString(path) for path in paths if len(path) > 1] num_paths = len(paths) # Imagine a satin column as a curvy ladder. |
