【发布时间】:2015-12-16 20:03:18
【问题描述】:
我在生成的网格中遇到了低质量的四面体问题。
我正在使用CGAL::Delaunay_Triangulation_3 进行三角测量,来自预定义的点云。
我的问题是 CGAL 生成的元素质量有点低 - 存在长条等,我想对生成的网格应用一些后处理优化。
因为我有“点云”形式的网格,所以我没有 Mesh_Domain_3。我发现的所有网格优化示例都使用了 make_mesh_3 和 Mesh_Domain。
有什么方法可以使用 CGAL 对生成的 delaunay 网格应用平滑,或者自定义 CGAL::Delaunay_triangulation_3 进行优化?但是有一个限制 - 网格中的某些点不能从云中移动/擦除,而有些可以。
我正在使用的类型:
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]));
}
【问题讨论】:
-
我的猜测是您需要 2 个步骤:1)使用一些重建算法来定义域,2)将其提供给网格器。
-
@MarcGlisse 没有办法提高 CGAL 中的质量:CGAL::Delaunay_triangulation_3?一个必须采取不同的方法?回退到 make_mesh_3?
-
不是很清楚你想做什么。我假设你只对空间的一部分感兴趣,比如德劳内三角剖分中四面体的某个子集。这是为网格器定义域的一种方法。 “改进 Delaunay 三角测量”实际上并没有任何意义。对于给定的点集,它是唯一定义的。如果可以移动点,则需要以一种或另一种方式定义域(代码为您定义域的方式提供了很大的灵活性)。
-
我的意思是提高四面体的质量——让它们更像“常规四面体”。移除低质量元素,例如 Slivers。通常,人们会对元素进行一些“拓扑”平滑或类似的操作,以提高网格中元素的质量。还有类似拉普拉斯平滑的东西。这应该应用于整个网格,除了某些点不能移动。
标签: c++ 3d cgal smoothing delaunay