diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index e1f51ba646c..60fe45dbeb8 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -102,6 +102,8 @@ create_single_source_cgal_program("test_pmp_manifoldness.cpp") create_single_source_cgal_program("test_mesh_smoothing.cpp") create_single_source_cgal_program("test_remove_caps_needles.cpp") create_single_source_cgal_program("test_simplify_polylines_pmp.cpp") +create_single_source_cgal_program("test_pmp_polyhedral_envelope.cpp") + # create_single_source_cgal_program("test_pmp_repair_self_intersections.cpp") if(TARGET CGAL::TBB_support) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_polyhedral_envelope.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_polyhedral_envelope.cpp index 5a06fecd980..33737ec9a2e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_polyhedral_envelope.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_polyhedral_envelope.cpp @@ -96,8 +96,25 @@ void test_remove_si() assert(!PMP::does_self_intersect(tm)); } +void cube_test() +{ + std::cout << "---- cube_test() ----\n"; + CGAL::Surface_mesh tm; + std::ifstream in("data-coref/cube_meshed.off"); + in >> tm; + assert(tm.vertices().size()!=0); + + typedef EPIC::Point_3 P; + CGAL::Polyhedral_envelope envelope(tm, 0.1); + assert(envelope(P(0,0,0), P(1,0,0), P(1,1,0))); + assert(envelope(P(0,0,0.05), P(1,0,0.05), P(1,1,0.05))); + // assert(envelope(P(0,0,0.1), P(1,0,0.1), P(1,1,0.1))); // NOT WORKING + assert(!envelope(P(0,0,0.2), P(1,0,0.2), P(1,1,0.2))); +} + int main() { test_remove_si(); test_API(); -} \ No newline at end of file + cube_test(); +}