diff options
| author | Lex Neva <github.com@lexneva.name> | 2019-02-09 20:37:14 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2019-02-16 16:53:38 -0500 |
| commit | 52bf2c80b66889d471745260bf1679289d1c59e3 (patch) | |
| tree | 69304146e4810990cc082abbaae75a7f5982ffae /lib/extensions | |
| parent | 4fe95be93ac3cbf29b721ca861828f580efbc484 (diff) | |
fix style
Diffstat (limited to 'lib/extensions')
| -rw-r--r-- | lib/extensions/convert_to_satin.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/extensions/convert_to_satin.py b/lib/extensions/convert_to_satin.py index ef4ac557..2b586e36 100644 --- a/lib/extensions/convert_to_satin.py +++ b/lib/extensions/convert_to_satin.py @@ -1,17 +1,18 @@ -import inkex -from shapely import geometry as shgeo +from copy import deepcopy from itertools import chain, groupby -import numpy -from numpy import diff, sign, setdiff1d import math -from copy import deepcopy -from .base import InkstitchExtension -from ..svg.tags import SVG_PATH_TAG -from ..svg import get_correction_transform, PIXELS_PER_MM +import inkex +from numpy import diff, sign, setdiff1d +import numpy +from shapely import geometry as shgeo + from ..elements import Stroke -from ..utils import Point from ..i18n import _ +from ..svg import get_correction_transform, PIXELS_PER_MM +from ..svg.tags import SVG_PATH_TAG +from ..utils import Point +from .base import InkstitchExtension class SelfIntersectionError(Exception): @@ -112,10 +113,10 @@ class ConvertToSatin(InkstitchExtension): if not isinstance(left_rail, shgeo.LineString) or \ not isinstance(right_rail, shgeo.LineString): - # If the parallel offsets come out as anything but a LineString, that means the - # path intersects itself, when taking its stroke width into consideration. See - # the last example for parallel_offset() in the Shapely documentation: - # https://shapely.readthedocs.io/en/latest/manual.html#object.parallel_offset + # If the parallel offsets come out as anything but a LineString, that means the + # path intersects itself, when taking its stroke width into consideration. See + # the last example for parallel_offset() in the Shapely documentation: + # https://shapely.readthedocs.io/en/latest/manual.html#object.parallel_offset raise SelfIntersectionError() # for whatever reason, shapely returns a right-side offset's coordinates in reverse |
