-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrapping external library #56
Comments
If I understand you correctly, then you are trying to bind the ...
#include "nbind/nbind.h"
// as you are inheriting from Geom_CartesianPoint, you have to bind to it, too
NBIND_CLASS(Geom_CartesianPoint) {
method(SetX); // I would bind SetX here
}
NBIND_CLASS(Point){ // leave out Geom_CartesianPoint here, the next line already takes care of proper inheritance
inherit(Geom_CartesianPoint);
construct<Standard_Real, Standard_Real, Standard_Real>();
construct<gp_Pnt>();
} I am not 100% sure where to bind the |
Thanks, i will give it a try! |
Hi, In the above code does the Gem_Point and Gem_CartesianPoint headers files need to be bounded as well? Or can I just write a binding file like above which uses them directly? |
Hi, |
Oh alright. Apologies for my ignorance. I'm really new to C++ and I'm trying to use ITK in electron. |
@SevenSinS02 you can give a shot at https://www.npmjs.com/package/node-itk. |
Ah thank you @parro-it. However, that is a private repo. I wanted to know if partial binding was possible. Like bind some classes using nbind and leaving the rest as it is. |
It should be possible, try use NBIND_CLASS just on the classes you need to use on js side... |
Ok cool. Let me try it and see if that works. Thanks a bunch @parro-it and @subwaystation. |
Not sure if this is an issue or just a newbie question, but im testing nbind to see if i can use it for my wrapper project. I tried following the example for wrapping the 'vg' library but i get some errors, not sure if they are due to the implementation of the library im trying to wrap or something missing in nbind or my own incompetence.
This is my code:
when i compile i get an error when i try to wrap the inherited method
SetX
the documentation for the Geom_CartesianPoint is here:
https://www.opencascade.com/doc/occt-6.9.1/refman/html/class_geom___cartesian_point.html
Anything im doing wrong here?
any help would be greatly appreciated
The text was updated successfully, but these errors were encountered: