我正在尝试从平面创建一个简单的NEF立方体并获取其顶点。不幸的是,我没有得到任何方面。
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;
typedef Nef_polyhedron::Plane_3 Plane_3;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
// As in https://doc.cgal.org/latest/Nef_3/Nef_3_2point_set_operations_8cpp-example.html
Nef_polyhedron N1(Plane_3(1, 0, 0, -1));
Nef_polyhedron N2(Plane_3(-1, 0, 0, -1));
Nef_polyhedron N3(Plane_3(0, 1, 0, -1));
Nef_polyhedron N4(Plane_3(0, -1, 0, -1));
Nef_polyhedron N5(Plane_3(0, 0, 1, -1));
Nef_polyhedron N6(Plane_3(0, 0, -1, -1));
Nef_polyhedron cube = N1 * N2 * N3 * N4 * N5 * N6;
// Loading a cube from file works:
// std::ifstream file("cube.off");
// assert(file);
// Polyhedron p2;
// file >> p2;
// Nef_polyhedron cube(p2);
Polyhedron p;
assert(cube.is_simple());
cube.convert_to_polyhedron(p);
assert(p.facets_begin() != p.facets_end()); // asserts
我做错了什么?