-
Notifications
You must be signed in to change notification settings - Fork 387
Open
Description
Thanks for greate lib for the first.
Trying to use PathsD (c# 2.0.0 via NuGet).
Having main rectangle 2 by 2 and attach another rect (2 by 1) to it. To the top left corner and to the bottom left corner. And results are different.
[Test]
public void Union() {
var main = new Paths64([new Rect64(0, 0, 2, 2).AsPath()]);
var add1 = new Paths64([new Rect64(-2, 0, 0, 1).AsPath()]);
Assert.That(Clipper.Union(main, add1, FillRule.NonZero).ToString(), Is.EqualTo("2,2 , 0,2 , 0,0 , 2,0 \n0,1 , -2,1 , -2,0 , 0,0 "));
var add2 = new Paths64([new Rect64(-2, 1, 0, 1).AsPath()]);
Assert.That(Clipper.Union(main, add2, FillRule.NonZero).ToString(), Is.EqualTo("2,2 , 0,2 , 0,0 , 2,0 "));
}
If I connect rect to the top left corner - it's not getting merged to the main.
I have more other use cases - and it's not always merged together.
Is it expected behaviour for PathsD? So I cannot use it for boolean operations to get rectangles merged for sure?
Metadata
Metadata
Assignees
Labels
No labels