The width of flange on a pipe should be sufficient to accommodate the nut of bolt A nut across the corners is twice the bolt diameter  hence the minimum width of flange marked X on the example below will be 2 x diameter of bolt + 5mm