poly2tri
poly2tri copied to clipboard
seidel.py: AttributeError: 'NoneType' object has no attribute 'right_point'
trafficstars
What steps will reproduce the problem?
===================================================
from seidel import Triangulator
verts = [(26.090910000000008, 20.543109999999956),
(33.597770000000025, 20.543109999999956),
(33.597770000000025, 12.413719999999955),
(25.46839, 12.413719999999955),
(25.46839, 20.451549999999997),
(26.090910000000008, 20.451549999999997),
(26.090910000000008, 20.54314999999997)]
triangulator = Triangulator(verts)
===================================================
Because the seidel.py module randomly shuffles the edges each time, the error
only occurs ~50% of the time.
What version of the product are you using? On what operating system?
Revision: 5ad6efedc1c1
Python 2.7.2 on Windows 7.
Please provide any additional information below.
I tracked the problem to line 511 of seidel.py. Whenever
trapezoids[-1].lower_right==None, the following iteration of the while loop
raises the exception.
Original issue reported on code.google.com by [email protected] on 10 Apr 2013 at 2:58
This appears to be related to having 2 points close together. Is there a
minimum distance between points that will cause the algorithm to fail?
-Ryan
Original comment by [email protected] on 11 Apr 2013 at 5:31
thanks - will take a look.
Original comment by [email protected] on 2 May 2013 at 1:25
- Changed state: Accepted