Personal tools
You are here: Home Forum Extension of the platform Gmsh in Salome Macro

Gmsh in Salome Macro

Up to Extension of the platform

Gmsh in Salome Macro

Posted by Lucio Gomez at April 14. 2017

Hello everyone,

I share with you a macro/script to use Gmsh externally in Salome. The code is an adaptation of the GMSHMesh Macro for FreeCAD.

video demostration: https://www.youtube.com/watch?v=sRjfJeXBlBY

The code: https://github.com/psicofil/Gmsh_Salome_Macro

I am sorry for my bad english. Greetings.

Re: Gmsh in Salome Macro

Posted by andrew at April 28. 2017
hi, I saw thw video and it is really impressive. I tried to run your macro both in windows and linux with salome 8.2 and gmsh 3 but I could not run it because it can't find the python libraries-QT4. I installed it in windows but it still could not be found. Same goes for linux. In linux the qt4 is installed by default by it can't be found again. I tried to follow instructions on the net about installing them and putting them in the path but I got lost. Could you perhaps explain how to see those libraries in windows or linux to get started? Also I would like to ask if the implementation is one-way that is a mesh created in gmsh and passed to salome or it can go both ways and have a mesh created with gmsh through salome and then save it in msh format? kind regards andrew

Re: Gmsh in Salome Macro

Posted by Lucio Gomez at April 29. 2017

Hello Andrew,

The problem is that Salome 8 works with PyQt 5, which is not compatible with some PyQt 4 commands with which the script interface was programmed. The macro works correctly on Salome 7.8 or on SalomeMeca 2016.

I will try to solve the problem so that it works in both versions of PyQt (and Salome), but it seems that it is not so easy.
I am sorry for my bad english
We are in contact.
Regards.

Re: Gmsh in Salome Macro

Posted by DAVID Gilles at May 02. 2017

Hello,

To facilitate the transition from PyQt4 to PyQt5, the 'qtsalome' module was introduced.

It contains all the classes of PyQt 4 or 5, accordiing to the SALOME version.

from PyQt4 import *

or

from PyQt5 import *'

can be written as:

from qtsalome import *'

 

You may still need have to migrate part of some code for changes in class names, or other changes between PyQt4 and PyQt5.

 

Regards,

Gilles

Re: Gmsh in Salome Macro

Posted by Lucio Gomez at June 12. 2017

I update the macro to make it compatible with Salome 8 and Salome 7.
I hope comments if it does not work.

The code: https://github.com/psicofil/Gmsh_Salome_Macro


Greetings.

Re: Gmsh in Salome Macro

Posted by Jacob Abdelfatah at June 13. 2017

Great Addon . I saw it before in FreeCAD. I would like to know if there are a way to set up the boundary conditions to a geometry and export to a .msh native file of gmsh.

Best Regards 

Jacob

Powered by Ploneboard
Document Actions