bhimesh Sat, 12/15/2007 - 13:45 Forums: Other usage issueshi 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 Wed, 12/19/2007 - 13: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(). Log in to post comments shmsh Sat, 02/09/2013 - 06: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 Log in to post comments shmsh Sat, 02/09/2013 - 06:21 also Dear what header file I need to include ??? and how to declare "myGraphicDevice" , "myViewer" ??? Regards Log in to post comments
Wed, 12/19/2007 - 13: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().
Sat, 02/09/2013 - 06: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
Sat, 02/09/2013 - 06:21
also Dear
what header file I need to include ???
and how to declare "myGraphicDevice" , "myViewer" ???
Regards