I wanted to implement polygon cutting. I constructed a rectangle as a special polygon, and then I found that the result of code 1 was not what I wanted. What I wanted was the result of code 2.
The difference between the two codes is that the number of points describing the rectangle is different, but the result of the two codes describing the polygon is the same, but the code 2 fits more meaningless point data.
What is causing the two results to be different? Or am I doing it the wrong way? I want to cut any polygon, and it seems that most polygons are cut fine, except this rectangle.
C# project, Use nuget Clipper2 1.3.0, net6.0
S1: Code:
result:![rectclip](https://github.com/AngusJohnson/Clipper2/assets/29189410/fa6241e1-3643-436a-a9a4-bfe775ced3bf)
S2: Code:
result:
Demo:
Clipper2Lib.Test.zip
I wanted to implement polygon cutting. I constructed a rectangle as a special polygon, and then I found that the result of code 1 was not what I wanted. What I wanted was the result of code 2.
The difference between the two codes is that the number of points describing the rectangle is different, but the result of the two codes describing the polygon is the same, but the code 2 fits more meaningless point data.
What is causing the two results to be different? Or am I doing it the wrong way? I want to cut any polygon, and it seems that most polygons are cut fine, except this rectangle.