Getting instances from a STEP file

I have a simple STEP based on OCC, it works great with parts, but when I started reciving some assemblies, I noticed that it only takes in consideration the original geometry and does not retrieve the instances in the assembly.

I based my code on STEPCAFControl_Reader STEPReader;

So I use the code the following code to read the file and to get the roots

step_doc = new TDocStd_Document("STEP");
CSimLabOpenCascadeTools::xde_doc = step_doc;
STEPCAFControl_Reader STEPReader;

STEPReader.SetColorMode(true);
STEPReader.SetNameMode(true);
STEPReader.SetLayerMode(true);

IFSelect_ReturnStatus status = STEPReader.ReadFile(Standard_CString((const char*)filename));

Handle(XCAFDoc_ShapeTool) root = XCAFDoc_DocumentTool::ShapeTool( step_doc->Main());

SimLab::CSimLabTransformNode* parent = SimLab::CSimLabTransformNode::Create();
parent->SetNodeTypeAssembly();

if (STEPReader.Transfer(step_doc))
{
TDF_LabelSequence labels;
root->ComputeSimpleShapes();
root->GetFreeShapes(labels);
unsigned int nRoots = labels.Length();
}
}

In my file I get 1 root, when traversing for solids it gets 2 solids, while it should get 3 as one objects has 2 instances.

Your help is appreciated.

Thanks,

Ashraf

Attachments: 
asultan's picture

Problem solved, the file includes Alibre schema, not using 203 or 214