diff options
Diffstat (limited to 'lib/extensions/flip.py')
| -rw-r--r-- | lib/extensions/flip.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/extensions/flip.py b/lib/extensions/flip.py index 65dbdc1f..0864da85 100644 --- a/lib/extensions/flip.py +++ b/lib/extensions/flip.py @@ -1,6 +1,5 @@ import inkex import cubicsuperpath -from shapely import geometry as shgeo from .base import InkstitchExtension from ..i18n import _ @@ -8,21 +7,11 @@ from ..elements import SatinColumn class Flip(InkstitchExtension): - def subpath_to_linestring(self, subpath): - return shgeo.LineString() - def flip(self, satin): csp = satin.path if len(csp) > 1: - flattened = satin.flatten(csp) - - # find the rails (the two longest paths) and swap them - indices = range(len(csp)) - indices.sort(key=lambda i: shgeo.LineString(flattened[i]).length, reverse=True) - - first = indices[0] - second = indices[1] + first, second = satin.rail_indices csp[first], csp[second] = csp[second], csp[first] satin.node.set("d", cubicsuperpath.formatPath(csp)) |
