Whenever I put train cars on display in my room, they tend to roll away unless I put them at a funky angle, since the shelves aren't level. I designed a set of holders that the Lego train wheel piece sits on so they don't run away:
The nice render above is sized for bogies with two studs between the wheel pieces - I designed up holders for single wheel bogies, and holders for bogies from zero to two studs between the wheels as seen below:
These should help keep my trains from rolling away. I'll have to do them in gray the next time I have gray loaded into the printer.