mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 17:49:00 +08:00
Fix test of layer region expansion - angle can be N * pi, not just 0.
This commit is contained in:
parent
74a38ed4f3
commit
555424ffbb
@ -8,7 +8,7 @@
|
|||||||
using namespace Slic3r;
|
using namespace Slic3r;
|
||||||
using namespace Slic3r::Algorithm;
|
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) {
|
ExPolygon rectangle(const Point& origin, const int width, const int height) {
|
||||||
return {
|
return {
|
||||||
@ -132,7 +132,7 @@ TEST_CASE_METHOD(LayerRegionFixture, "test the bridge expansion with the bridge
|
|||||||
|
|
||||||
REQUIRE(result.size() == 2);
|
REQUIRE(result.size() == 2);
|
||||||
CHECK(result.at(0).bridge_angle == Approx(1.5707963268));
|
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(0).expolygon.contour.size() == 22);
|
||||||
CHECK(result.at(1).expolygon.contour.size() == 14);
|
CHECK(result.at(1).expolygon.contour.size() == 14);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user