MoiseRousseau / SALOME-Voronoi

Interface between Salome and Vorpalite for polyhedral mesh generation
GNU General Public License v3.0
16 stars 2 forks source link

Salome plug-in installation #5

Closed MarkoRamius closed 1 year ago

MarkoRamius commented 1 year ago

Hello,

I followed the installation instructions, however, only after a bit of fiddling I was able to successfully use the plug-in.

First of all, thank you for sharing your work. Secondly, I want to share my installation experience so that you and others may profit.
This discussion applies to the Section Salome plugin installation of the README file.


I have created a directory named ~/.config/salome/Plugins as stated in the installation instructions. Within this directory, I cloned this repository.

However, in order to get the plug-in recognized by Salome, I needed to create a file named salome_plugins.py, which containes the following code (assuming my user-name is user):

import sys
import salome_pluginsmanager

pathVoronoi = "/home/user/.config/salome/Plugins/SALOME-Voronoi"
sys.path.append(pathVoronoi)

import Voronoi_converter

salome_pluginsmanager.AddFunction('Voronoi/Convert to Voronoi', ' ',Voronoi_converter.convertForCVTCalculation)

With this file in place (full path: ~/.config/salome/Plugins/salome_plugins.py), SALOME presents the plug-in in the Tools -> Plugins menu.

Working with a file named smesh_plugin.py, as suggested in the installation instructions, achieved nothing for me.
Maybe there was something I was missing or getting wrong.


This has been done on the following system:

MoiseRousseau commented 1 year ago

Thanks for you return. I update the installation instruction for Salome 9.9 and add a script to automatically install Vorpalite. A smesh_plugin.py example is also available. Can you copy it in ~/.config/salome/Plugins/ and let me know if it now work under Mesh/Plugin/Voronoi ?

MarkoRamius commented 1 year ago

Hello,

this works now, the plugin shows up in the mesh-> SMESH Plugins menu.

Thank you