Uniform grid meshing help

Dear All
Is there any way to generate a uniform grid for using buildmesh command?

in the case of a square domain:
if we use mesh Th = square(4, 5);
that gives us a meshing with a uniform triangular element.

but in the

case of builmesh command we got a zig-zag orientation of mesh elements:

Can we get a uniform alignment of triangles ( like in square case) using builmesh command.

Thanks in advance!!!

Sorry, they no algorithme to do that
but for you example you can

int[int] labs=[10,20,30,40];// bot., right, top, left labels
mesh Th1 =  square(10,10,label=labs,region=0,[x,y]); //  
 mesh Th =  trunc(Th1,(x<0.5) | (y < 0.5),label=1);  //  remove 1/2 square top , right

1 Like

Thanks, Prof. @frederichecht Sir
It helps me to shape my problem accordingly.