c++cgallibigl

Input facet components contain degenerate triangles


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);

Errors

But I'm receiving such exceptions:

Input facet components contain degenerate triangles

Precondition exception expression: !k.is_degenerate_3_object()

Questions

Screenshots

Screenshot

Screenshot another


Solution

  • 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.