mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-24 08:38:40 -07:00
* re-enable tests * Add comprehensive testing guide for OrcaSlicer in CLAUDE.md * fix build errors on Win * fix appimage errors
23 lines
573 B
C++
23 lines
573 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::ObjInfo obj_info;
|
|
std::string message;
|
|
Slic3r::load_obj(fpath.c_str(), &mesh, obj_info, message);
|
|
return mesh;
|
|
}
|
|
|
|
#endif // SLIC3R_TEST_UTILS
|