Salome HOME
Do not publish objects having no corresponding shaper object
authoreap <eap@opencascade.com>
Fri, 24 Jan 2020 18:38:31 +0000 (21:38 +0300)
committereap <eap@opencascade.com>
Fri, 24 Jan 2020 18:38:31 +0000 (21:38 +0300)
src/PY/SHAPERSTUDY.py

index cbebea94e5b194eb07db0c1c9fa45495a3c2c6e3..43d694a5da6fc0e37f51c7d88ab439b4cb86e2c2 100644 (file)
@@ -96,6 +96,8 @@ class SHAPERSTUDY(SHAPERSTUDY_ORB__POA.Gen,
         if theFather is not NULL the object is placed under theFather's SObject.
         Returns a SObject where theObject is placed
         """
+        if not theObject.GetEntry():
+            return None # object not existing in shaper
         aStudy = getStudy()
         aBuilder = aStudy.NewBuilder()
         isGroup = theObject.GetType() == 37 or theObject.GetType() == 52