From fe414fe4e7ff1d0488d8a9b9795e04a1ad34a75a Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 23 Jan 2020 21:56:19 +0300 Subject: [PATCH] adjust for shaperBuilder --- src/SMESH_SWIG/smeshBuilder.py | 2 +- src/SMESH_SWIG/smesh_algorithm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ) -- 2.39.2