Cannot succeed in using "Coherence" with a rectangle and a 3D box face
Hi, I am trying to mesh a box, with a small rectangle within one side (to act as a physical domain later on). Unfortunately, I cannot succeed to have common nodes between this rectangle and it associated face: both are meshed independently:
When working in 2-D, I know that I must use the "Coherence" or "Fragments" functions before meshing, as explained in example "simple3.geo".
When working in 3-D, the "Coherence" does not work.
SetFactory("OpenCASCADE");
Box(1) = {0, 0, 0, 5, 5, 5};
Rectangle(7) = {1, 1, 5, 2, 1, 0};
Coherence;
I got this message: Error : Boolean fragments failed
Using the GMSH gui and Boolean operation, I succeed:
SetFactory("OpenCASCADE");
Box(1) = {0, 0, 0, 5, 5, 5};
Box(2) = {1, 1, 4, 2, 3, 3};
BooleanUnion{ Volume{1}; }{ Volume{2}; Delete; }
Coherence;
Recursive Delete { Volume{2}; }
Unfortunately, I cannot reproduce it with the Python API:
geom = gmsh.model.occ
box3d_1 = geom.addBox(0,0,0,dx,dy,dz)
box3d_2 = geom.addBox(gap_from_borders,gap_from_borders, dz-0.5, 2, 2, 2)
geom.fuse([(2,box3d_1)],[(2,box3d_1)], removeObject=False, removeTool=True )
geom.removeAllDuplicates()
Am I missing something obvious ? Thanks in advance ?
Nicolas