poly2tri.js icon indicating copy to clipboard operation
poly2tri.js copied to clipboard

will anything be ever done about colinear edges restriction

Open makc opened this issue 8 years ago • 6 comments

I mean, now I have to wiggle the vertices by 1e-something * Math.random () which I should not have to. Just have divisions by 0 replaced by some small number, and it should work.

makc avatar Mar 13 '17 15:03 makc

This is an issue that is present in the original algorithm, from the C++ version (now here : https://github.com/greenm01/poly2tri ). You are suggesting ignoring COLLINEAR detection, and ignoring potential math error resulting from it ? Maybe it could work. Are you able to suggest a patch ? If not, I may have a look latter.

r3mi avatar Mar 19 '17 13:03 r3mi

Are you able to suggest a patch ?

I am not an expert here. What I can say is that this hack allows this test to pass:

screen shot 2017-03-21 at 10 40 58

makc avatar Mar 21 '17 09:03 makc

other tests like big roundish triangle and butterfly-like polygon fail, so the hack is no good.

makc avatar Mar 21 '17 11:03 makc

Any update here?

joel-simon avatar Nov 21 '18 20:11 joel-simon

Sorry, not for the time being.

r3mi avatar Nov 25 '18 16:11 r3mi

What is the issue, putting steiner points on the polygon edge should split the edge?

Steiner points are supposed to be placed inside the polygon. I guess you will have to refine your polygon edges before sending it to the triangulator.

obidobi avatar Jan 11 '19 16:01 obidobi