return false;
TopoDS_Shape aShape = theObject->GetTopShape();
- if( aShape.ShapeType()!=TopAbs_FACE )
- return false;
+ TopoDS_Face aFace;
- TopoDS_Face aFace = TopoDS::Face( aShape );
+ if( aShape.ShapeType() ==TopAbs_FACE )
+ {
+ aFace = TopoDS::Face(aShape);
+ }
+ else if ( aShape.ShapeType() ==TopAbs_COMPOUND )
+ {
+ TopoDS_Iterator It(aShape);
+ for (; It.More(); It.Next())
+ if (It.Value().ShapeType() == TopAbs_FACE)
+ {
+ aFace = TopoDS::Face(It.Value());
+ break;
+ }
+ }
+
+ if (aFace.IsNull())
+ return false;
return LocalPartition( aFace, theType );
}