The best tips I've run across for painting machine tool parts is in the back of Steve Brooks' Ilion Publishing restoration manual. The basics are:
1. Never, EVER, let paint get on a machined surface. Nothing else is as important as this rule. It's one of those "pay me now or pay me a lot more later" rules that you just have to learn the hard way before you appreciate it. I violated this rule recently on my lathe's apron and paid dearly during reassembly. Just don't let your guard down and you'll thank yourself later.
2. It's OK to paint up to and beyond the edge between cast and machined surfaces, just have a rag ready to dip in thinner and wipe it off immediately. The rag mimics the same path followed by the tool that made the machined surface. If you're careful, it will look like the cut was made after painting.
3. Plug all holes for shafts, threaded fasteners, and taper pins. The easiest way I've found is to simply insert the fastener, paint over it, then throw it in some thinner to clean it. Much easier to clean a screw than a screw hole. Wood dowel stock of the same OD as the shaft works well for larger bores. You can also use long wooden dowels to suspend parts like gearbox castings while painting.
For areas where you do decide to mask before spraying, apply painter's tape beyond the edge of the machined surface. Then, take a razor blade held at nearly 90 degrees to the surface and "scrape" the cast edge through the tape. This abrades the tape in two right at the interface. This is especially useful at the edges of shallow bosses, etc., where it's difficult to cut the tape in the traditional sense. You'll be surprised how easily you can mask a complex perimeter perfectly by scraping through the tape this way.
Spraying is great if you can contain the overspray, but it does require multiple coats to build thickness and it's still best to brush the first coat to ensure adhesion on cast iron. With a good quality slow drying oil-based alkyd enamel, you'll be shocked at how good a finish you can get brushing. People will debate whether or not a primer is required; my practice is to not prime cast iron and to prime steel. Cast iron has built-in "tooth" for the paint to adhere to, steel does not and is much more prone to rust than cast iron in the same environment.
Finally, if you ask ten restorers what paint is best, you'll get at least eleven answers back. I understand those who use catalyzed automotive enamels or two-part epoxies to increase the wear resistance and improve the finished appearance. These paints are tough, but the organic solvents and catalysts in them will harm your health if you're not equipped to spray them. If you don't have a friend in the business who can get you a discount for small quantities, they usually cost several hundred dollars for the quantity of primer and paint required for a typical machine tool.
For what it's worth, my opinion is all paints fail eventually and it's better to use one that is easy to touch up in the future. I have used Sherwin-Williams All Surface Alkyd Enamel with great success on two restorations now. Spray it, brush it, whatever's easiest. It takes several days to achieve good handling hardness, and several weeks to reach full hardness, so patience is required. The benefit of all that cure time is brush marks essentially disappear as surface tension has time to pull them down flat.
I always ask for the low sheen version, but that's a personal preference for vintage tools.
Good luck!
Tom