SEM Metrology becomes the standard metrology for the mask industry, as the precision and accuracy requirements tighten continuously. At the same time, analysis of general shape features becomes an important task in wafer metrology. In this paper we consider the basic requirements and suggested implementations for performing 2D metrology on reticles and wafers, [i.e. measurements of OPC (Optical Proximity Correction) structures, End of Lines, Dual Damascene and Corner Rounding]. The authors consider the following challenges related to the development of a generic algorithm for general shape 2D analysis: (1) A generic segmentation of the feature. It should be robust to noise, as well as brightness and contrast changes. (2) The complexity of two dimensional general shape features metrology. Standard CD SEM metrology is based on metrics describing simple geometric shapes such as ellipses and lines). (3) Obtaining such metrics that can be used as handles for process control (i.e. what to measure on the 2D feature). In the first part of the paper we describe a novel algorithm for segmentation and geometric analysis of general shape features based on a Smoothing Spline and the methods of differential geometry. Next, we consider the numerical methods implemented for shape analysis of noisy contours. In the second part of the paper the performance of our methods on synthetic contours of circular arc with different noise levels is demonstrated. We conclude with sample results of several suggested metrics measured on real SEM images of reticles and wafers.