X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2Fpadder%2Fspadderpy%2F__init__.py;h=004256778103fe78b8e22284a0d05eaba9b23bfb;hp=911cf5b96a9c534a6f23bbe1fbd3f59d7326d922;hb=7eda9ca931ed2a11cb5e4637e4ffe19f5c061115;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6 diff --git a/src/Tools/padder/spadderpy/__init__.py b/src/Tools/padder/spadderpy/__init__.py index 911cf5b96..004256778 100644 --- a/src/Tools/padder/spadderpy/__init__.py +++ b/src/Tools/padder/spadderpy/__init__.py @@ -1,9 +1,9 @@ -# Copyright (C) 2011-2012 EDF R&D +# Copyright (C) 2011-2016 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,6 +16,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + # Author(s): Guillaume Boulant (23/03/2011) # @@ -31,10 +32,24 @@ def getRootDir(): def getTestDataDir(): ''' - This function gives the absolute path to the directory containing - the data files for test (realistic med files). + This function gives the absolute path to the SMESH directory + containing the data files for the padder plugin test (realistic + med files). ''' - datadir=os.path.join(getRootDir(),"share/salome/resources/smesh/padderexe") + datadir = os.path.join(getRootDir(),"share/salome/resources/smesh/padderdata") + return datadir + +def getTestPadderDataDir(): + """ + This function gives the absolute path to the PADDER directory + containing the data files for the padder plugin test. WARNING: + this directory is a directory of the external program SpherePadder + that is wrapped by the padder plugin. We use the shell variable + PADDERHOME (defined by the SALOME environment) to localize this + folder. + """ + PADDERHOME = os.environ['PADDERHOME'] + datadir = os.path.join(PADDERHOME,"tests") return datadir import MESHJOB # to get the enum constant values