-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
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
Understanding XOR response #135
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using your library to construct a room that looks like the image below. Black space represents negative space where the polygon would not be located. I am using the XOR operation because I need to create this outer shell and inner shell. The result that I get back (See JSON below) is an array of polygons but it's unclear which polygons are negative "holes" and which ones are positive space. Is there some reliable way of determining the holes? Right now my best guess is that the 2nd polygon in an array is negative, but I am not sure if that is always true.
Here is a basic working example where I am trying to remove the
outer
polygon but add theinner
polygon to essentially create a square donut. Any thoughts on how to interpret the resulting JSON so that I can identify the hole and non-hole bodies?As a reference, I need the hole indicies in order to use
earcut
: https:/mapbox/earcutOutput.json:
The text was updated successfully, but these errors were encountered: