Salome HOME
plugin dialog blocFissure general
[modules/smesh.git] / src / Tools / smesh_plugins.py
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2011-2015  EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20 # Author : Guillaume Boulant (EDF) 
21 #
22 import salome_pluginsmanager
23
24 try:
25   from spadderPlugin import runSpadderPlugin
26   salome_pluginsmanager.AddFunction('PADDER mesher',
27                                     'Create a mesh with PADDER',
28                                     runSpadderPlugin)
29 except:
30   salome_pluginsmanager.logger.info('ERROR: PADDER mesher plug-in is unavailable')
31   pass
32
33 try:
34   from meshcut_plugin import MeshCut
35   salome_pluginsmanager.AddFunction('MeshCut',
36                                     'Cut a tetrahedron mesh by a plane',
37                                     MeshCut)
38
39 except:
40   salome_pluginsmanager.logger.info('ERROR: MeshCut plug-in is unavailable')
41   pass
42
43 try:
44   from yamsplug_plugin import YamsLct
45   salome_pluginsmanager.AddFunction('ReMesh with MGSurfOpt ( formerly Yams )',
46                                     'Run Yams',
47                                     YamsLct)
48 except:
49   salome_pluginsmanager.logger.info('ERROR: MGSurfOpt (Yams) plug-in is unavailable')
50   pass
51
52 try:
53   from MGCleanerplug_plugin import MGCleanerLct
54   salome_pluginsmanager.AddFunction('ReMesh with MGCleaner',
55                                     'Run MGCleaner',
56                                     MGCleanerLct)
57 except:
58   salome_pluginsmanager.logger.info('ERROR: MGCleaner plug-in is unavailable')
59   pass
60
61 try:
62   from blocFissure.ihm.fissureCoude_plugin import fissureCoudeDlg
63   salome_pluginsmanager.AddFunction('Meshed Pipe with a crack',
64                                     'Create a mesh with blocFissure tool',
65                                     fissureCoudeDlg)
66 except:
67   salome_pluginsmanager.logger.info('ERROR: Meshed Pipe with a crack plug-in is unavailable')
68   pass
69 try:
70   from blocFissure.ihm.fissureGenerale_plugin import fissureGeneraleDlg
71   salome_pluginsmanager.AddFunction('Add a crack in a mesh',
72                                     'Insert a crack in an hexahedral mesh with blocFissure tool',
73                                     fissureGeneraleDlg)
74 except:
75   salome_pluginsmanager.logger.info('ERROR: Meshed Pipe with a crack plug-in is unavailable')
76   pass
77
78 # ZCracks plugin requires the module EFICAS to be installed
79 # thus it is first tested if this module is available before
80 # adding the plugin to salome_pluginsmanager
81 try:
82   import eficasSalome
83   from zcracks_plugin import ZcracksLct
84   salome_pluginsmanager.AddFunction('Run Zcrack',
85                                     'Run Zcrack',
86                                     ZcracksLct)
87 except:
88   salome_pluginsmanager.logger.info('ERROR: Zcrack plug-in is unavailable')
89   pass