Algorithm for Solving the Distance of Planar Line Segments Based on Local Coordinate System
-
Graphical Abstract
-
Abstract
Aiming at the lack of high-speed and high-precision planar line segment distance solving algorithms in the existing CAD geometry engine and VLSI design, we propose a planar line segment distance solving algorithm based on local coordinate system. First, a local coordinate system is established by coordinate transformation; then, according to the relative position relationship between two line segments, the planar line segment distance solving is classified into 12 kinds of nearest point solving cases; finally, the planar line segment distance is solved by computing the distance of the nearest points. The experiments are carried out with PCB line segments data and randomly generated line segments data, and the experiment results show that the algorithm is 23% to 35% more efficient than the compared algorithms. Moreover, the algorithm can still control the computational error in four critical cases, which proves its effectiveness.
-
-