c4d.utils.SplineLengthData

class c4d.utils.SplineLengthData

Overview

Lifecycle Management

SplineLengthData.Free()

Called to free the spline.

SplineLengthData.Init()

Initialize the spline length data object with a spline.

Magic Methods

SplineLengthData.__init__()

Spline Measurements

SplineLengthData.GetLength()

Returns the length of the spline data object.

SplineLengthData.GetSegmentLength()

Get the length of the segment.

SplineLengthData.UniformToNatural()

Get the natural position along the spline.

Members

Lifecycle Management

SplineLengthData.Free(self)

Called to free the spline.

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().

Magic Methods

SplineLengthData.__init__(self)

Spline Measurements

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.

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.