ClippingBezier icon indicating copy to clipboard operation
ClippingBezier copied to clipboard

Intersection exception

Open FabioTacke opened this issue 3 years ago • 4 comments

I use the library to calculate intersections of UIBezierPaths. In some cases I run into the BezierPathIntersectionException (mismatched intersection length) when intersecting paths with almost identical path segments.

I've added a test case that reproduces the exception. From briefly looking into the algorithm I don't understand what's going wrong here. I would be glad if you could take a look into it.

It might be the same issue as what's causing #9.

Thanks!

FabioTacke avatar Feb 15 '22 15:02 FabioTacke

Big thanks for the test case! I don't have time in the near-term to look into this, but when I finally do get time that test will be a big help. I think you're right that this is #9 as well.

adamwulf avatar Feb 21 '22 22:02 adamwulf

This is big issue in my app. When can you see this bug and resolve problem?

TianLong1989 avatar Apr 14 '22 02:04 TianLong1989

Hi @TianLong1989, unfortunately I wont have time to fix this in the near term. Depending on your paths, you might be able to scale them up by 10 or 100, run the clipping, and scale the results back down. i know that's also not ideal, but could possibly resolve the issue for you in some cases.

adamwulf avatar Apr 14 '22 15:04 adamwulf