Here's an attempt to automate the selection of the outer boundaries with some undocumented properties. Here's a BoundaryMeshRegion
with multiple holes and multiple outer boundaries:
g1 = Graphics[Table[Annulus[{x, 0}, {0.5 + x/20, 1}], {x, 0, 9, 3}]];
g2 = Graphics[Rectangle[{1.5, -0.3}, {7.5, 0.3}]];
br = RegionUnion[BoundaryDiscretizeGraphics /@ {g1, g2}]
The "BoundaryGroups"
property groups the boundaries of connected regions, and it appears that the first element of each group is the outer boundary. (Pure conjecture of course, but that was the case for the limited number of tests I did).
bgps = br["BoundaryGroups"]
(* {{6, 2, 3, 4, 5}, {8, 7}, {1, 9}} *)
outer = bgps[[All, 1]]
(* {6, 8, 1} *)
I use another undocumented property, "IndexedBoundaryPolygons"
to extract the polygons with those indices and construct a new region:
polys = br["IndexedBoundaryPolygons"][[outer]];
MeshRegion[MeshCoordinates[br], polys]