C++ AddShape expects Mat(4x4) as vertices (3xN)- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: C++ AddShape expects Mat(4x4) as vertices (3xN) (/Thread-C-AddShape-expects-Mat-4x4-as-vertices-3xN) |
C++ AddShape expects Mat(4x4) as vertices (3xN)-mFarzanehkaloorazi-07-30-2019 Hi, I could get this to work with Python, but as far as I understood, in C++ something is wrong. Look at AddShape API: Quote: Item RoboDK:: AddShape(Mat*trianglePoints,Item*addTo,boolshapeOverride,Color*color)trianglePoints=Listofverticesgroupedbytriangles(3xNor6xNmatrix,Nmustbemultipleof3becauseverticesmustbestackedbygroupsof3) However, Mat is only a 4x4 matrix class! Quote: classROBODKMat:publicQMatrix4x4 How can I use AddShape in C++? What type of value do I need to pass in? RE: C++ AddShape expects Mat(4x4) as vertices (3xN)-Albert-08-19-2019 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. RE: C++ AddShape expects Mat(4x4) as vertices (3xN)-mFarzanehkaloorazi-09-20-2019 (08-19-2019, 11:11 PM)Albert Wrote:This issue has been fixed with the latest version of RoboDK and the plugin interface here: 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”
RE: C++ AddShape expects Mat(4x4) as vertices (3xN)-Albert-09-24-2019 I just realized that you were talking about the C++ API and not the C++ plugin interface. This is now solved and possible with both. The latest version of the RoboDK API for C++ is available here.: https://github.com/RoboDK/RoboDK-API/tree/master/C++ I tested the sample you provided and it works. |