summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKaalleen <reni@allenka.de>2021-08-08 21:51:29 +0200
committerKaalleen <reni@allenka.de>2021-08-08 21:51:29 +0200
commitd807b12870515e23bd9ac4f8ce024a3070de2805 (patch)
treec98c792cfe075de36ebb2d8a57cd8f4697cd4632 /lib
parentb411305c6742ff07dbddbdec07f1338f5beaf31b (diff)
remove get_angle
Diffstat (limited to 'lib')
-rw-r--r--lib/patterns.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/patterns.py b/lib/patterns.py
index bb19f2b4..d282dc9c 100644
--- a/lib/patterns.py
+++ b/lib/patterns.py
@@ -3,8 +3,6 @@
# Copyright (c) 2010 Authors
# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
-import math
-
import inkex
from shapely import geometry as shgeo
@@ -46,7 +44,7 @@ def _apply_fill_patterns(patterns, patches):
patch_points = []
for i, stitch in enumerate(patch.stitches):
if not shgeo.Point(stitch).within(pattern):
- # keep points outside the fill patter
+ # keep points outside the fill pattern
patch_points.append(stitch)
elif i - 1 < 0 or i >= len(patch.stitches) - 1:
# keep start and end points
@@ -97,8 +95,3 @@ def _get_pattern_points(first, second, pattern):
# sort points after their distance to first
points.sort(key=lambda point: point.distance(first))
return points
-
-
-def get_angle(a, b, c):
- ang = math.degrees(math.atan2(c[1]-b[1], c[0]-b[0]) - math.atan2(a[1]-b[1], a[0]-b[0]))
- return ang + 360 if ang < 0 else ang