Orient local axis to match mesh's shape This seems like it should be easy, but I've searched SE and YouTube to no avail so far...

I have a mesh in my scene, representing a vehicle's drive shaft. Here it is, with everything else hidden:



However, the local axis (shown here) lines up with the scene's global axis, which isn't going to be useful when I try rotating the shaft around its length.

How can I transform the mesh's local axes so that, say, the x axis aligns with the drive shaft's length?

And if that's possible, are there any hints on how to make it exactly lined up so the shaft doesn't wobble when rotating? Thanks!
You may add a custom transform orientation based on your object's current orientation. In your case select the object in Object Mode, press Ctrl+Alt+Spacebar (or click a '+' button in a Transform Orientations panel of the Properties Shelf (N). It'll add a new orientation according to your object's position.


If you have more complicated object with the normals facing in different directions you may select the face/faces with desired angle/angles in Edit Mode and then press the buttons mentioned above. It'll orient the 3d gizmo according to the faces' position.


The newly added orientations (you may add as many as you like) are available in the Transform Orientation tab at the bottom bar of the 3D window.