All major cab structural work should always be done while it is bolted to the frame. If the frame has been tweaked because of an accident, then the frame should be straightened first, then do your cab repairs.