Hi rownn, thanks for following up.
Can you elaborate more on I wasnt able to get the "customlength" by offset.?
Actually looking at your screenshot and assuming that the red-labelled refers to what you actually consider "wrong" and the green-labelled to the right, I think that the red-labelled is indeed correct since it actually lies in the middle of spline considering that the start point is the top/right vertex.
At the same time, the green-labelled point is the one that you can obtain when passing 0.5 to SplineHelp::GetPosition() which is the 50% of the spline parametrization not of the spline length.
Assuming a linear rectangle is used as shown above the code below shows the behavior I describe:
def main():
sh = c4d.utils.SplineHelp()
sh.InitSpline(op)
splineLength = sh.GetSplineLength()
halfLength = splineLength / 2
midPointOffsetIncorrect = halfLength / splineLength
midPointOffsetFromReal = sh.GetOffsetFromReal(midPointOffsetIncorrect,0)
midPointOffsetFromUnit = sh.GetOffsetFromUnit(halfLength,0)
mtx = c4d.Matrix()
midpointRed = sh.GetPosition(midPointOffsetFromUnit) # which in this case is the same of offsetFromReal
midNullRed = c4d.BaseObject(c4d.Onull)
midNullRed[c4d.ID_BASEOBJECT_USECOLOR] = 2
midNullRed[c4d.ID_BASEOBJECT_COLOR] = c4d.Vector(1,0,0)
midNullRed[c4d.ID_BASELIST_NAME] = "MidRed"
mtx.off = midpointRed
midNullRed.SetMg(mtx)
midpointGreen = sh.GetPosition(midPointOffsetIncorrect)
midNullGreen = c4d.BaseObject(c4d.Onull)
midNullGreen[c4d.ID_BASEOBJECT_USECOLOR] = 2
midNullGreen[c4d.ID_BASEOBJECT_COLOR] = c4d.Vector(0,1,0)
midNullGreen[c4d.ID_BASELIST_NAME] = "MidGreen"
mtx.off = midpointGreen
midNullGreen.SetMg(mtx)
doc.InsertObject(midNullRed)
doc.InsertObject(midNullGreen)
c4d.EventAdd()
Best, Riccardo