Fix getting line distance as coordinate
Fix getting line distance as coordinate

Line distance is a coordinate (difference) type, so don't get it as an index.

Contributes to issue CURA-4410.

Ultimaker/CuraEngine,Ultimaker/CuraEngine