Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Sweep Nurbs in SDK

    SDK Help
    0
    9
    690
    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

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

      On 31/05/2006 at 07:56, xxxxxxxx wrote:

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

      ---------
      Hi,
      Can anybody explain me how to use the Sweep Nurbs in the C4D SDK?
      Thank you.
       
      B->

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

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

        On 03/06/2006 at 23:30, xxxxxxxx wrote:

        You use them just like in the main application: create a Sweep NURBS and put at least two splines in it. To do this you need to use BaseObject::Alloc() and BaseDocument::InsertObject(), and some functions to create the splines. It might be easier to help you if you describe more completely what you want to do.

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

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

          On 05/06/2006 at 23:26, xxxxxxxx wrote:

          Hi,
          Need some advice/support here.  Trying to develop a simple plugin that will duplicate an existing cube along a "Circle" spline.  I used the below code.  The Duplicate works giving me the Cube copies, however the Duplicate Mode-Along Spline does not.  So I end up with copies on the same location.  Am I using the correct method/parameters? 
             var doc = GetActiveDocument();
             var bc = new(BaseContainer);
             var obj = doc->FindObject("Cube");
             bc->SetData(MDATA_DUPLICATE_COPIES, 8);
             bc->SetData(MDATA_ARRANGE_MODE_ALONGSPLINE, true);
             bc->SetData(MDATA_ARRANGE_SPLINE_PERSTEP, true);
             bc->SetData(MDATA_ARRANGE_SPLINE_USE_MOVE, true);
             bc->SetData(MDATA_ARRANGE_SPLINE_LINK, "Circle");
             bc->SetData(MDATA_ARRANGE_SPLINE_STARTPOS, 0);
             bc->SetData(MDATA_ARRANGE_SPLINE_ENDPOS,100);
             bc->SetData(MDATA_ARRANGE_SPLINE_USE_ROTATION, true);
             bc->SetData(MDATA_ARRANGE_SPLINE_ALIGNTANGENTIAL, "+Z");
             var result = SendModelingCommand(ID_MODELING_DUPLICATE_TOOL,doc,obj,bc,MODIFY_ALL);
          Thank you.

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

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

            On 06/06/2006 at 00:44, xxxxxxxx wrote:

            Thank you,
             
            The Sweep NURBS works fine now.
            What we wanted to do is to simulate a river that follow a river's bed
            on a custom fractal terrain generator plugin 😉

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

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

              On 09/06/2006 at 08:35, xxxxxxxx wrote:

              Hi,
              About the DUPLICATE/ARRANGE commands, 8 copies is only to try out the code.  I am looking at more than 80 copies.  🙂
              Can someone help me or give me some advice?
              Thanks.
              ________
              wengkit

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

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

                On 15/06/2006 at 22:55, xxxxxxxx wrote:

                Use:

                    
                    
                    bc->Set **Object** (MDATA_ARRANGE_SPLINE_LINK, circleObject);
                

                Setting the name directly like you did won't work. You can find circleObject by doc->FindObject("circle"). Btw, this looks like C.O.F.F.E.E., not C++?!

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

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

                  On 17/06/2006 at 07:27, xxxxxxxx wrote:

                  Hi Mikael,
                  Thanks for your advice.  Based on that, I used:
                  > var circleObject = doc->FindObject("Circle");
                  >
                  > bc->SetObject(MDATA_ARRANGE_SPLINE_LINK, circleObject);
                  >
                  before calling the SendModelingCommand() API as per my earlier post on 05 June.  However, it still did not work.  Could not get the Cube copies on the spline.  Any idea?
                  Many thanks.
                   
                  -------------
                  wengkit

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

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

                    On 27/06/2006 at 03:39, xxxxxxxx wrote:

                    Sorry for not testing your code. There were some other errors. This is a working example:

                        
                        
                           var bc = new(BaseContainer);  
                           var obj = doc->FindObject("Cube");
                        
                        
                        
                        
                           var circleObject = doc->FindObject("Circle");   
                           bc->SetData(MDATA_DUPLICATE_COPIES, 8);  
                           bc->SetData(MDATA_ARRANGE_MODE, MDATA_ARRANGE_MODE_ALONGSPLINE);  
                           bc->SetData(MDATA_ARRANGE_SPLINE_PERSTEP, true);  
                           bc->SetData(MDATA_ARRANGE_SPLINE_USE_MOVE, true);  
                           bc->SetData(MDATA_ARRANGE_SPLINE_USE_MOVE_X, true);  
                           bc->SetData(MDATA_ARRANGE_SPLINE_USE_MOVE_Y, true);  
                           bc->SetData(MDATA_ARRANGE_SPLINE_USE_MOVE_Z, true);  
                           bc->SetObject(MDATA_ARRANGE_SPLINE_LINK, circleObject);  
                           bc->SetData(MDATA_ARRANGE_SPLINE_STARTPOS, 0.0);  
                           bc->SetData(MDATA_ARRANGE_SPLINE_ENDPOS, 1.0);  
                           bc->SetData(MDATA_ARRANGE_SPLINE_USE_ROTATION, true);  
                           bc->SetData(MDATA_ARRANGE_SPLINE_ALIGNTANGENTIAL, MDATA_ARRANGE_SPLINE_ALIGNTANGENTIAL_Z);  
                           var result = SendModelingCommand(ID_MODELING_DUPLICATE_TOOL,doc,obj,bc,MODIFY_ALL);
                    

                    I suggest that you look at toolarrange.res to see where I found the correct constants to use. Also PERCENT = 0.0 to 1.0.

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

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

                      On 28/06/2006 at 23:53, xxxxxxxx wrote:

                      Hi Mikael,
                      Thanks for your reply, it is a great help.  Your suggestion has open some very useful 'doors' to a newbie like me. 
                      ------------------
                      wengkit

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