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

    Knife Tool

    SDK Help
    0
    3
    484
    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 21/02/2003 at 02:11, xxxxxxxx wrote:

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

      ---------
      Hi,
      I am trying to knife a cube (300,300,300).
      From SendModelingCommand I came to know that, we have to pass P1, P2, V1 and V2 to use knife tool.
      I am clear about P1 and P2, but from COFFEE help i am not getting the clear picture about V1 and V2. ie. Ray tracing vector. Can anybody explain me about this?
      I used the following code: I am trying to knife the cube in horizontal way...

          
          
          
          
          obj = GetActiveObject(doc);
          
          
          
          
          con = obj->GetContainer();
          
          
          
          
          con->SetData(MDATA_KNIFE_P1, vector(-200,0,0));
          
          
          
          
          con->SetData(MDATA_KNIFE_V1, ????);
          
          
          
          
          con->SetData(MDATA_KNIFE_P2, vector(200,0,0));
          
          
          
          
          con->SetData(MDATA_KNIFE_V2, ????);
          
          
          
          
          obj->SetContainer(con);
          
          
          
          
          SendModelingCommand(MCOMMAND_KNIFE, doc, obj, con, MODIFY_ALL);
          
          
          
      

      What should I use for V1 and V2?

      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 21/02/2003 at 05:38, xxxxxxxx wrote:

        you cannot use the knife for it is an interactive command. You can let the user then use the knife but you cannot use it through your code. So you have to handle the subdivision yourself.
        Best
        samir

        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 22/02/2003 at 23:54, xxxxxxxx wrote:

          V1 and V2 are projection vectors for P1 and P2. They should point into the screen from where you are looking. (With just a single line between P1 and P2, C4D could not know where the cut should be done.)
          The knife can be used non-interactively with the P1, P2, V1 and V2 parameters, afaik.

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