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

    SplineObject

    SDK Help
    0
    8
    1.5k
    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 26/11/2002 at 00:30, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   7.303 
      Platform:   Windows  ; Mac  ;  
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi,
      I need help to create a spline object. I tried to create a spline as follows:
      var splobj = new(SplineObject);
      var ptarr = new(array,3); // Points for my spline path
      ptarr[0] = vector(0,0,0);
      ptarr[1] = vector(100,100,100);
      ptarr[2] = vector(200,200,200);
      splobj->SetPoints(ptarr);
      doc->InsertObject(splobj,NULL,NULL);
      GeEventAdd(REDRAW_ALL);

      But I cannot see any points as I specified. What is the problem?
      Attn: Forum Administrator
       I searched in archieved forum for this topic, but i am getting some error messages when I click the link "Next" from any message. This is for your kind attention. Thanks.

      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 26/11/2002 at 02:12, xxxxxxxx wrote:

        Have a look in here:
        <[URL-REMOVED]>
        It´s for polygonobjects but the same procedure


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        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/11/2002 at 01:37, xxxxxxxx wrote:

          Is there any tutorial for handling spline object? I feel difficult to handle.
          What is the difference between SetSegments() and SetTangents(). What is the difference between Segment Array and Tangent Array.

          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/11/2002 at 09:44, xxxxxxxx wrote:

            Segments are for multi-segmented splines, tangents are for Bezier splines. The format of these arrays are in the documentation. The update messages are completely analogous to the polygon object example (e.g. MSG_SEGMENTS_CHANGED). There's no MSG_TANGENTS_CHANGED since they are 1:1 to the points.

            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 29/11/2002 at 00:37, xxxxxxxx wrote:

              Still I couln't succeed in spline creation. _  _ I feel any sample code will be more useful. Can anybody help me? First time I am working with spline creation so confused bit.

              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 01/12/2002 at 02:07, xxxxxxxx wrote:

                Here's the simplest possible example:

                    
                    
                    NewSplineObject(pointCount)  
                    {  
                      if (pointCount < 0) return FALSE;  
                        
                      var newObject = new(SplineObject);  
                        
                      var pointArray = new(array, pointCount);
                    
                    
                    
                    
                      var i;  
                      for (i = 0; i < pointCount; ++i)  
                      {  
                        pointArray[i] = vector(0.0);  
                      }
                    
                    
                    
                    
                      newObject->SetPoints(pointArray);  
                        
                      var variableChanged = new(VariableChanged);  
                      var backupTags = new(BackupTags);  
                        
                      backupTags->Init(newObject);  
                      variableChanged->Init(0, pointCount);  
                      if (!newObject->Message(MSG_POINTS_CHANGED, variableChanged))  
                      {  
                        backupTags->Restore();  
                        return FALSE;  
                      }  
                        
                      newObject->Message(MSG_UPDATE);  
                      return newObject;  
                    }
                    
                    
                    
                    
                      
                    main()  
                    {  
                      var doc = GetActiveDocument();  
                      doc->InsertObject(NewSplineObject(16), NULL, NULL);  
                    }
                
                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/12/2002 at 17:27, xxxxxxxx wrote:

                  Thanks Mikael.

                  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 30/06/2003 at 07:16, xxxxxxxx wrote:

                    Quote: Originally posted by Mikael Sterner on 01 December 2002
                    >
                    > * * *
                    >
                    > Here's the simplest possible example:
                    >
                    > var pointArray = new(array, pointCount);
                    >
                    > var i;
                    > for (i = 0; i < pointCount; ++i)
                    > {
                    >     pointArray _= vector(0.0);
                    > }
                    >
                    > newObject- >SetPoints(pointArray);
                    >
                    >
                    >
                    >
                    >
                    >
                    > * * *

                    And how to initialize the position of the points during this process (for example, taking the points of another spline).

                    Sulian

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