The bay sizes of the building are determined by the distance from one portal to the next. This determines the length of the building, you may have a 9m long building made up of 3 bays at 3m.