There is. You can extract the nodes of the boundary of the mesh using extractborder(...) function from load "Curvature" module (it gives you an option which boundary to extract through boundary labels). And then, when using buildmesh(...) you can enforce the desired distribution of nodes, a priori prescribed, by passing the option fixedborder=true.
Above, in extractborder(Th1,labs,nodesTh1);, node coordinates of boundary labeled 2 of mesh Th1 are extracted into nodesTh1(0,:) and nodesTh1(1,:), x and y coordinates, respectively. Also, orientation is preserved from Th1 - bcs of that, when construction Th2 you have to be careful with orientation (note, L(-(nodesTh1.m-1)) → negative sign changes orientation).