直接上代码:
OCCMFCView.h文件添加:
#include <AIS_Shape.hxx>
public:
Handle(AIS_Shape) myAISSphere;
void ReadSTEP();
OCCMFCView.cpp文件OnInitialUpdate()函数添加:
// Create AISInteractiveContext
myAISContext = new AIS_InteractiveContext(myViewer);
myAISContext->SetDisplayMode(AIS_Shaded, Standard_True);
//myAISContext->SetAutomaticHilight(Standard_False);
myAISContext->DefaultDrawer()->SetFaceBoundaryDraw(Standard_True);
添加函数:
#include <STEPControl_Reader.hxx>
#include <BRepBuilderAPI_Transform.hxx>
void COCCMFCView::ReadSTEP()