I tried something similar before and found that the gap between the pieces is a lot bigger than 0.02" (.5mm). It wasn’t gears, it was a ball joint. I eventually gave up on that, but you can read my experience here:
http://forum.formlabs.com/t/print-a-ball-socket-joint-as-one-piece/11176/4