switch to perspective view
See original GitHub issueHello.
Maybe this is a simple question, but I can’t figure out how to switch viewer
widget from orthographic view to perspective view ?
Looked to viewer.py
code, python-occ code, but can’t figure it out.
Found V3d_ORTHOGRAPHIC
here:
https://www.opencascade.com/doc/occt-6.9.0/refman/html/class_v3d___view.html
, 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[15]: <cq_editor.widgets.viewer.OCCViewer at 0x7f1d9cb47b88>
But model .py file is imported as module, so it doesn’t have access to self.
Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Home View switches to perspective projection in AutoCAD
Switch the projection from Perspective to Parallel. Right-click the Home View icon again. Choose Set Current View as Home.
Read more >Perspective/Orthographic — Blender Manual
To toggle between the two projections for the 3D Viewport, select View ‣ Perspective/Orthographic or use the shortcut Numpad5 . Changing the projection...
Read more >FreeCAD Tutorial - How to switch to perspective view - YouTube
FreeCAD Tutorial - General #7 - How to switch to perspective viewSubscribe to AllVisuals4U!
Read more >The Difference Between Perspective and Orthographic
The Difference Between Perspective and Orthographic - Blender 3.0 Tutorial. Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >Blender How to change from perspective to orthographic view
Your browser can't play this video. Learn more. Switch camera.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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
ofself.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()