LineObject in Python



  • On 11/12/2017 at 03:50, xxxxxxxx wrote:

    Hi,

    I need to define positions along a LineObject and get their relative position / parameter on the complete spline.

    In C++, I can easily get those with CLine* LineObject::GetLineR(). In Python, there seem to exist neither the CLine struct nor the GetLineR method. So how can I achieve the same thing in Python? What is the LineObject good for in Python if I can't get any lines from it?

    Thanks for any heads up,
    Frank



  • On 12/12/2017 at 02:51, xxxxxxxx wrote:

    Hi Frank,

    LineObject.GetLineR() is missing in the Python API but there's another way to get line data in Python.

    C++ API LineObject::GetLineR() just retrieves line tag data from an object.
    The Python API provides the convenience function VariableTag.GetAllHighlevelData() to retrieve data from a tag. The function supports tangent, line, segment, normal, etc.

    Note the line data is given as a list of dictionary with pos and t keys so the info from each CLine is returned.



  • On 13/12/2017 at 03:09, xxxxxxxx wrote:

    Ah, that sounds useful, thanks!

    I'll try that!

    And it sure would be cool if that was mentioned in the Python SDK documentation ;-)

    Cheers,
    Frank



  • On 13/12/2017 at 07:21, xxxxxxxx wrote:

    Hi Frank,

    I'll add a note to LineObject docs explaining how to retrieve the line data.
    Note the solution is the same to obtain the segment data as well.


Log in to reply