Patrick Eells designed and printed fully functional brushless DC motor. You can use any FDM DIY 3d printer, but you will need magnets and wind some copper wire coils.
The motor was designed as a 3-phase, 4-pole brushless DC motor with 4 - N52 neodymium magnets on the rotor, and 3 wire wrapped solenoids connected to the stator. The motor is controlled by Arduino. The total cost to build this motor without the Arduino micro controller and the batteries was 27,71 USD.
Excellent project!
Very detailed guide can be found here:
http://www.instructables.com/id/3D-Printed-DC-Motor/?ALLSTEPS
All the files and guide in PDF format can be downloaded here: http://pitt.edu/~pfe3/3DPrintedMotor.zip
There was a stepper motor printed in the past, but it was printed on commercial grade printer:
http://diy3dprinting.blogspot.com/2013/11/working-3d-printed-diy-programmable.html