I have this code below and get different results when using
SplineLengthData / GetLength or SplineHelp / GetSplineLength.
is there a know reason for this ?
sld = c4d.utils.SplineLengthData()
length = sld.GetLength()
# --> length = 114.149518217
sh = c4d.utils.SplineHelp()
length = sh.GetSplineLength()
# --> 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
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?
... 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 ?
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.
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.