Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

Displaying Shapes in Windows form application (Visual studio 2005)

Displaying Shapes in Windows form application (Visual studio 2005)
bhimesh 2007/12/15 11:45
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..

bhimesh
Svetlozar Kostadinov 2007/12/19 11:08
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);
myViewer->SetDefaultLights();
myViewer->SetLightOn();

myViewer->SetZBufferManagment(Standard_True);

-----
Now you have a context and you're ready call Display().
shmsh 2013/02/09 03:05
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

Regards
shmsh 2013/02/09 03:21
also Dear

what header file I need to include ???

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

Regards
 
 
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map