How is smesh (salome mesh) module maintained in FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 227
- Joined: Tue Sep 22, 2015 1:47 pm
- Location: Oxford UK/Shenzhen China
- Contact:
How is smesh (salome mesh) module maintained in FreeCAD
Dear FCers,
I am curious how smesh module, currently in freecad soource tree, is maintained, as opencascade and salome evolve?
There needs some effort to split smesh out from salome, here is the salome 8.3 's extraction.
https://github.com/LaughlinResearch/ who wrote python binding for smesh and occt 7.2
I did not found the smesh version in the current FreeCAD, can anyone shed me some light?
I hope to record this process into the book "Module developer's guide to FreeCAD source code"
Thank you
Qingfeng
I am curious how smesh module, currently in freecad soource tree, is maintained, as opencascade and salome evolve?
There needs some effort to split smesh out from salome, here is the salome 8.3 's extraction.
https://github.com/LaughlinResearch/ who wrote python binding for smesh and occt 7.2
I did not found the smesh version in the current FreeCAD, can anyone shed me some light?
I hope to record this process into the book "Module developer's guide to FreeCAD source code"
Thank you
Qingfeng
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
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Re: How is smesh (salome mesh) module maintained in FreeCAD
It seems to me that at some point in time, FreeCAD developers just copied the source code of various libraries, like SMESH, zipios++, KDL, etc., so that they would be together with FreeCAD. Maybe those libraries were not easy to get in the past, so to avoid tracking the dependencies, they just copied them into the source tree (as long as they are BSD, MIT, LGPL 2 licensed). Obviously, this means that the source in the tree needs to be updated manually, or it will become obsolete.qingfeng.xia wrote: ↑Mon Nov 04, 2019 12:48 pm I am curious how smesh module, currently in freecad soource tree, is maintained, as opencascade and salome evolve?
https://github.com/FreeCAD/FreeCAD/tree ... esmesh/inc...
I did not found the smesh version in the current FreeCAD, can anyone shed me some light?...
The source has a bunch of references to "Upgrade to SMESH 7.7.1" (last change three years ago), so I presume this is the version that is included in FreeCAD.
There are CMake switches in FreeCAD to use external libraries.
Code: Select all
FREECAD_USE_EXTERNAL_KDL
FREECAD_USE_EXTERNAL_SMESH
FREECAD_USE_EXTERNAL_ZIPIOS
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
-
- 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
great! thank you!, Salome 7.7 seems not quite ancient. it can stay in FreeCAD as it is
I will think about a tool to track the change and review the diff.
In my other parallel preprocessor project, I split out some function of Salome geom module, I will share a link once it is available.
I will think about a tool to track the change and review the diff.
In my other parallel preprocessor project, I split out some function of Salome geom module, I will share a link once it is available.
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
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Re: How is smesh (salome mesh) module maintained in FreeCAD
I think from time to time the devs add little tweaks. Recently I believe Werner did some form of tweak for netgen import for smesh. I would need to find the commit. So it's good to keep an eye on these things
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: How is smesh (salome mesh) module maintained in FreeCAD
Correct. But this doesn't sound like the best solution. The best solution should be to use the most up-to-date SMESH. If FreeCAD does some improvements, these should be upstreamed. Because FreeCAD keeping its own copy of SMESH is going to be difficult to maintain.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: How is smesh (salome mesh) module maintained in FreeCAD
In the long run not keeping a copy of smesh involves getting it packaged for Debian/Ubuntu, but that involves packaging all of salome, which is pretty big. It was previously in Debian (https://tracker.debian.org/pkg/salome) and removed so it wouldn't be a from-scratch effort, but it hasn't been maintained since 2010 so it won't be easy.
Re: How is smesh (salome mesh) module maintained in FreeCAD
You can simply create a package from https://github.com/LaughlinResearch/SMESH which we do for conda packages and works for all plattforms. Using the latest salome release is a bit more work I guess. But if anyone has the motivation, it shouldn't be too much trouble.kkremitzki wrote: ↑Tue Nov 05, 2019 10:38 pm In the long run not keeping a copy of smesh involves getting it packaged for Debian/Ubuntu, but that involves packaging all of salome, which is pretty big. It was previously in Debian (https://tracker.debian.org/pkg/salome) and removed so it wouldn't be a from-scratch effort, but it hasn't been maintained since 2010 so it won't be easy.
-
- 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
I split out salome geometry module, it is now on github https://github.com/ukaea/SGeom
I managed to compiled smesh 8.3 with latest FreeCAD without netgen. Freecad test workbench does not complain any error. I will send a PR , can someone have a test on other platforms, windows. This smesh may not work with OCE.
PR link: https://github.com/FreeCAD/FreeCAD/pull/2706
netgen has been turn off in smesh, even CI trun it on. I am fixing it.
the new smesh does not compile/cmake failed on windows according to CI
Fem module wiki said netgen has been disabled since moved to occt 7.x. netget must be patched, in ordered to work with smesh.
but wmayer seems just fixed the existing 7.7 this week. I made my change on smesh 8.3 to make it working.
I managed to compiled smesh 8.3 with latest FreeCAD without netgen. Freecad test workbench does not complain any error. I will send a PR , can someone have a test on other platforms, windows. This smesh may not work with OCE.
PR link: https://github.com/FreeCAD/FreeCAD/pull/2706
netgen has been turn off in smesh, even CI trun it on. I am fixing it.
the new smesh does not compile/cmake failed on windows according to CI
Code: Select all
CMake Error at src/3rdParty/salomesmesh/CMakeLists.txt:150 (message):
pthread include directory is required.
but wmayer seems just fixed the existing 7.7 this week. I made my change on smesh 8.3 to make it working.
vocx wrote: ↑Tue Nov 05, 2019 10:21 pmCorrect. But this doesn't sound like the best solution. The best solution should be to use the most up-to-date SMESH. If FreeCAD does some improvements, these should be upstreamed. Because FreeCAD keeping its own copy of SMESH is going to be difficult to maintain.
Last edited by qingfeng.xia on Sat Nov 09, 2019 12:41 pm, edited 4 times in total.
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
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Re: How is smesh (salome mesh) module maintained in FreeCAD
No netgen works with occt7.3 and this version of smesh: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.
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.
Last edited by looo on Fri Nov 08, 2019 4:40 pm, edited 1 time in total.
Re: How is smesh (salome mesh) module maintained in FreeCAD
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.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.
...
Therefore, being completely honest, I don't know what the status of Netgen is. Does it work, does it not work? Does it require a specific version of SMESH? Is the problem pybind11? Travis failures pybind11?
See this
user1234 wrote: ↑Sat Nov 02, 2019 9:38 pm I tried to compile the master of netgen [https://github.com/NGSolve/netgen] today (Debian 10) for FreeCAD, but no success because of pybind11 (error in cmake for pybind11 in netgen). But they have updated the master for OCCT7.4.0.
Greetings
user
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.