Salome HOME
bos #18641 [CEA 18636][Windows] SMESH_MeshersList environment variable separator
[modules/smesh.git] / src / SMESH_SWIG / smeshBuilder.py
index 35f4ddfd0d1f09be3ee4abb772bb6ad47bb01438..69c4024e965937ea26bd11a29684305aae9f541c 100644 (file)
@@ -1250,6 +1250,27 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
 
         return hyp
 
+    def GetHypothesisParameterValues( self, hypType, libName, mesh, shape, initParams ):
+        """
+        Create hypothesis initialized according to parameters
+
+        Parameters:
+                hypType (string): hypothesis type
+                libName (string): plug-in library name
+                mesh: optional mesh by which a hypotheses can initialize self
+                shape: optional geometry  by size of which a hypotheses can initialize self
+                initParams: structure SMESH.HypInitParams defining how to initialize a hypothesis
+
+        Returns:
+                created hypothesis instance
+        """
+        if isinstance( mesh, Mesh ):
+            mesh = mesh.GetMesh()
+        if isinstance( initParams, (bool,int)):
+            initParams = SMESH.HypInitParams( not initParams, 1.0, not mesh )
+        return SMESH._objref_SMESH_Gen.GetHypothesisParameterValues(self, hypType, libName,
+                                                                    mesh, shape, initParams )
+
     def GetMeshInfo(self, obj):
         """
         Get the mesh statistic.
@@ -2072,7 +2093,14 @@ class Mesh(metaclass = MeshMeta):
 
     def SetMeshOrder(self, submeshes):
         """
-        Set order in which concurrent sub-meshes should be meshed
+        Set priority of sub-meshes. It works in two ways:
+        
+        * For sub-meshes with assigned algorithms of same dimension generating mesh of
+          *several dimensions*, it sets the order in which the sub-meshes are computed.
+        * For the rest sub-meshes, it sets the order in which the sub-meshes are checked
+          when looking for meshing parameters to apply to a sub-shape. To impose the 
+          order in which sub-meshes with uni-dimensional algorithms are computed, 
+          call **submesh.Compute()** in a desired order.
 
         Parameters:
                 submeshes: list of lists of :class:`sub-meshes <SMESH.SMESH_subMesh>`
@@ -5588,6 +5616,8 @@ class Mesh(metaclass = MeshMeta):
         if isinstance( Elements, list ):
             if not Elements:
                 raise RuntimeError("Elements empty!")
+            if isinstance( Elements[0], Mesh ):
+                Elements = [ Elements[0].GetMesh() ]
             if isinstance( Elements[0], int ):
                 Elements = self.GetIDSource( Elements, SMESH.ALL )
                 unRegister.set( Elements )
@@ -7598,7 +7628,7 @@ class genObjUnRegister:
             if genObj and hasattr( genObj, "UnRegister" ):
                 genObj.UnRegister()
 
-for pluginName in os.environ[ "SMESH_MeshersList" ].split( ":" ):
+for pluginName in os.environ[ "SMESH_MeshersList" ].split( os.pathsep ):
     """
     Bind methods creating mesher plug-ins to the Mesh class
     """