Fix test of layer region expansion - angle can be N * pi, not just 0.

This commit is contained in:
Martin Šach 2024-02-19 13:28:18 +01:00 committed by Lukas Matena
parent 74a38ed4f3
commit 555424ffbb

View File

@ -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);