X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FBLSURFPlugin%2FBLSURFPluginBuilder.py;h=f06850f72f37704dbb05219f267b802e8d198cc3;hb=0f2aa28809d72a7bc50330357e283ffbce742b8f;hp=9c4af7519d999d866f69b299747453612bbb3e48;hpb=ee6881ed28404aa266c05e9c2be5b08244b91efd;p=plugins%2Fblsurfplugin.git diff --git a/src/BLSURFPlugin/BLSURFPluginBuilder.py b/src/BLSURFPlugin/BLSURFPluginBuilder.py index 9c4af75..f06850f 100644 --- a/src/BLSURFPlugin/BLSURFPluginBuilder.py +++ b/src/BLSURFPlugin/BLSURFPluginBuilder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2014 CEA/DEN, EDF R&D +# Copyright (C) 2007-2015 CEA/DEN, 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 @@ -23,6 +23,8 @@ from salome.smesh.smesh_algorithm import Mesh_Algorithm +LIBRARY = "libBLSURFEngine.so" + # Topology treatment way of MG-CADSurf FromCAD, PreProcess, PreProcessPlus, PreCAD = 0,1,2,3 @@ -83,7 +85,7 @@ class BLSURF_Algorithm(Mesh_Algorithm): Mesh_Algorithm.__init__(self) if noBLSURFPlugin: print "Warning: BLSURFPlugin module unavailable" - self.Create(mesh, geom, BLSURF, "libBLSURFEngine.so") + self.Create(mesh, geom, BLSURF, LIBRARY) self.params=None self.geompyD = mesh.geompyD #self.SetPhysicalMesh() - PAL19680 @@ -238,6 +240,22 @@ class BLSURF_Algorithm(Mesh_Algorithm): self.SetTopology(PreCAD) self.Parameters().SetPreCADOptionValue(optionName,optionValue) pass + + ## Adds custom advanced option value. + # @param optionName custom advanced option name + # @param level custom advanced option value + def AddOption(self, optionName, level): + self.Parameters().AddOption(optionName,level) + pass + + ## Adds custom advanced PreCAD option value. + # @param optionName custom name of the option + # @param optionValue value of the option + def AddPreCADOption(self, optionName, optionValue): + if self.Parameters().GetTopology() != PreCAD: + self.SetTopology(PreCAD) + self.Parameters().AddPreCADOption(optionName,optionValue) + pass ## Sets GMF file for export at computation # @param fileName GMF file name @@ -432,7 +450,7 @@ class BLSURF_Algorithm(Mesh_Algorithm): def Parameters(self): if not self.params: self.params = self.Hypothesis("MG-CADSurf Parameters", [], - "libBLSURFEngine.so", UseExisting=0) + LIBRARY, UseExisting=0) pass return self.params