Don't mark endpoints of segment as belonging to segment
Don't mark endpoints of segment as belonging to segment

The segment includes its start point and the body of the segment, but if a point is on the last endpoint of a segment it should be marked as belonging to the next segment.

Contributes to issue CURA-7828.

Ultimaker/CuraEngine,Ultimaker/CuraEngine