2013/9/13 Mark Blome <bl...@zib.de> > Hi Tomas, > > to me it looks like support for this would need to be implemented in > pythonocc/src/wrapper/Visualization/Display3d.cpp > something along the lines of replacing > myV3dView = myV3dViewer->CreateView(); > with > myV3dViewer->DefaultPerspectiveView () ; > myV3dViewer->SetDefaultTypeOfView ( V3d_PERSPECTIVE ) ; > myV3dView = myV3dViewer->CreateView(); > > I tried this and when initializing the display I an see a perspective view > on > the trihedron, however as soon as I display a geometry everythings back to > orthographic projection it seems. I would also like to be able to switch > between > the projection methods. Has anyone successfully done this with PythonOCC ? > > Best regards, > Mark >
Hi Mark, The Display3d.cpp file is definitely the place where the V3d_View/V3d_Viewer are created. This choice has been made a long time ago: I never got a 100% pure python code working for the graphical part and had to code a very small subset directly in C++. You can imagine how bad I feel about it ;) I tested/reproduced the behavior you report. Unfortunately I don't have any idea about the fact that the perspective view is switched back to orthographic after a simple shape is displayed. You can try the SetFocale method in a python script: you'll see that the triedron is moved away, but the shape is not displayed anymore. Best Regards, Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users