In this paper, a shape model representing the cross-sections of machined parts is developed, and then formulated as an unconstrained minimization problem using the criterion of minimax errors. A procedure hybridizing the genetic algorithm with a line search technique is proposed to solve the matching problem, the output of which reports the out-of-profile error, and determines the pose and scale of the object being analysed. Extensive experiments show that the algorithm is robust, accurate and fairly fast. In addition, the model is flexible in the sense of the capability of analysing different types of profiles without changing parameter settings and software programs. This flexibility makes the proposed technique generic and is inherently suitable for on-line implementation in automated manufacturing environments.