This refactors the code of TopoShape::getFacesFromDomains and the the private class BrepMesh of the MeshPart module to reduce code duplication.