I've seen some PCB's with components mounted at multiples of 45 degrees (45, 135, etc.) I recently discovered my PCB program (gEDA PCB) supports these, though it isn't a GUI function and you have to run a command. When is it appropriate to mount at these angles? And what about angles of 30 degrees and 60 degrees, or arbitrary angles?
Another reason would be for indicator or display components. It's not terribly uncommon to see chip LEDs at varying angle to fit the aesthetics of a particular device.
Whatever the reasoning, most SMT machines can places parts at angles without issue.
Placing a QFP chip at 45 degrees can make it easier to connect the leads to pins on a DIL board. Try it for yourself. Other angles aren't helpful.
Parts can be at whatever angle they need to be to help layout or fit into some bizarre package. Your manufacturing engineer may not like it, but if it's required, then oh well. As Duane mentions, this is rarely a problem nowadays, but be sure.
Conversely, your manufacturing engineer will pretty much demand 45° rotation of QFPs if they are to be wave soldered.
When is it appropriate to mount components at a 45 degree angle?
Whenever you feel like it. Whenever it helps the layout. Don't stop at 45 degrees, use any angle that makes sense. Here's a board using 30 degrees.
Inductors and magnetics that may generate fields are recommended to be offset from one another. As an example, don't line up L1, L2 and L3 next to each other. Place L1 as you normally would, L2 at right angles to L1 and L3 at a 45 degree angle. I took this example directly off a datasheet but forget whose (Microchip, I believe).
Ha! The layout program specified (gEDA PCB) doesn't support rotating a square to 45 degrees. The thermal pad of a QFN is usually a square. Rotating it at 45 degrees doesn't work.
One workaround is to make it a not-quite-square.
You will also encounter another problem with gEDA PCB: text cannot be rotated to arbitrary angles. Only 0,90,180,270 degrees.
I don't recommend PCB for anything other than simple rectilinear designs.
edit: I have been using pcb for increasingly geometrically complex designs, and it gets harder and harder. Finally, I made a script to convert DXF to pcb's format, such as it is.
The script is here: http://vivara.net/software/dxftopy.tar.gz
It goes from qcad:
Resulting file (ben-mode render):
But this process is an unspeakable pain in the hindquarters. pcb is terrible at editing anything that is not on a grid.
When you want to wave solder (not much done anymore) QFP parts you simply have to place them at a 45 degree angle. If you place them orthogonally the solder wave will short all the pins transversal to the wave. 45 degrees allows to place solder thieves that take any excess solder.