如何将三角孔补丁转换为表面网格?

How to convert a triangulated hole patch to a surface mesh?

我有一个带有顶点和三角形的三角孔补丁。现在如何将其转换为表面网格?

我正在尝试使用两个不同的补丁部分填充我的网格中的一个洞。我有边界上所有点的顶点位置(z=0 的点)。使用它们,我使用以下代码对孔进行了三角测量(来自 https://doc.cgal.org/latest/Polygon_mesh_processing/Polygon_mesh_processing_2triangulate_polyline_example_8cpp-example.html

    std::vector<PointCGAL> polyline;
Mesh::Property_map<vertex_descriptor, std::string> name;
Mesh::Property_map<vertex_descriptor, PointCGAL> location = 
    mesh1.points();
BOOST_FOREACH(vertex_descriptor vd, mesh1.vertices()) {
    if (location[vd].z() < 0.00001)
    {
        std::cout << "on Boundary" << endl;
        polyline.push_back(PointCGAL(location[vd].x(), 
    location[vd].y(), location[vd].z()));
    }
    std::cout << location[vd] << std::endl;
}

typedef CGAL::Triple<int, int, int> Triangle_int;
std::vector<Triangle_int> patch;
patch.reserve(polyline.size() - 2); // there will be exactly n-2 
    triangles in the patch
CGAL::Polygon_mesh_processing::triangulate_hole_polyline(
    polyline,
    std::back_inserter(patch));

看看函数polygon_soup_to_polygon_mesh()