GreinerHormann icon indicating copy to clipboard operation
GreinerHormann copied to clipboard

values not intersecting

Open nxgraphics opened this issue 9 years ago • 1 comments

Hi ! i had a question concerning the intersections, if the clipper is the same size as the source polygon, why doesnt it return the on-line intersection ? var src = [[0,0], [100,0], [100,100], [0,100]]; var clipper = [[0,0] , [100,0] , [100,100], [0,100]]; it returns null, could you comfirm the behaviour ? thx

nxgraphics avatar Sep 06 '16 17:09 nxgraphics

I confirm that, the only thing that can be done here is a trivial string equality check. Greiner-Hormann algorithm is not good at overlapping edges, it's a degenerate case. You can also try https://github.com/w8r/martinez algorithm

Kind regards, Alexander Milevski

On 06 Sep 2016, at 19:05, Stephane Kyles [email protected] wrote:

Hi ! i had a question concerning the intersections, if the clipper is the same size as the source polygon, why doesnt it return the on-line intersection ? var src = [[0,0], [100,0], [100,100], [0,100]]; var clipper = [[0,0] , [100,0] , [100,100], [0,100]]; it returns null, could you comfirm the behaviour ? thx

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

w8r avatar Sep 06 '16 20:09 w8r