Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

ID_MODELING_WELD_TOOL in c++

 Post Reply Post Reply
Author
Message
moh View Drop Down
Member
Member
Avatar

Joined: 2012 Jan 19
Location: France
Online Status: Offline
Posts: 4
Post Options Post Options   Quote moh Quote  Post ReplyReply Direct Link To This Post Topic: ID_MODELING_WELD_TOOL in c++
    Posted: 2017 Sep 07 at 2:14am

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++
Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1482
Post Options Post Options   Quote Andreas Block Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Sep 08 at 6:27am
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.

Cheers,
Andreas
SDK Support Engineer
Back to Top
moh View Drop Down
Member
Member
Avatar

Joined: 2012 Jan 19
Location: France
Online Status: Offline
Posts: 4
Post Options Post Options   Quote moh Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Sep 09 at 2:37am

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

            }


Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1482
Post Options Post Options   Quote Andreas Block Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Sep 11 at 9:57am
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.

Cheers,
Andreas
SDK Support Engineer
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.