A 3-D grid generator for finite-element solutions of electromagnetic field problems is discussed. The method of dividing an entire configuration into smaller regions provides a high degree of flexibility in defining the characteristics of the different portions of the problem. The software is capable of handling a wide variety of objects and is easy to use. It only requires the information about geometries and characteristics of the different regions in the volume. The grid generator algorithm is discussed. The algorithm was applied to a general 3-D example. The example includes most of the items which create difficulty in 3-D discretization of a general volume. This example utilizes thin plates, air-gaps, and curved surfaces as well as volume variations in all directions.