ID_MODELING_WELD_TOOL in c++



  • 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++



  • 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.



  • 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();
                }



  • 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.


Log in to reply