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

    distribute between certain points of a spline

    SDK Help
    0
    5
    432
    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 26/04/2013 at 12:23, xxxxxxxx wrote:

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

      ---------
      hi there, can someone roughly tell me how i can distribute a bunch of objects between point A and point B of a spline? i know how to place objects along a spline using GetSplinePoint and i know how to get the position of the editable points of a spline by using static_cast<PointObject*>(spline)->GetPointW(). but how do i get the part of a spline between two edit points? for linear spline it shouldnt be a problem to calculate distributed positions but how do i do it by using the spline part between two of its edit points?

      hope this makes sense?Confused

      cheers,
      Ello

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

        On 26/04/2013 at 13:15, xxxxxxxx wrote:

        have you looked into splinehelp ? the sampling methods provided there offer a uniform position
        offset parameter called realoffset, which might be what you are looking for.

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

          On 27/04/2013 at 00:15, xxxxxxxx wrote:

          yes, i have looked into spline help, but i dont really understand which to use, for example i want to get the part of a spline between point 2 and 3, and after that i want to be able to get points similar to using GetSplinePoint...

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

            On 27/04/2013 at 02:13, xxxxxxxx wrote:

            well you could calculate your distribution for a linear spline and then convert these
            none uniform offsets with one of the splinehelp methods into your needed vectors.
            i am not 100% sure what non uniform offsets are meant for, but from my experiences
            with splinehelp and the sdk, they are meant for that scenario.

            an alternative route you could take would be the underlying lineobject. convert your
            spline indices into line indices. then search or interpolate your desired points between 
            these both line indices.

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

              On 27/04/2013 at 02:28, xxxxxxxx wrote:

              ok, thanks so far for your input. i'll investigate those 🙂

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