In precision metrology, the form errors between the measured data and reference nominal surfaces are usually evaluated in four approaches: least squares elements, minimum zone elements, maximum inscribed elements and minimum circumscribed elements. The calculation of minimum zone element, maximum inscribed element and minimum circumscribed element is not smoothly differentiable, thus very difficult to be solved. In this article, a unified method is presented to evaluate the form errors of spheres, cylinders and cones in the sense of minimum zone element, maximum inscribed element and minimum circumscribed element. The primal–dual interior point method is adopted to solve this non-linearly constrained optimisation problem. The solution is recursively updated by arc search until the Karush–Kuhn–Tucker conditions are satisfied. Some benchmark data are employed to demonstrate the validity and superiority of this method. Numerical experiments show that this optimisation algorithm is computationally efficient and its global convergence can be guaranteed.