There is a standard command in 3D View window (Object mode): View=>Align View=>Align View to Selected. So, why I have created this script? Well, this standard command has two important drawbacks:
Here you can download the AlignView.py script file.
To follow this tutorial, you should place the Align View script into your Blender script directory (here is the tutorial, which explains how to do that).
Let’s align view to the XY face of the Tube from the Fig 1.:
Select the object, first.
Then run the Object=>Scripts=>Align View to Selected command (Fig. 2):
A popup menu will appear (Fig. 3). Select from it the desired plane:
And here is the result (Fig. 4). I have switched into wireframe mode, to show it better: