diff options
author | tamasmeszaros <meszaros.q@gmail.com> | 2020-01-08 19:10:11 +0300 |
---|---|---|
committer | tamasmeszaros <meszaros.q@gmail.com> | 2020-01-08 19:11:22 +0300 |
commit | bb62f36df3915f125c7460c6c12ab88a47efe798 (patch) | |
tree | 1cd080661a4eb0d8ebab94e01e13ea0ee2e910f8 /tests/test_utils.hpp | |
parent | a3a99d7a076df8b2dad39c8e22e83b0e60f500e8 (diff) |
Add tests for EigenMesh3D raycaster with hole support.
Tests fail! Supports are intersecting the object when holes are added.
Diffstat (limited to 'tests/test_utils.hpp')
-rw-r--r-- | tests/test_utils.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_utils.hpp b/tests/test_utils.hpp new file mode 100644 index 000000000..b129cc79f --- /dev/null +++ b/tests/test_utils.hpp @@ -0,0 +1,21 @@ +#ifndef SLIC3R_TEST_UTILS +#define SLIC3R_TEST_UTILS + +#include <libslic3r/TriangleMesh.hpp> +#include <libslic3r/Format/OBJ.hpp> + +#if defined(WIN32) || defined(_WIN32) +#define PATH_SEPARATOR R"(\)" +#else +#define PATH_SEPARATOR R"(/)" +#endif + +inline Slic3r::TriangleMesh load_model(const std::string &obj_filename) +{ + Slic3r::TriangleMesh mesh; + auto fpath = TEST_DATA_DIR PATH_SEPARATOR + obj_filename; + Slic3r::load_obj(fpath.c_str(), &mesh); + return mesh; +} + +#endif // SLIC3R_TEST_UTILS |