Closed LarsSkiba closed 3 weeks ago
Hi @AngusJohnson,
This implementation is not fully finalized yet but i created a PR so you can comment on the code early during my development and maybe give helpful feedback, if you recognize undesired changes.
Please leave it open unless you plan not to accept such a contribution at all, which would also be helpful feedback ;)
This only implements a left-sided offset
My testcases work fine so far, i'd also contribute them to your tests when i'm done.
Does the API extension makes sense to you? It's not really an EndType but so is polygon and this extension seems like the least "invasive" API extension.
I'd also add a right-sided offset, one really trivial approach would be reverse the EndType from ButtRight to ButtLeft, call OffsetOpenPath and reverse the last path in the solution. Do you have an opinion on this approach?
I can also try extending other languages once i have a finalized, accepted C++ PR.
The additional logic in OffsetPoint solves this problem:
To my knowledge this is not solvable by a FillRule so i went with calculation the intersection point.
I discovered further major challenges, closing for now.
Implement a one-sided offset by extending the EndType with ButtLeft.