mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-27 18:51:11 -06:00
Fix of rotations using sidebar fields
This commit is contained in:
parent
8e4934d91d
commit
14fe55d4b8
4 changed files with 22 additions and 10 deletions
|
|
@ -1182,8 +1182,6 @@ Vec3d extract_euler_angles(const Eigen::Matrix<double, 3, 3, Eigen::DontAlign>&
|
|||
{
|
||||
#if ENABLE_NEW_EULER_ANGLES
|
||||
// reference: http://www.gregslabaugh.net/publications/euler.pdf
|
||||
auto is_approx = [](double value, double test_value) -> bool { return std::abs(value - test_value) < EPSILON; };
|
||||
|
||||
Vec3d angles1 = Vec3d::Zero();
|
||||
Vec3d angles2 = Vec3d::Zero();
|
||||
if (is_approx(std::abs(rotation_matrix(2, 0)), 1.0))
|
||||
|
|
|
|||
|
|
@ -164,6 +164,12 @@ static inline T lerp(const T& a, const T& b, Number t)
|
|||
return (Number(1) - t) * a + t * b;
|
||||
}
|
||||
|
||||
template <typename Number>
|
||||
static inline bool is_approx(Number value, Number test_value)
|
||||
{
|
||||
return std::abs(double(value) - double(test_value)) < double(EPSILON);
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue