For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Displaying Shapes in Windows form application (Visual studio 2005)

bhimesh's picture

hi everybody..
Using opencascade wrapper for .net we can create the topods shapes.. or directly save them in iges..

but how can we display them on form itself..

thanks in advance..


Svetlozar Kostadinov's picture

You should create OCAS View in the form window.

myGraphicDevice = new Graphic3d_WNTGraphicDevice();
myViewer = new V3d_Viewer(
myGraphicDevice, // Handle(Aspect_GraphicDevice)& Device
a3DName.ToExtString(),// Standard_ExtString aName
"", // Standard_CString aDomain
1000.0, // Quantity_Length ViewSize
V3d_XposYnegZpos, // V3d_TypeOfOrientation ViewProj
Quantity_NOC_GRAY30, // Quantity_NameOfColor ViewBackground
V3d_ZBUFFER, // V3d_TypeOfVisualization Visualization
V3d_GOURAUD, // V3d_TypeOfShadingModel ShadingModel
V3d_WAIT, // V3d_TypeOfUpdate UpdateMode
Standard_True, // Standard_Boolean ComputedMode
Standard_False); // Standard_Boolean DefaultComputedMode

myAISContext = new AIS_InteractiveContext(myViewer);


Now you have a context and you're ready call Display().

shmsh's picture

Dear Svetlozar Kostadinov

what do you mean by OCAS view and how can we create that ???

and does this mean that we can not use display command before creating OCAS view ???

Thanks in advance


shmsh's picture

also Dear

what header file I need to include ???

and how to declare "myGraphicDevice" , "myViewer" ???