You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing tetrahedra near feature corners in CGAL 3D mesh generation #9338
I am generating a 3D volume mesh from a surface mesh using:
MeshCriteria(
CGAL::parameters::facet_size(longestSurfaceEdge)
.cell_size(longestSurfaceEdge)
.facet_distance(facetDistance)
.edge_min_size(0.1 * minTubeLength)
.edge_size(longestSurfaceEdge)
.cell_radius_edge_ratio(2)
.facet_angle(30)
);
using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
using MeshDomain = CGAL::Polyhedral_mesh_domain_with_features_3<Kernel>;
MeshDomain domain(surface);
domain.add_features(<"the red polylines seen below">);
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(
domain, criteria, CGAL::parameters::no_exude().no_perturb());
At feature corners circled above, you can see the missing cells.
Here is the surface mesh, which bounds the domain, with feature polylines, colored in red:
Here you can see the polylines (the ones colored red above). They are constructed from edges of the surface mesh which bounds the domain. Each corner of the polyline is red, while the blue vertices are the intermediate points of the polyline:
Observations
Removing edge_min_size parameter does not fix the issue, just makes the missing cells smaller.
domain.add_corners() function causes exactly the same problem.
I also tried removing polylines that are close to the domain surface (the ones that form the hexagon, on the tube border were not removed), which fixed the problem. The problem then is that, I do not preserve the features that I need.
Different facet_topology criteria parameters, produce the same results.
I tried adding some polylines, around the corners, on the patch where the cells are missing, in an effort to shrink down the protecting balls. It did not work well.
Hypothesis
My understanding why the problem exists is, because the protecting balls (placed on polyline vertices) are interfering with the surface, where the cells are missing.
Because the domain surface around the two missing cells is not perpendicular to the polylines that are inside the tube, the protecting balls overlaps with the domain surface, which causes problems.
You can see in other corners where the surface is more or less perpendicular to the polylines inside the tube, there is no problem.
Questions
How could the missing cells be fixed?
Is there a better way to preserve features without creating this issue?
Environment
Operating system: Linux 64 bit
Compiler: g++ (GCC) 14.2.0
Release or debug mode: Debug
Specific flags used: CGAL::Sequential_tag (for CGAL::Mesh_triangulation_3<>), -DCGAL_DISABLE_GMP=1
CGAL version: 6.1
Boost version: 1.89.0
Other libraries versions if used (Eigen, TBB, etc.): /
The function parameters::manifold() is used to drive the meshing algorithm for surfaces.
It ensures that the surface of the output mesh is a manifold surface without boundaries. The manifold property of the output mesh can be achieved only if the input surface is a manifold. Note that the meshing algorithm provably terminates only if the input sharp edges have been protected, using the feature protection (see Protection of 0 and 1-dimensional Exposed Features).
The domain surface mesh is a manifold. But, I cannot yet get the meshing to terminate, if I specify the manifold parameter. I suspect it is because of the sharp edges in other parts of the domain, like this narrow spike:
The sharp edges of the domain are protected with polylines (45 degree angle between normals), but it still doesn't work.
Unfortunately, I can’t share the original input mesh because it contains proprietary information.
I’ll see whether I can create an anonymized reproducible example that still triggers the same issue.
Hello @rokgm ,
thanks for your report.
The PR #9855 should fix this issue, provided you add the new facet_normals_variation(90) angle bound on neighbor facets normals.
We would be happy to know if this PR solves this issue on your data.
Best,
Activity
sloriot commentedon Feb 25, 2026
Can you try
rokgm commentedon Feb 25, 2026
The domain surface mesh is a manifold. But, I cannot yet get the meshing to terminate, if I specify the manifold parameter. I suspect it is because of the sharp edges in other parts of the domain, like this narrow spike:
sloriot commentedon Feb 25, 2026
You should indeed try without
edge_min_size()rokgm commentedon Feb 26, 2026
Without
edge_min_size()the spike looks like this (also nofacet_angle()andcell_radius_edge_ratio(), this should help meshing the spike):If I additionaly specify
.manifold()I get this error:the point (circled red dot below) with this coordinates lies here in the domain surface mesh. It is not on any edge or vertex:
sloriot commentedon Feb 26, 2026
You shouldn't get issue with the spike. Do you have self-intersections in the input?
Maybe you can share a minimal reproducible example?
rokgm commentedon Mar 17, 2026
Unfortunately, I can’t share the original input mesh because it contains proprietary information.
I’ll see whether I can create an anonymized reproducible example that still triggers the same issue.
anjanikumari12 commentedon Mar 25, 2026
janetournois commentedon Nov 17, 2026
Hello @rokgm ,
thanks for your report.
The PR #9855 should fix this issue, provided you add the new
facet_normals_variation(90)angle bound on neighbor facets normals.We would be happy to know if this PR solves this issue on your data.
Best,