A mechanical product is an assembly of a number of parts. The positions and orientations of those parts are determined by their contacting relations. Since it is inevitable for real part's shapes to take some geometrical errors, it is an important design problem to evaluate how these geometrical errors cause what deviations in parts' positions and orientations in the assembly. This paper describes a method to calculate the contact state of plane figures, which represent part's shapes specifically with some geometrical errors. The contact state is defined as a state with globally minimum energy of a part placed in a potential field. Simulated annealing method is applied to search this globally minimum state. After the introduction of basic mathematical formulations of the problem, fundamental algorithms and implementation issues are discussed. Some simple examples are also given to show that the method can calculate a variety of contact states of parts.