From 555424ffbbde4ac0edc5044f2b79ca2fe0788c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=A0ach?= Date: Mon, 19 Feb 2024 13:28:18 +0100 Subject: [PATCH] Fix test of layer region expansion - angle can be N * pi, not just 0. --- tests/libslic3r/test_layer_region.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/libslic3r/test_layer_region.cpp b/tests/libslic3r/test_layer_region.cpp index 9652a54324..c35d18e776 100644 --- a/tests/libslic3r/test_layer_region.cpp +++ b/tests/libslic3r/test_layer_region.cpp @@ -8,7 +8,7 @@ using namespace Slic3r; using namespace Slic3r::Algorithm; -constexpr bool export_svgs = true; +constexpr bool export_svgs = false; ExPolygon rectangle(const Point& origin, const int width, const int height) { return { @@ -132,7 +132,7 @@ TEST_CASE_METHOD(LayerRegionFixture, "test the bridge expansion with the bridge REQUIRE(result.size() == 2); CHECK(result.at(0).bridge_angle == Approx(1.5707963268)); - CHECK(result.at(1).bridge_angle == Approx(0)); + CHECK(std::fmod(result.at(1).bridge_angle, M_PI) == Approx(0.0)); CHECK(result.at(0).expolygon.contour.size() == 22); CHECK(result.at(1).expolygon.contour.size() == 14);