mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-06-21 17:03:01 +08:00

fixes on ratio_over fix Flow::extrusion_width (bad computation of first_layer_height) fix enum visibility moving test classes to prusaslicer test directory (wip) all that because i was trying to write a test class for a modification in min_object_distance (and i didn't even start)
28 lines
658 B
C++
28 lines
658 B
C++
#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;
|
|
}
|
|
|
|
inline std::string get_model_path(const std::string &obj_filename)
|
|
{
|
|
std::string fpath = TEST_DATA_DIR PATH_SEPARATOR + obj_filename;
|
|
return fpath;
|
|
}
|
|
|
|
#endif // SLIC3R_TEST_UTILS
|