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

Search the Forums
See All Topics

please I have met the trouble during a week (myView)

please I have met the trouble during a week (myView)
yeon cheol Kang 2011/01/03 08:38
Hi. todays i have many worry about my code. i want to display the point in my code, so i creating a handle_V3d_Viewer. In C**Doc class generator, object of handle_V3d_viewer, myViewer, is initializing. there is no problem. referenced the documents, I read the follow sentences.

To Create 3D graphic objects and display them on the screen, follow the procedure below;

1. Create attribute : i already create, and no problem
2. Create a 3D Viewer : also, i create in my C**Doc class generator
3. Create a 3D View : i can't this procedure

Documents offer the follow example, so i type in my code, which function name is C***View::Create3DView( Handle_V3d_Viewer myViewer) ( I randomly write the function name)

Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice = ((C**App *)AfxGetApp())->GetGraphicDevice();
Handle(WNT_Window) a WNTWindow;
aWNTWindow = new WNT_Window(theGraphicDevice, GetSafeHwnd());
myView = myViewer->CreateView();

The reason why i write a code upper side is follow

myView -> this object declare in the C**view as public, myView class is Handle_V3d_View
myViewer -> this object declare in the C**Doc as public, myViewer class is Handle_V3d_Viewer

when i complied the code, there is no error. but execute this, Access violation in follow senetence


Handle(V3d_View)& operator=(const handle(V3d_View)& aHandle)
return *this;

summary my question,

1. why don't act this code?

2. If i need to initialize the myView, where i do?

3. If someone have a good idea which is related with this problem, i wanna share the idea. if you shear, i please your kind

Happy new year and plz help me

Venugopal Gudimetla 2011/01/03 19:26
Hi yeon cheol,
Did you take a look at the mfc examples?

yeon cheol Kang 2011/01/04 05:51
thanks alot Venugopal. Your proposal is very helpful!!

i solve this problem. solution in the OCC_3dView.cpp.

Create a View at the OnInitialUpdate function of C***View class, i can display the gp_pnt.

Happy New year~ and very thanks
hero 2013/02/10 00:46
Dear yeon cheol Kang
I also got a project on MFC but I'm unable yet to create my 3D_Viewer .

any help would be appreciated

Latest news
  • Open CASCADE CAD Assistant for iOS platform is available!
  • Open CASCADE Technology 6.9.0 is available for download!
  • JT Assistant for Android

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