TPolyline3::DistanceSquared

Calculate the squared distance from a point to the polyline