Is there any way we can get the shape-healing functionality exposed in the nglib API?
I'm using nglib to load a CAD geometry in IGES format and generate surface mesh. I want to heal the geometry before generating the mesh but I do not find any healing functions in nglib.h. I tried to dig through the nglib source code and found that OCCGeometry has a healing function called HealGeometry(). But I'm not able to create an object of type OCCGeometry since it generates the compilation error "Undefined symbols: vtable for NetgenGeometry referenced from…" and "vtable for OCCGeometry referenced from…".
Can someone tell me how to create an instance of OCCGeometry in my code?
If you look at nglib's code, the Ng_OCC_Geometry pointer you obtain when you call, say, Ng_OCC_Load_BREP() is no more than a void pointer to an OCCGeometry instance. Therefore, to have access to the OCCGeometry class interface, just cast the void pointer to an OCCGeometry pointer.
Something like this:
netgen::OCCGeometry* occgeom = reinterpret_cast<netgen::OCCGeometry*>(ngoccgeom);
Thank you. As you mentioned, I casted Ng_OCC_Geometry pointer to OCCGeometry and it is working fine. But I have one more question. To use healing, I have to add the dynamic library -locc to my project. Can I pack the library libocc.so along with a commercial software? Does it come under LGPL (like libnglib.so)?