CSGTree.cpp 511 B

1234567891011121314151617
  1. #include <test_common.h>
  2. #include <igl/copyleft/cgal/CSGTree.h>
  3. TEST_CASE("CSGTree: extrusion", "[igl/copyleft/cgal]") {
  4. Eigen::MatrixXd V;
  5. Eigen::MatrixXi F;
  6. test_common::load_mesh("extrusion.obj", V, F);
  7. igl::copyleft::cgal::CSGTree tree(V, F);
  8. igl::copyleft::cgal::CSGTree inter(tree, tree, "i"); // returns error
  9. Eigen::MatrixXd V2 = inter.cast_V<Eigen::MatrixXd>();
  10. Eigen::MatrixXi F2 = inter.F();
  11. REQUIRE (V2.rows() == V.rows());
  12. REQUIRE (F2.rows() == F.rows());
  13. }