-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Issue Details
Unexpected behavior
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.): /