Select lines and entget 1st line, search the rest of lines and compare their unit vector with unit vector from 1st line... If unit vectors are the same or opposite then compare distances of vector from 1st line and 2nd line... If one distance is smaller then entdel smaller line, then compare distances of 1st line and 3rd line (entdel smaller line)... Proceed to next loop to search next pair of lines with the same or opposite unit vectors... Loop until all unit vectors are different...