Means for shaping the cross-section of the beam