Reading a Step File

 I am successful in reading in a step file, however, the number of roots and shapes is always 1. What is the reason for only getting 1 root or 1 shape?  Attached is my stp file.


    STEPCAFControl_Reader aReader;
    Handle(TopTools_HSequenceOfShape)aHSequenceOfShape = new TopTools_HSequenceOfShape();
    Handle(TDocStd_Document) aDoc;
    Handle(XCAFDoc_ShapeTool) shapeTool;
    Handle(XCAFApp_Application)anApp = XCAFApp_Application::GetApplication();
    anApp->NewDocument("MDTV-XCAF", aDoc);
    VrmlData_Scene scene;
    char* path = "mycami2.stp";
    IFSelect_ReturnStatus status  =aReader.ReadFile("../mycami2.stp");
    if(status != IFSelect_RetDone)
        printf("Step file could not be read");


    shapeTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main());
    TDF_LabelSequence myShapes;
    int lll = myShapes.Length(); // always shows up as one


Thank you,






Aaron McDonald's picture

GetShapes will return high level shapes. for example a file that has a solid containing a shell, containing various faces, GetShapes will return 1, refering to the solid. This file does seem to have a single a solid.