Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

switch to perspective view

See 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 ?

Looked to code, python-occ code, but can’t figure it out.

Found V3d_ORTHOGRAPHIC here: , 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:

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.


Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

vlad0337187commented, Jun 23, 2020

@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 of 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.

cybervegancommented, Feb 9, 2022

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()

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found