bos #29332 [CEA 26899] GroupOnGeom returns None

Make return an empty compound for an empty group
  where list == [-1]
This commit is contained in:
eap 2022-03-16 18:07:06 +03:00
parent ac075ee14b
commit e3980c1c79

View 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 */ /* Case of only one subshape, excluding groups of one main shape */
if ( list->length() == 1 && !(aShape->GetType() == 37 && list[0] == 1) ) { if ( list->length() == 1 &&
if (list[0] > 0) !(aShape->GetType() == 37 && list[0] == 1) &&
S = subShapes[list[0]-1]; list[0] > 0 ) {
S = subShapes[list[0]-1];
} }
else { else {
BRep_Builder B; BRep_Builder B;