Fixed import of volumes from .amf
This commit is contained in:
parent
9d51348272
commit
533e1feac3
2 changed files with 2 additions and 1 deletions
|
@ -528,6 +528,7 @@ void AMFParserContext::endElement(const char * /* name */)
|
||||||
}
|
}
|
||||||
stl_get_size(&stl);
|
stl_get_size(&stl);
|
||||||
m_volume->mesh.repair();
|
m_volume->mesh.repair();
|
||||||
|
m_volume->center_geometry();
|
||||||
m_volume->calculate_convex_hull();
|
m_volume->calculate_convex_hull();
|
||||||
m_volume_facets.clear();
|
m_volume_facets.clear();
|
||||||
m_volume = nullptr;
|
m_volume = nullptr;
|
||||||
|
|
|
@ -1217,7 +1217,7 @@ Vec3d extract_euler_angles(const Eigen::Matrix<double, 3, 3, Eigen::DontAlign>&
|
||||||
|
|
||||||
// The following euristic is the best found up to now (in the sense that it works fine with the greatest number of edge use-cases)
|
// The following euristic is the best found up to now (in the sense that it works fine with the greatest number of edge use-cases)
|
||||||
// but there are other use-cases were it does not
|
// but there are other use-cases were it does not
|
||||||
// We need to imrove it
|
// We need to improve it
|
||||||
double min_1 = angles1.cwiseAbs().minCoeff();
|
double min_1 = angles1.cwiseAbs().minCoeff();
|
||||||
double min_2 = angles2.cwiseAbs().minCoeff();
|
double min_2 = angles2.cwiseAbs().minCoeff();
|
||||||
bool use_1 = (min_1 < min_2) || (is_approx(min_1, min_2) && (angles1.norm() <= angles2.norm()));
|
bool use_1 = (min_1 < min_2) || (is_approx(min_1, min_2) && (angles1.norm() <= angles2.norm()));
|
||||||
|
|
Loading…
Reference in a new issue