我正在尝试使用CGAL::Euler::remove_face
通过装饰器从网格中删除第一个面:
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron;
typedef Polyhedron::Halfedge_handle Halfedge_handle;
typedef Polyhedron::Facet_handle Facet_handle;
typedef Polyhedron::Vertex_handle Vertex_handle;
typedef Polyhedron::HalfedgeDS HalfedgeDS;
Polyhedron m_cgal_mesh;
std::ifstream in("D:/sphere3.off");
in >> m_cgal_mesh;
HalfedgeDS decorator(m_cgal_mesh.hds());
Halfedge_handle hh = m_cgal_mesh.halfedges_begin();
CGAL::Euler::remove_face(hh, decorator);
m_cgal_mesh.hds() = decorator;
问题是,即使decorator
在调试器中显示出一张较少的面孔,正如预期的那样,当我调用m_cgal_mesh.hds() = decorator;
更新实际网格时,它并不能正确翻译。