For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

NetGen

Matthias Teich's picture
Forums: 

Hello,

searching this forum I noticed some of you seem to have experience with the net generator NetGen.
I am trying to use NetGen as a library for 2 days now, but I don't get it working.

NetGen itself compiles and runs fine.

To use it as a library I compiled NetGen as a static library and included it in visual studio. I also included nglib.h.
I thought there would be nothing more to do to be able to use it and any other step I made did not improve the situation. I still get Linker errors (unresolved symbols: nglib::NG_Init() )

I am not experienced with libraries so I do not know if there is anything more to do to use the lib?!

It would be very nice if someone could give me a hint on how to proceed...

Best Regards,
Matthias

Bearloga's picture

You can look how it is done in SALOME NETGENPLUGIN for MESH module.

Matthias Teich's picture

Good morning,

I should have mentioned that there is no problem with NetGen when I use Linux (Ubuntu).

But I need it in Visual Studio :(
Any help is highly appreciated.

Best Regards,
Matthias

Bearloga's picture

Does SALOME miss build procedures for Windows?

P Dolbey's picture

There is no "publicly" available version of Salome for Windows, either in source or binary. The reasons were posted on the Salome forum, but were removed by the moderators, and I will not reproduce them here.

Fotis has ported most of the GEOM core to Windoes and has also made a start on porting SMESH albeit on Borland technology.

http://occ.borland.googlepages.com/opencascadeborlandbdsport

Anyway, in the nglib.h is the following declaration

// initialize, deconstruct Netgen library:
void Ng_Init ();
void Ng_Exit ();

This is not in the scope of a class or namespace called "nglib::" so have you defined your own namespace around the nglib.h include, and is the source of the problem?

Pete

Pete

Matthias Teich's picture

Hello,

thanks for your hints.
My first problem is solved now.
Now I am trying to use the iges/step import of the netgen library :)

Best Regards,
Matthias

P Dolbey's picture

Its always useful to let us know how you fixed the problem.

Pete

Matthias Teich's picture

Yes, you're right.

Most of the provided examples in ngcore did not work except ng_vol.
This was just because of the reason you mentioned above.

In addition I had something messed up in my Visual Studio.
ng_vol compiled fine on both Linux and Windows now.

Does anyone know if there is an extended nglib with support for OCCGeometry?

Best Regards,
Matthias Teich

zhang chunyu's picture

Dear Matthias Teich,

I encountered the same problem as yours. Would you please share your .proj file or steps to setup your project? Thank you very much!

Naehfix's picture

Hi there.

I am using GMSH (http://www.geuz.org/gmsh/) for triangulation. It produces very nice Meshes.
But I am not using a library.
I save the shapes it want to mesh with the IGES-Writer und call the gmsh.exe with the proper commandline arguments. GMSH can export the generated Mesh as STL File which is very easy to parse.

GMSH is easy to use an it is very fast. I also tried NetGen but it was way off too slow. Maybe I just did something wrong using it.

Naehfix's picture

Hi there.

I am using GMSH (http://www.geuz.org/gmsh/) for triangulation. It produces very nice Meshes.
But I am not using a library.
I save the shapes it want to mesh with the IGES-Writer und call the gmsh.exe with the proper commandline arguments. GMSH can export the generated Mesh as STL File which is very easy to parse.

GMSH is easy to use an it is very fast. I also tried NetGen but it was way off too slow. Maybe I just did something wrong using it.

Naehfix's picture

Hi there.

I am using GMSH (http://www.geuz.org/gmsh/) for triangulation. It produces very nice Meshes.
But I am not using a library.
I save the shapes it want to mesh with the IGES-Writer und call the gmsh.exe with the proper commandline arguments. GMSH can export the generated Mesh as STL File which is very easy to parse.

GMSH is easy to use an it is very fast. I also tried NetGen but it was way off too slow. Maybe I just did something wrong using it.

Stephane Routelous's picture

GMSH is licensed under GPL, so you are not allowed to use it in closed source applications.

Stephane Routelous's picture

well, i think you can spawn the executable, but not use it as library.
but I'm not a lawyer ...

Naehfix's picture

I am using the GMSH.exe and not the sourcecode. And the Project I am working on is not commercial.

And as far as I know, the GPL says, that only if someone uses or modifies the Source-Code, then you have to make your Project Open Source. Neither of it is the case in my Project :)

Naehfix's picture

I am using the GMSH.exe and not the sourcecode. And the Project I am working on is not commercial.

And as far as I know, the GPL says, that only if someone uses or modifies the Source-Code, then you have to make your Project Open Source. Neither of it is the case in my Project :)

Naehfix's picture

I am using the GMSH.exe and not the sourcecode. And the Project I am working on is not commercial.

And as far as I know, the GPL says, that only if someone uses or modifies the Source-Code, then you have to make your Project Open Source. Neither of it is the case in my Project :)

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.