Closed juanSilvaHenao closed 2 weeks ago
could you provide the parameters to pass to the command line?
Yes: it takes the .nii image file, the vtu out file, cell size and element_ratio (this value doesn't matter as it is fixed in the code to 0.25*cell_size), so with the file provided it will be:
case_6.nii case_6.vtu 2 0.5
Can you please tell us where this unexpected connection happens (coordinates of the points), so that we can spot it too in the input image and output mesh?
My guess for now is that you should use a smaller facet_distance
criterion
the coordinates of one of the points are: (72.6996, 50.5809, 111.179) it is one of the points in the bottom right of the attached image. I am already using a very small facet distance (0.00002) but the problem is still present, for example in regions of the domain where the two subdomains are close together but there should be space between them, for example around the node with coordinates: (35.474, 113.694, 12.2524)
Hello,
I could generate a tet mesh from your input with almost the same meshing criteria, and the volumes are nicely separated :
Actually, facet_distance
does not have to be that small (I used 0.01 and it could probably be higher).
However, the minimal sizes edge_min_size
, facet_min_size
and cell_min_size
that you were using were too large. These criteria have been designed to prevent any other meshing criteria from triggering refinement of simplices smaller than that, hence the issues that you are facing.
Thank you! I tried once again removing the min_size parameters and it works with a facet distance of 0.08 :). I started using these parameters (min_sizes) to speed up the meshing process without realizing that it will induce this error.
One final question, is there a way to indicate that two adjacent subdomains should be touching but not sharing any nodes?
This can be useful to simulate contact between two bodies without meshing them separately (which I assume is also an option).
Thanks for your help!
Mesh_3 meshes all subdomains simultaneously and ensures that connectivity between subdomains is valid, with subdomains separated by surface facets. You can separate the subdomains a posteriori and duplicate surface vertices. Would it help?
I think that can be what I need. Is there any example or anywhere I can get information that I can use as a guide for doing this? Sorry, I am fairly new to CGAL so that might be a very basic question....
There isn't really an example of how to do that.
As an intermediate step, the function CGAL::facets_in_complex_3_to_triangle_mesh() can be used to export the surface mesh corresponding to a given surface patch index
Ok, i'll try starting with it. Thank yo so much for your help!
Issue Details
Greetings,
I am using mesh_3D_weighted_image_with_detection_of_features.cpp to generate a 3D mesh from a segmented image with several subdomains. The code works without any compilation issues however, the generated meshes seem to have problems separating the different subdomains like it is shown in the image
I am using feature protection both inside the image and in bbox and also tried using weights. I also tried tuning the facet parameters (reducing facet size and distance) as well as edge length and cell size but nothing does the trick. Is there any way I can guarantee that there is no cell sharing between certain subdomains? Also, is there a way to force two adjacent subdomain to hace separate nodes in the boudary (e.g. for contact simulation)?
I send attached the image file I am trying to mesh as well as my source code, wich is a modified version of mesh_3D_weighted_image_with_detection_of_features.cpp
case_6.zip
Thanks in advance
Source Code
Environment