Curvature based meshing

Hello my friends!

Is curvature based meshing being supported by opencascade? I surfed the Net and found that BRepMesh_IncrementalMesh does something like this. But the generated mesh distribution is very disordered and unusable.

I need a tool that refine meshes in high curvature areas automatically. Something like the capability provided in SW2013 (http://help.solidworks.com/2013/English/SolidWorks/cworks/IDC_HELP_MESHS...).

Any help is appreciated!
Tnx
H. Parvaz

Timo Roth's picture

BRepMesh_IncrementalMesh creates a mesh optimized for visualization purposes only. Therefore, it looks disordered.
If you need a mesh for FEM, you might have a look at Netgen / CADExchanger computational meshes.

hadi.parvaz's picture

Dear Timo

Thanks for your attention and valuable information about computational and visualization meshes. I took a look at Netgen and CADExchanger pages. They Do they provide APIs or they are just provided in GUI format?

Regards
H. Parvaz

hadi.parvaz's picture

Also, I found out that the software is not open source. Am I right?

Timo Roth's picture

Both provide also an API.
CADExchanger is not open source but Netgen is.
CADExchanger offers an easier integration of Netgen into OCCT and some additional features.

Timo Roth's picture
hadi.parvaz's picture

Dear Timo,

Tnx for your info. CADExchanger is the exact tool I need for my project. I tested it and the solution was impressive. But, I need an open-source tool for my project. Also, I investigated NETGEN and downloaded it.

I need to find a Python based NETGEN or something like that (for example SMESH). Anyway, Thanks for your response.

Regards
H. Parvaz

jelle's picture

Its part of PythonOCC

hadi.parvaz's picture

Dear Jelle

I was in doubt that whether PythonOCC supports NETGEN or not. I contacted Thomas and he said that there is no official plan for NETGEN support in PythonOCC.

I am in need to a curvature based meshing tool. So, I am to direct toward Salome platform that supports NETGEN, BLSurf, Mefisto,... .

But any better idea is appreciated.

Regards
H. Parvaz

jelle's picture

Ai, Thomas is correct ( he usually is ;) SMESH integration is not a core pythonocc capability, but its in quite a useful state.
Mark Blome has done work to integrate NETGEN [1] further and extend the SMESH integration.

[1] http://www.pythonocc.org/resources/meshing/pythonocc-and-smesh/

hadi.parvaz's picture

I studied this page and all of its information. NETGEN is going to be added to PythonOCC in further versions.

Also, I read your conversation with Mark Blome, too in PythonOCC user mailing list. It will be a really excellent capability for "OUR DEAR PYTHONOCC" :).

Anyway, I will use Salome platform for my meshing need, now.

Regards

Mark Blome's picture

Dear Hadi,

for the software I develop I integrated Netgen into PythonOCC via the
Salome SMESH version 6.5.0. This version also contains a new Tetgen interface
that I implemented.

You can find my extension in the github branch mb/geom_smesh_updates.
https://github.com/tpaviot/pythonocc/tree/mb/geom_smesh_updates

Because of the additional dependencies introduced (boost, vtk, netgen and tetgen) the
updated SMESH version was deemed to "heavy" and to difficult to maintain (it's
not so easy to get everything compiled correctly considering different platforms/compilers).

If you like I can assist you in using netgen with your PythonOCC version. I use
netgen quite extensively in my software and it does a pretty good job for my purposes.

Regards,
Mark

hadi.parvaz's picture

Dear Mark,

The development is really impressive and extensively useful. Is it completely finished?

I downloaded the whole files (About 80Mb in rar archive) but I don't know how to use that? Can you please guide me in this?

I need to mesh a NURBS surface with Netgen hypothesis and algorithm. I did this with Salome and the results was suitable.

Tnx
H. Parvaz

Mark Blome's picture

Dear Hadi,

the package you downloaded should be more or less self-consistent,
though Im not sure what version of OCC you would need to link it
against. Which platform do you intend to compile it for ? Linux or
Mac OS X ? 64 or 32 bit ? Which Python version do you use ?

It might be better if I contact you directly by your email address
because I don't think these kind of PythonOCC/SMESH/Netgen
compile issues are of broader interest to the OCC community.

Regards,
Mark

hadi.parvaz's picture

Dear Mark

I found your Email at the net (blome@zib.de). I will contact you through Email and explain my problem more clearly with my used platform, OCC, etc.

Thanks about your attention.

Regards
H. Parvaz

SunHongLei's picture

Hi,hadi,I have this same problem too. So, can you solve this problem now? I mean using C++ not python, do you solve it using NETGEN or CADExchanger?

hadi.parvaz's picture

Dear SunHongLei

I contacted Mark Blome and found out that the excellent work that has been done integrating NETGEN into Python works just in Linux. Also, CADExchanger is commercial software and some license problem would be using that.

The best module for a C++ or Python programmer is Salome platfrom. You can found this opensource pre/post processor on the net (www.salome-platform.org) for different operating systems. It worked nice for me.

Regards
H. Parvaz

SunHongLei's picture

OK,I will check it ,Thanks very much!

SunHongLei's picture

Dear hadi:
By the way, did you use the package SMESH? Is that convient to you that sent me a demo using salome to mesh a surface(295313461@qq.com)? Thanks very much!

Best regards!

hadi.parvaz's picture

Dear SunHongLei

The package SMESH is impregnated into Salome and it contains different meshing hypotheses and algorithms where one of them is NETGEN.

But for usage of this software, it is very simple and user-friend and lots of example have been provided by its website. I am really busy now working on my thesis wouldn't be able to create a demo.

Regards
H. Parvaz

SunHongLei's picture

Dear hadi:
I really want to know that do you only use salome software or you build the salome with compiler(like visual studio 2010)? I have tried build smesh module but I can not pass because its data structure is very complicated and I just can not build smesh alone.

hadi.parvaz's picture

My friend;

There is no need for building. If you use windows platform, download a windows compatible version of salome and just enjoy!