Reputation: 17275
In Clipper, given an open path (black) and a closed polygon (blue), how can I clip the open path such that the clipped parts get completed using the polygon contours and, when possible, a single path remains instead of disjoint segments?
What Clipper operations can achieves this?
Note that the clipping polygon is not necessarily a rectangle like in the example, so the completed segments may be polylines themselves.
Upvotes: 2
Views: 1182
Reputation: 17275
Based on this thread it is not possible to do so for open paths.
However, if the open subject path can be closed with a closing path (which is not always guaranteed to be possible), then intersecting/clipping it and then removing the closing path segments will leave the desired results.
Upvotes: 2