Try to compute a good "Frame" for the selected Triangles of the Mesh. Only the largest triangle-connected-component of Triangles is considered. The Frame Z is aligned with the area-weighted average normal of the connected triangles. Initially the Frame is placed at the area-weighted centroid of the connected triangles. Rays are cast along Z in both directions, if either hits, the Frame is translated to the nearer hit.