SOLVED GetSplineLength() is failing?

hi,

I have this code below and get different results when using
SplineLengthData / GetLength or SplineHelp / GetSplineLength.

is there a know reason for this ?

best, index

sld = c4d.utils.SplineLengthData()
sld.Init(path)
length = sld.GetLength()
sld.Free()
# --> length = 114.149518217

sh = c4d.utils.SplineHelp()
sh.InitSplineWith(path, c4d.SPLINEHELPFLAGS_USERDEFORMERS)
length = sh.GetSplineLength()
sh.FreeSpline()
# --> length = 0.0

hm, i tried to make an example, but now it worked as expected.
I will post an example, if i run into that again

ps. no multiple segments

Hi,

Could you provide a way to reproduce it?
I've been trying this with a simple spline i draw with the spline pen. The length are not the same but none return 0.0. (One is the spline length, the other the lineObject representing it)

Are you using multiple segments?

Cheers,
Manuel

hm, i tried to make an example, but now it worked as expected.
I will post an example, if i run into that again

ps. no multiple segments

... by the way ...
Do I have to re-init c4d.utils.SplineLengthData or c4d.utils.SplineHelp
if I insert or change points in a Spline ?
and ...
I miss a bit clarity in the documentation. Stupid questions maybe,
but what is a LineObject, and what are Segments exactly?
is that documented somewhere?
The SDK says nothing about such things.
The Manual neither.

Hi,

Spline Segment are explained in the Cinema 4D documentation

About the initialisation, if you just move the point that should work but i would recommend to init again SplineLengthData.
if you add a point, you need to initialize the SplineLengthData again.

Cheers,
Manuel