Merge prusa 2.6.1

This commit is contained in:
QIDI TECH
2023-09-16 16:26:29 +08:00
parent 1338e60f8b
commit 963e22db99
203 changed files with 25254 additions and 6453 deletions

View File

@@ -3,6 +3,7 @@
#include <libslic3r/TriangleMesh.hpp>
#include <libslic3r/Format/OBJ.hpp>
#include <random>
#if defined(WIN32) || defined(_WIN32)
#define PATH_SEPARATOR R"(\)"
@@ -18,4 +19,22 @@ inline Slic3r::TriangleMesh load_model(const std::string &obj_filename)
return mesh;
}
template<class T>
Slic3r::FloatingOnly<T> random_value(T minv, T maxv)
{
static std::mt19937 rng(std::random_device{}());
std::uniform_real_distribution<T> dist(minv, maxv);
return dist(rng);
}
template<class T>
Slic3r::IntegerOnly<T> random_value(T minv, T maxv)
{
static std::mt19937 rng(std::random_device{}());
std::uniform_int_distribution<T> dist(minv, maxv);
return dist(rng);
}
#endif // SLIC3R_TEST_UTILS