Subshaping for nested compounds in STEP export

I suggest changing the XCAFCoc_ShapeTool::CheckSubShape method to allow subshaping of nested compounds:

static Standard_Boolean CheckSubShape (const TopoDS_Shape &S, const TopoDS_Shape &sub)
if ( S.IsSame ( sub ) ) return Standard_True;

if ( !(S.ShapeType() == TopAbs_COMPOUND
&& sub.ShapeType() == TopAbs_COMPOUND) ) //KA
if ( S.ShapeType() >= sub.ShapeType() ) return Standard_False;

for ( TopoDS_Iterator it(S); it.More(); it.Next() ) {
if ( CheckSubShape ( it.Value(), sub ) ) return Standard_True;
return Standard_False;

kanding's picture

To be more precise, I mean the corresponding static function CheckSubShape in the file XCAFDoc_ShapeTool.cxx which is used by the method XCAFDoc_ShapeTool::IsSubShape in OCC5.1.
This is not relevant for OCC5.2