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 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 the inner 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?
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://github.com/mapbox/earcutOutput.json:
The text was updated successfully, but these errors were encountered: