Flow/Sporph Curve (Convert from 3D to 2D)

Hei, Iam trying to sporph the controlline of the bridge in order to create 2D curve on XY plane.

Why the 2D curve endpoint’s x value Is not equal to the projected 3D curve length. It should be at least. is there something wrong in my code?

Here is my code: NÄKINSILTA.3dm (8.2 MB)
NÄKINSILTA 4.gh (244.5 KB)