From: eap Date: Wed, 16 Mar 2022 15:07:06 +0000 (+0300) Subject: bos #29332 [CEA 26899] GroupOnGeom returns None X-Git-Tag: V9_9_0a2^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e3980c1c796b58dc44c8fcf06a1720b30ac35830;p=modules%2Fgeom.git bos #29332 [CEA 26899] GroupOnGeom returns None Make return an empty compound for an empty group where list == [-1] --- diff --git a/src/GEOMClient/GEOM_Client.cxx b/src/GEOMClient/GEOM_Client.cxx index 53f92b453..871cd861a 100644 --- a/src/GEOMClient/GEOM_Client.cxx +++ b/src/GEOMClient/GEOM_Client.cxx @@ -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;