Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Verify discarding of edge pairs when their subpolygons fall partly outside of the polygon #6

Open
grimsa opened this issue Jan 6, 2016 · 1 comment

Comments

@grimsa
Copy link
Owner

grimsa commented Jan 6, 2016

Currently edge pairs are discarded from the calculation, when any part of triangle1, trapezoid or triangle2 (within which a cut could be located) falls outside the actual polygon being split.

However some cuts might be valid and should be considered, as long as the area outside of the polygon is not included in the calculation.

@grimsa
Copy link
Owner Author

grimsa commented Jan 10, 2016

The issue is valid.

One of the triangles of edge pair (AB & EF) - B'BE falls partly outside of the polygon ABCDEF...... (part outside marked in red).
In this case areaAdjacentToTriangle (e.g. 200, marked in grey) could be reduced by the amount marked in red (say, 50) and calculation could proceed. Note that in this case areaAdjacentToTriangle can sometimes be negative (when red area is larger than grey one) and that would be a valid case.

polygon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant