- SplitData aSplitData( aGeomObj->GetTopShape(), aGeomObj->GetName() );
- anInputSplitDataList.append( aSplitData );
+ TopoDS_Shape aShape = aGeomObj->GetTopShape();
+ if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_COMPOUND ) {
+ // Create split data for each face contained in the compound
+ TopExp_Explorer anExp( aShape, TopAbs_FACE );
+ for ( ; anExp.More(); anExp.Next() ) {
+ TopoDS_Face aFace = TopoDS::Face( anExp.Current() );
+ if ( !aFace.IsNull() ) {
+ SplitData aSplitData( aFace, aGeomObj->GetName() );
+ anInputSplitDataList.append( aSplitData );
+ }
+ }
+ } else {
+ SplitData aSplitData( aShape, aGeomObj->GetName() );
+ anInputSplitDataList.append( aSplitData );
+ }