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

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / Displaying Shapes in Windows form application (Visual studio 2005)

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
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

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