I'm calling IGL trim_with_solid
like this:
#include <igl/copyleft/cgal/trim_with_solid.h>
// Input
Eigen::MatrixX3f m_VA;
Eigen::MatrixX3i m_FA;
Eigen::MatrixX3f m_VB;
Eigen::MatrixX3i m_FB;
// Output
Eigen::MatrixX3f m_V;
Eigen::MatrixX3i m_F;
Eigen::Matrix<bool, Eigen::Dynamic, 1> m_D;
Eigen::VectorXi m_J;
// Fill out input matrices ...
igl::copyleft::cgal::trim_with_solid(m_VA, m_FA, m_VB, m_FB, m_V, m_F, m_D, m_J);
But I'm receiving such exceptions:
Input facet components contain degenerate triangles
Precondition exception expression:
!k.is_degenerate_3_object()
Am I calling trim_with_solid
correctly?
As far as I remember, my input meshes don't have degenerate facets. However, if they do, does IGL have any tool to detect and remove degenerate facets? Thanks!
Actually, the input B
mesh i.e. VB
/FB
was messed up and contained degenerate triangle polygons. After fixing B
mesh, the errors got resolved.