Salome HOME
52548: Set filter on standalone group of edges does't work
[modules/smesh.git] / src / SMESH_SWIG / smesh_algorithm.py
index 46f2270c1d7b8d7f68ca9d8b65e02930cd792966..8ce382e179b8b5c93545682b58c1274fc6678b75 100644 (file)
@@ -274,7 +274,14 @@ class Mesh_Algorithm:
         if not "ViscousLayers" in self.GetCompatibleHypothesis():
             raise TypeError, "ViscousLayers are not supported by %s"%self.algo.GetName()
         if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ):
-            faces = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f) for f in faces ]
+            import GEOM
+            faceIDs = []
+            for f in faces:
+                if self.mesh.geompyD.ShapeIdToType( f.GetType() ) == "GROUP":
+                    faceIDs += f.GetSubShapeIndices()
+                else:
+                    faceIDs += [self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f)]
+            faces = faceIDs
         hyp = self.Hypothesis("ViscousLayers",
                               [thickness, numberOfLayers, stretchFactor, faces, isFacesToIgnore],
                               toAdd=False)