From e78ad6ffa998cade604c27b0e900baa029d6256b Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Fri, 11 Dec 2020 17:57:29 +0100 Subject: [PATCH] Fixing unit tests for supports. After "dont_support_bridges" was fixed for perimeters, no support was rightfully generated for a preset using a default "dont_support_bridges" = off. --- tests/fff_print/test_support_material.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/fff_print/test_support_material.cpp b/tests/fff_print/test_support_material.cpp index 663b715a9..01d858132 100644 --- a/tests/fff_print/test_support_material.cpp +++ b/tests/fff_print/test_support_material.cpp @@ -23,6 +23,7 @@ SCENARIO("SupportMaterial: support_layers_z and contact_distance", "[SupportMate // Box h = 20mm, hole bottom at 5mm, hole height 10mm (top edge at 15mm). TriangleMesh mesh = Slic3r::Test::mesh(Slic3r::Test::TestMesh::cube_with_hole); mesh.rotate_x(float(M_PI / 2)); +// mesh.write_binary("d:\\temp\\cube_with_hole.stl"); auto check = [](Slic3r::Print &print, bool &first_support_layer_height_ok, bool &layer_height_minimum_ok, bool &layer_height_maximum_ok, bool &top_spacing_ok) { @@ -76,7 +77,8 @@ SCENARIO("SupportMaterial: support_layers_z and contact_distance", "[SupportMate { "support_material", 1 }, { "layer_height", 0.2 }, { "first_layer_height", 0.4 }, - }); + { "dont_support_bridges", false }, + }); bool a, b, c, d; check(print, a, b, c, d); THEN("First layer height is honored") { REQUIRE(a == true); } @@ -90,7 +92,8 @@ SCENARIO("SupportMaterial: support_layers_z and contact_distance", "[SupportMate { "support_material", 1 }, { "layer_height", 0.2 }, { "first_layer_height", 0.3 }, - }); + { "dont_support_bridges", false }, + }); bool a, b, c, d; check(print, a, b, c, d); THEN("First layer height is honored") { REQUIRE(a == true); } @@ -104,7 +107,8 @@ SCENARIO("SupportMaterial: support_layers_z and contact_distance", "[SupportMate { "support_material", 1 }, { "layer_height", 0.2 }, { "first_layer_height", 0.3 }, - }); + { "dont_support_bridges", false }, + }); bool a, b, c, d; check(print, a, b, c, d); THEN("First layer height is honored") { REQUIRE(a == true); }