is_irregular_vertex.cpp 537 B

123456789101112131415
  1. #include <test_common.h>
  2. #include <igl/is_irregular_vertex.h>
  3. TEST_CASE("is_irregular_vertex: simple", "[igl]")
  4. {
  5. Eigen::MatrixXd V;
  6. Eigen::MatrixXi F;
  7. // Known "bad" mesh (many boundaries + irregular vertices, non-manifold)
  8. igl::read_triangle_mesh(test_common::data_path("truck.obj"), V, F);
  9. std::vector<bool> vec = igl::is_irregular_vertex(V,F);
  10. // some vertices are irregular thus the sum over all vertices should evaluate to true
  11. REQUIRE(std::any_of(vec.begin(),vec.end(), [](bool v) { return v; }));
  12. }