We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code fails intersection and returns an empty array:
const poly1 = [[ [0, 0], [1, 0], [1, 1], [0, 1], [0, 0] ]]; const poly2 = [[ [0.5, 0.0], [0.6, 0.5], [0.7, 0.5], [0.5, 0.0] ]]; const intersectionPolygon = martinezPolygonClipping.intersection(poly1, poly2);
In the above case, the poly2 can be interpreted as "leaning right", with exactly 1 vertex at the southern edge.
However, when running with poly2 "leaning left", this passes.
const poly2 = [[ [0.5, 0.0], [0.4, 0.5], [0.3, 0.5], [0.5, 0.0] ]];
It also passes when the vertex is not on the southern edge.
const poly2 = [[ [0.5, 0.00001], // Both +0.00001 and -0.0001 pass [0.6, 0.5], [0.7, 0.5], [0.5, 0.00001] ]];
The text was updated successfully, but these errors were encountered:
Thanks for a good test case!
Sorry, something went wrong.
@w8r Any chance we can see a fix for this soon?
w8r
Successfully merging a pull request may close this issue.
The following code fails intersection and returns an empty array:
In the above case, the poly2 can be interpreted as "leaning right", with exactly 1 vertex at the southern edge.
However, when running with poly2 "leaning left", this passes.
It also passes when the vertex is not on the southern edge.
The text was updated successfully, but these errors were encountered: