diff --git a/src/libslic3r/Measure.cpp b/src/libslic3r/Measure.cpp index 8213f9778..9105d65c8 100644 --- a/src/libslic3r/Measure.cpp +++ b/src/libslic3r/Measure.cpp @@ -34,7 +34,7 @@ static std::array orthonormal_basis(const Vec3d& v) std::array ret; ret[2] = v.normalized(); int index; - ret[2].maxCoeff(&index); + ret[2].cwiseAbs().maxCoeff(&index); switch (index) { case 0: { ret[0] = Vec3d(ret[2].y(), -ret[2].x(), 0.0).normalized(); break; }