Refactored generateRotatedPart to apply