使用 CGAL 平滑生成的 Delaunay

Smoothing generated Delaunay using CGAL

我在生成的网格中遇到低质量四面体问题。

我正在使用 CGAL::Delaunay_Triangulation_3 从预定义的点云进行三角测量。
我的问题是 CGAL 生成的元素质量有点低 - 存在条子等,我想对生成的网格应用一些 post 处理优化。

因为我有 'point cloud' 形式的 Mesh,所以我没有 Mesh_Domain_3。我找到的所有网格优化示例都使用 make_mesh_3 和 Mesh_Domain。

是否有任何方法可以使用 CGAL 对生成的 delaunay 网格应用平滑,或自定义 CGAL::Delaunay_triangulation_3 进行优化?但是有一个限制 - 网格中的一些点不能 moved/erased 来自云,而有些可以。

我正在使用的类型:

 typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
 typedef CGAL::Triangulation_vertex_base_with_info_3<int, Kernel> Vb;
 typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
 typedef CGAL::Delaunay_triangulation_3<Kernel, Tds> Delaunay;

生成代码

Delaunay triangulation(nodes.begin(), nodes.end());
//woudld be best to apply mesh smoothing here.
for(auto fit = triangulation.finite_cells_begin(); fit != triangulation.finite_cells_end(); ++fit)
{
    auto x1 = fit->vertex(0)->info();
    auto x2 = fit->vertex(1)->info();
    auto x3 = fit->vertex(2)->info();
    auto x4 = fit->vertex(3)->info();

    tetras.push_back(new Tetrahedron(nodesToTriangulate[x1],nodesToTriangulate[x2],nodesToTriangulate[x3],nodesToTriangulate[x4]));
}

您可以计算每个四面体的重心并使用加权三角测量重新进行三角测量。

我决定使用约束拉普拉斯平滑 + 拓扑平滑方差来提高网格中四面体的质量。我不得不自己实现这些平滑,因为它们在 CGAL 中不可用。

这大大提高了网格的质量。我所说的质量是指四面体的最小立体角。