From e3980c1c796b58dc44c8fcf06a1720b30ac35830 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 16 Mar 2022 18:07:06 +0300 Subject: [PATCH] bos #29332 [CEA 26899] GroupOnGeom returns None Make return an empty compound for an empty group where list == [-1] --- src/GEOMClient/GEOM_Client.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.30.2