I wrote a simple one a while ago- I had to thread a 3" NPT into a throttle valve for a locomotive boiler I helped build. I actually cut 3 threads, on the throttle, a flange and a ball-socket coupling. They all worked, the boiler passed inspection and got stamped.
I did it as a quick and dirty, it would take some error checking and clean up to make it generally usefull.
Ill see what I can do.