summaryrefslogtreecommitdiff
path: root/lib/utils/smoothing.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils/smoothing.py')
-rw-r--r--lib/utils/smoothing.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/utils/smoothing.py b/lib/utils/smoothing.py
index 9c16bb0f..1511b0a3 100644
--- a/lib/utils/smoothing.py
+++ b/lib/utils/smoothing.py
@@ -57,4 +57,8 @@ def smooth_path(path, smoothness=1.0, iterations=5):
r[-1] = ll[-1]
points = ll * 0.75 + r * 0.25
- return [Point(*coord) for coord in points]
+ # we want to keep the old start and end points
+ start = [Point(* path[0])]
+ end = [Point(* path[-1])]
+
+ return start + [Point(*coord) for coord in points] + end