diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 8fd7b6166..696d4f3cc 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -305,7 +305,7 @@ def AssureGeomPublished(mesh, geom, name=''): """ if not mesh.smeshpyD.IsEnablePublish(): return - if not isinstance( geom, geomBuilder.GEOM._objref_GEOM_Object ): + if not hasattr( geom, "GetShapeType" ): return if not geom.GetStudyEntry(): ## get a name diff --git a/src/SMESH_SWIG/smesh_algorithm.py b/src/SMESH_SWIG/smesh_algorithm.py index d962b4548..be5552d8e 100644 --- a/src/SMESH_SWIG/smesh_algorithm.py +++ b/src/SMESH_SWIG/smesh_algorithm.py @@ -396,7 +396,7 @@ class Mesh_Algorithm: geompy = self.mesh.geompyD for i in reverseList: if isinstance( i, int ): - s = geompy.SubShapes(self.mesh.geom, [i])[0] + s = geompy.GetSubShape(self.mesh.geom, [i]) if s.GetShapeType() != geomBuilder.GEOM.EDGE: raise TypeError("Not EDGE index given") resList.append( i )