Get Distance of control point along spline

With the 2d sprite shape package, how do I get the distance of a given control point reliably along the spline?

Yes I could try and best effort calculate it maybe from the auto generated edge collider, or the sprite shape renderer, but there are always edge cases where something is a problem, like points that cause the spline to go back and forth on top of itself (which breaks the calculations)

There doesn’t seem to be any publicly exposed way to do this? Am I missing something?

Tried manually recreating the spline with Cubic Bezier algorithm, but its a bit off, especially for the more complex bits. Does anyone know what algorithm is used for the sprite shapes?

Ah, never mind. ChatGPT made me realise I can use Unity Splines package

https://docs.unity3d.com/Packages/com.unity.splines@2.5/manual/index.html

I just map the sprite shape spline to a unity spline, and now I have full control and access to anything I want. Lovely.