mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 00:56:00 +08:00
fix test
This commit is contained in:
parent
b04bd6a8ad
commit
7f848b0603
BIN
tests/data/fonts/NotoSans-Regular.ttf
Normal file
BIN
tests/data/fonts/NotoSans-Regular.ttf
Normal file
Binary file not shown.
@ -94,13 +94,14 @@ Vec3d calc_hit_point(const igl::Hit &h, indexed_triangle_set &its)
|
||||
}
|
||||
} // namespace Private
|
||||
|
||||
/* TEST_CASE("Emboss text", "[Emboss]")
|
||||
#include <libslic3r/Utils.hpp>
|
||||
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<Emboss::Font> font = Emboss::load_font(font_name);
|
||||
std::optional<Emboss::Font> font = Emboss::load_font(font_path.c_str());
|
||||
REQUIRE(font.has_value());
|
||||
|
||||
std::optional<Emboss::Glyph> 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]")
|
||||
{
|
||||
|
@ -39,12 +39,14 @@ Vec3d calc_normal(const Vec3i &triangle, const std::vector<Vec3f> &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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user