Percentage offsets of interpolation points



  • On 31/10/2013 at 17:56, xxxxxxxx wrote:

    Hello everybody,

    i´ve rummaged in the SDK for a while, but i wasnt able to find what i was looking for. So just a little question: Is it or how is it possible to get the percentage offsets of the interpolation points of a spline?

    Hope anyone can help.

    Greeting
    rown



  • On 01/11/2013 at 09:57, xxxxxxxx wrote:

    Hi rown,

    In C++, you could use SplineHelp::GetLinePointSegment(), but since it is not available in Python, you can

    1. either get the internal line object (using GetCache() on the spline) and search for the closest point to your point, then compare the traversed length with the full length of the line object
    2. or do a march along the original spline with an appropriate interval and use GetSplinePoint() to get closer to your original point.

    Best,
    -Niklas


Log in to reply