-
Notifications
You must be signed in to change notification settings - Fork 381
Description
I have a sort of bizarre need right now: I need a function that, given a set of Paths, returns the same Paths, except every intersection between Paths is guaranteed to have a shared point. I also need this to work on open paths. So given the open paths:
[(0, 0), (2, 2)], and [(0, 2), (2, 0)]
it would return [(0, 0), (1, 1), (2, 2)], and [(0, 2), (1, 1), (2, 0)].
(This would also happen if one or both of those paths already included (1, 1).)
This feels like the kind of thing Clipper could do with its internal structures, but that there isn't a really good way to accomplish this efficiently from the outside. But I also sort of understand why it doesn't include this; it's a weird requirement. So that's why I'm making this request; I want to know if you think this would be reasonable for Clipper to have.
If you don't, no worries, I'll probably vendor Clipper and hack it into my own version :) If you do, but don't want to spend the time on it, I'm happy to send a pull request with whatever I end up with; note that I'm using the C# version so it'll be in C#. On the other hand, if you decide it sounds like a great idea and just go ahead and implement it, I'll thank you profusely.
I'll do that anyway, honestly; thanks for making this, it's been a lifesaver.