Salome HOME
bos #26454 [EDF] (2021) SMESH: interactive mesh modification
[modules/smesh.git] / src / SMESH_SWIG / smesh_algorithm.py
index 8ee3718a3839b43650811b5842125d84af7bfed3..ecc237be4d4f2854ee9a645df4e86ca10b17ea42 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -440,6 +440,18 @@ class Mesh_Algorithm:
         for i in reverseList:
             if isinstance( i, int ):
                 s = geompy.GetSubShape(self.mesh.geom, [i])
+
+                #bos #20082 begin:
+                if s is None and type(self.geom) != geomBuilder.GEOM._objref_GEOM_Object:
+                    # try to get the SHAPERSTUDY engine directly, as 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()
+                        s = aShapeOp.GetSubShape(self.mesh.geom, i)
+                #bos #20082 end
+
                 if s.GetShapeType() != geomBuilder.GEOM.EDGE:
                     raise TypeError("Not EDGE index given")
                 resList.append( i )