I would just share my first experience printing replacement gear. I didn't yet use the Online Gear Generator by
@timwatson , because my 3D soft has a built in generator, that's for next time.
The gears to replace are from an HO scale Electrotren SNCF CC7100, at least two gears on the axles were cracked. The gear is a cogwheel dia. 5.9mm, 10 teeth, module 0.5, axle dia. 1.9 mm.
After some try & error, tweeking tolerances and print settings, I got functional replacement gears, smooth running. Printer is a Prusa Mk4 with .25mm nozzle. Plastic is Polymax Tough PLA, which makes precise prints with a good tensile strength. This material is particularly resistant to oil, grease and solvants.



