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

    Knifing with python

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 367 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

      On 16/01/2013 at 14:20, xxxxxxxx wrote:

      Bonjour tout la monde,

      I found this post (over in the C arena), among others, on using the knife tool with smc, and I've spent a lot of time trying to figure it out in general with no joy.  I find myself asking, "Is it even possible?"

      Here's the simple bit I've been trying:

      data = c4d.BaseContainer()
          data.SetLong(1100, 3) ##Set mode to Plane
          data.SetBool(1115, 1) ##Set to Slice, for now, so I can figure out one thing at a time
          data.SetLong(1107, 2) ##Set plane to XZ
          
          objList = []
          objList.append(doc.GetFirstObject())      ##Temporary cube for testing
          c4d.utils.SendModelingCommand(244, objList, 0, data, doc, c4d.MODELINGCOMMANDFLAGS_CREATEUNDO)       ##244 = c4d.MCOMMAND_KNIFE
          
          c4d.EventAdd()

      No errors, just... nothing happens.  Anyone know how to/have ever successfully cut anything in any way whatsoever?  Really appreciate the help.

      ~Whithers

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

        On 16/01/2013 at 15:29, xxxxxxxx wrote:

        the knife tool requires mouse input in all modes, even for the plane-slice mode.
        as stated in the linked thread it is currently not possible to use the knife tool as
        a smc command, as it is not possible access/write the required data.

        Vector MDATA_KNIFE_P1;
        
        Vector MDATA_KNIFE_V1;
        
        Vector MDATA_KNIFE_P2;
        
        Vector MDATA_KNIFE_V2;
        
          
        
        
        >__Originally posted by xxxxxxxx__
        

        Originally posted by xxxxxxxx

        that i wasn't able to set the vectors for the knife tool is just a limitation

        of the knifetool ?

        I contacted the developers on this.

        and just as a advice - try not to use smc if you can avoid it in any way. it is more or less just one
        big bug.

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

          On 16/01/2013 at 16:10, xxxxxxxx wrote:

          Thanks, devil.

          I was hoping the Plane mode might lead to an exception.  Oh well, there's always another way.

          'Preciate ya.

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

            On 29/01/2013 at 07:25, xxxxxxxx wrote:

            Hi,

            It's possible to send a knife modeling command. I just posted a code example in the other thread.

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

              On 24/02/2013 at 13:49, xxxxxxxx wrote:

              Thanks Yannick!  That's awesome.

              Sorry I'm a bit late noticing you posted this, I had given it up for dead 🙂

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