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 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.
This discussion was converted from issue #1006 on August 21, 2025 07:01.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions