diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-07-04 21:17:20 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-07-12 20:13:46 -0400 |
| commit | 62ef2850a2f57d64d0e65fbfc055b85e3c940031 (patch) | |
| tree | 5c16d38ac0fff6651e44d06924adbcdcea77af48 /lib/elements/satin_column.py | |
| parent | d090fa003830f117918fac201ca527d513507a70 (diff) | |
generalize Element.shape and implement in all element types
Diffstat (limited to 'lib/elements/satin_column.py')
| -rw-r--r-- | lib/elements/satin_column.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py index 1d13c5e0..2ceb38de 100644 --- a/lib/elements/satin_column.py +++ b/lib/elements/satin_column.py @@ -89,6 +89,17 @@ class SatinColumn(EmbroideryElement): @property @cache + def shape(self): + # This isn't used for satins at all, but other parts of the code + # may need to know the general shape of a satin column. + + flattened = self.flatten(self.parse_path()) + line_strings = [shgeo.LineString(path) for path in flattened] + + return shgeo.MultiLineString(line_strings) + + @property + @cache def csp(self): return self.parse_path() |
