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,
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.
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'm sorry that I can't share this step file for some reason. Bur I get it from a .prt file of UG.