I have two parts, which need to be meshed. One part is located inside another. To simplify the problem, imagine two cubes: one inside another. enter image description here

Geometries are stored in STL files. From CAD point of view, one file contains an internal cube, another contains cube with a hole for an internal cube. All dimensions fits (there are no intersections). My task is to create a conformal tetrahedral mesh suitable for mechanical FEM analysis - without duplicated nodes on shared faces. Each element should contain information to which part it belongs. File format does not matter but Abaqus is preferred.

I decided to use gmsh, but I cannot mesh both parts together. I tried the following commands:

  1. File -> Open Internal cube
  2. Add volume to internal cube
  3. File -> Merge External cube
  4. Add volume to external cube

This produces mesh but elements in internal cube are duplicated. It looks like gmsh does not treat hole (in external cube) as a void. I also tried to use Coherence in gmsh but it failed with error:

Error : Self intersecting surface mesh, computing intersections (this could take a while)

Error : Surface mesh is wrong, cannot do the 3D mesh

I assume, that my geometries are fine:

How to create such a mesh which satisfy my requirements?

  • $\begingroup$ Can you have the shapes as SAT or IGS files? Did you check the normals for the inner hole? $\endgroup$
    – nicoguaro
    Jan 6, 2016 at 19:14
  • $\begingroup$ This is a question best asked on the gmsh forums or mailing lists. $\endgroup$ Jan 6, 2016 at 20:12
  • 1
    $\begingroup$ You can use a cutting plane to change the geometry from toroidal to simply connected. Meshing becomes easier then. $\endgroup$ Jan 7, 2016 at 1:53
  • $\begingroup$ @nicoguaro: STL files are being made using our own software. And meshing should be perform automatic. Yes I can convert it to SAT but I would like to avoid it. $\endgroup$ Jan 7, 2016 at 7:12
  • 1
    $\begingroup$ This is a discussion on GMSH mailing list that contains info on how to create CompSolids in CAD tools that will be meshed conformally in GMSH. onelab.info/pipermail/gmsh/2016/010238.html $\endgroup$
    – Anton Menshov
    Jun 17, 2018 at 23:28


Browse other questions tagged or ask your own question.