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
BoolOps take two (multi-)polygons, the subject and the clip and returns the union/intersection/XOR/difference of these as a new (multi-)polygon. It can be useful to know which edges in the result polygon come from which edges in the subject and the clip.
Example:
I have room A with wallpaper A, and a hallway C with wallpaper C. I want to attach these, so I take the union between room A's polygon and hallway C's polygon. Now what wallpaper do I assign to each wall in the union polygon?
Based on my understanding of the Martinez-Rueda-Feito algorithm:
When we create events initially, we can just attach some metadata saying which polygon (subject or clip) and which edge in that polygon the event polygons to.
Splitting an edge does not change this metadata. We can just copy it over from the existing edge.
Any overlapping edges that are detected need to store the metadata of both edges in them (so whichever edge is in the result will have the full information).
When linking up the result polygon, we just also store the metadata alongside it.
This does mean we require a little more memory per event, and returning this metadata will require an extra allocation. Perhaps we can avoid the extra memory allocation by adding a new trait: BoolOpsWithEdgeSource?
The text was updated successfully, but these errors were encountered:
BoolOps take two (multi-)polygons, the subject and the clip and returns the union/intersection/XOR/difference of these as a new (multi-)polygon. It can be useful to know which edges in the result polygon come from which edges in the subject and the clip.
Example:
I have room A with wallpaper A, and a hallway C with wallpaper C. I want to attach these, so I take the union between room A's polygon and hallway C's polygon. Now what wallpaper do I assign to each wall in the union polygon?
Based on my understanding of the Martinez-Rueda-Feito algorithm:
This does mean we require a little more memory per event, and returning this metadata will require an extra allocation. Perhaps we can avoid the extra memory allocation by adding a new trait:
BoolOpsWithEdgeSource
?The text was updated successfully, but these errors were encountered: