Difference boolean meshed incorrectly at small mesh sizes
I am using the Gmsh python API to mesh cubic volumes with spherical pores. The pores are made using a boolean difference from sphere and cube volumes. In the documentation, gmsh.model.mesh.setSize() is only applicable to points. Here I set the mesh size of all points before meshing the volume. If the mesh size is too small, some pores are meshed incorrectly (please see included images). I've managed to narrow the problem down to the following example script. How can I resolve this issue? Thanks in advance!
import gmsh
import sys
gmsh.initialize()
gmsh.model.add("meshing")
gmsh.model.occ.addBox(-0.5, 0.0, -0.5, 1.0, 1.0, 1.0, 1)
gmsh.model.occ.addSphere(0.5326513, 0.22294676, 0.09069639, 0.14555053, 2)
out,_ = gmsh.model.occ.cut([(3, 1)], [(3, 2)], removeObject=True, removeTool=True)
gmsh.model.occ.synchronize()
points = gmsh.model.occ.getEntities(0)
gmsh.model.mesh.setSize(points, 0.03) # 0.05 works fine
gmsh.model.mesh.generate(3) # mesh volume with tetrahedrons
gmsh.fltk.run()
gmsh.finalize()