An OpenSCAD LEGO-compatible brick generator.
This parametric brick takes the popular work of http://www.thingiverse.com/thing:5699 a couple steps further, adding easy Customizer support and support for generating wings, smooth-topped tiles, DUPLO-style bricks, sloped bricks, Technic-style holes, and more.
Depending on the resolution of your printer, you may not be able to print pieces that fit exactly with standard LEGO blocks. If you do print any of these bricks, I'd be interested to know whether they fits together with other bricks, especially if you have an SLS or SLA printer.
These blocks are not strictly identical to LEGO bricks, but they should be compatible in most every way.
See http://www.chrisfinke.com/2015/01/27/3d-printed-lego-compatible-bricks/ for more details.