Hi Hang
For TetGen to work, the input mesh must be well-posted - i.e. it must be water-tight with no self-intersecting elements or degenerated elements.
If your mesh was created other tools or processed by merging multiple surfaces, you have to check/repair to ensure the input mesh is valid. Unfortunately, invalid surface is very easy to generate, for example, smoothing, downsampling, Boolean operations, all these steps are prune to self-intersecting cases.
If the input surface is a simple closed surface, calling meshcheckrepair(…, ‘meshfix’) can fix these defect in most cases, but it does not work if the surface contains multiple closed-compartments.
There is no robust way, as far as I know, to repair a complex polyhedral surface to avoid self intersections. One thing that we do know is that v2s output using cgalsurf and cgalmesh are guaranteed to be well-conditioned, but surfaces often have a non-smooth boundary or do not contain sharp features (in newer CGAL libraries, one can force sharp features by manually inserting 1D feature lines, but this function has not been added to iso2mesh – such feature line is also hard to define in many datasets).
Qianqian
--
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/CAGcvOTUxPUetQ5G9AOGkSLHN4xu%3D%2BBEkxPfFCv8r3ktfqVZh%3DA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/5d82e595.1c69fb81.91a1.8a9f%40mx.google.com.
Hi Qianqian,
I've been playing with different parameter combinations in iso2mesh to generate the volume mesh, and had a couple of questions:
(1) seems that remeshsurf and meshcheckrepair both can be used to remove self-intersecting faces. What are the differences? I am asking because I noticed that for the same surf mesh, meshcheckrepair works but remeshsurf does not.
both functions can convert a ill-posed surface into a well-posed surface, but based on different workflows.
the remeshsurf function first rasterizes a surface into a voxelated image (a binary mask), and then re-extract the external surface using cgal's surface extraction tool.
the meshcheckrepair('meshfix') calls meshfix, a utility written by Marco Attene to repair a simple closed surface
M. Attene. A lightweight approach to repairing digitized polygon meshes. The Visual Computer, 2010. (c) Springer. DOI: 10.1007/s00371-010-0416-3
https://github.com/MarcoAttene/MeshFix-V2.1
the remeshsurf approach is more robust, but the output mesh have two minor issues: 1) sharp features, if any, will disappear due to the CGAL surface extraction algorithm, and 2) the output mesh are completely different discretization and won't share nodes/elements with the original input;
the 2nd approach, meshfix, does not have the above problems, but is often more sensitive to input surface's quality - if the input surface contains multiple compartments or open-edges, it can give an invalid output.
(2) in surf2mesh, I added a fourth column in the node matrix, to better control the mesh density. However, for a range of values I tested, I got the tetgen error as before, but if I do not include the fourth column, it generates the volume mesh successfully. I didn't find other setting requirement in the examples, am I missing something? Or is there any guideline as to the surface node size in the fourth column?
again, this sounds like a tetgen issue. if it was not successful, tetgen must print an error, you may want to send the input as well as the error message to Dr. Hang Si, the author of tetgen for further debugging.
Qianqian
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/CAGcvOTWm3Q3j70UnX_vf64Rf0-AJckOuGwEGZ61_RRQq8dkqmg%40mail.gmail.com.