MATLAB: PDE meshing (generateMesh) failing after solid operations

createpdefacesfailfinite elementsgeometryfrommeshgptoolboximportgeometryMATLABmeshPartial Differential Equation Toolboxpdesolidstltetrahedronvertices

Hey there,
I'm trying to develop an algorithm to define, edit and solve finite elements problems using constructive solid geometry. The libs I'm using work well, but when it comes to generate the mesh, some complex geometries return the "Meshing failed for Hmax…" error whatever the Hmax, Hmin values are.
After some tests, It seems it is the very solid operation which makes the meshing fail, even if the operation is somehow "simplifying" the model, or if it leaves the model exactly the same way. An example:
Original model: Successful mesh generation
Modificated (intersection with a cube to obtain a half): failed generation
How could I avoid this? For me, since the non-modificated models are of the same complexity, it does not seem a "too complex geometry" problem.
Any workaround appreciated.
Thank you

Best Answer

I figured it out a coupe weeks ago. There is a script called tetgen.m, from the gptoolbox, which uses an external program, also called Tetgen, to generate the meshes.
Related Question