Pinion gear of mechanical machine in a factory