Why Analysis siyus can open the STEP file that I'm failed with STEPControl_Reader, is there a better way to load step file workflow.

jianbaoxia

CAD master
I'm confusing that why I can't load my step file, but both the Analysis siyus and FreeCAD all can show it.
I refer to the tutorial code in OCCT Introduction.
And there is my code, it can work in load another step file,
Code:
    STEPControl_Reader step_reader;
    Standard_CString filepath = "C:\\Users\\14656\\Desktop\\sm-203.STEP";
    IFSelect_ReturnStatus status = step_reader.ReadFile(filepath);
    TopoDS_Shape step_shape;
    if (status == IFSelect_RetDone)
    {
        step_reader.TransferRoot(1);
        step_shape = step_reader.Shape();
        vout << step_shape;
        std::cout << status << "SUCCESS!" << std::endl;
    }
    else
        std::cout << status << "Sorry to fail!" << std::endl;
I try to learn how the "load-step" work on Analysis Situs, but I get some problem in compile,.So when I'm reading source code now, and also try to get help form forum. I hope I didn't bother you with my initial question.

I'm sorry that I can't share this step file for some reason. Bur I get it from a .prt file of UG.
 

JSlyadne

Administrator
Staff member
I'm sorry that I can't share this step file for some reason. Bur I get it from a .prt file of UG.
Is it kind of a technical issue or non-disclosure? If the first one, it's worth to try to resolve it.

To learn on how to deal with the OCCT's API providing import step capabilities you might also want to check out the related episode of Lesson 12, namely this 17:30.
 

jianbaoxia

CAD master
@JSlyadne OMG, I'm so silly. It's just bucause the UTF-8 code in file name and path, this problem trouble me several days!!!
I have read the "load-step" in Analysis Situs , and it's also classic workflow, until I saw the issue of Quaoar. I was glad I had solved the problem, but more angry at myself for being stupid
 
Top