Salome HOME
Porting to MeshGems 2.10: additional correction to avoid crash
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPluginBuilder.py
index e84497cf2c89a6027af927e65d6d9acc0cd1e125..1571de3eb6b092d71a4b15bbcd66fcda97b9baeb 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2019  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
@@ -198,6 +198,49 @@ class BLSURF_Algorithm(Mesh_Algorithm):
     self.Parameters().SetTopology(way)
     pass
 
+  ## Activate/deactivate surface proximity computation
+  # @param toUse boolean flag
+  #
+  def SetSurfaceProximity(self, toUse ):
+    self.Parameters().SetSurfaceProximity(toUse)
+    return
+
+  ## Set number of surface element layers to be generated due to surface proximity
+  # @param nbLayers number of layers
+  #
+  def SetNbSurfaceProximityLayers(self, nbLayers ):
+    self.Parameters().SetNbSurfaceProximityLayers( nbLayers )
+    return
+
+  ## Set coefficient by which size of element refined due to surface proximity is increased
+  # @param ratio proximity coefficient
+  #
+  def SetSurfaceProximityRatio(self, ratio ):
+    self.Parameters().SetSurfaceProximityRatio(ratio)
+    return
+  
+  ## Activate/deactivate volume proximity computation
+  # @param toUse boolean flag
+  #
+  def SetVolumeProximity(self, toUse ):
+    self.Parameters().SetVolumeProximity(toUse)
+    return
+  
+  ## Set number of surface element layers to be generated due to volume proximity
+  # @param nbLayers number of layers
+  #
+  def SetNbVolumeProximityLayers(self, nbLayers ):
+    self.Parameters().SetNbVolumeProximityLayers(nbLayers)
+    return
+
+  ## Set coefficient by which size of element refined due to volume proximity is increased
+  # @param ratio proximity coefficient
+  #
+  def SetVolumeProximityRatio(self, ratio ):
+    self.Parameters().SetVolumeProximityRatio(ratio)
+    return
+
+
   ## Sets verbosity level in the range 0 to 100.
   #  @param level verbosity level
   def SetVerbosity(self, level):
@@ -251,6 +294,7 @@ class BLSURF_Algorithm(Mesh_Algorithm):
   #  can set this parameter to 0
   #  
   def SetMaxNumberOfPointsPerPatch( self, nb ):
+    print("Warning: method SetMaxNumberOfPointsPerPatch() is deprecated")
     self.Parameters().SetMaxNumberOfPointsPerPatch( nb )
 
   ## Set max_number_of_threads parameter
@@ -333,6 +377,28 @@ class BLSURF_Algorithm(Mesh_Algorithm):
   def SetTags( self, howToTreat ):
     self.Parameters().SetTags( howToTreat )
 
+  ## Activate/deactivate fully patch independent meshing
+  #   @param isIndependent boolean flag
+  #
+  # This feature can only be used if the @a tags parameter is set to "respect".
+  # By default this option deactivated.
+  #
+  def SetPatchIndependent( self, isIndependent ):
+    self.SetOptionValue( "allow_patch_independent", "yes" if isIndependent else "no" )
+
+  ## Set to preserve lines defined by a sharp angle in the input discrete geometry
+  #   @param toCompute boolean flag
+  #
+  # If this option is deactivated, MeshGems-CADSurf will not try to preserve lines
+  # defined by a sharp angle in the input discrete geometry. Only input ridges, free
+  # edges, non manifold edges and separation betwen zones with different attributes
+  # will be respected (if tags is set to respect).
+  # By default this option activated.
+  #
+  def SetComputeRidges( self, toCompute ):
+    self.SetOptionValue( "compute_ridges", "yes" if toCompute else "no" )
+
+
   ## Activate removal of the tiny edges from the generated
   # mesh when it improves the local mesh quality, without taking into account the
   # tags (attributes) specifications.