X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_SWIG%2Fsmesh_algorithm.py;h=62495cc4917b889e4011785701970aae8fd03128;hb=f79e964b7592c63818f892516f3b4936d7704397;hp=8ee3718a3839b43650811b5842125d84af7bfed3;hpb=d55dbe18f5a898be97fbc9cf66d189a1398bae0f;p=modules%2Fsmesh.git diff --git a/src/SMESH_SWIG/smesh_algorithm.py b/src/SMESH_SWIG/smesh_algorithm.py index 8ee3718a3..62495cc49 100644 --- a/src/SMESH_SWIG/smesh_algorithm.py +++ b/src/SMESH_SWIG/smesh_algorithm.py @@ -340,20 +340,9 @@ class Mesh_Algorithm: if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ): faceIDs = [] for shape in faces: - try: - ff = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["FACE"] ) - for f in ff: + ff = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["FACE"] ) + for f in ff: faceIDs.append( self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f)) - except: - # try to get the SHAPERSTUDY engine directly, because GetGen does not work because of - # simplification of access in geomBuilder: omniORB.registerObjref - from SHAPERSTUDY_utils import getEngine - gen = getEngine() - if gen: - aShapeOp = gen.GetIShapesOperations() - ff = aShapeOp.ExtractSubShapes( shape, self.mesh.geompyD.ShapeType["FACE"], False) - for f in ff: - faceIDs.append( aShapeOp.GetSubShapeIndex( self.mesh.geom, f )) faces = faceIDs hyp = self.Hypothesis("ViscousLayers", [thickness, numberOfLayers, stretchFactor, faces, isFacesToIgnore], @@ -403,20 +392,9 @@ class Mesh_Algorithm: if edges and isinstance( edges[0], geomBuilder.GEOM._objref_GEOM_Object ): edgeIDs = [] for shape in edges: - try: ee = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["EDGE"]) for e in ee: edgeIDs.append( self.mesh.geompyD.GetSubShapeID( self.mesh.geom, e )) - except: - # try to get the SHAPERSTUDY engine directly, because GetGen does not work because of - # simplification of access in geomBuilder: omniORB.registerObjref - from SHAPERSTUDY_utils import getEngine - gen = getEngine() - if gen: - aShapeOp = gen.GetIShapesOperations() - ee = aShapeOp.ExtractSubShapes( shape, self.mesh.geompyD.ShapeType["EDGE"], False) - for e in ee: - edgeIDs.append( aShapeOp.GetSubShapeIndex( self.mesh.geom, e )) edges = edgeIDs hyp = self.Hypothesis("ViscousLayers2D", [thickness, numberOfLayers, stretchFactor, edges, isEdgesToIgnore],