This paper presents a unified framework for computing a surface to approximate a target shape defined by discrete data points. A signed point-to-surface distance function is defined, and its properties are investigated, especially, its second-order Taylor approximant is derived. The intercorrelations between the signed and the squared distance functions are clarified, and it is demonstrated that the squared distance function studied in the previous works is just the Type I squared distance function deduced from the signed distance function. It is also shown that surface approximations under different criteria and constraints can all be formulated as optimization problems with specified requirements on the residual errors represented by the signed distance functions, and that classical numerical optimization algorithms can be directly applied to solve them since the derivatives of the involved objective functions and constraint functions are all available. Examples of global cutter position optimization for flank milling of ruled surface with a cylindrical tool, which requires approximating the tool envelope surface to the point cloud on the design surface following the minimum zone criterion, are given to confirm the validity of the proposed approach.