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

    SplineHelp class [SOLVED]

    SDK Help
    0
    3
    268
    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
      Helper
      last edited by

      On 06/05/2015 at 08:42, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R14 
      Platform:      
      Language(s) :     C++  ;

      ---------
      I have a problem using the SplineHelp class. What I want is to get the distance a point in the spline is along the full length of the spline. What I'm doing is this:

        
      sh->GetLinePointSegment(j, &offset;, &ind;, &segment;);   
      

      Where 'sh' is an initialised SplineHelp and 'j' is the index of a point in the spline, from 0 to GetPointCount() - 1.

      Now, suppose I have a spline with one segment and 3 points, at equal distance from each other. What I'd _expect_ to see is that point 0 returns an offset of 0.0 (because it's the start of the spline), point 1 returns 0.5 (halfway along) and point 2 returns 1.0 (the end of the spline).

      What I actually see are values of 0.0, 0.333, and 0.667. So, either I am not using this function correctly or there's a problem with it. Either way, does anyone know how to find out how 'far' along a spline a point is located?

      Steve

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

        On 06/05/2015 at 10:57, xxxxxxxx wrote:

        Recently discussed: https://plugincafe.maxon.net/topic/8467/11050_splinehelp-unexpected-results-solved

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

          On 06/05/2015 at 12:50, xxxxxxxx wrote:

          Well so it was! Don't know how I missed that, searched here but not for the specific function or I'd have seen it

          Thanks very much for the link!

          Steve

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