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
    • Recent
    • Tags
    • Users
    • Login

    Spline with multiple segments

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 386 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 12/07/2014 at 11:39, xxxxxxxx wrote:

      Hi
      I need some help. I try to build my own Point Treacer but i can only set 1  segment .
      Hope someone can help me.

      Download https://www.dropbox.com/s/ikvjq1tin873lm0/treacer.c4d

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

        On 12/07/2014 at 15:11, xxxxxxxx wrote:

        A simplified Version:
        import c4d
        from c4d import utils

        def main() :

        #create spline
          tmp = c4d.SplineObject(6, c4d.SPLINETYPE_AKIMA)
          tmp.ResizeObject(6, 2)
          tmp.SetSegment(0, 3, False)
          tmp.SetPoint(0, c4d.Vector(0,12,0))
          tmp.SetPoint(1, c4d.Vector(0,120,80))
          tmp.SetPoint(2, c4d.Vector(0,20,70))
          tmp.SetSegment(1, 3, False)
          tmp.SetPoint(0, c4d.Vector(23,0,0))
          tmp.SetPoint(1, c4d.Vector(0,30,80))
          tmp.SetPoint(2, c4d.Vector(0,200,70))

        #create container
          container = c4d.BaseObject(c4d.Onull)
          tmp.InsertUnder(container)

        return container

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

          On 13/07/2014 at 06:13, xxxxxxxx wrote:

          What about continuing the indices with 3, 4, 5 instead of 0, 1, 2 which you have already set? 🙂

          Best,
          -Niklas

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

            On 13/07/2014 at 06:53, xxxxxxxx wrote:

            thx 😲

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

              On 16/07/2014 at 12:07, xxxxxxxx wrote:

              I would really like to know how you got on with this as I have struggled a lot in the past to try and rebuild the tracer object. Thank you for your previous scene file, could you please post an updated one for us to learn from.
              Kind regards

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