This paper presents a method for calculating the parameters of the Schwarz-Christoffel inverse transformation using the Genetic Algorithm. It is shown that for problems involving a polygonal geometry with axial symmetry, the number of estimated parameters is reduced by half. Simulations are performed with polygonal figures with several different geometries and with up to 27 sides. A four-sided polygon is inversely mapped in order to verify the accuracy of the method. The method is also applied for calculating the induction lines and the flux lines in the region of a doubly slotted airgap of an electrical machine. Finally, based on the length of the midline of induction in the airgap, a new and very simple formula to calculate the Carter factor of an electrical machine is presented, which takes into account the actual geometry of the airgap.