Superfluous Point Insertion in Union result #625
yongsun-park
started this conversation in
General
Replies: 1 comment 1 reply
-
there is two extra colinear points in the result. Paths64 subject;
subject.push_back(MakePath({ 0, 0, 3, 0, 3, 3, 0, 3 }));
subject.push_back(MakePath({2, 0, 5, 0, 5, 3, 0, 3}));
Clipper64 clipper;
clipper.AddSubject(subject);
Paths64 result;
clipper.Execute(ClipType::Union, FillRule::Positive, result);
std::cout << result << std::endl; // 3,0 , 5,0 , 5,3 , 2,3 , 0,3 , 0,0
maybe clipper lib could handle or do post handle this since it's not diffcult to remove colinear points. BTW, here should use Positve filling rule to get the result in C++, if use EvenOdd filling rule, the result would be: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been using Clipper and am considering updating to the Clipper2 library.
When I union two simple rectangles as shown below, I get 6 coordinate points instead of 4. While the result is not incorrect, I would like to inquire if it's possible to get a result with 4 coordinate points instead of 6.
Here's the test code:
Beta Was this translation helpful? Give feedback.
All reactions