Set an Object in the Viewer

Hello! I've launched the VisualC++ Viewer-Wizard. The application started without any errors. Now I want to develop a program which based on this viewer. Now my question: Is it only a viewer, which imports or exports e.g. BRep-Files or is it possible to set functions in the source code, which allows the user to display e.g. a box, a circle or something in the activated window? Which functions must be executed? Pearhaps my question is a silly one, but please answer! Thanks in advance! Regards Martin

Le Gonidec Xavier's picture

// For display a Box gp_Pnt P(150.,150.,150.); // centre de la petite boîte BRepPrimAPI_MakeBox B1(250.,250.,250.); BRepPrimAPI_MakeBox B2(P,100.,100.,100.); BRepAlgoAPI_Cut B(B1,B2); Handle(AIS_Shape) aBox = new AIS_Shape(B.Shape()); GetAISContext()->SetColor(aBox,Quantity_NOC_TURQUOISE); GetAISContext()->SetMaterial(aBox,Graphic3d_NOM_PLASTIC); GetAISContext()->SetDisplayMode(aBox,1); GetAISContext()->SetTransparency(aBox,0.5); GetAISContext()->Display(aBox);

See sample call SampleAISBasicDoc on CSampleAISBasicDoc Class fonction "OnCircle"