snapPointsToLines2 function

Snap points to lines