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

    Changing the number of points of a spline

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 407 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 09/03/2006 at 05:45, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.x 
      Platform:      Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      I already have a spline object in my document. Now, I would like to be able to add it or subtract it points (no matter their positions, that is already solved). So, for example, the spline has 5 control points but I would like to be able to change that at will, making it have, lets say 3 or 10 points, using COFFEE, of course. Possible? If yes, how?
      Thank you in advance for any help.

      Rui Batista

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 09/03/2006 at 06:06, xxxxxxxx wrote:

        You can try MCOMMAND_SPLINE_ROUND with a SendModelingCommand()
        -Sneaker

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 09/03/2006 at 08:14, xxxxxxxx wrote:

          Thank you, Sneaker. It seems to work when I do it manually. But, when I try to code it in COFFEE, it can't pass the second line:

          bc=new(BaseContainer);
          bc->SetData(MDATA_SPLINE_ROUNDPOINTS,n_points);
          bc->SetData(MDATA_SPLINE_ROUNDTYPE,1);

          It tells me that "variable of function expected" at the place I have the n_points variable typed. It doesn't even work when I try to set it to a constant, like 10 or 20.
          What could be wrong with such a simple code?

          Rui Batista

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 09/03/2006 at 14:05, xxxxxxxx wrote:

            There seems to be some missing constants.
            That code worked here
            bc->SetData(2015,99);
            bc->SetData(2016,0);
            SendModelingCommand(450000039,doc,op,bc,MODIFY_POINTSELECTION);
            I found the values in coffeesymbols.h (ID_MODELING_SPLINE_ROUND_TOOL=450000039,)
            and in toolsplineround.h
            Don't ask me how I found that, but I'm quit good in guessing without understanding too much about that all ;o).
            Edit:
            Oh, yes and the minimum points seem to be 3.
            hey, I'm glad I could help. You don't know how much I learned already from your tutorials and files.

            all the best,
            -Sneaker

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 10/03/2006 at 18:41, xxxxxxxx wrote:

              Thank you VERY MUCH, Sneaker.
              It worked fine!! 🙂

              Rui Batista

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