Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    LineObject in Python

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 562 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post