The authors discuss an automatic mesh generator, Omega , developed as a front-end for the simulation of complex three-dimensional semiconductor devices. Grids generated with Omega exhibit smooth transitions from dense to coarse grid regions and a proper description of irregular geometries such as nonuniform surfaces and interfaces. In addition to the grid itself, Omega provides the dual lattice needed for the integration of the device equations. The underlying algorithm avoids the obtuse angle problem. It is shown how this problem can be formalized in 3-D, how badly shaped elements can be detected, and how they can be avoided by construction. Examples of simulations of complex 3-D devices, with grids with several tens of thousands of mesh points, demonstrate the capabilities of Omega .<>