diff --git a/tests/data/fonts/NotoSans-Regular.ttf b/tests/data/fonts/NotoSans-Regular.ttf new file mode 100644 index 0000000000..a1b8994ede Binary files /dev/null and b/tests/data/fonts/NotoSans-Regular.ttf differ diff --git a/tests/libslic3r/test_emboss.cpp b/tests/libslic3r/test_emboss.cpp index 026fdee581..ec2def9664 100644 --- a/tests/libslic3r/test_emboss.cpp +++ b/tests/libslic3r/test_emboss.cpp @@ -94,13 +94,14 @@ Vec3d calc_hit_point(const igl::Hit &h, indexed_triangle_set &its) } } // namespace Private -/* TEST_CASE("Emboss text", "[Emboss]") +#include +TEST_CASE("Emboss text", "[Emboss]") { - const char *font_name = "C:/windows/fonts/arialbd.ttf"; - char letter = '%'; - float flatness = 2.; + std::string font_path = std::string(TEST_DATA_DIR) + "/fonts/NotoSans-Regular.ttf"; + char letter = '%'; + float flatness = 2.; - std::optional font = Emboss::load_font(font_name); + std::optional font = Emboss::load_font(font_path.c_str()); REQUIRE(font.has_value()); std::optional glyph = Emboss::letter2glyph(*font, letter, flatness); @@ -114,7 +115,7 @@ Vec3d calc_hit_point(const igl::Hit &h, indexed_triangle_set &its) indexed_triangle_set its = Emboss::polygons2model(shape, projection); CHECK(!its.indices.empty()); -}*/ +} TEST_CASE("Test hit point", "[AABBTreeIndirect]") { diff --git a/tests/libslic3r/test_meshboolean.cpp b/tests/libslic3r/test_meshboolean.cpp index 4dce6d2862..ad518c41f8 100644 --- a/tests/libslic3r/test_meshboolean.cpp +++ b/tests/libslic3r/test_meshboolean.cpp @@ -39,12 +39,14 @@ Vec3d calc_normal(const Vec3i &triangle, const std::vector &vertices) TEST_CASE("Add TriangleMeshes", "[MeshBoolean]") { TriangleMesh tm1 = make_sphere(1.6, 1.6); + size_t init_size = tm1.its.indices.size(); Vec3f move(5, -3, 7); move.normalize(); tm1.translate(0.3 * move); - its_write_obj(tm1.its, "tm1.obj"); + //its_write_obj(tm1.its, "tm1.obj"); TriangleMesh tm2 = make_cube(1., 1., 1.); - its_write_obj(tm2.its, "tm2.obj"); + //its_write_obj(tm2.its, "tm2.obj"); MeshBoolean::cgal::plus(tm1, tm2); - its_write_obj(tm1.its, "test_add.obj"); + //its_write_obj(tm1.its, "test_add.obj"); + CHECK(tm1.its.indices.size() > init_size); }