diff options
author | Florian Meyer <florianfelix@web.de> | 2010-06-10 22:42:32 +0400 |
---|---|---|
committer | Florian Meyer <florianfelix@web.de> | 2010-06-10 22:42:32 +0400 |
commit | 2a39a6cbd8877e098d4f659daafde608aec23a73 (patch) | |
tree | 128995ac1b89f685170d2260a3b38aaa5347abc8 /curve_simplify.py | |
parent | 9b58364d307d1604d9e54641458bd22b81b84955 (diff) |
now really the correct fix for zero edge lengths
Diffstat (limited to 'curve_simplify.py')
-rw-r--r-- | curve_simplify.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/curve_simplify.py b/curve_simplify.py index 5cc06232..70e9f825 100644 --- a/curve_simplify.py +++ b/curve_simplify.py @@ -142,6 +142,9 @@ def altitude(point1, point2, pointn): if edge2.length == 0: altitude = 0 return altitude + if edge1.length == 0: + altitude = edge2.length + return altitude alpha = edge1.angle(edge2) altitude = math.sin(alpha) * edge2.length return altitude |