karl- / poly2tri

Automatically exported from code.google.com/p/poly2tri
Other
0 stars 2 forks source link

Infinite loop crash - self-touching polygon #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Triangulate using these vertices: (1033, 309), (1032, 309.14935064935065), 
(1032, 331.55555555555617), (1031.9802955665025, 332), (968, 332), (968, 
318.70779220779224), (879, 332), (1024, 512). This is a self-touching polygon 
(but not intersecting).
2.
3.

What is the expected output? What do you see instead?
Triangles are expected (if poly2tri supports self-touching polygons), but the 
program goes into an infinite loop in FlipEdgeEvent, eventually crashing.

What version of the product are you using? On what operating system?
C++ version.

Please provide any additional information below.
It also crashes for polygons containing collinear edges. 

Original issue reported on code.google.com by hisaoki....@gmail.com on 10 Jan 2011 at 7:32

GoogleCodeExporter commented 8 years ago
Correction: this polygon in fact contains collinear edges, not just a touching 
vertex.

Original comment by hisaoki....@gmail.com on 10 Jan 2011 at 7:34

GoogleCodeExporter commented 8 years ago
Sorry currently the Constraint algorithm only support Simple Polygons. I'm not 
sure if the current algorithms could support weak simple polygons, polygons 
with touching vertexes or edges with some modification. Would have to analyze 
them but I don't have that time right now :(. 

Will have it in mind for future improvements and hope you can solve this on 
your side for now.

Original comment by thahlen@gmail.com on 10 Jan 2011 at 2:39

GoogleCodeExporter commented 8 years ago
No problem.. I will try to separate the polygons manually, though it could be a 
bit slow.

Original comment by hisaoki....@gmail.com on 10 Jan 2011 at 3:28

GoogleCodeExporter commented 8 years ago

Original comment by thahlen@gmail.com on 11 Jan 2011 at 2:24