From 611b13e2332152b87b404cf57aa02492984baaf9 Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 6 Oct 2020 15:46:44 +0300 Subject: [PATCH] bos #20082: Set reverse edge in GeometricProgression fails --- src/SMESH_SWIG/smesh_algorithm.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/SMESH_SWIG/smesh_algorithm.py b/src/SMESH_SWIG/smesh_algorithm.py index 8ee3718a3..e9867dc4e 100644 --- a/src/SMESH_SWIG/smesh_algorithm.py +++ b/src/SMESH_SWIG/smesh_algorithm.py @@ -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 )