Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The work of the meshing algorithm is ustable for big meshes #54

Closed
StudentFS2 opened this issue Jan 24, 2021 · 3 comments
Closed

The work of the meshing algorithm is ustable for big meshes #54

StudentFS2 opened this issue Jan 24, 2021 · 3 comments

Comments

@StudentFS2
Copy link

Hi!
Meshing with
[node,elem,face]=v2m(part,0.5,3,50);
or
[no,el,regions,holes]=v2s(part,0.5,3);
works fine for small volumes (100x100x100 voxels):
Capture1
but for bigger volumes (500x100x500 voxels) the real surfaces are no longer followed by the exactly same command
Capture2
Capture3

@StudentFS2
Copy link
Author

Here is the geometry
part.zip

@fangq
Copy link
Owner

fangq commented Jun 6, 2021

sorry @StudentFS2 for the delay - for some reason, I did not get notification for this issue, until going over these today.

This is a known issue related to CGAL, see Issue #5, particularly, this infinite loop bug I reported 11 years ago

http://cgal-discuss.949826.n4.nabble.com/Bug-infinite-refinement-for-CGAL-Surface-mesher-td3024338.html

When you run your v2m command with a large volume, the printed message actually contains a warning:

>> [node,elem,face]=v2m(part,0.3,3,50);
extracting surfaces from a volume ...
region 1 centroid :	50.000000 1.666667 1.333333

processing threshold level 1...
Surface Mesh Extraction Utility (Based on CGAL 3.8)
(modified for iso2mesh by Qianqian Fang)
http://iso2mesh.sf.net

RNG seed 1648335518
set initial mesh size to 50
Refining... maximum node number is set to 40000
**reach maximum node limit, element angular bound may not satisfied**

done.
Final number of points: 40000
surface mesh generation is complete
generating tetrahedral mesh from closed surfaces ...
creating volumetric mesh from a surface mesh ...
volume mesh generation is complete

see in the middle, reach maximum node limit, element angular bound may not satisfied

what that means is that CGAL surface extraction function fails to complete the mesh extraction before the maximum node limit set in the program (40,000 by default). that means the mesh output is incomplete.

the reason that 40,000 node is not enough to create the surface is not because the surface is extremely dense, but CGAL is trapped in a "non-manifold" shape and produces extremely dense node cluster (and fails to stop), see reply from CGAL developer

http://cgal-discuss.949826.n4.nabble.com/Bug-infinite-refinement-for-CGAL-Surface-mesher-tp3024338p3025666.html

unfortunately, I set the threshold to a different value than 0.5, as well as increase the maximum node limit via opt.maxnode, CGAL still won't be able to complete the mesh extraction.

because this is an upstream (CGAL) bug, so I am closing this ticket and use #5 to track the upstream fix.

@lrineau
Copy link
Contributor

lrineau commented Jun 7, 2021

Hi @fangq, @StudentFS2. I am a CGAL develop, and actually in charge of the 3D Mesh Generation in CGAL. And I am the CGAL develop you were discussing with on Nabble.

As I have already said in the past (ten years ago), I am still willing to help. The issue is to be able to reproduce the issue using a pure C++ code, because I cannot use MathLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants