Trim Polyline to Intersection Point (2-D)

(1) Identification of the polyline
(2) Intersection points