]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
bos #29332 [CEA 26899] GroupOnGeom returns None V9_9_0a2
authoreap <eap@opencascade.com>
Wed, 16 Mar 2022 15:07:06 +0000 (18:07 +0300)
committereap <eap@opencascade.com>
Wed, 16 Mar 2022 15:07:06 +0000 (18:07 +0300)
Make return an empty compound for an empty group
  where list == [-1]

src/GEOMClient/GEOM_Client.cxx

index 53f92b453bd18d9c01e5cfcf81a1567a4b5314c6..871cd861a93274e97ebe3191cd97bef9ce16bba1 100644 (file)
@@ -255,9 +255,10 @@ TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_p
   }
 
   /* Case of only one subshape, excluding groups of one main shape */
-  if ( list->length() == 1 && !(aShape->GetType() == 37 && list[0] == 1) ) {
-    if (list[0] > 0)
-      S = subShapes[list[0]-1];
+  if ( list->length() == 1 &&
+       !(aShape->GetType() == 37 && list[0] == 1) &&
+       list[0] > 0 ) {
+    S = subShapes[list[0]-1];
   }
   else {
     BRep_Builder B;