Menu

#197 Minkowski difference

*
open
nobody
None
1
2019-12-03
2019-12-03
Anonymous
No

MinkowskiDiff should be returning a single polygon in this case, I think, but it's returning two overlapping polygons, the second of those very thin and, probably, unneede. See here the specific case: https://www.geogebra.org/graphing/nc2uaywn

Here it is a googletest failing testcase:

TEST(Clipper, MinkowskiBug) {
    const ClipperLib::Path polygonA{{4927, 2529}, {15991, 0}, {24869, 7081}, {24869, 18429}};
    const ClipperLib::Path polygonB{{-4925, 4551}, {-15992, 7080}, {-24869, 0}, {-24869, -11347}};

    ClipperLib::Paths ret;
    ClipperLib::MinkowskiDiff(polygonB, polygonA, ret);

    EXPECT_EQ(ret.size(), 1U);
}

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB