Fix off-by-one error in marking segment index of intersection
Fix off-by-one error in marking segment index of intersection

If the direction is backwards, the previous point is actually the segment index that is beyond the found point. This results in some errors later down the line. We want the segment index, so the index of the segment that the point is on, regardless of which direction was being walked while the point was found.

Contributes to issue CURA-7828.

Ultimaker/CuraEngine,Ultimaker/CuraEngine