c4d.utils.SplineLengthData

class c4d.utils.SplineLengthData

Methods Signatures

SplineLengthData.__init__()

SplineLengthData.Init()

Initialize the spline length data object with a spline.

SplineLengthData.Free()

Called to free the spline.

SplineLengthData.UniformToNatural()

Get the natural position along the spline.

SplineLengthData.GetLength()

Returns the length of the spline data object.

SplineLengthData.GetSegmentLength()

Get the length of the segment.

Methods Documentation

SplineLengthData.__init__(self)
SplineLengthData.Init(self, op, segment)

Initialize the spline length data object with a spline.

Parameters
  • op (c4d.SplineObject) – The spline object to use.

  • segment (int) – The segment of the spline.

Raises

IndexError – If the segment index is out of range : 0<=segment<SplineObject.GetSegmentCount().

SplineLengthData.Free(self)

Called to free the spline.

SplineLengthData.UniformToNatural(self, t)
Get the natural position along the spline.
The uniform position is with respect to the actual length of the spline, whereas the natural position only cares about the interpolation of the curve parameter.
Parameters

t (float) – The uniform position along the spline.

Return type

float

Returns

The natural position in the segment.

SplineLengthData.GetLength(self)

Returns the length of the spline data object.

Return type

float

Returns

The length.

SplineLengthData.GetSegmentLength(self, a, b)

Get the length of the segment.

Parameters
  • a (int) – Start of the segment.

  • b (int) – End of the segment.