ufl.FacetNormal will always point outwards of a cell, so therefore I am curious as why you need this extra extraction of entities. You can use ufl.Expression with facet entities to tabulate these, as shown in: FacetNormal vector components and director vector - #9 by dokken
There are several examples of this on the forum and in scifem.
The reorient function in legacy FEniCS relates to the CellNormal, as well as the orientation of facets shared between two cells. The issue I am mentioning above is illustrated in figure 4. Of v3 (arxiv) of https://arxiv.org/pdf/2102.11901v3
For the remeshing, you would have to gather the boundary on a single process. This is due to the fact that very few mesh generation tools run with MPI.
To transfer dolfinx grids into gmsh, I have also played with this, see for instance: XDMF -> GMSH Physical Groups -> Attributes · Issue #6 · scientificcomputing/fenics-in-the-wild · GitHub
which could be adapted to facets.
