Skip to content

self intersecting polygons #545

Answered by philstopford
Arvin-huang1 asked this question in Q&A
Discussion options

You must be logged in to vote

This looks to be an edge case for the touching notes in the documentation here : http://www.angusj.com/clipper2/Docs/Overview.htm#touching

If .I extend the horizontal cutters by 1 unit each side, the solution seems to be clean. If I reverse the arrays for the paths, so that X <-> Y, the edges are also clean.

I did find that running a Union of the subj and clip before the clipping operation helped clean things up :

    subj = Clipper.Union(subj, FillRule.NonZero);
    clip = Clipper.Union(clip, FillRule.NonZero);

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Arvin-huang1
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Arvin-huang1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #544 on May 31, 2023 07:18.