How is smesh (salome mesh) module maintained in FreeCAD

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by qingfeng.xia »

There is some breaking change in netget master, which I think I have fixed (netgen 6.2 and occt 7.3 all from ppa). On ubuntu 16.04, the compiler gcc 5 is not high enough to compile, I spent one hour to update g++ to make it works. I will give it anther test before I post.

> " why did you split out salome geometry module".
It is not used in FC, but in my other project, it leads me to think how to split out mesh module.
looo wrote: Fri Nov 08, 2019 4:25 pm
qingfeng.xia wrote: Fri Nov 08, 2019 4:01 pm Fem module wiki said netgen has been disabled since moved to occt 7.x. so it is safe. netget must be patched, in ordered to work with smesh, I just wonder why netgen does not merge this patch, due to occt 7.0 upgrade. I will have another investigation on netgen error, to see if I can bring it back.
No netgen works with occt7.3 and this version of smesh:
https://github.com/LaughlinResearch/SMESH

Smesh and netgen are build for linux, osx and win via these recipes as conda-packages:
https://github.com/conda-forge/smesh-feedstock
https://github.com/conda-forge/netgen-feedstock

But I don't think repo you linked will work with netgen, as the structure has changed a lot.

btw.: why did you split out salome geometry module. I thought we are talkina about salome mesh module.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by looo »

qingfeng.xia wrote: Sat Nov 09, 2019 12:12 pm There is some breaking change in netget master, which I think I have fixed (netgen 6.2 and occt 7.3 all from ppa). On ubuntu 16.04, the compiler gcc 5 is not high enough to compile, I spent one hour to update g++ to make it works. I will give it anther test before I post.

Good to hear this. I gave up on latest netgen and settled at 6.2.1808. But this also needs some patches to work.
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by qingfeng.xia »

looo wrote: Sat Nov 09, 2019 1:18 pm Good to hear this. I gave up on latest netgen and settled at 6.2.1808. But this also needs some patches to work.
netgen 6.2 has been developed for 3 years, lots of change. If you mean patch is needed to work (not only to compiling), then I'd better to give up.
I just use netgen in ubuntu (it may be released by freecad-daily ppa).

Windows compiling still failed, on pthread, I just wonder why pthread is needed. Shall I just turn it off if(WIN32)
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by wmayer »

FYI: The last major upgrade of the Salome smesh code was done 3 years ago with git commit 666a3e5a68
Since then we had to make multiple changes to fix critical bugs and I think not all of them found their way into upstream. So, we should go through the list of changes and apply those we need.

https://github.com/FreeCAD/FreeCAD/comm ... alomesmesh
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by reox »

qingfeng.xia wrote: Sat Nov 09, 2019 1:42 pm Windows compiling still failed, on pthread, I just wonder why pthread is needed. Shall I just turn it off if(WIN32)
usually, the pthread error is not the error itself! look carefully at the cmake output and see what failed first.
vocx wrote: Fri Nov 08, 2019 4:27 pm The wiki information was true at the time it was written, but in this development version, 0.19, some users in fact enabled Netgen with FreeCAD and it seemed to work. compile with netgen for FEM meshing. Only recently there seems to be some problems with Netgen again.
uhhm - yes I can compile. But netgen is not useable - it segfaults on mesh creation.
I tried with the latest version of netgen, but the segfaults persist.
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by qingfeng.xia »

I also got segment fault, if our research project will use netgen later, I may have time to investigate. for the time being, I may leave it as it is.
There is patch for netgen 6.2, not sure how good it is.

netgen license is GNU Lesser General Public License v2.1. it is compatible with FC, an easy way to maintain is to include netgen into FC somehow, git submodule, if user enable netgen. salome 9.3 still uses the patched netgen 5.5 version, packed with salome.

wmayer wrote: Sun Nov 10, 2019 10:30 am FYI: The last major upgrade of the Salome smesh code was done 3 years ago with git commit 666a3e5a68
Since then we had to make multiple changes to fix critical bugs and I think not all of them found their way into upstream. So, we should go through the list of changes and apply those we need.

https://github.com/FreeCAD/FreeCAD/comm ... alomesmesh
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by reox »

qingfeng.xia wrote: Mon Nov 11, 2019 10:53 am an easy way to maintain is to include netgen into FC somehow, git submodule
It is the cheap and easy way, yes. But it just postpones the problems to a later time. Not being able to use the upstream version makes it very difficult to integrate patches and fixes.
In my opinion, freecad should not have any third party libraries integrated. But this is my very personal opinion and there are probably good reasons for some library not to do it.

According to the conda users, netgen works. I still haven't found out what they are doing differently, but there seems a combination of smesh, freecad and netgen plus some build settings and voodoo magic which works - and is a recent netgen version.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by looo »

reox wrote: Mon Nov 11, 2019 6:17 pm
qingfeng.xia wrote: Mon Nov 11, 2019 10:53 am an easy way to maintain is to include netgen into FC somehow, git submodule
It is the cheap and easy way, yes. But it just postpones the problems to a later time. Not being able to use the upstream version makes it very difficult to integrate patches and fixes.
In my opinion, freecad should not have any third party libraries integrated. But this is my very personal opinion and there are probably good reasons for some library not to do it.

According to the conda users, netgen works. I still haven't found out what they are doing differently, but there seems a combination of smesh, freecad and netgen plus some build settings and voodoo magic which works - and is a recent netgen version.

No there is definetly no magic involved. We simple wasted a lot of energy and time to get it done. There are some topics on all the problems we had to get to the point where netgen/smesh finally worked for all 3 platforms supported by conda.

But now there is occt7.4 and smesh problems begin again. Occt7.4 introduced a lot of diff for meshes. salome-smesh 9.3 is compatible with occt7.4 but the external and internal forks of salome mesh are not compatible...
So we can choose between using smesh8.3 and go through all the incompatibilities and fix them or use salome smesh 9.3 and apply all the patches to this version. Both tasks are unnecessary duplicate and difficult work.
On the other hand, this is a very important task to stay up to date with dependencies.
otaolafr
Posts: 13
Joined: Tue Nov 10, 2020 4:54 pm

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by otaolafr »

Hello,
first of all I am sorry if my questions are not a perfectly fit for this post but after I read the conversation I think is the right place to post my questions. furthermore also i excuse myself that it is a rather old post.

1. does smesh module brings SMESH tools and interface of the SMESH module from salome to freeCAD? I am a salome user, with specially use of this module so i was looking for the possibility to bring it to freeCAD? (what I mean is is possible to have a workbench that when actived the different tools and interface is the same as when we have the SMESH module active in salome?)
2. if it is possible to do this, how can it be achieved? from what i understood from the conversation, i thought that i was gonna be able to find a workbench salomeSmesh to install from the addon but i did not had luck.
best regards,
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: How is smesh (salome mesh) module maintained in FreeCAD

Post by onekk »

otaolafr wrote: Thu Dec 15, 2022 9:18 am ...
Have you noted that the post is 3 years old?

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply