update libslic3r

This commit is contained in:
QIDI TECH
2024-11-11 14:57:19 +08:00
parent a42b7a0880
commit 87d9e1e953
432 changed files with 13838 additions and 6269 deletions

View File

@@ -1,26 +1,34 @@
#ifndef slic3r_Point_hpp_
#define slic3r_Point_hpp_
#include "libslic3r.h"
#include <oneapi/tbb/scalable_allocator.h>
#include <assert.h>
#include <cstddef>
#include <vector>
#include <cmath>
#include <string>
#include <sstream>
#include <unordered_map>
#include <Eigen/Geometry>
#include <algorithm>
#include <cstdint>
#include <iterator>
#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include <cassert>
#include <oneapi/tbb/scalable_allocator.h>
#include <Eigen/Geometry>
#include "libslic3r.h"
#include "LocalesUtils.hpp"
#include "libslic3r/Point.hpp"
namespace Slic3r {
class BoundingBox;
class BoundingBoxf;
class Point;
using Vector = Point;
// Base template for eigen derived vectors
@@ -166,6 +174,7 @@ inline const Vec3d get_base(unsigned index, const Transform3d::LinearPart &trans
inline const Vec3d get_x_base(const Transform3d::LinearPart &transform) { return get_base(0, transform); }
inline const Vec3d get_y_base(const Transform3d::LinearPart &transform) { return get_base(1, transform); }
inline const Vec3d get_z_base(const Transform3d::LinearPart &transform) { return get_base(2, transform); }
template<int N, class T> using Vec = Eigen::Matrix<T, N, 1, Eigen::DontAlign, N, 1>;
class Point : public Vec2crd
@@ -258,6 +267,16 @@ inline bool is_approx(const Vec3d &p1, const Vec3d &p2, double epsilon = EPSILON
return d.x() < epsilon && d.y() < epsilon && d.z() < epsilon;
}
inline bool is_approx(const Matrix3d &m1, const Matrix3d &m2, double epsilon = EPSILON)
{
for (size_t i = 0; i < 3; i++)
for (size_t j = 0; j < 3; j++)
if (!is_approx(m1(i, j), m2(i, j), epsilon))
return false;
return true;
}
inline Point lerp(const Point &a, const Point &b, double t)
{
assert((t >= -EPSILON) && (t <= 1. + EPSILON));
@@ -586,11 +605,13 @@ static bool apply(T &val, const MinMax<T> &limit)
}
return false;
}
} // namespace Slic3r
// start Boost
#include <boost/version.hpp>
#include <boost/polygon/polygon.hpp>
namespace boost { namespace polygon {
template <>
struct geometry_concept<Slic3r::Point> { using type = point_concept; };
@@ -618,6 +639,7 @@ namespace boost { namespace polygon {
// end Boost
#include <cereal/cereal.hpp>
// Serialization through the Cereal library
namespace cereal {
// template<class Archive> void serialize(Archive& archive, Slic3r::Vec2crd &v) { archive(v.x(), v.y()); }