-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D
+# Copyright (C) 2007-2023 CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# @package GHS3DPluginBuilder
# Python API for the MG-Tetra meshing plug-in module.
+import omniORB
from salome.smesh.smesh_algorithm import Mesh_Algorithm
from salome.smesh.smeshBuilder import AssureGeomPublished
pass
return self.params
+ ## Set lower boundary of mesh element size
+ # Set it to zero to deactivate this option
+ def SetMinSize(self, theMinSize):
+ self.Parameters().SetMinSize(theMinSize)
+ return
+
+ ## Set upper boundary of mesh element size
+ # Set it to zero to deactivate this option
+ def SetMaxSize(self, theMaxSize):
+ self.Parameters().SetMaxSize(theMaxSize)
+ return
+
+ ## Activate/deactivate volume proximity computation
+ #
+ def SetVolumeProximity(self, toUse ):
+ self.Parameters().SetVolumeProximity(toUse)
+ return
+
+ ## Set number of surface element layers to be generated due to volume proximity
+ #
+ def SetNbVolumeProximityLayers(self, nbLayers ):
+ self.Parameters().SetNbVolumeProximityLayers(nbLayers)
+ return
+
## To mesh "holes" in a solid or not. Default is to mesh.
# @param toMesh "mesh holes" flag value
def SetToMeshHoles(self, toMesh):
self.Parameters().SetToRemoveCentralPoint(toRemove)
pass
+ ## To set the algorithm id
+ # @param algorithm ID 0 MGTetra HPC - 1 MGTetra
+ def SetAlgorithm(self,algoId):
+ self.Parameters().SetAlgorithm(algoId)
+ pass
+
+ ## To use parallel mode
+ # @param toUseNumOfThreads "use max number of threads" flag value
+ def SetUseNumOfThreads(self,useThreads):
+ self.Parameters().SetUseNumOfThreads(useThreads)
+ pass
+
+ ## To set the number of threads to be used
+ # @param numberOfThreads define max_num_threads for MGTetra and MGTetra HPC
+ def SetNumOfThreads(self,numThreads):
+ self.Parameters().SetNumOfThreads(numThreads)
+ pass
+
+ ## Set SetPthreadMode.
+ # @param pthreadMode for parallel algorithm in MGTetra
+ # - 0 - none
+ # - 1 - aggresive
+ # - 2 - safe
+ def SetPthreadMode(self,pthreadMode):
+ self.Parameters().SetPthreadMode(pthreadMode)
+ pass
+
+ ## Set SetParallelMode.
+ # @param parallelMode for parallel algorithm in MGTetra HPC
+ # - 0 - none
+ # - 1 - reproducible_given_max_number_of_threads
+ # - 2 - reproducible
+ # - 3 - aggressive
+ def SetPthreadMode(self,parallelMode):
+ self.Parameters().SetParallelMode(parallelMode)
+ pass
+
## To set an enforced vertex.
# @param x : x coordinate
# @param y : y coordinate
pass
pass
- ## Sets command line option as text.
- # @param option command line option
- def SetTextOption(self, option):
- self.Parameters().SetAdvancedOption(option)
+ ## Set advanced option value
+ # @param optionName option name
+ # @param optionValue option value
+ def SetOptionValue(self, optionName, optionValue):
+ self.Parameters().SetOptionValue( optionName, optionValue )
pass
## Sets command line option as text.
+ # @param optionAndValue command line option in a form "option value"
+ def SetAdvancedOption(self, optionAndValue):
+ self.Parameters().SetAdvancedOption(optionAndValue)
+ pass
+
+ ## OBSOLETE Sets command line option as text.
# @param option command line option
- def SetAdvancedOption(self, option):
+ def SetTextOption(self, option):
self.Parameters().SetAdvancedOption(option)
pass
pass
pass # end of GHS3D_Optimizer class
+
+class hypoProxy(GHS3DPlugin._objref_GHS3DPlugin_Hypothesis):
+ """
+ Private class wrapping to provide backward compatibility with deprecated API.
+ """
+ def __init__(self, *args):
+ GHS3DPlugin._objref_GHS3DPlugin_Hypothesis.__init__(self, *args)
+ def __deepcopy__(self, memo=None):
+ new = self.__class__(self)
+ return new
+ def SetPrintLogInFile(self, value):
+ self.SetStandardOutputLog(not value)
+omniORB.registerObjref(GHS3DPlugin._objref_GHS3DPlugin_Hypothesis._NP_RepositoryId, hypoProxy)
+del hypoProxy