0

I have problem with low quality of Tetrahedrons in my generated Mesh.

I am using CGAL::Delaunay_Triangulation_3 for triangulation, from pre-defined point cloud.
My problem is that Elements generated by CGAL are a bit of low quality - presence of sliver etc, I would like to apply some post-processing optimization on the generated Mesh.

Because I have Mesh in form of 'point cloud' I dont have Mesh_Domain_3. All examples I found towards the mesh optimization used make_mesh_3 together with Mesh_Domain.

Is There any way to apply smoothing on generated delaunay mesh using CGAL, or customize CGAL::Delaunay_triangulation_3 for optimization? There is one constraint though - Some of the points in the meshes cannot be moved/erased from the cloud, and some can.

Types that I am using:

 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;

Generation Code

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]));
}
Aleksander Fular
  • 803
  • 9
  • 18
  • My guess would be that you need 2 steps: 1) use some reconstruction algorithm to define the domain and 2) feed that to the mesher. – Marc Glisse Sep 19 '15 at 23:19
  • @MarcGlisse there is no way to improve quality of: CGAL::Delaunay_triangulation_3 in CGAL? One has to take different approach? Fallback to make_mesh_3? – Aleksander Fular Sep 20 '15 at 02:28
  • It is not very clear what you want to do. I assume you are only interested in some portion of space, say some subset of the tetrahedra in the Delaunay triangulation. That's one way to define a domain for the mesher. "Improving the Delaunay triangulation" doesn't really mean anything. For a given point set, it is uniquely defined. And if you can move the points, you need to define a domain one way or another (the code gives you a lot of flexibility in how you define the domain). – Marc Glisse Sep 20 '15 at 08:59
  • I meant Improving the quality of tetrahedrons that is - make them more like 'Regular Tetrahedron'. Remove low quality elements, like Slivers. Normally one would do some 'topological' smoothing on elements or something like that to improve the quality of elements within the mesh. Also something like laplace smoothing. This should be applied on whole mesh, with exception that some points cannot be moved. – Aleksander Fular Sep 20 '15 at 16:46

2 Answers2

0

You can compute the center of gravity for each tetrahedon and retriangulate with a weighted triangulation.

Micromega
  • 12,486
  • 7
  • 35
  • 72
0

I decided to use constrained laplace smoothing + variance of topologic smoothing to improve quality of tetrahedron in the mesh. I've had to implement these smoothing myself as they are not available in CGAL.

This greatly improved the quality of the mesh. by Quality I mean the minimal solid angle of tetrahedrons.

Aleksander Fular
  • 803
  • 9
  • 18