Trunc function does not work for mesh splitting

Hello Prj, I hope you doing well. I currently try to build mesh with a interface face, which I can use it for separating design domain later. However, I find the freefem partitioning with overlapped domain works fine with this .msh file, while the No-overlap partitioning with trunc function gives me some error. I am really running out of the cue. Could you give me some ideas about which part of this code or the mesh is not right? I am attaching the .stp .msh & .edp file here.

Thank you so much. (48.6 KB)

Your mesh is not OK. Even a simple script such as

Th = gmshload3("CUBE.msh");
Th = trunc(Th, 1);

does not work.

I think you are right, do you know which part of this mesh is the issue.

I think I find the problem, at the shared face, they are not meshing with the same way. I re-meshed that surface with transfinite in Gmsh. Now it is working. Thank you Prj. (8.4 KB)