update test

This commit is contained in:
QIDI TECH
2024-11-09 14:59:54 +08:00
parent c9ec3da208
commit cb4f6b9da4
35 changed files with 1372 additions and 6272 deletions

View File

@@ -75,26 +75,13 @@ struct LayerRegionFixture {
TEST_CASE_METHOD(LayerRegionFixture, "test the surface expansion", "[LayerRegion]") {
const double custom_angle{1.234f};
// w36
/* const Surfaces result{expand_merge_surfaces(
const Surfaces result{expand_merge_surfaces(
surfaces, stBottomBridge,
expansion_zones,
closing_radius,
custom_angle
)};*/
// w36
const Surfaces result{expand_merge_surfaces(
surfaces, stBottomBridge,
shells,
expansion_params_into_solid_infill,
sparse,
expansion_params_into_sparse_infill,
closing_radius
)};
if constexpr (export_svgs) {
SVG svg("general_expansion.svg", BoundingBox{
Point{scaled(-3.0), scaled(-1.0)},
@@ -125,13 +112,9 @@ TEST_CASE_METHOD(LayerRegionFixture, "test the surface expansion", "[LayerRegion
}
TEST_CASE_METHOD(LayerRegionFixture, "test the bridge expansion with the bridge angle detection", "[LayerRegion]") {
// w36
Surfaces result{expand_bridges_detect_orientations(
surfaces,
shells,
expansion_params_into_solid_infill,
sparse,
expansion_params_into_sparse_infill,
expansion_zones,
closing_radius
)};
@@ -148,7 +131,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(std::fmod(result.at(1).bridge_angle, M_PI) == Approx(0.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);