Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

C++ AddShape expects Mat(4x4) as vertices (3xN)

#3
(08-19-2019, 11:11 PM)Albert Wrote:This issue has been fixed with the latest version of RoboDK and the plugin interface here:
https://github.com/RoboDK/Plug-In-Interface

You should use the tMatrix2D type to provide your shapes to RoboDK.

Hi Albert,

Thank you for your answer.

Would it be possible to fix this in RoboDK_api.ccp/h ?

I am not using plugins and want to use the API. I checked on Github and it is still the same as before atRoboDK-API/C++/robodk_api.cpp.

Basically I want to get something as simple as following to work:

Code:
# include“robodk_api.h”

int main(int argc, char *argv[])
{

RoboDK_API::RoboDK *RDK1 = NULL;
RDK1 = new RoboDK_API::RoboDK("",-1);

RoboDK_API::Item *partReference;
partReference = new RoboDK_API::Item(RDK1->getItem("Frame 1"));

double a[]={10,2,3,50,60,70,800,999,888};
RoboDK_API::tMatrix2D *mat2d = RoboDK_API::Matrix2D_Create();
Matrix2D_Set_Size(mat2d, 3, 3);
mat2d->data = a;

RoboDK_API::Color color; color.a = 1; color.g = 1; color.b = 1; color.r = 1;

RoboDK_API::Item body = RDK1->AddShape(mat2d, partReference, false, &color);

RDK1->CloseRoboDK();

return 0;
}


Messages In This Thread
RE: C++ AddShape expects Mat(4x4) as vertices (3xN) - bymFarzanehkaloorazi- 09-20-2019, 05:04 PM



Users browsing this thread:
1 Guest(s)