mirror of https://github.com/CGAL/cgal
Update draw nef3 example to observe faces with holes
This commit is contained in:
parent
dd653cd396
commit
182389ed44
|
|
@ -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
|
||||
|
|
@ -13,15 +13,18 @@ typedef CGAL::Nef_polyhedron_3<Kernel> 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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue