Feature request: Preserving sequence and orientation when trimming open paths #795
Replies: 1 comment 1 reply
-
|
I was just tripped up by this behavior (using an embarrassingly old version of clipper 1 in FreeCAD, but searching for information I found this issue for clipper 2 as well). I'm mostly concerned with preserving path orientation, not order of disconnected results. @AngusJohnson I understand if the way clipper is written makes it challenging to preserve orientation of open paths, but it would still be nice to have clear documentation (perhaps in https://angusj.com/clipper2/Docs/Overview.htm "Clipping open paths") that orientation is not preserved. For what it's worth, in my clipper 1 example I have a many-segment open path that is returned from clipping reversed, whereas the example discussed here seems to be for a single segment clipped into many parts. I'm less surprised that this single-segment example does not preserve orientation. I'm unsure if my multi-segment issue is present in clipper 2, or if I only see it because I'm living in the dark ages (I'm hoping to upgrade versions one of these days, but it will be a large undertaking). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Angus,
currently we use the Z coordinate to restore the sequence of paths and "direction" (an open path could be reversed relative to the input) of open paths after clipping. This is a bit cumbersome.

Imagine calculating the intersection here, i'd like the segments have the sequence 1,2,3 all pointing to right side.
I'd like that the sequence of paths in the output follows the original path and that they also have same direction.
Would it be possible to preserve this internally, maybe switchable behavior?
Well, these are two different requests, and both would be useful independently of each other.
Regards, Lars
Beta Was this translation helpful? Give feedback.
All reactions