Gizmo measure - Fixed calculation of angle edge-plane

This commit is contained in:
enricoturri1966 2022-11-22 13:13:25 +01:00
parent 87fb1604d8
commit 36b4a149a4

View File

@ -34,7 +34,7 @@ static std::array<Vec3d, 3> orthonormal_basis(const Vec3d& v)
std::array<Vec3d, 3> 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; }