Advanced sensing technologies have produced a significant amount of discrete point data in the past decade. Measurement uncertainty frequently occurs at the geometric discontinuity of mechanical parts. In this paper, a genetic search algorithm is developed for optimally-constrained multiple-line fitting of discrete data points. It contains two important technical components: (a) constrained least-squares fitting of multiple lines, and (b) genetic search for optimal corner/edge points. The algorithm is designed for both two-dimensional and three-dimensional cases. Numerical experiments demonstrate the effectiveness of the proposed approach, compared to the conventional least-squares fitting method as well as exhaustive search method. A comparative study with a particle swarm method indicates that both the genetic search and particle swarm search produce similar results in terms of minimum fitting errors. It can be used for the effective determination of sharp edges or corners based on discrete data points measured for high-precision industrial inspection and manufacturing. direction numbers of a line in a three-dimensional space binary numbers for a chromosome cognitive and social parameters decimal value corresponding to binary bits the shortest distance of the ith data point and the fitting line fitness function in two-dimensional cases fitness function in three-dimensional cases the fitness value of the ith candidate corner, mean and maximum fitness the probability of crossover the probability of mutation the position of the globally-best individual the best previous position of the ith particle random numbers that are uniformly distributed within a range [0,0.2] the kth position of the ith particle in 2D The kth position of the ith particle in 3D the coordination of the ith data point in a three-dimension space The coordination of start point for genetic search orthogonal projection of data points to fitted lines the real increment in a given genetic search the coordination of candidate constrained corner the size of genetic search in three coordinate directions the coordinates of the point passed by a line the coordinates of any point in a three-dimension space the kth velocity of the ith particle inertial weight the coefficients of a line equation in two and three dimensions the sum of squared coordinate difference in x coordinate between data points and their corresponding points on the fitted line the sum of squared coordinate difference in y coordinate between data points and their corresponding points on the fitted line the gradient of E(A, B) the gradient of E(C, D) standard deviation of data points 
Genetic search for optimally-constrained multiple-line fitting of discrete data points