switch to perspective viewSee original GitHub issue
Maybe this is a simple question, but I can’t figure out how to switch
viewer widget from orthographic view to perspective view ?
viewer.py code, python-occ code, but can’t figure it out.
, so I suggest it can be switched to perspective somehow.
Also the question is: how to do this from my .py file with 3d model reference.
Because in console I can access it:
self.viewer Out: <cq_editor.widgets.viewer.OCCViewer at 0x7f1d9cb47b88>
But model .py file is imported as module, so it doesn’t have access to self.
- Created 3 years ago
- Comments:15 (6 by maintainers)
Top GitHub Comments
@adam-urbanczyk , thanks, didn’t notice this, will try to do so.
I’m just always confused with orthographic view - for my eyes it distorts object proportions. So I’m just trying to enable it manually.
And can I access
self.viewer from .py script with my object ?
(to automate switching to perspective view when I press “render” button)
P.S. Updated my progress comment, was able to switch existing widget to perspective view.
To set the view to perspective in the console, it’s: self.viewer._get_view().Camera().SetProjectionType(Graphic3d_Camera.Projection_Perspective) self.viewer._get_view().Redraw()