diff --git a/Data/data/meshes/beam.off b/Data/data/meshes/beam.off new file mode 100644 index 00000000000..8d0908dc812 --- /dev/null +++ b/Data/data/meshes/beam.off @@ -0,0 +1,16 @@ +OFF +8 6 0 +2.7 2.7 2.3 +2.7 2.3 2.3 +2.3 2.7 2.3 +2.3 2.3 2.3 +2.7 2.7 -1.3 +2.7 2.3 -1.3 +2.3 2.7 -1.3 +2.3 2.3 -1.3 +4 0 1 3 2 +4 5 4 6 7 +4 0 2 6 4 +4 3 1 5 7 +4 0 4 5 1 +4 6 2 3 7 diff --git a/Nef_3/examples/Nef_3/draw_nef_3.cpp b/Nef_3/examples/Nef_3/draw_nef_3.cpp index f5923ffe451..0ccd07ba6f9 100644 --- a/Nef_3/examples/Nef_3/draw_nef_3.cpp +++ b/Nef_3/examples/Nef_3/draw_nef_3.cpp @@ -13,15 +13,18 @@ typedef CGAL::Nef_polyhedron_3 Nef_polyhedron; int main(int argc, char *argv[]) { // read OFF file into a polyhedron - Polyhedron P; - std::ifstream ifs((argc > 1) ? argv[1] : CGAL::data_file_path("meshes/cross_quad.off")); - ifs >> P; + Polyhedron P1, P2; + std::ifstream ifs1((argc > 1) ? argv[1] : CGAL::data_file_path("meshes/cross_quad.off")); + ifs1 >> P1; + std::ifstream ifs2((argc > 1) ? argv[1] : CGAL::data_file_path("meshes/beam.off")); + ifs2 >> P2; // initialize nef from polyhedron - Nef_polyhedron N(P); + Nef_polyhedron N1(P1); + Nef_polyhedron N2(P2); // draw Nef Polyhedron - CGAL::draw(N); + CGAL::draw(N1-N2); return EXIT_SUCCESS; }