BruceJawn / poly2tri

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

Segfault with Python version #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Following input makes Python version segfault:

points = [
    [2.10229524019, -0.760509508136],
    [2.15571376911, -0.752653842118],
    [2.00173917352, 0.294373407871],
    [1.9483206446, 0.286517741853]
]
holes = [[
    [1.9968142935, 0.0247609293562],
    [2.02104796235, 0.0283247041864],
    [2.08803526014, -0.495188920808],
    [2.06380159129, -0.498752695638]
]]

one edge of the hole is very close to contour. I'm not sure whether this input 
is correct but it should not segfault.

Original issue reported on code.google.com by dusan.ma...@gmail.com on 2 Dec 2010 at 11:51

GoogleCodeExporter commented 9 years ago
Sorry for the late reply.

I tested the input on the java version, tho it didn't crash the hole can't be 
handled because one point seems to be on the edge of the polygon or close 
enough to be considered on the edge. 

I have forwarded this issue to the maintainer of the Python port.

Original comment by thahlen@gmail.com on 13 Dec 2010 at 11:03

GoogleCodeExporter commented 9 years ago
Thomas is correct; one point in the hole is close enough to the edge of the 
polygon to be considered on the edge. Holes need to be contained "inside" their 
respective polygons! 

FYI, this point set does not make the C++ version crash.... but it returns an 
incorrect result because of the invalid input; attached is a screenshot.

Original comment by mason.gr...@gmail.com on 15 Dec 2010 at 4:26

Attachments:

GoogleCodeExporter commented 9 years ago
Closed!

Original comment by mason.gr...@gmail.com on 15 Dec 2010 at 5:50