XCAFDoc_ShapeTool::IsCompound wrong way to judge

It is not rigorous to rely on name to determine if it is a compund. This name can be changed.

Standard_Boolean XCAFDoc_ShapeTool::IsCompound (const TDF_Label& L) 
  Handle(TDataStd_Name) Name;
  if (L.FindAttribute(TDataStd_Name::GetID(),Name)) {
    TCollection_ExtendedString estr1 = Name->Get();
    TCollection_ExtendedString estr2("COMPOUND");
    if(estr1==estr2) {
      return Standard_True;
  return Standard_False;
Dmitrii Pasukhin's picture


Yes, you are right. This code is incorrect. I don't know where this code used. But on internal DE components we don't use it.

I will create a ticket and update a source.

Best regards, Dmitrii.