Salome HOME
Fix regression mesh_BLSURF_02/C1
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPluginBuilder.py
index 31f15cd5915e8bcfaf8f1339f29b1faf3f07b5ae..f06850f72f37704dbb05219f267b802e8d198cc3 100644 (file)
@@ -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