Ported "avoid crossing perimeters" and bridging unit tests from Perl

to C++.
Further reduced Perl bindings.
Got rid of the ExPolygonCollection wrapper, replaced with ExPolygons.
This commit is contained in:
Vojtech Bubnik 2022-05-04 18:21:08 +02:00
parent a627614b58
commit 576c167bd5
42 changed files with 204 additions and 1006 deletions

View file

@ -294,7 +294,7 @@ SCENARIO("Various Clipper operations - t/clipper.t", "[ClipperUtils]") {
WHEN("clipping a line") {
auto line = Polyline::new_scale({ { 152.742,288.086671142818 }, { 152.742,34.166466971035 } });
Polylines intersection = intersection_pl({ line }, { circle_with_hole });
Polylines intersection = intersection_pl(line, Polygons{ circle_with_hole });
THEN("clipped to two pieces") {
REQUIRE(intersection.front().length() == Approx((Vec2d(152742000, 215178843) - Vec2d(152742000, 288086661)).norm()));
REQUIRE(intersection[1].length() == Approx((Vec2d(152742000, 35166477) - Vec2d(152742000, 108087507)).norm()));