You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe I've encountered a bug in CompoundPath.contains in which, by inspection, it's clear that a CompoundPath does not contain a particular point but Paper.js is returning that it does. I've taken a crack at isolating what I believe to be the source of the problem and would greatly appreciate having more trained eyes looking into the matter.
My suspicion is that this is related to the use of x-axis raycasting in order to determine containment. It's possible that there is a small error in in this process, particularly with curved lines, that causes a path to believe it contains any point with the same y value as its own starting point. Perhaps only one intersection is made with the curved line, instead of two, causing an even/odd check to return a different value than we would expect.
Please have a look at the test cases I provide in my sketch and let me know if there are any further questions about my issue I can answer. Thanks so much for the help!
The text was updated successfully, but these errors were encountered:
We had a similar bug recently (#819), which is closed now, but I am aware that this part of paper is not bullet proof yet and I guess it still contains bugs.
But please let us know if your bug still occurs with the latest code, as this part has seen quite a few changes recently. Be aware that Sketch is running on an old code base.
Well, that was easy :) Please keep on testing an posting issues if you find anything, the boolean operations are almost finished and it would be great to find and close all remaining bugs now.
Hey folks,
I believe I've encountered a bug in
CompoundPath.contains
in which, by inspection, it's clear that a CompoundPath does not contain a particular point but Paper.js is returning that it does. I've taken a crack at isolating what I believe to be the source of the problem and would greatly appreciate having more trained eyes looking into the matter.Here's an example sketch demonstrating the potential bug
My suspicion is that this is related to the use of x-axis raycasting in order to determine containment. It's possible that there is a small error in in this process, particularly with curved lines, that causes a path to believe it contains any point with the same y value as its own starting point. Perhaps only one intersection is made with the curved line, instead of two, causing an even/odd check to return a different value than we would expect.
Please have a look at the test cases I provide in my sketch and let me know if there are any further questions about my issue I can answer. Thanks so much for the help!
The text was updated successfully, but these errors were encountered: