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

    ID_MODELING_WELD_TOOL in c++

    SDK Help
    0
    4
    493
    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

      On 07/09/2017 at 02:14, xxxxxxxx wrote:

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

      ---------
      hello everybody
      i do som test white sendmodeling command in python to weld tow points , it works fin , but in c++ its not work , 
       the question is ! how it work in c++

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

        On 08/09/2017 at 06:27, xxxxxxxx wrote:

        Hi,

        as this sounds more like an issue with C++ than SendModelingCommand() parameters, I'd say have a look at the code snippets on SendModelingCommand(). If this doesn't help, please provide us with a small code snippet and some details about the actual problem.

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

          On 09/09/2017 at 02:37, xxxxxxxx wrote:

          the Sendmodeling Command()move the tow point in the same position but doesn't welded together!!

          BaseSelect *Ps_Point =   P_res->GetPointS();
          cd.mode = MODELINGCOMMANDMODE_POINTSELECTION;
          cd.op = res;

          cd.bc = &seting;
          seting.SetBool(MDATA_WELD_TOPOINT, true);
                      
              if (LA == min_a )
                      {
                          Ps_Point->Select(PointCount +n);
                          seting.SetVector(MDATA_WELD_POINT, va);
                          SendModelingCommand(ID_MODELING_WELD_TOOL, cd);
                          Ps_Point->DeselectAll();
                      }
                      
                  if (LB == min_b )
                      {
                          Ps_Point->Select(PointCount +n);
                          seting.SetVector(MDATA_WELD_POINT, vb);
                          SendModelingCommand(ID_MODELING_WELD_TOOL, cd);
                          Ps_Point->DeselectAll();
                      }

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

            On 11/09/2017 at 09:57, xxxxxxxx wrote:

            Hi,

            I'm having some difficulties with your snippet, as I can't see the initialization/value of a bunch of variables used in there. The Select() call certainly looks strange to me, assuming that PointCount is the number of points of the object, it looks as if you are selecting "behind" the object.

            Maybe also this thread helps, where Riccardo discusses the weld command. While his snippets are in Python, don't worry, the Python layer uses the C++ version internally, so if it works in ?Python it works in C++ as well.

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