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

    Cannot get correct point values on spline

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 227 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 14/10/2006 at 10:11, xxxxxxxx wrote:

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

      ---------
      Hi,
      Ive come into a really strange problem

          
          
          
          
          SplineObject *spline = static_cast<SplineObject*>(doc->GetActiveObject());
          
          
          
          
          Vector *points = spline->GetPoint();
          
          
          
          
          Vector p = Vector(0);
          
          
          
          
          p = points[1];
          
          
          
          
          Vector u = !p;
          
          
          
      

      If I create a default Circle Primitive, make it editable (and leave it at its default location)
      then I run the above code.
      In Cinema 4D, the second point on the spline is at location <0, 200, 0>. Cinema 4D reports this and you can clearly see it too.
      When I attempt to use the coe above, the resulting vector is <1.22, 200, 0> and its unit vector is <6.0, 1.0, 0>
      Why is this? How is it even possible to have a unit vector with a 6 on the x?
      Ive been staring at this for the past hour now, and I can't see whats wrong

      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 16/10/2006 at 02:55, xxxxxxxx wrote:

        It works without a problem here. My code:

          
        SplineObject *spline = static_cast<SplineObject*>(doc->GetActiveObject());  
          
        Vector *points = spline->GetPoint();  
          
        Vector p = Vector(0);  
          
        p = points[1];  
               
        Vector u = !p;  
          
        GePrint( RealToString(p.x) + " " + RealToString(p.y) + " " + RealToString(p.z) );  
        GePrint( RealToString(u.x) + " " + RealToString(u.y) + " " + RealToString(u.z) );  
        

        cheers,
        Matthias

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