How to rotate the axis of an object to align with the projection directions

Another option is to use Chris Fullmers Perpendicular face tool.
Perp