We have developed fast numerical solutions to the diffraction of light from periodic array structures that allow real-time regression fitting to optical data. In contrast to previous publications, the solutions we have developed are easily applied to focused beams with arbitrary angles of incidence on periodic structures with complex shapes and multiple layers both within and below the structure. The adaptive nature of the shape definition makes it relatively easy to characterize typical microelectronic patterning effects, including undercut, rounding, footing and encroachment in a robust manner on poly-gate, STI, Damascene and resist structures. This real-time approach is not limited by a priori knowledge or assumptions about the range of variation of the CD parameters, and is therefore able to deal with large excursions in process parameters. It is also not limited by parameter discretization effects. The program itself is easily configured for any type of optical measurement (ellipsometry, reflectometry, etc). Data will be presented for several categories of microelectronic CD structures that have been measured with this approach.